version 1.2, 2011/10/18 09:02:05
|
version 1.7.6.2, 2014/06/30 20:50:57
|
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; |
install -d share/zoneinfo; |
install -d share/zoneinfo; |
|
|
ln -s /elwix/local local; | ln -s /elwix/pkg pkg; |
|
|
chown -hR root:wheel . |
chown -hR root:wheel . |
cd - |
cd - |
Line 69 install_romfs()
|
Line 75 install_romfs()
|
LIBS="${ROMFS_USR}/lib" |
LIBS="${ROMFS_USR}/lib" |
LIBEXEC="${ROMFS_USR}/libexec" |
LIBEXEC="${ROMFS_USR}/libexec" |
LIBDATA="${ROMFS_USR}/libdata" |
LIBDATA="${ROMFS_USR}/libdata" |
SKEL="${ROMFS_USR}/share/skel" |
|
MISC="${ROMFS_USR}/share/misc" |
|
BIN="${ROMFS_USR}/bin" |
BIN="${ROMFS_USR}/bin" |
SBIN="${ROMFS_USR}/sbin" |
SBIN="${ROMFS_USR}/sbin" |
|
SHARE="${ROMFS_USR}/share" |
|
SKEL="${SHARE}/skel" |
|
MISC="${SHARE}/misc" |
|
|
echo "+++ Install ELWIX RomFS software ..." |
echo "+++ Install ELWIX RomFS software ..." |
if [ -r ${BSDSRC}/release/picobsd/mfs_tree/etc/termcap ]; then |
if [ -r ${BSDSRC}/release/picobsd/mfs_tree/etc/termcap ]; then |
Line 83 install_romfs()
|
Line 90 install_romfs()
|
install -v -m 644 ${BSDSRC}/etc/services $MISC; |
install -v -m 644 ${BSDSRC}/etc/services $MISC; |
fi |
fi |
|
|
install -v -m 0555 ${WORLD}/libexec/ld-elf.so.1 $LIBEXEC |
|
|
|
install -v ${CFGDIR}/root.skel/cshrc $SKEL/dot.cshrc; |
install -v ${CFGDIR}/root.skel/cshrc $SKEL/dot.cshrc; |
install -v ${CFGDIR}/root.skel/login $SKEL/dot.login; |
install -v ${CFGDIR}/root.skel/login $SKEL/dot.login; |
install -v ${CFGDIR}/root.skel/logout $SKEL/dot.logout; |
install -v ${CFGDIR}/root.skel/logout $SKEL/dot.logout; |
Line 100 install_romfs()
|
Line 105 install_romfs()
|
|
|
InstallDir ${WORLD}/usr/local/bin $BIN |
InstallDir ${WORLD}/usr/local/bin $BIN |
InstallDir ${WORLD}/usr/local/sbin $SBIN |
InstallDir ${WORLD}/usr/local/sbin $SBIN |
|
InstallDir ${WORLD}/usr/local/lib $LIBS |
InstallDir ${WORLD}/usr/local/libdata $LIBDATA |
InstallDir ${WORLD}/usr/local/libdata $LIBDATA |
|
|
InstallFiles \*.so\* ${PKG}/lib $LIBS |
|
InstallFiles \* ${PKG}/libexec $LIBEXEC |
|
InstallFiles \* ${PKG}/libdata $LIBDATA |
|
InstallFiles \* ${PKG}/bin $BIN |
|
InstallFiles \* ${PKG}/sbin $SBIN |
|
|
|
chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
} |
} |
|
|
build_image() |
build_image() |
{ |
{ |
echo "+++ Build ELWIX Firmware image ..." | echo "+++ Build ELWIX Firmware system 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}); | cd ${ROMFS_USR} |
tunefs -L elwixFirmware /dev/$MDDEV; | pax -w -z -v -f${REL}/${ROMFS_IMG} . |
# mount /dev/$MDDEV /mnt | cd - |
# umount /mnt | |
mdconfig -d -u $MDDEV; | |
|
|
mkuzip -s 8192 -o ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG}; | # Stop using uzip fs |
mv ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG} | # 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} |
} |
} |
|
|
### main() |
### main() |
if SnitVer ${WORLD}/elwix.ver; then | clean_romfs || exit 1 |
clean_romfs | build_romfs || exit 1 |
|
|
build_romfs | install_romfs || exit 1 |
install_romfs | build_image || exit 1 |
| |
build_image | |
else | |
echo "Skipped ELWIX RomFS build ..." | |
fi | |
|
|
echo "+++ Complete build ELWIX RomFS" |
echo "+++ Complete build ELWIX RomFS" |