In OpenWrt, the Files custom folder is selected. In Make menuconfig, select the implementation in the folder. openwrtmenuconfig
Create a script file in the openwrt root directory:
#!/bin/bash# *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*# > Author: xiaojunyu/LunaW# > Mail : xiaojunyu5201314@163.com # > Gmail : lunaw.org@gmail.com # > Blog : http://blog.csdn.net/lunaw# > GitHub: https://github.com/lunaw# > Web : http://lunaw.org# *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*echo "include \$(TOPDIR)/rules.mk" > xiaotempecho "PKG_NAME:=Qxnet-Files" >> xiaotempecho "PKG_RELEASE:=1" >> xiaotempecho "PKG_BUILD_DIR:=\$(BUILD_DIR)/\$(PKG_NAME)" >> xiaotempecho "include \$(INCLUDE_DIR)/package.mk" >> xiaotempecho "" >> xiaotempfor PackName in $(ls Qxnet-Files)do echo "define Package/$PackName" >> xiaotemp echo " SECTION:=files" >> xiaotemp echo " CATEGORY:=Qxnet-Files" >> xiaotemp echo " TITLE:=$PackName Files" >> xiaotemp echo "endef" >> xiaotemp echo "define Build/Prepare" >> xiaotemp echo " mkdir -p \$(PKG_BUILD_DIR)" >> xiaotemp echo " \$(CP) ./src/* \$(PKG_BUILD_DIR)/" >> xiaotemp echo "endef" >> xiaotemp if [[ "$PackName" == "z-key-add" ]] then echo "define Package/$PackName/install" >> xiaotemp echo " cp -rvf \$(TOPDIR)/Qxnet-Files/$PackName/* \$(TOPDIR)/files" >> xiaotemp echo "endef" >> xiaotemp echo "" >> xiaotemp else echo "define Package/$PackName/install" >> xiaotemp echo " rm -rf \$(TOPDIR)/files" >> xiaotemp echo " cp -rvf \$(TOPDIR)/Qxnet-Files/$PackName \$(TOPDIR)/" >> xiaotemp echo " mv \$(TOPDIR)/$PackName \$(TOPDIR)/files" >> xiaotemp echo "endef" >> xiaotemp echo "" >> xiaotemp fi donefor PackName in $(ls Qxnet-Files)do echo "\$(eval \$(call BuildPackage,$PackName))" >> xiaotempdonemv xiaotemp package/Qxnet-Files/Makefile
Then add the corresponding folder.
In include/toplevel. mk:
Prepare-tmpinfo: run the above script in the line below FORCE.
In the future, you only need to put the files of various versions under Qxnet-Files to find the corresponding package in make menuconfig, and select it to compile it.
In the script, z-key-add is an encryption package of the company's Encryption Board, and the encryption package is added, so I made a judgment that the rest of the packages are in the form of Delete Overwrite
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.