version 1.9.2.1, 2016/11/14 00:21:35
|
version 1.9.2.2, 2016/11/21 17:25:33
|
Line 40 X_TARGET_CPUTYPE="TARGET_CPUTYPE=${TARGET_CPUTYPE}"
|
Line 40 X_TARGET_CPUTYPE="TARGET_CPUTYPE=${TARGET_CPUTYPE}"
|
|
|
clean_elwix() |
clean_elwix() |
{ |
{ |
echo "+++ Clean elwix binary from ELWIX World ..." | echo "+++ Clean elwix binary from ELWIX World ... $BSDOBJ/elwix" |
rm -rf $BSDOBJ/elwix |
rm -rf $BSDOBJ/elwix |
|
|
echo "+++ Clean ELWIX RootFS firmware ..." | echo "+++ Clean ELWIX RootFS firmware ... $ROOTFS_MKDIR" |
rm -rf $ROOTFS_MKDIR |
rm -rf $ROOTFS_MKDIR |
mkdir $ROOTFS_MKDIR |
mkdir $ROOTFS_MKDIR |
|
|
echo "+++ Clean RootFS directory ..." | echo "+++ Clean RootFS directory ... $ROOTFS" |
chflags -R noschg $ROOTFS |
chflags -R noschg $ROOTFS |
rm -rf $ROOTFS |
rm -rf $ROOTFS |
mkdir $ROOTFS |
mkdir $ROOTFS |
Line 58 clean_elwix()
|
Line 58 clean_elwix()
|
|
|
prepare_elwix() |
prepare_elwix() |
{ |
{ |
echo "+++ Prepair ELWIX RootFS firmware ..." | echo "+++ Prepair ELWIX RootFS firmware ... $ROOTFS_MKDIR" |
cd $ROOTFS_MKDIR |
cd $ROOTFS_MKDIR |
cat >$MKH <<_EOF |
cat >$MKH <<_EOF |
# Auto-generated Makefile include for crungegen |
# Auto-generated Makefile include for crungegen |
Line 79 buildopts -DNO_PAM -DNO_KERBEROS WITHOUT_PAM_SUPPORT=y
|
Line 79 buildopts -DNO_PAM -DNO_KERBEROS WITHOUT_PAM_SUPPORT=y
|
buildopts -DMK_CASPER=no WITHOUT_CASPER=yes |
buildopts -DMK_CASPER=no WITHOUT_CASPER=yes |
_EOF |
_EOF |
cat $CFGDIR/$ROOTFS_CONF >>$ROOTFS_CONF |
cat $CFGDIR/$ROOTFS_CONF >>$ROOTFS_CONF |
|
echo "+++ Prepared RootFS config ... $CFGDIR/$ROOTFS_CONF" |
|
|
install -d ${BSDOBJ}/elwix |
install -d ${BSDOBJ}/elwix |
env MAKEOBJDIRPREFIX=${BSDOBJ}/elwix crunchgen -f \ |
env MAKEOBJDIRPREFIX=${BSDOBJ}/elwix crunchgen -f \ |
Line 92 _EOF
|
Line 93 _EOF
|
|
|
build_elwix() |
build_elwix() |
{ |
{ |
echo "+++ Build ELWIX RootFS firmware ..." | echo "+++ Build ELWIX RootFS firmware ... $ROOTFS_MKDIR" |
cd $ROOTFS_MKDIR |
cd $ROOTFS_MKDIR |
env MAKEOBJDIRPREFIX=${BSDOBJ}/elwix make -f $MKF \ |
env MAKEOBJDIRPREFIX=${BSDOBJ}/elwix make -f $MKF \ |
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ |
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ |
Line 108 build_elwix()
|
Line 109 build_elwix()
|
|
|
build_rootdir() |
build_rootdir() |
{ |
{ |
echo "+++ Build RootFS directory ..." | echo "+++ Build RootFS directory ... $ROOTFS" |
cd $ROOTFS |
cd $ROOTFS |
|
|
install -d bin; |
install -d bin; |
Line 150 install_rootfs()
|
Line 151 install_rootfs()
|
PRG="/sbin/elwix" |
PRG="/sbin/elwix" |
LNPRG="${SBIN}/elwix" |
LNPRG="${SBIN}/elwix" |
|
|
echo "+++ Install ELWIX into RootFS directory ..." | echo "+++ Install ELWIX into RootFS directory ... $ROOTFS" |
install $ROOTFS_MKDIR/elwix $SBIN |
install $ROOTFS_MKDIR/elwix $SBIN |
|
|
InstallList ${ELWIX_ROOTFS} ${WORLD} ${ROOTFS} |
InstallList ${ELWIX_ROOTFS} ${WORLD} ${ROOTFS} |
Line 384 install_rootfs()
|
Line 385 install_rootfs()
|
|
|
build_image() |
build_image() |
{ |
{ |
echo "+++ Build ELWIX RootFS image ..." | echo "+++ Build ELWIX RootFS image ... $ROOTFS --> $REL/$ROOTFS_IMG" |
makefs -s ${ROOTFS_SIZE} -o minfree=0 $REL/$ROOTFS_IMG $ROOTFS |
makefs -s ${ROOTFS_SIZE} -o minfree=0 $REL/$ROOTFS_IMG $ROOTFS |
|
echo "+++ Completed ELWIX RootFS image ... $ROOTFS --> $REL/$ROOTFS_IMG" |
} |
} |
|
|
install_image() |
install_image() |
{ |
{ |
echo "+++ Install ELWIX RootFS Image into kernel ..." | echo "+++ Install ELWIX RootFS Image into kernel ... $REL/$ROOTFS_IMG" |
mfs_size=`stat -f '%z' $REL/$ROOTFS_IMG 2>/dev/null` |
mfs_size=`stat -f '%z' $REL/$ROOTFS_IMG 2>/dev/null` |
[ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1 |
[ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1 |
|
|
Line 405 install_image()
|
Line 407 install_image()
|
|
|
cp $KERNEL_ROOTFS $NEWKERN |
cp $KERNEL_ROOTFS $NEWKERN |
dd if=$REL/$ROOTFS_IMG ibs=8192 of=$NEWKERN obs=${sec_start} oseek=1 conv=notrunc \ |
dd if=$REL/$ROOTFS_IMG ibs=8192 of=$NEWKERN obs=${sec_start} oseek=1 conv=notrunc \ |
2>/dev/null && echo "MFS image embedded into kernel" | 2>/dev/null && echo "'-> Completed MFS image embedded into kernel" |
|
|
# START=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | head -1` |
# START=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | head -1` |
# STOP=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | tail -1` |
# STOP=`strings -td $KERNEL_ROOTFS | grep "MFS Filesystem" | cut -d ' ' -f 1 | tail -1` |
Line 420 install_image()
|
Line 422 install_image()
|
cd $REL |
cd $REL |
gzip -9 $KRNNAME |
gzip -9 $KRNNAME |
cd - |
cd - |
|
|
|
echo "+++ Completed ELWIX RootFS kernel ... $NEWKERN.gz" |
} |
} |
|
|
### main() |
### main() |