Skip to content

Commit 3dc7a4c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into build_k2p
2 parents 5d932c4 + e78c4bf commit 3dc7a4c

File tree

3,438 files changed

+579711
-303385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,438 files changed

+579711
-303385
lines changed

.github/workflows/openwrt-ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ on:
2020
types: [published]
2121
watch:
2222
types: [started]
23+
24+
permissions:
25+
contents: read
2326

2427
jobs:
2528

2629
build_openwrt:
2730

31+
permissions:
32+
contents: write # for release creation
33+
2834
name: Build OpenWrt firmware
2935

3036
runs-on: ubuntu-latest

README.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 欢迎来到 Lean 的 Openwrt 源码仓库
22

3-
如何编译自己需要的 OpenWrt 固件 [English](./README_EN.md)
3+
如何编译自己需要的 OpenWrt 固件 [How to build your Openwrt firmware](./README_EN.md)
44

55
## 官方讨论群
66
如有技术问题需要讨论或者交流,欢迎加入以下群:
@@ -48,7 +48,7 @@
4848
make V=s -j1
4949
```
5050

51-
本套代码保证肯定可以编译成功。里面包括了 R21 所有源代码,包括 IPK 的。
51+
本套代码保证肯定可以编译成功。里面包括了 R22 所有源代码,包括 IPK 的。
5252

5353
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
5454

@@ -127,13 +127,21 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
127127

128128
## 软路由介绍
129129

130-
友情推荐不恰饭:如果你在寻找一个低功耗小体积性能不错的 x86 / x64 路由器,我个人建议可以考虑小马v1 的铝合金版本
131-
(N3710 4千兆):[页面介绍](https://item.taobao.com/item.htm?spm=a230r.1.14.20.144c763fRkK0VZ&id=561126544764)
130+
iKOOLCORE 硬酷R1 多网口小主机 - N5105/N6005 : Cube box, rest fun. 方寸之间,尽是乐趣
132131

133-
![xm1](doc/xm5.jpg) ![xm2](doc/xm6.jpg)
132+
(商品介绍页面 - 深圳市硬酷科技):
133+
[Lean用户R1专属券](https://taoquan.taobao.com/coupon/unify_apply.htm?sellerId=1981117776&activityId=3eb8a2ad3c8945ed831b203f44dc218b)
134+
[N5105下单链接](https://item.taobao.com/item.htm?ft=t&id=682987219699)
135+
[N6005下单链接](https://item.taobao.com/item.htm?ft=t&id=682672722483)
136+
137+
(商品介绍页面 - 硬酷科技(支持花呗)):
138+
[Lean用户R1专属券](https://taoquan.taobao.com/coupon/unify_apply.htm?sellerId=2208215115814&activityId=e013790422b849edb3a71e4e6aa46ff3)
139+
[下单链接](https://item.taobao.com/item.htm?ft=t&id=682987219699)
140+
141+
[![r1](doc/r1.jpg)](https://item.taobao.com/item.htm?ft=t&id=682025492099)
134142

135143
## 捐贈
136144

137145
如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善
138146

139-
支付宝 ![alipay](doc/alipay_donate.jpg) 微信 ![wechat](doc/wechat_donate.jpg)
147+
![star](doc/star.png)

config/Config-images.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ menu "Target Images"
287287
config TARGET_IMAGES_GZIP
288288
bool "GZip images"
289289
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
290-
default n
290+
default y
291291

292292
comment "Image Options"
293293

@@ -298,13 +298,13 @@ menu "Target Images"
298298
depends on USES_BOOT_PART
299299
default 8 if TARGET_apm821xx_sata
300300
default 64 if TARGET_bcm27xx
301-
default 32 if TARGET_rockchip
301+
default 64 if TARGET_rockchip
302302
default 16
303303

304304
config TARGET_ROOTFS_PARTSIZE
305305
int "Root filesystem partition size (in MB)"
306306
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml
307-
default 160
307+
default 400
308308
help
309309
Select the root filesystem partition size.
310310

doc/alipay_donate.jpg

-71.2 KB
Binary file not shown.

doc/r1.jpg

125 KB
Loading

doc/star.png

163 KB
Loading

doc/wechat_donate.jpg

-51.1 KB
Binary file not shown.

doc/xm5.jpg

-23.8 KB
Binary file not shown.

doc/xm6.jpg

-27.9 KB
Binary file not shown.

include/cmake.mk

+9-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ endif
1818
CMAKE_BINARY_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
1919
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
2020
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
21+
HOST_CMAKE_BINARY_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
2122
MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)
2223

2324
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
2425
cmake_tool=$(TOOLCHAIN_DIR)/bin/$(1)
2526
else
26-
cmake_tool=$(shell which $(1))
27+
cmake_tool=$(shell command -v $(1))
2728
endif
2829

2930
ifeq ($(CONFIG_CCACHE),)
@@ -51,20 +52,21 @@ CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))
5152
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
5253
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
5354
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
55+
CMAKE_HOST_INSTALL_PREFIX ?= $(HOST_BUILD_PREFIX)
5456

5557
ifeq ($(HOST_USE_NINJA),1)
5658
CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Ninja"
5759

5860
define Host/Compile/Default
59-
+$(NINJA) -C $(HOST_BUILD_DIR) $(1)
61+
+$(NINJA) -C $(HOST_CMAKE_BINARY_DIR) $(1)
6062
endef
6163

6264
define Host/Install/Default
63-
+$(NINJA) -C $(HOST_BUILD_DIR) install
65+
+$(NINJA) -C $(HOST_CMAKE_BINARY_DIR) install
6466
endef
6567

6668
define Host/Uninstall/Default
67-
+$(NINJA) -C $(HOST_BUILD_DIR) uninstall
69+
+$(NINJA) -C $(HOST_CMAKE_BINARY_DIR) uninstall
6870
endef
6971
endif
7072

@@ -133,7 +135,8 @@ endef
133135
Build/InstallDev = $(if $(CMAKE_INSTALL),$(Build/InstallDev/cmake))
134136

135137
define Host/Configure/Default
136-
(cd $(HOST_BUILD_DIR); \
138+
mkdir -p "$(HOST_CMAKE_BINARY_DIR)"
139+
(cd $(HOST_CMAKE_BINARY_DIR); \
137140
CFLAGS="$(HOST_CFLAGS)" \
138141
CXXFLAGS="$(HOST_CFLAGS)" \
139142
LDFLAGS="$(HOST_LDFLAGS)" \
@@ -155,7 +158,7 @@ define Host/Configure/Default
155158
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
156159
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
157160
-DCMAKE_STRIP=: \
158-
-DCMAKE_INSTALL_PREFIX=$(HOST_BUILD_PREFIX) \
161+
-DCMAKE_INSTALL_PREFIX=$(CMAKE_HOST_INSTALL_PREFIX) \
159162
-DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
160163
-DCMAKE_SKIP_RPATH=TRUE \
161164
-DCMAKE_INSTALL_LIBDIR=lib \

include/kernel-5.10

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.10 = .138
2-
LINUX_KERNEL_HASH-5.10.138 = 29a003bb8e0e3a45942f703370fb0b3460e6fdcbbad37424423c9cf831ab5ba8
1+
LINUX_VERSION-5.10 = .143
2+
LINUX_KERNEL_HASH-5.10.143 = fa2c9edef272d39dca52e057e1d41433cf1b6ab6a00d24a00333c0b735054e91

include/kernel-5.15

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.15 = .63
2-
LINUX_KERNEL_HASH-5.15.63 = 6dd3cd1e5a629d0002bc6c6ec7e8ea96710104f38664122dd56c83dfd4eb7341
1+
LINUX_VERSION-5.15 = .68
2+
LINUX_KERNEL_HASH-5.15.68 = 17bbb3cb5c9ba18583b6679cc28f828aec49c72abbfc6fbde310b0cb17218b7e

include/kernel-5.19

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.19 = .4
2-
LINUX_KERNEL_HASH-5.19.4 = a9214b97085af98dfcaaa8c2e8eff4858c1d53dccd6c58931cf7b0455ff9bf87
1+
LINUX_VERSION-5.19 = .9
2+
LINUX_KERNEL_HASH-5.19.9 = 0ad5b5986693adc1962be807bc3a64423a24b6a9da9df39b259d7e3bfd927f37

include/kernel-5.4

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.4 = .203
2-
LINUX_KERNEL_HASH-5.4.203 = fc933f5b13066cfa54aacb5e86747a167bad1d8d23972e4a03ab5ee36c29798a
1+
LINUX_VERSION-5.4 = .211
2+
LINUX_KERNEL_HASH-5.4.211 = bfb43241b72cd55797af68bea1cebe630d37664c0f9a99b6e9263a63a67e2dec

include/netfilter.mk

+23-10
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_COMMENT, $(P_XT)xt_comme
4848
$(eval $(call nf_add,IPT_CLUSTER,CONFIG_NETFILTER_XT_MATCH_CLUSTER, $(P_XT)xt_cluster))
4949

5050
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)xt_LOG))
51-
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_common, lt 5.13))
52-
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_V4)nf_log_ipv4, lt 5.13))
53-
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_syslog, ge 5.13))
5451
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_TCPMSS, $(P_XT)xt_TCPMSS))
5552
$(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_REJECT, $(P_V4)ipt_REJECT))
5653
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_TIME, $(P_XT)xt_time))
@@ -156,7 +153,6 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_IPT6,CONFIG_IP6_NF_IPTABLES, $(P_V6)ip6_
156153
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
157154

158155
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
159-
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),))
160156
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6,lt 5.13),))
161157

162158
$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6)))
@@ -173,6 +169,13 @@ $(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_OPTS, $(P_V6)ip6t_hbh))
173169
$(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_FRAG, $(P_V6)ip6t_frag))
174170
$(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, $(P_V6)ip6t_rt))
175171

172+
# log
173+
174+
$(eval $(call nf_add,NF_LOG,CONFIG_NF_LOG_COMMON, $(P_XT)nf_log_common, lt 5.13))
175+
$(eval $(call nf_add,NF_LOG,CONFIG_NF_LOG_IPV4, $(P_V4)nf_log_ipv4, lt 5.13))
176+
$(eval $(call nf_add,NF_LOG,CONFIG_NF_LOG_SYSLOG, $(P_XT)nf_log_syslog, ge 5.13))
177+
# $(eval $(if $(NF_KMOD),$(call nf_add,NF_LOG6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6,lt 5.13),))
178+
176179
# nat
177180

178181
# kernel only
@@ -245,14 +248,15 @@ $(eval $(call nf_add,IPT_NFQUEUE,CONFIG_NETFILTER_XT_TARGET_NFQUEUE, $(P_XT)xt_N
245248

246249
$(eval $(call nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE))
247250

248-
# tproxy
251+
# socket
252+
$(eval $(call nf_add,NF_SOCKET,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
253+
$(eval $(call nf_add,NF_SOCKET,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
254+
$(eval $(call nf_add,IPT_SOCKET,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
249255

250-
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
251-
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
252-
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
256+
# tproxy
257+
$(eval $(call nf_add,NF_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4))
258+
$(eval $(call nf_add,NF_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6))
253259
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY))
254-
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4))
255-
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6))
256260

257261
# led
258262
$(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
@@ -338,6 +342,7 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT_INET, $(P_XT)nft
338342

339343
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_META, $(P_EBT)nft_meta_bridge),))
340344
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_REJECT, $(P_EBT)nft_reject_bridge),))
345+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NF_CONNTRACK_BRIDGE, $(P_EBT)nf_conntrack_bridge),))
341346

342347
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_nat),))
343348
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_chain_nat),))
@@ -355,6 +360,14 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV6, $(P_V6)nft_fib
355360

356361
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_QUEUE,CONFIG_NFT_QUEUE, $(P_XT)nft_queue),))
357362

363+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_SOCKET,CONFIG_NFT_SOCKET, $(P_XT)nft_socket),))
364+
365+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_TPROXY,CONFIG_NFT_TPROXY, $(P_XT)nft_tproxy),))
366+
367+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_COMPAT,CONFIG_NFT_COMPAT, $(P_XT)nft_compat),))
368+
369+
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_XFRM,CONFIG_NFT_XFRM, $(P_XT)nft_xfrm),))
370+
358371
# userland only
359372
IPT_BUILTIN += $(NF_IPT-y) $(NF_IPT-m)
360373
IPT_BUILTIN += $(IPT_CORE-y) $(IPT_CORE-m)

include/prereq-build.mk

+4-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ $(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
192192
mkdir -p $(dir $@)
193193
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
194194

195-
prereq: $(STAGING_DIR_HOST)/bin/mkhash
195+
$(STAGING_DIR_HOST)/bin/xxd: $(SCRIPT_DIR)/xxdi.pl
196+
$(LN) $< $@
197+
198+
prereq: $(STAGING_DIR_HOST)/bin/mkhash $(STAGING_DIR_HOST)/bin/xxd
196199

197200
# Install ldconfig stub
198201
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \

include/trusted-firmware-a.mk

+3
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ define Build/Trusted-Firmware-A/Target
6969
endef
7070

7171

72+
DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc)
73+
7274
define Build/Compile/Trusted-Firmware-A
7375
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
7476
CROSS_COMPILE=$(TARGET_CROSS) \
7577
OPENSSL_DIR=$(STAGING_DIR_HOST) \
78+
$(if $(DTC),DTC="$(DTC)") \
7679
PLAT=$(PLAT) \
7780
BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
7881
$(TFA_MAKE_FLAGS)

0 commit comments

Comments
 (0)