version 1.1.2.7, 2012/05/29 13:26:40
|
version 1.4.2.3, 2014/01/07 09:27:55
|
Line 9
|
Line 9
|
# |
# |
|
|
[ -r ./config/rc.elwix ] && . ./config/rc.elwix |
[ -r ./config/rc.elwix ] && . ./config/rc.elwix |
|
if [ -r ./config/rc.3thparty_helper ]; then |
|
. ./config/rc.3thparty_helper |
|
else |
|
echo |
|
echo "ELWIX project is not configured - Missing rc.3thparty_helper script" |
|
echo |
|
exit 1 |
|
fi |
|
|
if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then |
if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then |
echo |
echo |
echo "ELWIX project is not configured !?!" |
echo "ELWIX project is not configured !?!" |
Line 39 clean_3th()
|
Line 48 clean_3th()
|
{ |
{ |
echo "+++ Clean ELWIX 3th party ..." |
echo "+++ Clean ELWIX 3th party ..." |
|
|
rm -rf ${PKG} | rm -rf ${PKG} ${ROMFS_USR2} |
| |
install -d ${PKG} |
install -d ${PKG} |
install -d ${PKG}/bin |
install -d ${PKG}/bin |
install -d ${PKG}/etc |
install -d ${PKG}/etc |
Line 48 clean_3th()
|
Line 58 clean_3th()
|
install -d ${PKG}/lib |
install -d ${PKG}/lib |
install -d ${PKG}/libexec |
install -d ${PKG}/libexec |
install -d ${PKG}/sbin |
install -d ${PKG}/sbin |
|
|
|
install -d ${ROMFS_USR2} |
|
install -d ${ROMFS_USR2}/bin |
|
install -d ${ROMFS_USR2}/etc |
|
install -d ${ROMFS_USR2}/lib |
|
install -d ${ROMFS_USR2}/libexec |
|
install -d ${ROMFS_USR2}/sbin |
} |
} |
|
|
compile_3th() |
compile_3th() |
{ |
{ |
echo "+++ Compile ELWIX 3th party ..." |
echo "+++ Compile ELWIX 3th party ..." |
|
|
cd $CROSS_3TH | BUILD_SH="./config/rc.3thparty_helper" |
./build.sh expat ${CBUILD} ${PKG} ${TARGET_BUILD} | |
| ${BUILD_SH} expat ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh libevent ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh libevent ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
Line 69 compile_3th()
|
Line 87 compile_3th()
|
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh scan_ffs ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh scan_ffs ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh pciutils ${CGBUILD} ${PKG} ${TARGET_BUILD} | # ./build.sh istgt ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 | # [ $? -ne 0 ] && exit 1 |
./build.sh istgt ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh rsync ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh rsync ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh ttcp ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh ttcp ${CBUILD} ${PKG} ${TARGET_BUILD} |
Line 95 compile_3th()
|
Line 111 compile_3th()
|
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh quagga ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh quagga ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh coova-chilli ${CBUILD} ${PKG} ${TARGET_BUILD} |
|
[ $? -ne 0 ] && exit 1 |
|
./build.sh iftop ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh iftop ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh arping ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh arping ${CBUILD} ${PKG} ${TARGET_BUILD} |
Line 107 compile_3th()
|
Line 121 compile_3th()
|
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh ipsec-tools ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh ipsec-tools ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh dhcp ${CBUILD} ${PKG} ${TARGET_BUILD} | # ./build.sh dhcp ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ./build.sh dhcping ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| ./build.sh dnsmasq ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh dhcdrop ${CBUILD} ${PKG} ${TARGET_BUILD} |
|
[ $? -ne 0 ] && exit 1 |
|
./build.sh dhcping ${CBUILD} ${PKG} ${TARGET_BUILD} |
|
[ $? -ne 0 ] && exit 1 |
|
./build.sh miniupnpd ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh miniupnpd ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh miniupnpc ${CGBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh miniupnpc ${CGBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh ntp ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh ntp ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh thttpd ${CBUILD} ${PKG} ${TARGET_BUILD} | ./build.sh spawn-fcgi ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
|
./build.sh lighttpd ${CBUILD} ${PKG} ${TARGET_BUILD} |
|
[ $? -ne 0 ] && exit 1 |
./build.sh libxml2 ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh libxml2 ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
./build.sh php ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh php ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 |
|
} |
|
|
|
install_3th() |
|
{ |
|
LIBS="${ROMFS_USR2}/lib" |
|
LIBEXEC="${ROMFS_USR2}/libexec" |
|
BIN="${ROMFS_USR2}/bin" |
|
SBIN="${ROMFS_USR2}/sbin" |
|
ETC="${ROMFS_USR2}/etc" |
|
|
|
echo "+++ Install ELWIX RomFS secondary firmware ..." |
|
|
|
StripFiles \*.so\* ${PKG}/lib |
|
InstallFiles \*.so\* ${PKG}/lib $LIBS |
|
StripFiles \* ${PKG}/libexec |
|
InstallFiles \* ${PKG}/libexec $LIBEXEC |
|
StripFiles \* ${PKG}/bin |
|
InstallFiles \* ${PKG}/bin $BIN |
|
StripFiles \* ${PKG}/sbin |
|
InstallFiles \* ${PKG}/sbin $SBIN |
|
|
|
InstallFiles \* ${PKG}/etc $ETC |
|
|
|
chown -R root:wheel $SBIN $BIN $LIBDATA $LIBEXEC $LIBS |
|
} |
|
|
|
build_3th() |
|
{ |
|
echo "+++ Build ELWIX Firmware secondary image ..." |
|
|
|
cd ${ROMFS_USR2} |
|
pax -w -z -v -f${REL}/${ROMFS_IMG2} . |
cd - |
cd - |
|
|
echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${PKG}/elwix.ver | # 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} |
} |
} |
|
|
### main() |
### main() |
if ! SnitVer ${PKG}/elwix.ver; then |
if ! SnitVer ${PKG}/elwix.ver; then |
clean_3th |
clean_3th |
compile_3th |
compile_3th |
|
|
|
install_3th |
|
build_3th |
|
|
|
echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${PKG}/elwix.ver |
else |
else |
echo "Skipped ELWIX 3th party build ..." |
echo "Skipped ELWIX 3th party build ..." |
fi |
fi |