619 lines
21 KiB
Plaintext
Executable File
619 lines
21 KiB
Plaintext
Executable File
include $(BSP_ROOTDIR)/ecnt-bsp.mk
|
|
include $(BSP_ROOTDIR)/ecnt-function.mk
|
|
|
|
APP_BSP_TARGET = api_prepare compileoption_lib
|
|
APP_BSP_TARGET_CLEAN = compileoption_lib_clean
|
|
|
|
#ifeq ($(strip $(TCSUPPORT_BLAPI)),)
|
|
#APP_BSP_TARGET += api
|
|
#APP_BSP_TARGET_CLEAN += api_clean
|
|
#else
|
|
APP_BSP_TARGET += xpon_bsp_apps ecntapi
|
|
#endif
|
|
|
|
APP_BSP_TARGET += ethcmd blapi hw_nat smuxctl portbindcmd ethtool
|
|
|
|
ifneq ($(strip $(CONFIG_TP_IMAGE)),)
|
|
APPS_TARGET = 11kvdaemon ated bndstrg wlancmd 11rdaemon 8021X wirelesstool iwprivget mtd tcwdog cputemp pwctlcmd ipnew ovs
|
|
else
|
|
APPS_TARGET = 11kvdaemon ated bndstrg wlancmd 11rdaemon 8021X wirelesstool iwprivget mtd tcwdog cputemp pwctlcmd ipnew openssl_lib ovs
|
|
endif
|
|
APPS_TARGET_CLEAN=$(addsuffix _clean, $(APPS_TARGET))
|
|
|
|
APP_BSP_TARGET +=$(APPS_TARGET)
|
|
APP_BSP_TARGET_CLEAN += $(APPS_TARGET_CLEAN)
|
|
|
|
ifeq ($(strip $(TCSUPPORT_NP)),)
|
|
ifneq ($(strip $(BSP)),)
|
|
XPON_APP_DIR_CHANGE=$(shell if [ ! -d $(XPON_APP_BSP_DIR) -a -d $(XPON_APP_SDK_DIR) ]; \
|
|
then \
|
|
mv $(XPON_APP_SDK_DIR) $(TRUNK_DIR)/BSP/; \
|
|
ln -sf $(XPON_APP_BSP_DIR) $(TRUNK_DIR)/apps; echo "MV XPON_APP_DIR TO BSP successfully"; else echo "DO NOT MV XPON_APP_DIR"; fi;)
|
|
$(warning Compile $(XPON_APP_DIR_CHANGE))
|
|
include $(XPON_APP_BSP_DIR)/make_xpon_app
|
|
ifeq ($(strip $(TCSUPPORT_IS_FH_PON)),)
|
|
APP_BSP_TARGET += xpon_app
|
|
APP_BSP_TARGET_CLEAN += xpon_app_clean
|
|
endif
|
|
else
|
|
ifeq ("$(IS_XPON_APP_BSP_DIR_EXIST):$(IS_XPON_APP_SDK_DIR_EXIST)", "Y:N")
|
|
include $(XPON_APP_BSP_DIR)/make_xpon_app
|
|
ifeq ($(strip $(TCSUPPORT_IS_FH_PON)),)
|
|
APP_BSP_TARGET += xpon_app
|
|
APP_BSP_TARGET_CLEAN += xpon_app_clean
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
|
|
ifneq ($(strip $(TCSUPPORT_VOIP)),)
|
|
ifeq ("$(IS_VOIP_BSP_DIR_EXIST)", "Y")
|
|
APP_BSP_TARGET += voip_app_bsp
|
|
APP_BSP_TARGET_CLEAN += voip_app_bsp_clean
|
|
else
|
|
ifeq ("$(IS_VOIP_APP_BSP_DIR_EXIST)", "Y")
|
|
APP_BSP_TARGET += voip_app_bsp
|
|
APP_BSP_TARGET_CLEAN += voip_app_bsp_clean
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
app_bsp: $(APP_BSP_TARGET)
|
|
app_bsp_clean: $(APP_BSP_TARGET_CLEAN)
|
|
|
|
###########################################################################################
|
|
compileoption_lib:
|
|
echo "Copy compileoption_lib source code from kernel"
|
|
cp $(KERNEL_DIR)/kernel/libcompileoption.c $(APP_COMPILEOPTION_LIB_DIR)
|
|
cp $(KERNEL_DIR)/include/linux/libcompileoption.h $(APP_COMPILEOPTION_LIB_DIR)
|
|
|
|
echo "Building compileoption_lib library"
|
|
$(MAKE) -C $(APP_COMPILEOPTION_LIB_DIR)
|
|
if test -e $(APP_COMPILEOPTION_LIB_DIR)/libcompileoption.so; \
|
|
then echo "Compile APP_COMPILEOPTION_LIB_DIR Lib success"; \
|
|
else echo "Compile APP_COMPILEOPTION_LIB_DIR Lib error!"; exit 1; \
|
|
fi
|
|
$(MAKE) -C $(APP_COMPILEOPTION_LIB_DIR) install
|
|
cp $(APP_COMPILEOPTION_LIB_DIR)/libcompileoption.so $(BSP_INT_FS)/lib/
|
|
cp $(APP_COMPILEOPTION_LIB_DIR)/libcompileoption.so $(BSP_EXT_FS)/lib/
|
|
|
|
cp $(APP_COMPILEOPTION_LIB_DIR)/libcompileoption.so $(BSP_EXT_LIB)
|
|
cp $(APP_COMPILEOPTION_LIB_DIR)/libcompileoption.h $(BSP_EXT_INC)
|
|
cp $(APP_COMPILEOPTION_LIB_DIR)/libcompileoption.so $(BSP_INT_LIB)
|
|
cp $(APP_COMPILEOPTION_LIB_DIR)/libcompileoption.h $(BSP_INT_INC)
|
|
|
|
compileoption_lib_clean:
|
|
echo "Clean APP_COMPILEOPTION_LIB_DIR library"
|
|
-$(MAKE) -C $(APP_COMPILEOPTION_LIB_DIR) clean
|
|
rm -rf $(BSP_INT_FS)/lib/libcompileoption.so
|
|
rm -rf $(BSP_EXT_FS)/lib/libcompileoption.so
|
|
|
|
rm -rf $(BSP_EXT_LIB)/libcompileoption.so
|
|
rm -rf $(BSP_EXT_INC)/libcompileoption.h
|
|
rm -rf $(BSP_INT_LIB)/libcompileoption.so
|
|
rm -rf $(BSP_INT_INC)/libcompileoption.h
|
|
|
|
api_prepare:
|
|
install -d $(BSP_EXT_LIB) $(BSP_EXT_INC)
|
|
install -d $(BSP_EXT_FS_BIN) $(BSP_EXT_FS_USR) $(BSP_EXT_FS_USEFS)
|
|
install -d $(BSP_INT_LIB) $(BSP_INT_INC)
|
|
install -d $(BSP_INT_FS)/lib $(BSP_INT_FS_USEFS) $(BSP_INT_FS_USR_SCRIPT)
|
|
cp $(TOOLS_TRX_DIR)/trx.h $(BSP_EXT_INC)
|
|
install -d $(BSP_INT_FS)/usr/bin $(BSP_INT_FS)/lib/modules $(BSP_INT_FS)/dev
|
|
install -d $(BSP_INT_FS)/usr/etc/Wireless $(BSP_INT_FS)/usr/etc/init.d
|
|
|
|
#rm -rf $(INSTALL_GLOBALINC)
|
|
install -d $(INSTALL_GLOBALINC)
|
|
cp -rf $(GLOBAL_INC_DIR)/uapi $(INSTALL_GLOBALINC)
|
|
|
|
install -d $(BSP_EXT_INSTALL)/inc
|
|
install -d $(INSTALL_GLOBALINC)/uapi
|
|
install -d $(INSTALL_GLOBALINC)/xpon
|
|
cp -rf $(DOC_DIR)/doxygen_conf/Doxyfile_inc $(BSP_EXT_INSTALL)/inc/Doxyfile
|
|
cp -rf $(DOC_DIR)/doxygen_conf/Doxyfile_global_inc_uapi $(INSTALL_GLOBALINC)/uapi/Doxyfile
|
|
cp -rf $(DOC_DIR)/doxygen_conf/Doxyfile_global_inc_xpon $(INSTALL_GLOBALINC)/xpon/Doxyfile
|
|
|
|
ecntapi: api_prepare
|
|
make -C $(BSP_API_DIR) -f $(BSP_API_DIR)/make_api api
|
|
|
|
ecntapi_clean:
|
|
make -C $(BSP_API_DIR) -f $(BSP_API_DIR)/make_api api_clean
|
|
|
|
blapi:
|
|
make -C $(BSP_ROOTDIR) -f $(BSP_BLAPI_DIR)/make_blapi blapi
|
|
|
|
blapi_clean:
|
|
make -C $(BSP_ROOTDIR) -f $(BSP_BLAPI_DIR)/make_blapi blapi_clean
|
|
|
|
###########################################################################
|
|
|
|
#Build ethcmd
|
|
ifneq ($(strip $(CUSTOMER_BUILD_RELEASECODE)),)
|
|
ethcmd:
|
|
echo "Build ethcmd111"
|
|
rm -f $(BSP_INT_FS)/usr/script/wanether.sh
|
|
rm -f $(BSP_EXT_FS)/usr/script/wanether.sh
|
|
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/ethcmd $(BSP_INT_FS)/userfs/bin/ethphxcmd
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/ethcmd $(BSP_EXT_FS)/userfs/bin/ethphxcmd
|
|
|
|
ifneq ($(strip $(TCSUPPORT_CPU_MT7520)),)
|
|
ifeq ($(MT7520_WAN_ETHER),1)
|
|
cp $(APP_BSP_ETC_SCRIPT_DIR)/wanether.sh $(BSP_INT_FS)/usr/script/
|
|
cp $(APP_BSP_ETC_SCRIPT_DIR)/wanether.sh $(BSP_EXT_FS)/usr/script/
|
|
|
|
endif
|
|
endif
|
|
ethcmd_clean:
|
|
echo "CUSTOMER_BUILD_RELEASECODE: Build ethcmd, do nothing!"
|
|
else
|
|
ethcmd:
|
|
echo "Build ethcmd"
|
|
$(MAKE) -C $(APP_BSP_ETHCMD_DIR)
|
|
if test -e $(APP_BSP_ETHCMD_DIR)/ethphxcmd; \
|
|
then echo "Compile ethcmd success"; \
|
|
else echo "Compile ethcmd error!"; exit 1; \
|
|
fi
|
|
rm -f $(BSP_INT_FS)/usr/script/wanether.sh
|
|
rm -f $(BSP_EXT_FS)/usr/script/wanether.sh
|
|
|
|
ifneq ($(strip $(TCSUPPORT_CPU_MT7520)),)
|
|
ifeq ($(MT7520_WAN_ETHER),1)
|
|
cp $(APP_BSP_ETC_SCRIPT_DIR)/wanether.sh $(BSP_INT_FS)/usr/script/
|
|
cp $(APP_BSP_ETC_SCRIPT_DIR)/wanether.sh $(BSP_EXT_FS)/usr/script/
|
|
|
|
endif
|
|
endif
|
|
|
|
ethcmd_clean:
|
|
echo "Clean ethcmd"
|
|
$(MAKE) -C $(APP_BSP_ETHCMD_DIR) clean
|
|
ifneq ($(strip $(TCSUPPORT_MT7530_SWITCH_API)),)
|
|
$(MAKE) -C $(APP_BSP_ETHCMD_DIR) lib_clean
|
|
endif
|
|
|
|
endif
|
|
###########################################################################
|
|
|
|
|
|
#Build hw_nat
|
|
ifneq ($(strip $(TCSUPPORT_RA_HWNAT)),)
|
|
ifneq ($(strip $(TC_BUILD_RELEASECODE)),)
|
|
hw_nat:
|
|
ifeq ($(strip $(TCSUPPORT_MT7510_FE)),)
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/ac $(BSP_INT_FS)/userfs/bin/
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/acl $(BSP_INT_FS)/userfs/bin/
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/mtr $(BSP_INT_FS)/userfs/bin/
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/ac $(BSP_EXT_FS)/userfs/bin/
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/acl $(BSP_EXT_FS)/userfs/bin/
|
|
cp $(APP_BINARY_DIR)/$(TCPLATFORM)/mtr $(BSP_EXT_FS)/userfs/bin/
|
|
|
|
endif
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/userfs/bin/hw_nat $(BSP_INT_FS)/userfs/bin/
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/userfs/bin/hw_nat $(BSP_EXT_FS)/userfs/bin/
|
|
|
|
hw_nat_clean:
|
|
echo "TC_BUILD_RELEASECODE: Build hw_nat, do nothing!"
|
|
else
|
|
hw_nat:
|
|
echo "Build hw_nat"
|
|
#ifneq ($(strip $(TCSUPPORT_MT7510_FE)),)
|
|
$(MAKE) -C $(APP_BSP_RA_HWNAT_7510_DIR)
|
|
if test -e $(APP_BSP_RA_HWNAT_7510_DIR)/hw_nat; \
|
|
then echo "Compile hw_nat success"; \
|
|
else echo "Compile hw_nat error!"; exit 1; \
|
|
fi
|
|
#else
|
|
# $(MAKE) -C $(APP_RA_HWNAT_DIR)
|
|
# if test -e $(APP_RA_HWNAT_DIR)/hw_nat; \
|
|
# then echo "Compile hw_nat success"; \
|
|
# else echo "Compile hw_nat error!"; exit 1; \
|
|
# fi
|
|
# cp $(APP_RA_HWNAT_DIR)/ac $(BSP_INT_FS)/userfs/bin/
|
|
# cp $(APP_RA_HWNAT_DIR)/acl $(BSP_INT_FS)/userfs/bin/
|
|
# cp $(APP_RA_HWNAT_DIR)/hw_nat $(BSP_INT_FS)/userfs/bin/
|
|
# cp $(APP_BINARY_DIR)/$(TCPLATFORM)/hw_nat $(BSP_EXT_FS)/userfs/bin/
|
|
# cp $(APP_RA_HWNAT_DIR)/mtr $(BSP_INT_FS)/userfs/bin/
|
|
#endif
|
|
hw_nat_clean:
|
|
echo "Clean hw_nat"
|
|
#ifneq ($(strip $(TCSUPPORT_MT7510_FE)),)
|
|
$(MAKE) -C $(APP_BSP_RA_HWNAT_7510_DIR) clean
|
|
#else
|
|
# $(MAKE) -C $(APP_RA_HWNAT_DIR) clean
|
|
#endif
|
|
endif
|
|
else
|
|
hw_nat:
|
|
echo "No Build hw_nat!"
|
|
hw_nat_clean:
|
|
echo "No Clean hw_nat!"
|
|
endif
|
|
###########################################################################
|
|
|
|
#Build smuxctl
|
|
ifneq ($(strip $(TCSUPPORT_SMUX)),)
|
|
ifneq ($(strip $(TC_BUILD_RELEASECODE)),)
|
|
smuxctl:
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/usr/bin/smuxctl $(BSP_INT_FS)/usr/bin
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/usr/bin/smuxctl $(BSP_EXT_FS)/usr/bin
|
|
|
|
smuxctl_clean:
|
|
echo "TC_BUILD_RELEASECODE: Build SMUXCTL, do nothing!"
|
|
else
|
|
smuxctl:
|
|
echo "Building smuxctl"
|
|
$(MAKE) -C $(APP_BSP_SMUXCTL_DIR)
|
|
if test -e $(APP_BSP_SMUXCTL_DIR)/smuxctl; \
|
|
then echo "Compile smuxctl success"; \
|
|
else echo "Compile smuxctl error!"; exit 1; \
|
|
fi
|
|
|
|
smuxctl_clean:
|
|
echo "Clean smuxctl"
|
|
$(MAKE) -C $(APP_BSP_SMUXCTL_DIR) clean
|
|
endif
|
|
else
|
|
smuxctl:
|
|
smuxctl_clean:
|
|
endif
|
|
###########################################################################
|
|
|
|
|
|
|
|
###########################################################################
|
|
#Build cputemp
|
|
cputemp:
|
|
echo "Building cpu_temp"
|
|
ifneq ($(strip $(TC_BUILD_RELEASECODE)),)
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/userfs/bin/cputemp $(BSP_INT_FS)/usr/bin
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/userfs/bin/cputemp $(BSP_EXT_FS)/usr/bin
|
|
else
|
|
|
|
$(MAKE) -C $(BSP_API_CPUTEMP_DIR)
|
|
if test -e $(BSP_API_CPUTEMP_DIR)/cputemp; \
|
|
then echo "Compile cputemp success"; \
|
|
else echo "Compile cputemp error!"; exit 1; \
|
|
fi
|
|
endif
|
|
|
|
cputemp_clean:
|
|
echo "Clean cpu_temp"
|
|
ifneq ($(strip $(TC_BUILD_RELEASECODE)),)
|
|
echo "TC_BUILD_RELEASECODE: Do nothing!"
|
|
else
|
|
$(MAKE) -C $(BSP_API_CPUTEMP_DIR) clean
|
|
endif
|
|
|
|
###########################################################################
|
|
#Building tcwdog
|
|
tcwdog:
|
|
echo "Build tcwdog"
|
|
$(MAKE) -C $(BSP_API_TCWDOG_DIR)
|
|
if test -e $(BSP_API_TCWDOG_DIR)/tcwdog; \
|
|
then echo "Compile tcwdog success"; \
|
|
else echo "Compile tcwdog error!"; exit 1; \
|
|
fi
|
|
|
|
tcwdog_clean:
|
|
echo "Clean tcwdog"
|
|
|
|
###########################################################################
|
|
#Build pwctlcmd
|
|
ifneq ($(strip $(TC_BUILD_RELEASECODE)),)
|
|
pwctlcmd:
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/userfs/bin/pwctlcmd $(BSP_EXT_FS)/userfs/bin/
|
|
cp $(RELEASE_BSP_DIR)/$(TCPLATFORM)/filesystem/userfs/bin/pwctlcmd $(BSP_INT_FS)/userfs/bin/
|
|
|
|
pwctlcmd_clean:
|
|
echo "CUSTOMER_BUILD_RELEASECODE: Build pwctlcmd, do nothing!"
|
|
else
|
|
pwctlcmd:
|
|
echo "Build pwctlcmd"
|
|
$(MAKE) -C $(BSP_API_PWCTLCMD_DIR)
|
|
if test -e $(BSP_API_PWCTLCMD_DIR)/pwctlcmd; \
|
|
then echo "Compile pwctlcmd success"; \
|
|
else echo "Compile pwctlcmd error!"; exit 1; \
|
|
fi
|
|
|
|
pwctlcmd_clean:
|
|
echo "Clean pwctlcmd"
|
|
$(MAKE) -C $(BSP_API_PWCTLCMD_DIR) clean
|
|
endif
|
|
###########################################################################
|
|
mtd:
|
|
#cp -rf $(GLOBAL_INC_DIR)/flash_layout/tc_partition.h $(BSP_APP_MTD_DIR)/
|
|
#cp -rf $(GLOBAL_INC_DIR)/flash_layout/prolinecmd.h $(BSP_APP_MTD_DIR)/
|
|
#cp -rf $(GLOBAL_INC_DIR)/modules/xpon_phy_global/mt7570.h $(BSP_APP_MTD_DIR)/
|
|
echo "Build mtd"
|
|
$(MAKE) -C $(BSP_APP_MTD_DIR)
|
|
if test -e $(BSP_APP_MTD_DIR)/mtd; \
|
|
then echo "Compile mtd success"; \
|
|
else echo "Compile mtd error!"; exit 1; \
|
|
fi
|
|
|
|
mtd_clean:
|
|
echo "Clean mtd"
|
|
$(MAKE) -C $(BSP_APP_MTD_DIR) clean
|
|
|
|
env:
|
|
echo "Build env"
|
|
$(MAKE) -C $(BSP_PUBLICDIR)/env
|
|
if test -e $(BSP_PUBLICDIR)/env/showenv; \
|
|
then echo "Compile env success"; \
|
|
else echo "Compile env error!"; exit 1; \
|
|
fi
|
|
cp $(BSP_PUBLICDIR)/env/showenv $(FILESYSTEM_DIR)/usr/bin/
|
|
cp $(BSP_PUBLICDIR)/env/setenv $(FILESYSTEM_DIR)/usr/bin/
|
|
|
|
env_clean:
|
|
echo "Clean env"
|
|
$(MAKE) -C $(BSP_PUBLICDIR)/env clean
|
|
|
|
ipnew:
|
|
echo "Build ipnew"
|
|
if test -e $(BSP_APP_IPROUTE_IP_NEW_DIR)/ip/ip; \
|
|
then echo "Already compile ipnew;" exit 0; \
|
|
fi
|
|
cd $(BSP_APP_IPROUTE_IP_NEW_DIR) && ./configure --host=$(COMPILE_TOOLCHAIN) --target=$(COMPILE_TOOLCHAIN)
|
|
$(MAKE) -C $(BSP_APP_IPROUTE_IP_NEW_DIR)
|
|
if test -e $(BSP_APP_IPROUTE_IP_NEW_DIR)/ip/ip; \
|
|
then echo "Compile ipnew success"; \
|
|
else echo "Compile ipnew error;" exit 1; \
|
|
fi
|
|
cp $(BSP_APP_IPROUTE_IP_NEW_DIR)/ip/ip $(BSP_EXT_FS)/usr/bin
|
|
cp $(BSP_APP_IPROUTE_IP_NEW_DIR)/bridge/bridge $(BSP_EXT_FS)/usr/bin/
|
|
ipnew_clean:
|
|
echo "Clean ipnew"
|
|
$(MAKE) -C $(BSP_APP_IPROUTE_IP_NEW_DIR) clean
|
|
|
|
openssl_lib:
|
|
echo "Compile openssl lib"
|
|
touch $(BSP_APP_OPENSSL_DIR)/Makefile
|
|
$(MAKE) -C $(BSP_APP_OPENSSL_DIR)
|
|
$(MAKE) install -C $(BSP_APP_OPENSSL_DIR)
|
|
|
|
if test -e $(BSP_APP_OPENSSL_DIR)/OPSSL/lib/libcrypto.so; \
|
|
then echo "Compile openssl success"; \
|
|
cp $(BSP_APP_OPENSSL_DIR)/OPSSL/lib/libcrypto.so* $(BSP_EXT_FS)/lib -avd; \
|
|
cp $(BSP_APP_OPENSSL_DIR)/OPSSL/lib/libssl.so* $(BSP_EXT_FS)/lib -avd; \
|
|
cp -rf $(BSP_APP_OPENSSL_DIR)/OPSSL $(LIB_INSTALL_DIR); \
|
|
else echo "Compile openssl error!"; exit 1; \
|
|
fi
|
|
|
|
openssl_lib_clean:
|
|
echo "Clean openssl lib"
|
|
touch $(BSP_APP_OPENSSL_DIR)/Makefile;
|
|
-$(MAKE) -C $(BSP_APP_OPENSSL_DIR) clean
|
|
rm -rf $(BSP_EXT_FS)/lib/libcrypto.so*
|
|
rm -rf $(BSP_EXT_FS)/lib/libssl.so*
|
|
|
|
ifneq ($(strip $(TCSUPPORT_SDN_OVS)),)
|
|
ovs:
|
|
echo "Build ovs 2.5.0"
|
|
if test -e $(BSP_APP_OVS_DIR)/openvswitch-2.5.0; \
|
|
then echo "already tar"; \
|
|
else cd $(BSP_APP_OVS_DIR) && tar -zxvf openvswitch-2.5.0.tar.gz;\
|
|
fi
|
|
cp $(BSP_APP_OVS_DIR)/make $(BSP_APP_OVS_DIR)/openvswitch-2.5.0
|
|
|
|
ifneq ($(strip $(TCSUPPORT_CPU_ARMV8)),)
|
|
cd $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 && ./configure --host=$(COMPILE_TOOLCHAIN) --target=$(COMPILE_TOOLCHAIN) --with-rundir=/tmp/openvswitch/run --with-dbdir=/tmp/openvswitch/run --with-logdir=/tmp/openvswitch/log --prefix=/usr/ovs --with-openssl=$(BSP_APP_OPENSSL_DIR)/OPSSL --enable-static --disable-shared CFLAGS="$(CFG_CFLAGS) -std=gnu99" KARCH=arm
|
|
else
|
|
cd $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 && ./configure --host=$(HOST) --target=$(ALIAS_TOOLCHAIN) --with-linux=$(KERNEL_DIR) --with-rundir=/tmp/openvswitch/run --with-dbdir=/tmp/openvswitch/run --with-logdir=/tmp/openvswitch/log --prefix=/usr/ovs --with-openssl=$(BSP_APP_OPENSSL_DIR)/OPSSL --enable-static --disable-shared CFLAGS="$(CFG_CFLAGS) -std=gnu99" KARCH=mips
|
|
endif
|
|
|
|
cd $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 && ./make -C $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 CC=$(CROSS)gcc AR=$(CROSS)ar RANLIB=$(CROSS)ranlib LD=$(CROSS)ld
|
|
cd $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 && ./make -C $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 CC=$(CROSS)gcc AR=$(CROSS)ar RANLIB=$(CROSS)ranlib LD=$(CROSS)ld prefix=$(BSP_EXT_FS)/usr/ovs install
|
|
|
|
if test -e $(BSP_APP_OVS_DIR)/openvswitch-2.5.0/datapath/linux/openvswitch.ko; \
|
|
then cp $(BSP_APP_OVS_DIR)/openvswitch-2.5.0/datapath/linux/openvswitch.ko $(BSP_EXT_FS)/lib/modules/; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/include; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/lib; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/share/man; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/bin/ovn*; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/bin/ovs-testcontroller; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/bin/ovs-pki; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/bin/vtep-ctl; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/bin/ovs-benchmark; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/bin/ovs-docker; \
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs/sbin/ovs-vlan-bug-workaround; \
|
|
echo "Compile ovs 2.5.0 success"; \
|
|
else echo "Compile ovs 2.5.0 error!"; exit 1; \
|
|
fi
|
|
|
|
$(STRIP) --strip-unneeded $(BSP_EXT_FS)/lib/modules/openvswitch.ko
|
|
-$(STRIP) --strip-unneeded $(BSP_EXT_FS)/usr/ovs/bin/*
|
|
-$(STRIP) --strip-unneeded $(BSP_EXT_FS)/usr/ovs/sbin/*
|
|
|
|
ovs_clean:
|
|
echo "Clean ovs 2.5.0"
|
|
if test -e $(BSP_APP_OVS_DIR)/openvswitch-2.5.0; \
|
|
then echo "already tar"; \
|
|
else cd $(BSP_APP_OVS_DIR) && tar -zxvf openvswitch-2.5.0.tar.gz;\
|
|
fi
|
|
cp $(BSP_APP_OVS_DIR)/make $(BSP_APP_OVS_DIR)/openvswitch-2.5.0
|
|
ifneq ($(strip $(TCSUPPORT_CPU_ARMV8)),)
|
|
cd $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 && ./configure --host=$(COMPILE_TOOLCHAIN) --target=$(COMPILE_TOOLCHAIN) --with-rundir=/tmp/openvswitch/run --with-dbdir=/tmp/openvswitch/run --with-logdir=/tmp/openvswitch/log --prefix=/usr/ovs --with-openssl=$(BSP_APP_OPENSSL_DIR)/OPSSL --enable-static --disable-shared CFLAGS="$(CFG_CFLAGS)" KARCH=arm
|
|
else
|
|
cd $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 && ./configure --host=$(HOST) --target=$(ALIAS_TOOLCHAIN) --with-rundir=/tmp/openvswitch/run --with-dbdir=/tmp/openvswitch/run --with-logdir=/tmp/openvswitch/log --prefix=/usr/ovs --with-openssl=$(BSP_APP_OPENSSL_DIR)/OPSSL --enable-static --disable-shared CFLAGS="$(CFG_CFLAGS)" KARCH=mips
|
|
endif
|
|
|
|
-cd $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 && ./make -C $(BSP_APP_OVS_DIR)/openvswitch-2.5.0 clean
|
|
|
|
rm -f $(BSP_EXT_FS)/lib/modules/openvswitch.ko
|
|
rm -f $(BSP_EXT_FS)/lib/libcrypto.so
|
|
rm -rf $(BSP_EXT_FS)/usr/ovs
|
|
else
|
|
ovs:
|
|
ovs_clean:
|
|
endif
|
|
############################################################################
|
|
#Build 11KV test daemon
|
|
11kvdaemon:
|
|
echo test
|
|
11kvdaemon_clean:
|
|
echo test1
|
|
###########################################################################
|
|
#Build ated
|
|
ated:
|
|
echo "Building ated"
|
|
$(call BspAppMake, $(BSP_API_ATED_DIR), all, ated)
|
|
if test -e $(BSP_API_ATED_DIR)/ated; \
|
|
then echo "Compile ated success"; \
|
|
else echo "Compile ated error!"; exit 1; \
|
|
fi
|
|
$(call BspAppUsrBinInstall, $(BSP_API_ATED_DIR), ated)
|
|
|
|
ated_clean:
|
|
echo "Clean ated"
|
|
|
|
###########################################################################
|
|
#Build bndstrg daemon
|
|
ifneq ($(strip $(TCSUPPORT_WLAN_BNDSTRG)),)
|
|
bndstrg:
|
|
$(call BspAppMake, $(BSP_API_BNDSTRG_DIR), all, bndstrg)
|
|
if test -e $(BSP_API_BNDSTRG_DIR)/bndstrg2; \
|
|
then echo "Compile bndstrg daemon success"; \
|
|
else echo "Compile bndstrg daemon error!"; exit 1; \
|
|
fi
|
|
|
|
bndstrg_clean:
|
|
$(call BspAppMake, $(BSP_API_BNDSTRG_DIR), clean)
|
|
else
|
|
bndstrg:
|
|
bndstrg_clean:
|
|
endif
|
|
###########################################################################
|
|
#Build wlancmd
|
|
ifneq ($(strip $(TCSUPPORT_WLAN)),)
|
|
wlancmd:
|
|
echo "Build wlancmd"
|
|
$(call BspAppMake, $(BSP_API_WLANCMD_DIR), all, wlancmd)
|
|
if test -e $(BSP_API_WLANCMD_DIR)/wlanphxcmd; \
|
|
then echo "Compile wlancmd success"; \
|
|
else echo "Compile wlancmd error!"; exit 1; \
|
|
fi
|
|
|
|
wlancmd_clean:
|
|
echo "Clean wlancmd"
|
|
|
|
else
|
|
wlancmd:
|
|
echo "No Build wlancmd!"
|
|
wlancmd_clean:
|
|
echo "No Clean wlancmd!"
|
|
endif
|
|
###########################################################################
|
|
#Build 11R test daemon
|
|
ifneq ($(strip $(TCSUPPORT_WLAN_DOT11R_FT)),)
|
|
11rdaemon:
|
|
$(call BspAppMake, $(BSP_API_MTKIAPPD_DIR), all, 11rdaemon)
|
|
if test -e $(BSP_API_MTKIAPPD_DIR)/mtkiappd; \
|
|
then echo "Compile 11rdaemon success"; \
|
|
else echo "Compile 11rdaemon error!"; exit 1; \
|
|
fi
|
|
|
|
11rdaemon_clean:
|
|
$(call BspAppMake, $(BSP_API_MTKIAPPD_DIR), clean)
|
|
else
|
|
11rdaemon:
|
|
11rdaemon_clean:
|
|
endif
|
|
###########################################################################
|
|
#Build 8021X
|
|
ifneq ($(strip $(TCSUPPORT_WLAN_8021X)),)
|
|
8021X:
|
|
echo "Build 8021X"
|
|
$(call BspAppMake, $(BSP_API_8021X_DIR), all, 8021X)
|
|
if test -e $(BSP_API_8021X_DIR)/rtdot1xd; \
|
|
then echo "Compile 8021X success"; \
|
|
else echo "Compile 8021X error!"; exit 1; \
|
|
fi
|
|
ln -sf rtdot1xd $(BSP_EXT_FS)/userfs/bin/rtdot1xd_AC
|
|
|
|
8021X_clean:
|
|
echo "Clean 8021X"
|
|
$(call BspAppMake, $(BSP_API_8021X_DIR), clean)
|
|
else
|
|
8021X:
|
|
8021X_clean:
|
|
endif
|
|
###########################################################################
|
|
#Build wireless_tools.28
|
|
ifneq ($(strip $(TCSUPPORT_WLAN)),)
|
|
wirelesstool:
|
|
echo "Build wirelesstool"
|
|
$(call BspAppMake, $(BSP_API_WRIELESSTOOL_DIR), all, wirelesstool)
|
|
if test -e $(BSP_API_WRIELESSTOOL_DIR)/iwpriv; \
|
|
then echo "Compile iwpriv success"; \
|
|
else echo "Compile iwpriv error!"; exit 1; \
|
|
fi
|
|
if test -e $(BSP_API_WRIELESSTOOL_DIR)/libiw.so.28; \
|
|
then echo "Compile libiw.so.28 success"; \
|
|
else echo "Compile libiw.so.28 error!"; exit 1; \
|
|
fi
|
|
ifneq ($(strip $(TCSUPPORT_ECNT_MAP)),)
|
|
if test -e $(BSP_API_WRIELESSTOOL_DIR)/iwconfig; \
|
|
then echo "Compile iwconfig success"; \
|
|
else echo "Compile iwconfig error!"; exit 1; \
|
|
fi
|
|
$(call BspAppUserFsBinInstall, $(BSP_API_WRIELESSTOOL_DIR), iwconfig)
|
|
endif
|
|
$(call BspAppUserFsBinInstall, $(BSP_API_WRIELESSTOOL_DIR), iwpriv)
|
|
cp $(BSP_API_WRIELESSTOOL_DIR)/libiw.so.28 $(BSP_EXT_FS)/lib/
|
|
|
|
wirelesstool_clean:
|
|
echo "Clean wirelesstool"
|
|
$(call BspAppMake, $(BSP_API_WRIELESSTOOL_DIR), clean)
|
|
$(call BspAppUserFsBinClean, iwconfig iwpriv)
|
|
|
|
else
|
|
wirelesstool:
|
|
echo "No Build Wireless!"
|
|
wirelesstool_clean:
|
|
echo "No Clean Wireless!"
|
|
endif
|
|
###########################################################################
|
|
#Build iwprivget
|
|
iwprivget:
|
|
$(call BspAppMake, $(BSP_API_IWPRIVGET_DIR), all, iwprivget)
|
|
if test -e $(BSP_API_IWPRIVGET_DIR)/iwprivget; \
|
|
then echo "Compile iwprivget success"; \
|
|
else echo "Compile iwprivget error!"; exit 1; \
|
|
fi
|
|
|
|
iwprivget_clean:
|
|
-$(call BspAppMake, $(BSP_API_IWPRIVGET_DIR), clean)
|
|
###########################################################################
|
|
#Build portbindcmd
|
|
portbindcmd:
|
|
echo "Building portbindcmd"
|
|
$(call BspAppMake, $(APP_BSP_PORTBIND_DIR), all, portbindcmd)
|
|
if test -e $(APP_BSP_PORTBIND_DIR)/portbindcmd; \
|
|
then echo "Compile portbindcmd success"; \
|
|
else echo "Compile portbindcmd error!"; exit 1; \
|
|
fi
|
|
|
|
portbindcmd_clean:
|
|
echo "Clean portbindcmd"
|
|
$(call BspAppMake, $(APP_BSP_PORTBIND_DIR), clean)
|
|
###########################################################################
|
|
ethtool:
|
|
echo "Build ethtool"
|
|
$(MAKE) -C $(APP_BSP_ETHTOOL_DIR)
|
|
if test -e $(APP_BSP_ETHTOOL_DIR)/ethtool; \
|
|
then echo "Compile ethtool success"; \
|
|
else echo "Compile ethtool error!"; exit 1; \
|
|
fi
|
|
#cp $(APP_BSP_ETHTOOL_DIR)/ethtool $(FILESYSTEM_DIR)/usr/bin/
|
|
$(call BspAppUsrBinInstall, $(APP_BSP_ETHTOOL_DIR), ethtool)
|
|
|
|
|
|
ethtool_clean:
|
|
echo "Clean ethtool"
|
|
$(MAKE) -C $(APP_BSP_ETHTOOL_DIR) clean
|
|
###########################################################################
|
|
|