version 1.4.2.2, 2014/01/07 09:26:42
|
version 1.6.2.4, 2017/11/02 15:23:49
|
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 | if [ ! -r ./config/rc.3thparty_helper ]; then |
. ./config/rc.3thparty_helper | |
else | |
echo |
echo |
echo "ELWIX project is not configured - Missing rc.3thparty_helper script" |
echo "ELWIX project is not configured - Missing rc.3thparty_helper script" |
echo |
echo |
Line 46 fi
|
Line 44 fi
|
|
|
clean_3th() |
clean_3th() |
{ |
{ |
echo "+++ Clean ELWIX 3th party ..." | echo "+++ Clean ELWIX 3th party ... ${PKG}, ${ROMFS_USR2}" |
|
|
rm -rf ${PKG} ${ROMFS_USR2} |
rm -rf ${PKG} ${ROMFS_USR2} |
|
|
Line 73 compile_3th()
|
Line 71 compile_3th()
|
|
|
BUILD_SH="./config/rc.3thparty_helper" |
BUILD_SH="./config/rc.3thparty_helper" |
|
|
cd $CROSS_3TH | # ${BUILD_SH} expat ${CBUILD} ${PKG} ${TARGET_BUILD} |
${BUILD_SH} expat ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh libevent ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh libiconv ${CGBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh pcre ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh mini_sendmail ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh choparp ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh scan_ffs ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
# ./build.sh istgt ${CBUILD} ${PKG} ${TARGET_BUILD} | |
# [ $? -ne 0 ] && exit 1 |
# [ $? -ne 0 ] && exit 1 |
./build.sh rsync ${CBUILD} ${PKG} ${TARGET_BUILD} | # ${BUILD_SH} libevent ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 | |
./build.sh ttcp ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh mpd ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh mrouted ${CGBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh igmpproxy ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh sudo ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh bmon ${CGBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh mtr ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh ipguard ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh smartmontools ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh quagga ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh iftop ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh arping ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh hping2 ${CGBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh trafshow ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
./build.sh ipsec-tools ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | |
# ./build.sh dhcp ${CBUILD} ${PKG} ${TARGET_BUILD} | |
# [ $? -ne 0 ] && exit 1 |
# [ $? -ne 0 ] && exit 1 |
# ./build.sh dhcping ${CBUILD} ${PKG} ${TARGET_BUILD} | # ${BUILD_SH} libiconv ${CGBUILD} ${PKG} ${TARGET_BUILD} |
# [ $? -ne 0 ] && exit 1 |
# [ $? -ne 0 ] && exit 1 |
./build.sh dnsmasq ${CBUILD} ${PKG} ${TARGET_BUILD} | # ${BUILD_SH} pcre ${CBUILD} ${PKG} ${TARGET_BUILD} |
[ $? -ne 0 ] && exit 1 | # [ $? -ne 0 ] && exit 1 |
./build.sh miniupnpd ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | for i in ${CROSS_3THPARTY}; do |
./build.sh miniupnpc ${CGBUILD} ${PKG} ${TARGET_BUILD} | if [ -d "${CROSS_3THPATH}$i" ]; then |
[ $? -ne 0 ] && exit 1 | MK=$(eval echo "\$${i}_MAKE") |
./build.sh ntp ${CBUILD} ${PKG} ${TARGET_BUILD} | env CFLAGS="-I${PKG}/include" LDFLAGS="-L${PKG}/lib" ${BUILD_SH} \ |
[ $? -ne 0 ] && exit 1 | $i $MK ${PKG} ${TARGET_BUILD} || Die "ERROR:: with $i packet!" |
./build.sh spawn-fcgi ${CBUILD} ${PKG} ${TARGET_BUILD} | else |
[ $? -ne 0 ] && exit 1 | Die "Error:: ${CROSS_PATH}$i not found!" |
./build.sh lighttpd ${CBUILD} ${PKG} ${TARGET_BUILD} | fi |
[ $? -ne 0 ] && exit 1 | done |
./build.sh libxml2 ${CBUILD} ${PKG} ${TARGET_BUILD} | |
[ $? -ne 0 ] && exit 1 | # ${BUILD_SH} iftop ${CBUILD} ${PKG} ${TARGET_BUILD} |
./build.sh php ${CBUILD} ${PKG} ${TARGET_BUILD} | # [ $? -ne 0 ] && exit 1 |
[ $? -ne 0 ] && exit 1 | # ${BUILD_SH} sudo ${CBUILD} ${PKG} ${TARGET_BUILD} |
cd - | # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} smartmontools ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} trafshow ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} ipsec-tools ${CGBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} dhcp ${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} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} miniupnpc ${CGBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} ntp ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} spawn-fcgi ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} lighttpd ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} libxml2 ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| # ${BUILD_SH} php ${CBUILD} ${PKG} ${TARGET_BUILD} |
| # [ $? -ne 0 ] && exit 1 |
| echo |
} |
} |
|
|
install_3th() |
install_3th() |
Line 153 install_3th()
|
Line 129 install_3th()
|
SBIN="${ROMFS_USR2}/sbin" |
SBIN="${ROMFS_USR2}/sbin" |
ETC="${ROMFS_USR2}/etc" |
ETC="${ROMFS_USR2}/etc" |
|
|
echo "+++ Install ELWIX RomFS secondary firmware ..." | echo "+++ Install ELWIX RomFS secondary firmware ... ${ROMFS_USR2}" |
|
|
StripFiles \*.so\* ${PKG}/lib |
StripFiles \*.so\* ${PKG}/lib |
InstallFiles \*.so\* ${PKG}/lib $LIBS |
InstallFiles \*.so\* ${PKG}/lib $LIBS |
Line 171 install_3th()
|
Line 147 install_3th()
|
|
|
build_3th() |
build_3th() |
{ |
{ |
echo "+++ Build ELWIX Firmware secondary image ..." | echo "+++ Build ELWIX Firmware secondary image ... ${ROMFS_USR2} --> ${REL}/${ROMFS_IMG2}" |
|
|
cd ${ROMFS_USR2} |
cd ${ROMFS_USR2} |
pax -w -z -v -f${REL}/${ROMFS_IMG2} . |
pax -w -z -v -f${REL}/${ROMFS_IMG2} . |
Line 187 build_3th()
|
Line 163 build_3th()
|
|
|
# mkuzip -s 8192 -o ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2}; |
# mkuzip -s 8192 -o ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2}; |
# mv ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2} |
# mv ${REL}/${ROMFS_IMG2}.uzip ${REL}/${ROMFS_IMG2} |
|
|
|
echo "+++ Complited ELWIX Firmware secondary image ... ${REL}/${ROMFS_IMG2}" |
} |
} |
|
|
### main() |
### main() |
|
if [ -n "${1}" ]; then |
|
rm ${PKG}/elwix.ver |
|
fi |
|
|
if ! SnitVer ${PKG}/elwix.ver; then |
if ! SnitVer ${PKG}/elwix.ver; then |
clean_3th | clean_3th || exit 1 |
compile_3th | compile_3th || exit 1 |
|
|
install_3th | install_3th || exit 1 |
build_3th | build_3th || exit 1 |
|
|
echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${PKG}/elwix.ver |
echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${PKG}/elwix.ver |
else |
else |