ad378bafcd976eccc4c66742ed06141cc3ac755d
3 SCRIPTDIR
="$(dirname "$0")"
4 [ "${SCRIPTDIR:0:1}" = "/" ] || SCRIPTDIR
="$PWD/$SCRIPTDIR"
5 BASEDIR
="$SCRIPTDIR/.."
7 DIR
="$BASEDIR/tmp/deptest"
8 STAMP_DIR_SUCCESS
="$DIR/stamp-success"
9 STAMP_DIR_FAILED
="$DIR/stamp-failed"
10 BUILD_DIR
="$DIR/build_dir/target"
11 BUILD_DIR_HOST
="$DIR/build_dir/host"
12 STAGING_DIR
="$DIR/staging_dir"
13 STAGING_DIR_HOST
="$DIR/staging_dir_host"
14 STAGING_DIR_HOST_TMPL
="$DIR/staging_dir_host_tmpl"
23 [ -f "$BASEDIR/include/toplevel.mk" ] || \
24 die
"Error: Could not find buildsystem base directory"
25 cd "$BASEDIR" || die
"Failed to enter base directory"
27 mkdir
-p "$STAMP_DIR_SUCCESS" "$STAMP_DIR_FAILED" "$BUILD_DIR" "$BUILD_DIR_HOST" "$LOG_DIR"
29 [ -d "$STAGING_DIR_HOST_TMPL" ] ||
{
30 rm -rf staging_dir
/host
31 make tools
/install V
=99 || die
"make tools/install failed, please check"
32 cp -al staging_dir
/host "$STAGING_DIR_HOST_TMPL"
33 make toolchain
/install V
=99 || die
"make toolchain/install failed, please check"
34 make target
/linux
/install V
=99 || die
"make target/linux/install failed, please check"
37 for pkg
in `cat tmp/.packagedeps | grep CONFIG_PACKAGE | grep -v curdir | sed -e 's,.*[/=]\s*,,' | sort -u`; do
39 for conf
in `grep CONFIG_PACKAGE tmp/.packagedeps | grep -E "[ /]$pkg\$" | sed -e 's,package-$(\(CONFIG_PACKAGE_.*\)).*,\1,'`; do
40 grep "$conf=" .config
> /dev
/null
&& SELECTED
=1
42 STAMP_SUCCESS
="$STAMP_DIR_SUCCESS/$pkg"
43 STAMP_FAILED
="$STAMP_DIR_FAILED/$pkg"
45 [ -f "$STAMP_SUCCESS" ] && continue
46 [ -n "$SELECTED" ] ||
{
47 echo "Package $pkg is not selected"
50 echo "Testing package $pkg..."
52 mkdir
-p "$STAGING_DIR"
53 rm -rf "$STAGING_DIR_HOST"
54 cp -al "$STAGING_DIR_HOST_TMPL" "$STAGING_DIR_HOST"
55 make package
/$pkg/compile \
56 BUILD_DIR
="$BUILD_DIR" \
57 BUILD_DIR_HOST
="$BUILD_DIR_HOST" \
58 STAGING_DIR
="$STAGING_DIR" \
59 STAGING_DIR_HOST
="$STAGING_DIR_HOST" \
60 V
=99 >"$LOG_DIR/$(basename $pkg).log" 2>&1
62 touch "$STAMP_SUCCESS"
65 echo "Building package $pkg failed!"
This page took 0.045605 seconds and 3 git commands to generate.