version 1.1, 2011/07/05 23:43:00
|
version 1.10.2.1, 2021/03/25 18:17:05
|
Line 32 fi
|
Line 32 fi
|
|
|
clean_romfs() |
clean_romfs() |
{ |
{ |
echo "+++ Clean ELWIX RomFS firmware ..." | echo "+++ Clean ELWIX RomFS firmware ... $ROMFS" |
chflags -Rf noschg $ROMFS |
chflags -Rf noschg $ROMFS |
rm -rf $ROMFS |
rm -rf $ROMFS |
|
|
Line 42 clean_romfs()
|
Line 42 clean_romfs()
|
|
|
build_romfs() |
build_romfs() |
{ |
{ |
echo "+++ Build ELWIX RomFS directory ..." | echo "+++ Build ELWIX RomFS directory ... $ROMFS_USR" |
mkdir -p $ROMFS_USR |
mkdir -p $ROMFS_USR |
|
|
cd $ROMFS_USR |
cd $ROMFS_USR |
Line 54 build_romfs()
|
Line 54 build_romfs()
|
install -d libdata; |
install -d libdata; |
install -d libexec; |
install -d libexec; |
install -d share; |
install -d share; |
|
install -d share/keys; |
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/local local; |
|
ln -s /elwix/pkg pkg; |
|
|
|
# special patch to ensuring properly working of passwd!!! |
|
ln -s /sbin/pwd_mkdb sbin; |
|
# special patch to ensuring properly working of atrun!!! |
|
ln -s /usr/pkg/sbin/mini_sendmail sbin/sendmail; |
|
|
chown -hR root:wheel . |
chown -hR root:wheel . |
cd - |
cd - |
} |
} |
Line 68 install_romfs()
|
Line 75 install_romfs()
|
{ |
{ |
LIBS="${ROMFS_USR}/lib" |
LIBS="${ROMFS_USR}/lib" |
LIBEXEC="${ROMFS_USR}/libexec" |
LIBEXEC="${ROMFS_USR}/libexec" |
SKEL="${ROMFS_USR}/share/skel" | LIBDATA="${ROMFS_USR}/libdata" |
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 ... $ROMFS_USR" |
if [ -r ${BSDSRC}/release/picobsd/mfs_tree/etc/termcap ]; then | if [ -r files/etc/termcap ]; then |
install -v -m 644 ${BSDSRC}/release/picobsd/mfs_tree/etc/termcap $MISC; | install -v -m 644 files/etc/termcap $MISC; |
install -v -m 644 ${BSDSRC}/release/picobsd/mfs_tree/etc/services $MISC; | install -v -m 644 files/etc/services $MISC; |
else |
else |
install -v -m 644 ${BSDSRC}/etc/termcap.small $MISC/termcap; |
install -v -m 644 ${BSDSRC}/etc/termcap.small $MISC/termcap; |
install -v -m 644 ${BSDSRC}/etc/services $MISC; |
install -v -m 644 ${BSDSRC}/etc/services $MISC; |
fi |
fi |
|
|
install -v -m 0555 /libexec/ld-elf.so.1 ${ROMFS_USR}/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; |
install -v ${CFGDIR}/root.skel/profile $SKEL/dot.profile; |
install -v ${CFGDIR}/root.skel/profile $SKEL/dot.profile; |
install -v ${CFGDIR}/root.skel/vimrc $SKEL/dot.vimrc; |
install -v ${CFGDIR}/root.skel/vimrc $SKEL/dot.vimrc; |
|
|
find ${WORLD}/lib -type f -name \*.so.\* -exec install {} $LIBS \; | find ${WORLD}/lib -type f -name \*.so.\* ! -name \*.debug -exec install {} $LIBS \; |
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.\* ! -name \*.debug -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} |
|
|
InstallProg ${ELWIX_LIB_AITIO} $LIBS; | InstallDir ${WORLD}/usr/local/bin $BIN |
InstallProg ${ELWIX_LIB_AITCRC} $LIBS; | InstallDir ${WORLD}/usr/local/sbin $SBIN |
InstallProg ${ELWIX_LIB_AITCFG} $LIBS; | InstallDir ${WORLD}/usr/local/lib $LIBS |
InstallProg ${ELWIX_LIB_AITSESS} $LIBS; | InstallDir ${WORLD}/usr/local/libdata $LIBDATA |
InstallProg ${ELWIX_LIB_AITRPC} $LIBS; | |
InstallProg ${ELWIX_LIB_AITPELCO} $LIBS; | |
InstallProg ${ELWIX_LIB_AITPWD} $LIBS; | |
InstallProg ${ELWIX_LIB_AITSYNC} $LIBS; | |
InstallProg ${ELWIX_LIB_AITCLI} $LIBS; | |
|
|
InstallProg ${AXL_LIB} $LIBS; | chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
InstallProg ${AXL_LIB_NS} $LIBS; | echo "+++ Completed ELWIX RomFS software ... $ROMFS_USR" |
InstallProg ${AXL_LIB_BABEL} $LIBS; | |
| |
# find $PKG/elwix_tools/bin -type f -perm +111 -exec install -v {} $BIN \; | |
# find $PKG/elwix_tools/sbin -type f -perm +111 -exec install -v {} $SBIN \; | |
| |
# content of OS from 3th party software | |
# echo "+++ Install elwix additional programes ..." | |
# install -v -m 0111 $PKG/sudo/sudoreplay $BIN; | |
# install -v -o root -g wheel -m 4111 $PKG/sudo/sudo $BIN; | |
# ln -f $BIN/sudo $BIN/sudoedit; | |
# install -v -m 0111 $PKG/sudo/visudo $SBIN; | |
# install -v $PKG/sudo/.libs/libsudo_noexec.so $LIBS; | |
# | |
# install -v $PKG/ttcp/ttcp $BIN; | |
# install -v $PKG/ntpd/ntpd $SBIN; | |
# install -v $PKG/choparp/choparp $SBIN; | |
# install -v $PKG/ipguard/ipguard $SBIN; | |
# install -v $PKG/mini_sendmail/mini_sendmail $SBIN/sendmail; | |
# | |
# install -v $PKG/pftop/pftop $BIN; | |
# install -v $PKG/pfflowd/pfflowd $SBIN; | |
# | |
# install -v $PKG/dhcp/work.freebsd/dhcpctl/omshell $BIN; | |
# install -v $PKG/dhcp/work.freebsd/server/dhcpd $SBIN; | |
# install -v $PKG/dhcp/work.freebsd/relay/dhcrelay $SBIN; | |
# install -v $PKG/dhcping/dhcping $SBIN; | |
# install -v $PKG/dhcdrop/src/dhcdrop $SBIN; | |
# | |
# install -v $PKG/mrouted/map-mbone $SBIN; | |
# install -v $PKG/mrouted/mrinfo $SBIN; | |
# install -v $PKG/mrouted/mrouted $SBIN; | |
# | |
# install -v $PKG/bmon/src/bmon $BIN; | |
# install -v $PKG/iftop/iftop $BIN; | |
# install -v $PKG/trafshow/trafshow $BIN; | |
# | |
# install -v $PKG/libevent/.libs/libevent-1.4.so.4 $LIBS; | |
# install -v $PKG/libevent/.libs/libevent_extra-1.4.so.4 $LIBS; | |
# install -v $PKG/expat/.libs/libexpat.so.6 $LIBS; | |
# install -v $PKG/libpdel/libpdel.so.0 $LIBS; | |
# | |
# install -v $PKG/mpd/src/mpd5 $SBIN; | |
# install -v $PKG/ifstated/ifstated $SBIN; | |
# | |
# install -v $PKG/ipsec-tools/src/libipsec/.libs/libipsec.so.0 $LIBS; | |
# install -v $PKG/ipsec-tools/src/racoon/.libs/libracoon.so.0 $LIBS; | |
# install -v $PKG/ipsec-tools/src/racoon/eaytest $BIN; | |
# install -v $PKG/ipsec-tools/src/racoon/plainrsa-gen $BIN; | |
# install -v $PKG/ipsec-tools/src/racoon/.libs/racoonctl $BIN; | |
# install -v $PKG/ipsec-tools/src/racoon/.libs/racoon $SBIN; | |
# install -v $PKG/ipsec-tools/src/setkey/.libs/setkey $BIN; | |
# | |
# install -v $PKG/arping/src/arping $SBIN; | |
# install -v $PKG/hping2/hping2 $SBIN; | |
# install -v $PKG/mtr/mtr $SBIN; | |
# | |
# install -v $PKG/smartmontools/smartctl $BIN; | |
# install -v $PKG/smartmontools/smartd $SBIN; | |
# | |
# install -v $PKG/conserver/conserver/conserver $SBIN; | |
# install -v $PKG/conserver/console/console $BIN; | |
# | |
## eeproms for atheros, used from elwix service tools | |
# cp -r /usr/local/libdata/athprom $FW_USR/libdata; | |
} |
} |
|
|
build_image() |
build_image() |
{ |
{ |
echo "+++ Build elwix firmware image ..." | echo "+++ Build ELWIX Firmware system image ... $ROMFS_USR --> ${REL}/${ROMFS_IMG}" |
makefs -ominfree=0,bsize=8192,fsize=1024,optimization=space -s${FW_SIZE} \ | |
$REL/$FW_IMG $FW_USR | |
|
|
MDDEV=$(mdconfig -a -t vnode -f $REL/$FW_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/${FW_IMG}.uzip $REL/$FW_IMG; | # Stop using uzip fs |
mv $REL/${FW_IMG}.uzip $REL/${FW_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} |
| |
| echo "+++ Completed ELWIX Firmware system image ... $ROMFS_USR --> ${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" |