From ba28a850a5fab52f15ce60884dc02af7fe322b6c Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Thu, 14 Sep 2023 18:53:58 +0800 Subject: [PATCH] add mini config --- .github/workflows/build.yml | 12 +- Makefile | 16 +- Makefile.mt7621 | 20 +- configs/{.config_k2p => .config} | 0 configs/{.config_k2p_drv => .config_drv} | 0 configs/.config_mini | 248 ++++++++++++++++++ configs/{.config_kernel => kernel/.config} | 0 .../.config_drv} | 0 8 files changed, 278 insertions(+), 18 deletions(-) rename configs/{.config_k2p => .config} (100%) rename configs/{.config_k2p_drv => .config_drv} (100%) create mode 100644 configs/.config_mini rename configs/{.config_kernel => kernel/.config} (100%) rename configs/{.config_kernel_drv => kernel/.config_drv} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0c3b8f..239a180 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,12 +15,12 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - drv: [mt_wifi, mt76] + drv: [mt76, drv, mini] steps: - uses: actions/checkout@v3 - uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-${{ matrix.drv }} + key: ${{ matrix.drv }} - name: Install packages run: | sudo apt update @@ -49,11 +49,9 @@ jobs: run: make image - name: Rename image run: | - if [ "$DRV" = "mt_wifi" ]; then - for f in images/*.bin; do - mv $f ${f/.bin/-drv.bin} - done - fi + for f in images/*.bin; do + mv $f ${f/.bin/-$DRV.bin} + done env: DRV: "${{ matrix.drv }}" - uses: actions/upload-artifact@v3 diff --git a/Makefile b/Makefile index 5ac3cc5..93dd806 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,16 @@ PATH = $(TOOLCHAIN_DIR)/bin:$(TOP_DIR)/tools:/usr/local/sbin:/usr/local/bin:/usr CRDA_URL = git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git PKGS = coova-chilli curl ebtables-2.0.9 filesharing hostapd-2018-07-08 inadynv2 \ - kromo l7 libevent libffi libmicrohttpd libnl-tiny lzma-loader \ + kromo l7 libevent libffi libucontext libmicrohttpd libnl-tiny lzma-loader \ $(if $(subst mt76,,$(DRV)),,mac80211 mac80211-rules) madwifi.dev \ misc rp-pppoe rules tools udhcpc usb_modeswitch util-linux export PATH SVN +define CopyConfig + cp configs/$(if $(subst mt76,,$(1)),$(if $(subst mini,,$(1)),.config_drv,.config_mini),.config) $(BUILD_DIR)/.config +endef + define PatchDir @for p in $(1)/*.patch; do \ echo "== Applying $$p..."; \ @@ -55,20 +59,20 @@ checkout: done cp Makefile.mt7621 $(BUILD_DIR)/Makefile.mt7621 - cp configs/.config_k2p $(BUILD_DIR)/.config + cp configs/.config $(BUILD_DIR)/.config $(MAKE_ROUTER) download prepare: $(call PatchDir,$(TOP_DIR)/patches) + $(call CopyConfig,$(DRV)) ifeq ($(DRV),mt76) [ -d $(BUILD_DIR)/crda ] || git clone $(CRDA_URL) $(BUILD_DIR)/crda echo "#!/bin/sh\n\necho crda called" > $(BUILD_DIR)/crda/crda.sh chmod +x $(BUILD_DIR)/crda/crda.sh ln -sf mac80211 $(BUILD_DIR)/compat-wireless ln -sf $(TOP_DIR)/dts/K2P.dts $(LINUX_DIR)/dts/K2P.dts - cp configs/.config_kernel $(LINUX_DIR)/.config - cp configs/.config_k2p $(BUILD_DIR)/.config + cp configs/kernel/.config $(LINUX_DIR)/.config else $(call PatchDir,$(TOP_DIR)/drivers/patches) rm -rf $(LINUX_DIR)/drivers/net/wireless/wifi_utility $(LINUX_DIR)/drivers/net/wireless/rt7615 @@ -79,8 +83,7 @@ else ln -sf $(TOP_DIR)/drivers/wireless_ralink.c $(BUILD_DIR)/httpd/visuals/wireless_ralink.c ln -sf $(TOP_DIR)/drivers/rt2880.c $(BUILD_DIR)/services/networking/wifi/rt2880.c ln -sf $(TOP_DIR)/dts/K2P_drv.dts $(LINUX_DIR)/dts/K2P.dts - cp configs/.config_kernel_drv $(LINUX_DIR)/.config - cp configs/.config_k2p_drv $(BUILD_DIR)/.config + cp configs/kernel/.config_drv $(LINUX_DIR)/.config endif ln -sf ../../opt $(BUILD_DIR)/opt cp $(LINUX_DIR)/drivers/net/wireless/Kconfig.dir882 $(LINUX_DIR)/drivers/net/wireless/Kconfig @@ -96,6 +99,7 @@ configure: $(MAKE_ROUTER) libffi-configure libffi $(MAKE_ROUTER) libnl-configure libnl $(MAKE_ROUTER) libpcap-configure libpcap + $(MAKE_ROUTER) libucontext-configure libucontext $(MAKE_ROUTER) openssl-configure openssl $(MAKE_ROUTER) curl-configure curl $(MAKE_ROUTER) gmp-configure gmp diff --git a/Makefile.mt7621 b/Makefile.mt7621 index 2518b9b..d7593f7 100644 --- a/Makefile.mt7621 +++ b/Makefile.mt7621 @@ -209,15 +209,20 @@ ifneq ($(CONFIG_USB),y) rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/fat rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/vfat rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/msdos + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/nls rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/mbcache.ko endif ifneq ($(CONFIG_USB_ADVANCED),y) rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext3 rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext4 + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/hfs + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/hfsplus rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/xfs rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/btrfs - rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd - rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd2 + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd2 + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/cdrom + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/scsi endif ifeq ($(CONFIG_3G_ONLY),y) rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs @@ -301,15 +306,20 @@ ifneq ($(CONFIG_USB),y) rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/fat rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/vfat rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/msdos + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/nls rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/mbcache.ko endif ifneq ($(CONFIG_USB_ADVANCED),y) rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext3 rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext4 + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/hfs + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/hfsplus rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/xfs rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/btrfs - rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd - rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd2 + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd2 + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/cdrom + rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/scsi endif ifeq ($(CONFIG_3G_ONLY),y) rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs @@ -351,4 +361,4 @@ include rules/all.mk .PHONY: all clean distclean mrproper install package .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig -.PHONY: dummy fixkc libnet libpcap libffi +.PHONY: dummy fixkc libnet libpcap libffi pcre diff --git a/configs/.config_k2p b/configs/.config similarity index 100% rename from configs/.config_k2p rename to configs/.config diff --git a/configs/.config_k2p_drv b/configs/.config_drv similarity index 100% rename from configs/.config_k2p_drv rename to configs/.config_drv diff --git a/configs/.config_mini b/configs/.config_mini new file mode 100644 index 0000000..c9bd104 --- /dev/null +++ b/configs/.config_mini @@ -0,0 +1,248 @@ +# +# Automatically generated make config: don't edit +# + +# +# Base Features +# +# CONFIG_CPUTEMP=y +CONFIG_OPENDPI=y +# CONFIG_SWAP=y +CONFIG_IPSET=y +# CONFIG_RSYNC=y +# CONFIG_SMBD=y +CONFIG_IRQBALANCE=y +# CONFIG_WPA3=y +# CONFIG_HOSTAPD2=y +CONFIG_WPA_SUPPLICANT2=y +CONFIG_NOOPT=y +CONFIG_MUSL=y +# CONFIG_MINIDLNA=y +# CONFIG_IPETH=y +# CONFIG_MACTELNET=y +CONFIG_SPEEDTEST_CLI=y +# CONFIG_TRANSMISSION=y +# CONFIG_PRIVOXY=y +# CONFIG_TOR=y +# CONFIG_UBOOTENV=y +CONFIG_SWCONFIG=y +CONFIG_MT7621=y +CONFIG_MT7620=y +CONFIG_MT7612=y +# CONFIG_EAD=y +# CONFIG_P910ND=y +# CONFIG_USB=y +# CONFIG_USB_ADVANCED=y +# CONFIG_SAMBA3=y +# CONFIG_SAMBA=y +# CONFIG_NTFS3G=y +# CONFIG_NTFS3=y +# CONFIG_3G=y +# CONFIG_FTP=y +# CONFIG_COMGT=y +# CONFIG_TCPDUMP=y +CONFIG_JFFS2=y +# CONFIG_OPENVPN=y +# CONFIG_OPENSSL=y +# CONFIG_FREERADIUS=y +# CONFIG_OLSRD=y +# CONFIG_SFTPSERVER=y +# CONFIG_VPNC=y +# CONFIG_VNCREPEATER=y +# CONFIG_POUND=y +# CONFIG_LIBCPP=y +# CONFIG_IPTRAF=y +CONFIG_NCURSES=y +# CONFIG_SCREEN=y +# CONFIG_MTR=y +# CONFIG_IPERF=y + +# CONFIG_EOP_TUNNEL=y +# CONFIG_WIVIZ=y +CONFIG_WHR300HP2=y +CONFIG_RT2860APD=y +CONFIG_RT3052=y +CONFIG_RT2880=y +CONFIG_WHRG300N=y +CONFIG_STABRIDGE=y +CONFIG_VLANTAGGING=y +CONFIG_JFFS2=y +CONFIG_NOMESSAGE=y +CONFIG_PWC=y +# CONFIG_REGISTER=y +# CONFIG_DEMO=y +# CONFIG_WIFIDOG=y +# CONFIG_LS2=y +CONFIG_MSSID=y +CONFIG_WIRELESS_TOOLS=y +CONFIG_LIBNET=y + +CONFIG_RADIOOFF=y +# CONFIG_OVERCLOCKING=y +CONFIG_CONNTRACK=y +CONFIG_PROXYWATCHDOG=y +CONFIG_LANGUAGE=y +CONFIG_NETWORKSETTINGS=y +CONFIG_ROUTERSTYLE=y +CONFIG_SCHEDULER=y +CONFIG_SYSLOG=y +CONFIG_TELNET=y +CONFIG_WDSWATCHDOG=y +CONFIG_IPV6=y +CONFIG_ARP=y +# CONFIG_CHILLILOCAL=y +# CONFIG_RADLOCAL=y +# CONFIG_E2FSPROGS=y +# CONFIG_HTTPREDIRECT=y +# CONFIG_SMTPREDIRECT=y +CONFIG_ELEGANT=y +# CONFIG_SPUTNIK_APD=y + +# CONFIG_3COM=y +CONFIG_BLUE=y +CONFIG_YELLOW=y +CONFIG_CYAN=y +CONFIG_DIST="std" +CONFIG_RED=y +CONFIG_GREEN=y +CONFIG_CDEBUG=n +CONFIG_TELNET=y +CONFIG_WIKAR=y +# CONFIG_ROBOCFG=y +CONFIG_KROMO=y +CONFIG_XIRIAN=y +CONFIG_BRAINSLAYER=y +CONFIG_NO_STYLUS=y + +CONFIG_RC=y +CONFIG_NVRAM=y +CONFIG_SHARED=y +CONFIG_BUSYBOX=y +CONFIG_LIBBCM=y +# CONFIG_WLCONF=y +CONFIG_BRIDGE=y +# CONFIG_VLAN is not set +CONFIG_HTTPD=y +CONFIG_WWW=y +# CONFIG_MATRIXSSL=y +# CONFIG_NOSSL is not set +CONFIG_EBTABLES=y +# CONFIG_NOCAT=y +# CONFIG_HOTSPOT=y + +# +# SIPATH +# +# CONFIG_RTPPROXY=y +# CONFIG_OPENSER=y +# CONFIG_MILKFISH=y +# CONFIG_SER=y +# CONFIG_MMC=y +# CONFIG_KAID=y +# CONFIG_ZEROIP is not set +CONFIG_RADAUTH=y +# CONFIG_CHILLISPOT=y +CONFIG_DHCPFORWARD=y +# CONFIG_SVEASPOT is not set +# CONFIG_VPND=y +# CONFIG_PPTPD=y + +# +# IPSec +# +# CONFIG_IPSEC is not set +# CONFIG_RADIUSPLUGIN=y +# CONFIG_PPPSTATS is not set +CONFIG_L7=y +# CONFIG_ZEBRA is not set +# CONFIG_QUAGGA=y +# CONFIG_WSHAPER is not set +CONFIG_SVQOS=y +# CONFIG_FROTTLE is not set +# CONFIG_PARPROUTED is not set +CONFIG_WOL=y +# CONFIG_SNMP=y +CONFIG_RADVD=y +# CONFIG_RFLOW=y +CONFIG_NETCONF=y +# CONFIG_IPTABLES is not set +CONFIG_LIBIPT=y +# CONFIG_GLIBC is not set +CONFIG_UCLIBC=y +CONFIG_LIBOPT=y +# CONFIG_ADM6996=y + +# +# Options +# +CONFIG_VENDOR=broadcom +CONFIG_UDHCPD=y +CONFIG_PPP=y +# CONFIG_PPPOESERVER=y +CONFIG_PPPOERELAY=y +# CONFIG_PPPOESNIFF is not set +CONFIG_UPNP=y +# CONFIG_NAS=y +# CONFIG_SES is not set +CONFIG_DROPBEAR_SSHD=y +CONFIG_BOOT_WAIT_ON=y +CONFIG_IPROUTE2=y +CONFIG_NTP=y +CONFIG_DNSMASQ=y +# CONFIG_DNSCRYPT=y +# CONFIG_IPVS=y +CONFIG_UTILS=y +# CONFIG_ETC is not set +# CONFIG_SPUTNIK_APD=y + +CONFIG_BCMWPA2=y +# CONFIG_KISMETDRONE is not set + +# +# Additional C libraries +# +CONFIG_LIBCRYPT=y +# CONFIG_LIBPCAP=y +CONFIG_LIBDL=y +CONFIG_LIBM=y +CONFIG_LIBRT=y +CONFIG_LIBNSL=y +CONFIG_LIBPTHREAD=y +CONFIG_LIBRESOLV=y +CONFIG_LIBUTIL=y + +# +# Environment +# +ARCHITECTURE=rt2880 +PLATFORM=mipsel +CONFIG_HOTPLUG2=y +KERNELVERSION=4.14 +LINUXDIR=$(SRCBASE)/linux/universal/linux-$(KERNELVERSION) +LIBDIR=$(TOOLCHAIN)/lib +USRLIBDIR=$(TOOLCHAIN)/usr/lib + +# +# Internal Options +# +PPPOE_SUPPORT=1 +CONFIG_PPPOE=y +PPTP_SUPPORT=1 +CONFIG_PPTP=y +PPPD_SUPPORT=1 +CONFIG_PPPD=y +HEARTBEAT_SUPPORT=1 +CONFIG_HEARTBEAT=y +PARENTAL_CONTROL_SUPPORT=1 +CONFIG_PARENTAL_CONTROL=y +CONFIG_L2TP=y +MULTICAST_SUPPORT=1 +CONFIG_MULTICAST=y + +CONFIG_DIR860=y +CONFIG_DIR882=y +# CONFIG_WIREGUARD=y +CONFIG_CAKE=y +CONFIG_SMARTDNS=y +# CONFIG_MRP=y +# CONFIG_HTOP=y diff --git a/configs/.config_kernel b/configs/kernel/.config similarity index 100% rename from configs/.config_kernel rename to configs/kernel/.config diff --git a/configs/.config_kernel_drv b/configs/kernel/.config_drv similarity index 100% rename from configs/.config_kernel_drv rename to configs/kernel/.config_drv