version 1.2.4.5, 2012/03/20 15:19:17
|
version 1.6, 2013/05/07 20:46:47
|
Line 53 build_romfs()
|
Line 53 build_romfs()
|
install -d lib/geom; |
install -d lib/geom; |
install -d libdata; |
install -d libdata; |
install -d libexec; |
install -d libexec; |
|
install -d local; |
|
install -d local/bin; |
|
install -d local/lib; |
|
install -d local/libexec; |
|
install -d local/libdata; |
|
install -d local/sbin; |
install -d share; |
install -d share; |
install -d share/misc; |
install -d share/misc; |
install -d share/skel; |
install -d share/skel; |
Line 102 install_romfs()
|
Line 108 install_romfs()
|
InstallDir ${WORLD}/usr/local/lib $LIBS |
InstallDir ${WORLD}/usr/local/lib $LIBS |
InstallDir ${WORLD}/usr/local/libdata $LIBDATA |
InstallDir ${WORLD}/usr/local/libdata $LIBDATA |
|
|
|
chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
|
} |
|
|
|
build_image() |
|
{ |
|
echo "+++ Build ELWIX Firmware system image ..." |
|
|
|
cd ${ROMFS_USR} |
|
pax -w -z -v -f${REL}/${ROMFS_IMG} . |
|
cd - |
|
|
|
# Stop using uzip fs |
|
# makefs -ominfree=0,bsize=8192,fsize=1024,optimization=space -s${ROMFS_SIZE} \ |
|
# ${REL}/${ROMFS_IMG} ${ROMFS_USR} |
|
|
|
# MDDEV=$(mdconfig -a -t vnode -f ${REL}/${ROMFS_IMG}); |
|
# tunefs -L elwixFirmware /dev/$MDDEV; |
|
# mdconfig -d -u $MDDEV; |
|
|
|
# mkuzip -s 8192 -o ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG}; |
|
# mv ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG} |
|
} |
|
|
|
build_image2() |
|
{ |
|
echo "+++ Build ELWIX Firmware secondary image ..." |
|
|
|
cd ${ROMFS_USR2} |
|
pax -w -z -v -f${REL}/${ROMFS_IMG2} . |
|
cd - |
|
|
|
# Stop using uzip fs |
|
# makefs -ominfree=0,bsize=8192,fsize=1024,optimization=space -s${ROMFS_SIZE2} \ |
|
# ${REL}/${ROMFS_IMG2} ${ROMFS_USR2} |
|
|
|
# MDDEV=$(mdconfig -a -t vnode -f ${REL}/${ROMFS_IMG2}); |
|
# tunefs -L elwixFirmware2 /dev/$MDDEV; |
|
# mdconfig -d -u $MDDEV; |
|
|
|
# mkuzip -s 8192 -o ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2}; |
|
# mv ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2} |
|
} |
|
|
|
install_romfs2() |
|
{ |
|
LIBS="${ROMFS_USR2}/lib" |
|
LIBEXEC="${ROMFS_USR2}/libexec" |
|
LIBDATA="${ROMFS_USR2}/libdata" |
|
BIN="${ROMFS_USR2}/bin" |
|
SBIN="${ROMFS_USR2}/sbin" |
|
|
|
echo "+++ Install ELWIX RomFS secondary software ..." |
|
|
|
install -d ${PKGDIR}/bin |
# InstallDir ${PKGDIR}/bin $BIN |
# InstallDir ${PKGDIR}/bin $BIN |
|
install -d ${PKGDIR}/sbin |
InstallDir ${PKGDIR}/sbin $SBIN |
InstallDir ${PKGDIR}/sbin $SBIN |
|
|
|
StripFiles \*.so\* ${PKG}/lib |
InstallFiles \*.so\* ${PKG}/lib $LIBS |
InstallFiles \*.so\* ${PKG}/lib $LIBS |
|
StripFiles \* ${PKG}/libexec |
InstallFiles \* ${PKG}/libexec $LIBEXEC |
InstallFiles \* ${PKG}/libexec $LIBEXEC |
|
StripFiles \* ${PKG}/libdata |
InstallFiles \* ${PKG}/libdata $LIBDATA |
InstallFiles \* ${PKG}/libdata $LIBDATA |
|
StripFiles \* ${PKG}/bin |
InstallFiles \* ${PKG}/bin $BIN |
InstallFiles \* ${PKG}/bin $BIN |
|
StripFiles \* ${PKG}/sbin |
InstallFiles \* ${PKG}/sbin $SBIN |
InstallFiles \* ${PKG}/sbin $SBIN |
|
|
chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
} |
} |
|
|
build_image() |
|
{ |
|
echo "+++ Build ELWIX Firmware image ..." |
|
makefs -ominfree=0,bsize=8192,fsize=1024,optimization=space -s${ROMFS_SIZE} \ |
|
${REL}/${ROMFS_IMG} ${ROMFS_USR} |
|
|
|
MDDEV=$(mdconfig -a -t vnode -f ${REL}/${ROMFS_IMG}); |
|
tunefs -L elwixFirmware /dev/$MDDEV; |
|
# mount /dev/$MDDEV /mnt |
|
# umount /mnt |
|
mdconfig -d -u $MDDEV; |
|
|
|
mkuzip -s 8192 -o ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG}; |
|
mv ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG} |
|
} |
|
|
|
### main() |
### main() |
if SnitVer ${WORLD}/elwix.ver; then | clean_romfs |
clean_romfs | build_romfs |
|
|
build_romfs | install_romfs |
install_romfs | build_image |
|
|
build_image | install_romfs2 |
else | build_image2 |
echo "Skipped ELWIX RomFS build ..." | |
fi | |
|
|
echo "+++ Complete build ELWIX RomFS" |
echo "+++ Complete build ELWIX RomFS" |