Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 74 lines (61 sloc) 2.124 kb
#!/bin/sh
. config/options
if [ ! -r build/config/options ]; then
echo "Cannot find a valid config (build/config/options is missing!)"
echo "Maybe you forgot to run 'make menuconfig' ?"
exit 1
fi
$SCRIPTS/checkdeps build || exit 1
export INSTALL=$ROOTFS
mkdir -p $INSTALL
# bootstrap the build environment
$SCRIPTS/build opkg-utils
$SCRIPTS/build opkg-host
$SCRIPTS/install base-files
$SCRIPTS/installdev opkg-utils
$SCRIPTS/installdev opkg-host
# remove stale packages
for f in $INSTALL/var/lib/opkg/info/*.control ; do
package=`basename $f .control`
drop_package=yes
for rootfs_package in $ROOTFS_PACKAGES; do
[ "$package" != "$rootfs_package" ] && continue
# the package is in $ROOTFS_PACKAGES, keep it
drop_package=no
# echo "$package : drop : $drop_package"
break
done
if [ "$drop_package" = yes ] || [ $PACKAGES/$package/unpack -nt $f -o $PACKAGES/$package/patches -nt $f ] || [ $PACKAGES/$package/build -nt $f ] || [ $PACKAGES/$package/install -nt $f ] || [ $PACKAGES/$package/meta -nt $f ]; then
# echo "$package : drop : $drop_package"
$SCRIPTS/uninstall $package
fi
done
for rootfs_package in $ROOTFS_PACKAGES; do
[ "$rootfs_package" = linux ] && DEPMOD=yes
install_package=yes
for f in $INSTALL/var/lib/opkg/info/*.control ; do
package=`basename $f .control`
[ "$rootfs_package" != "$package" ] && continue
# the package is already installed, skip it
install_package=no
break
done
[ "$install_package" = yes ] && $SCRIPTS/install $rootfs_package
done
for package in $OPK_PACKAGES; do
$SCRIPTS/package $package
done
# create kernel modules dependancies
if [ "$DEPMOD" = yes ]; then
$SCRIPTS/installdev kmod-host
VER=$(kernel_version)
rm -f $INSTALL/lib/modules/$VER/modules.*
$ROOT/$TOOLCHAIN/bin/depmod -b $INSTALL -v $VER > /dev/null
for i in `ls $INSTALL/lib/modules/$VER/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do
rm -f $i
done
fi
# save build config
DOT_CONFIG="`ls -d $ROOT/$BUILD_NOARCH/kconfig-frontends-*`/.config"
cp -P $DOT_CONFIG $INSTALL/config
exit 0
Jump to Line
Something went wrong with that request. Please try again.