version 1.6.2.2, 2013/07/29 08:52:16
|
version 1.7.6.1, 2014/02/25 22:49:30
|
Line 43 clean_romfs()
|
Line 43 clean_romfs()
|
build_romfs() |
build_romfs() |
{ |
{ |
echo "+++ Build ELWIX RomFS directory ..." |
echo "+++ Build ELWIX RomFS directory ..." |
mkdir -p $ROMFS | mkdir -p $ROMFS_USR |
|
|
cd $ROMFS | cd $ROMFS_USR |
|
|
install -d bin; |
install -d bin; |
install -d boot; |
|
install -d boot/defaults; |
|
install -d boot/firmware; |
|
install -d boot/kernel; |
|
install -d boot/modules; |
|
install -d boot/zfs; |
|
install -d dev; |
|
install -d elwix; |
|
install -d elwix/etc; |
|
install -d elwix/exports; |
|
install -d elwix/home; |
|
install -d -m 0750 elwix/root; |
|
install -d -m 0750 elwix/root/.ssh; |
|
install -d elwix/system; |
|
install -d elwix/tftpboot; |
|
install -d elwix/var; |
|
ln -fs /elwix/etc etc; |
|
ln -fs /elwix/exports exports; |
|
ln -fs /elwix/home home; |
|
ln -fs /elwix/root root; |
|
ln -fs /elwix/system system; |
|
ln -fs /elwix/tftpboot tftpboot; |
|
install -d mnt; |
|
install -d -m 0555 proc; |
|
install -d sbin; |
install -d sbin; |
install -d -m 1777 tmp; | install -d lib; |
install -d usr; | install -d lib/geom; |
install -d usr/bin; | install -d libdata; |
install -d usr/lib; | install -d libexec; |
ln -fs /usr/lib lib; | install -d libexec/casper; |
install -d usr/lib/engines; | install -d local; |
install -d usr/lib/geom; | install -d local/bin; |
install -d usr/lib32; | install -d local/lib; |
install -d usr/libdata; | install -d local/libexec; |
install -d usr/libexec; | install -d local/libdata; |
ln -fs /usr/libexec libexec; | install -d local/sbin; |
install -d usr/local; | install -d share; |
install -d usr/local/bin; | install -d share/misc; |
install -d usr/local/lib; | install -d share/skel; |
install -d usr/local/libexec; | install -d share/zoneinfo; |
install -d usr/local/libdata; | |
install -d usr/local/sbin; | |
install -d usr/sbin; | |
install -d usr/share; | |
install -d usr/share/misc; | |
install -d usr/share/skel; | |
install -d usr/share/zoneinfo; | |
install -d var; | |
|
|
|
ln -s /elwix/pkg pkg; |
|
|
chown -hR root:wheel . |
chown -hR root:wheel . |
cd - |
cd - |
} |
} |
|
|
install_romfs() |
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" |
BIN="${ROMFS}/bin" | BIN="${ROMFS_USR}/bin" |
UBIN="${ROMFS}/usr/bin" | SBIN="${ROMFS_USR}/sbin" |
SBIN="${ROMFS}/sbin" | SHARE="${ROMFS_USR}/share" |
USBIN="${ROMFS}/usr/sbin" | |
SHARE="${ROMFS}/usr/share" | |
SKEL="${SHARE}/skel" |
SKEL="${SHARE}/skel" |
MISC="${SHARE}/misc" |
MISC="${SHARE}/misc" |
|
|
Line 133 install_romfs()
|
Line 101 install_romfs()
|
find ${WORLD}/lib -type f -name libalias_\*.so -exec install {} $LIBS \; |
find ${WORLD}/lib -type f -name libalias_\*.so -exec install {} $LIBS \; |
find ${WORLD}/lib/geom -type f -name \*.so -exec install {} $LIBS/geom \; |
find ${WORLD}/lib/geom -type f -name \*.so -exec install {} $LIBS/geom \; |
find ${WORLD}/usr/lib -type f -name \*.so.\* -exec install {} $LIBS \; |
find ${WORLD}/usr/lib -type f -name \*.so.\* -exec install {} $LIBS \; |
find ${WORLD}/usr/lib/engines -type f -name \*.so -exec install {} $LIBS/engines \; |
|
|
|
InstallList ${ELWIX_ROMFS} ${WORLD} ${ROMFS} |
InstallList ${ELWIX_ROMFS} ${WORLD} ${ROMFS} |
|
|
InstallDir ${WORLD}/usr/local/bin $UBIN | InstallDir ${WORLD}/usr/local/bin $BIN |
InstallDir ${WORLD}/usr/local/sbin $USBIN | InstallDir ${WORLD}/usr/local/sbin $SBIN |
InstallFiles \*.so\* ${WORLD}/usr/local/lib $LIBS | InstallDir ${WORLD}/usr/local/lib $LIBS |
InstallDir ${WORLD}/usr/local/libdata $LIBDATA |
InstallDir ${WORLD}/usr/local/libdata $LIBDATA |
|
InstallDir ${WORLD}/libexec/casper $LIBEXEC/casper |
|
|
chown -R root:wheel $SBIN $BIN $USBIN $UBIN $LIBDATA $LIBEXEC $LIBS | chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
} |
} |
|
|
build_image2() | build_image() |
{ |
{ |
echo "+++ Build ELWIX Firmware secondary image ..." | echo "+++ Build ELWIX Firmware system image ..." |
|
|
cd ${ROMFS_USR2} | cd ${ROMFS_USR} |
pax -w -z -v -f${REL}/${ROMFS_IMG2} . | pax -w -z -v -f${REL}/${ROMFS_IMG} . |
cd - |
cd - |
|
|
# Stop using uzip fs |
# Stop using uzip fs |
# makefs -ominfree=0,bsize=8192,fsize=1024,optimization=space -s${ROMFS_SIZE2} \ | # makefs -ominfree=0,bsize=8192,fsize=1024,optimization=space -s${ROMFS_SIZE} \ |
# ${REL}/${ROMFS_IMG2} ${ROMFS_USR2} | # ${REL}/${ROMFS_IMG} ${ROMFS_USR} |
|
|
# MDDEV=$(mdconfig -a -t vnode -f ${REL}/${ROMFS_IMG2}); | # MDDEV=$(mdconfig -a -t vnode -f ${REL}/${ROMFS_IMG}); |
# tunefs -L elwixFirmware2 /dev/$MDDEV; | # tunefs -L elwixFirmware /dev/$MDDEV; |
# mdconfig -d -u $MDDEV; |
# mdconfig -d -u $MDDEV; |
|
|
# mkuzip -s 8192 -o ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2}; | # mkuzip -s 8192 -o ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG}; |
# mv ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2} | # mv ${REL}/${ROMFS_IMG}.uzip ${REL}/${ROMFS_IMG} |
} |
} |
|
|
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 |
|
install -d ${PKGDIR}/sbin |
|
InstallDir ${PKGDIR}/sbin $SBIN |
|
|
|
StripFiles \*.so\* ${PKG}/lib |
|
InstallFiles \*.so\* ${PKG}/lib $LIBS |
|
StripFiles \* ${PKG}/libexec |
|
InstallFiles \* ${PKG}/libexec $LIBEXEC |
|
StripFiles \* ${PKG}/libdata |
|
InstallFiles \* ${PKG}/libdata $LIBDATA |
|
StripFiles \* ${PKG}/bin |
|
InstallFiles \* ${PKG}/bin $BIN |
|
StripFiles \* ${PKG}/sbin |
|
InstallFiles \* ${PKG}/sbin $SBIN |
|
|
|
chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
|
} |
|
|
|
### main() |
### main() |
clean_romfs |
clean_romfs |
build_romfs |
build_romfs |
|
|
install_romfs |
install_romfs |
| build_image |
install_romfs2 | |
build_image2 | |
|
|
echo "+++ Complete build ELWIX RomFS" |
echo "+++ Complete build ELWIX RomFS" |