--- elwix/build_fs.sh 2012/11/22 15:02:59 1.4.2.1 +++ elwix/build_fs.sh 2013/01/27 23:20:15 1.4.2.2 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: build_fs.sh,v 1.4.2.1 2012/11/22 15:02:59 misho Exp $ +# $Id: build_fs.sh,v 1.4.2.2 2013/01/27 23:20:15 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -33,10 +33,10 @@ fi clean_fsdir() { echo "+++ Clean ELWIX FS ..." - rm -rf ${FS} ${FS_LITE} + rm -rf ${FS} ${FS_LITE} ${FS_LITE128} echo "+++ Clean ELWIX FS release ..." - rm -rf ${REL}/${OS} ${REL}/${OS_LITE} + rm -rf ${REL}/${OS} ${REL}/${OS_LITE} ${REL}/${OS_LITE128} } build_fsdir() @@ -249,25 +249,47 @@ install_fsdir() install -v ${REL}/${ROOTFS_KERN} $1/boot/kernel - if [ -z "$2" ]; then - install -v ${REL}/${ROMFS_IMG} $1/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} - ln $1/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} $1/altroot/${ROMFS_IMG} - ln -s /elwix/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} $1/${ROMFS_IMG} + case "$2" in + _[Ll][Ii][Tt][Ee]_128) + install -d $1/usr + cd $1/usr + pax -r -z -pe -f ${REL}/${ROMFS_IMG} + cd - - install -v ${REL}/${ROMFS_IMG2} $1/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} - ln $1/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} $1/altroot/${ROMFS_IMG2} - ln -s /elwix/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} $1/${ROMFS_IMG2} + install -d $1/usr/local + cd $1/usr/local + pax -r -z -pe -f ${REL}/${ROMFS_IMG2} + cd - - OSZ=${REL}/${OS} - else - install -d $1/usr - cd $1/usr - pax -r -z -pe -f ${REL}/${ROMFS_IMG} - cd - + OSZ=${REL}/${OS_LITE128} + ;; + _[Ll][Ii][Tt][Ee]) + install -d $1/usr + cd $1/usr + pax -r -z -pe -f ${REL}/${ROMFS_IMG} + cd - - OSZ=${REL}/${OS_LITE} - fi + OSZ=${REL}/${OS_LITE} + ;; + *) + install -v ${REL}/${ROMFS_IMG} \ + $1/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} + ln $1/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} \ + $1/altroot/${ROMFS_IMG} + ln -s /elwix/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} \ + $1/${ROMFS_IMG} + install -v ${REL}/${ROMFS_IMG2} \ + $1/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} + ln $1/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} \ + $1/altroot/${ROMFS_IMG2} + ln -s /elwix/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} \ + $1/${ROMFS_IMG2} + + OSZ=${REL}/${OS} + ;; + esac + cd $1 tar -czvf $OSZ . } @@ -286,24 +308,31 @@ clean_fsdir build_fsdir ${FS} build_fsdir ${FS_LITE} +build_fsdir ${FS_LITE128} mkboot ${FS} mkboot ${FS_LITE} +mkboot ${FS_LITE128} mkhome ${FS} mkhome ${FS_LITE} +mkhome ${FS_LITE128} mkvar ${FS} mkvar ${FS_LITE} +mkvar ${FS_LITE128} mketc ${FS} mketc ${FS_LITE} "_lite" +mketc ${FS_LITE128} "_lite_128" mkbackup ${FS} mkbackup ${FS_LITE} +mkbackup ${FS_LITE128} install_fsdir ${FS} install_fsdir ${FS_LITE} "_lite" +install_fsdir ${FS_LITE128} "_lite_128" echo "+++ Complete build ELWIX FS" echo "ELWIX finish version ${VERSION}, Good luck!"