Skip to content

Commit 65c49d7

Browse files
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: (34 commits) kernel: bump 5.4 to 5.4.214 (coolsnowwolf#10170) kernel: bump 5.19 to 5.19.10 (coolsnowwolf#10168) kernel: bump 5.15 to 5.15.69 kernel: replace downstream get_mtd_device_by_node() implementation e2guardian: fix gcc11 compile error iucode-tool: fix host-compile on macos and non-x86 linux autocore: ethinfo: rewritten in lua umbim: fixes build with gcc 11 (coolsnowwolf#10163) rockchip: replace patches with upstream tools/cmake: fix download url with make variables kernel: backport MTK ethernet/WLAN offload fixes mediatek: build ubnt-ledbar as a module system.ntp.enable_server default (coolsnowwolf#10158) mediatek: sync upstream source code kernel: 5.15: add support for ESMT F50x1G41LB mediatek: fix sysupgrade on MTK7986 rfba AP mediatek: filogic: use WPS button instead of RST on BPi-R3 mediatek: bpi-r64: make initramfs/recovery optional mediatek: bpi-r3: make initramfs/recovery optional uboot-mediatek: replace patches with updated versions ...
2 parents 3dc7a4c + 6fc2d00 commit 65c49d7

File tree

1,806 files changed

+48882
-411691
lines changed

Some content is hidden

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

1,806 files changed

+48882
-411691
lines changed

include/kernel-5.15

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.15 = .68
2-
LINUX_KERNEL_HASH-5.15.68 = 17bbb3cb5c9ba18583b6679cc28f828aec49c72abbfc6fbde310b0cb17218b7e
1+
LINUX_VERSION-5.15 = .69
2+
LINUX_KERNEL_HASH-5.15.69 = e32839ca761e5251f25708f7939b37b101d28fc29515a97bfc0c838a21efdf34

include/kernel-5.19

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.19 = .9
2-
LINUX_KERNEL_HASH-5.19.9 = 0ad5b5986693adc1962be807bc3a64423a24b6a9da9df39b259d7e3bfd927f37
1+
LINUX_VERSION-5.19 = .10
2+
LINUX_KERNEL_HASH-5.19.10 = 67dab932e85f9b9062ced666c8ea888230a1dadfd624b05aead6b6ebc6d3bdd5

include/kernel-5.4

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.4 = .211
2-
LINUX_KERNEL_HASH-5.4.211 = bfb43241b72cd55797af68bea1cebe630d37664c0f9a99b6e9263a63a67e2dec
1+
LINUX_VERSION-5.4 = .214
2+
LINUX_KERNEL_HASH-5.4.214 = 9abc79b4808c827eb82f8a44313ce6d3ade255949989bb98c11acda7ca3bc5db

package/base-files/files/bin/config_generate

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ generate_static_system() {
296296
delete system.ntp
297297
set system.ntp='timeserver'
298298
set system.ntp.enabled='1'
299-
set system.ntp.enable_server='0'
299+
set system.ntp.enable_server='1'
300300
add_list system.ntp.server='ntp.aliyun.com'
301301
add_list system.ntp.server='time1.cloud.tencent.com'
302302
add_list system.ntp.server='time.ustc.edu.cn'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Copyright (C) 2021 OpenWrt.org
3+
#
4+
5+
[ -e /etc/config/ubootenv ] && exit 0
6+
7+
touch /etc/config/ubootenv
8+
9+
. /lib/uboot-envtools.sh
10+
. /lib/functions.sh
11+
12+
board=$(board_name)
13+
14+
case "$board" in
15+
bananapi,bpi-r3)
16+
. /lib/upgrade/common.sh
17+
export_bootdevice
18+
export_partdevice rootdev 0
19+
case "$rootdev" in
20+
mmc*)
21+
local envdev=$(find_mmc_part "ubootenv" $rootdev)
22+
ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
23+
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
24+
;;
25+
mtd*)
26+
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
27+
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
28+
ubootenv_add_uci_config "$envdev" "0x20000" "0x20000" "0x20000" "1"
29+
;;
30+
*)
31+
. /lib/upgrade/nand.sh
32+
local envubi=$(nand_find_ubi ubi)
33+
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
34+
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
35+
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x1f000" "1"
36+
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x1f000" "1"
37+
;;
38+
esac
39+
;;
40+
esac
41+
42+
config_load ubootenv
43+
config_foreach ubootenv_add_app_config ubootenv
44+
45+
exit 0

package/boot/uboot-mediatek/Makefile

+176-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,77 @@
11
include $(TOPDIR)/rules.mk
22
include $(INCLUDE_DIR)/kernel.mk
33

4-
PKG_VERSION:=2021.04
5-
PKG_HASH:=0d438b1bb5cceb57a18ea2de4a0d51f7be5b05b98717df05938636e0aadfe11a
4+
PKG_VERSION:=2022.07
5+
PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e
66
PKG_BUILD_DEPENDS:=arm-trusted-firmware-tools/host
77

88
include $(INCLUDE_DIR)/u-boot.mk
99
include $(INCLUDE_DIR)/package.mk
1010
include $(INCLUDE_DIR)/host-build.mk
1111

12+
MT7621_LOWLEVEL_PRELOADER_URL:=https://raw.githubusercontent.com/mtk-openwrt/mt7621-lowlevel-preloader/a03b07c60bf1ba4add9b671d32caa102fe948180/
13+
14+
define Download/mt7621-stage-sram
15+
FILE:=mt7621_stage_sram.bin
16+
URL:=$(MT7621_LOWLEVEL_PRELOADER_URL)
17+
HASH:=1dda68aa089f0ff262e01539b990dea478952e9fb68bcc0a8cd6f76f0135c62e
18+
endef
19+
20+
define Download/mt7621-stage-sram-noprint
21+
FILE:=mt7621_stage_sram_noprint.bin
22+
URL:=$(MT7621_LOWLEVEL_PRELOADER_URL)
23+
HASH:=8ee419275144fc298e9444d413d98e965a55d283152a74ea6a1f8de79eb516b6
24+
endef
25+
26+
ifdef CONFIG_TARGET_ramips_mt7621
27+
ifdef CONFIG_DEBUG
28+
$(eval $(call Download,mt7621-stage-sram))
29+
else
30+
$(eval $(call Download,mt7621-stage-sram-noprint))
31+
endif
32+
endif
33+
1234
define U-Boot/Default
1335
BUILD_TARGET:=mediatek
1436
UBOOT_IMAGE:=u-boot-mtk.bin
1537
endef
1638

39+
define U-Boot/mt7620_rfb
40+
NAME:=MT7620 Reference Board
41+
UBOOT_CONFIG:=mt7620_rfb
42+
BUILD_DEVICES:=ralink_mt7620a-evb
43+
BUILD_TARGET:=ramips
44+
BUILD_SUBTARGET:=mt7620
45+
UBOOT_IMAGE:=u-boot-with-spl.bin
46+
endef
47+
48+
define U-Boot/mt7620_mt7530_rfb
49+
NAME:=MT7620+MT7530 Reference Board
50+
UBOOT_CONFIG:=mt7620_mt7530_rfb
51+
BUILD_DEVICES:=ralink_mt7620a-mt7530-evb
52+
BUILD_TARGET:=ramips
53+
BUILD_SUBTARGET:=mt7620
54+
UBOOT_IMAGE:=u-boot-with-spl.bin
55+
endef
56+
57+
define U-Boot/mt7621_rfb
58+
NAME:=MT7621 Reference Board
59+
UBOOT_CONFIG:=mt7621_rfb
60+
BUILD_DEVICES:=mediatek_mt7621-eval-board
61+
BUILD_TARGET:=ramips
62+
BUILD_SUBTARGET:=mt7621
63+
UBOOT_IMAGE:=u-boot-mt7621.bin
64+
endef
65+
66+
define U-Boot/mt7621_nand_rfb
67+
NAME:=MT7621 Reference Board (NAND)
68+
UBOOT_CONFIG:=mt7621_nand_rfb
69+
BUILD_DEVICES:=mediatek_mt7621-eval-board
70+
BUILD_TARGET:=ramips
71+
BUILD_SUBTARGET:=mt7621
72+
UBOOT_IMAGE:=u-boot-mt7621.bin
73+
endef
74+
1775
define U-Boot/mt7622_rfb1
1876
NAME:=MT7622 Reference Board 1
1977
UBOOT_CONFIG:=mt7622_rfb
@@ -68,7 +126,7 @@ endef
68126
define U-Boot/mt7622_ubnt_unifi-6-lr
69127
NAME:=Ubiquiti UniFi 6 LR
70128
UBOOT_CONFIG:=mt7622_ubnt_unifi-6-lr
71-
BUILD_DEVICES:=ubnt_unifi-6-lr-ubootmod
129+
BUILD_DEVICES:=ubnt_unifi-6-lr-v1-ubootmod ubnt_unifi-6-lr-v2-ubootmod
72130
BUILD_SUBTARGET:=mt7622
73131
UBOOT_IMAGE:=u-boot.fip
74132
BL2_BOOTDEV:=nor
@@ -79,27 +137,110 @@ endef
79137

80138
define U-Boot/mt7623a_unielec_u7623
81139
NAME:=UniElec U7623 (mt7623)
82-
BUILD_DEVICES:=unielec_u7623-emmc unielec_u7623-02-emmc-512m-legacy
140+
BUILD_DEVICES:=unielec_u7623-02
83141
BUILD_SUBTARGET:=mt7623
84142
UBOOT_CONFIG:=mt7623a_unielec_u7623_02
85143
endef
86144

87145
define U-Boot/mt7623n_bpir2
88146
NAME:=Banana Pi R2 (mt7623)
89-
BUILD_DEVICES:=bpi_bananapi-r2
147+
BUILD_DEVICES:=bananapi_bpi-r2
90148
BUILD_SUBTARGET:=mt7623
91149
UBOOT_IMAGE:=u-boot.bin
92150
UBOOT_CONFIG:=mt7623n_bpir2
93151
endef
94152

153+
define U-Boot/mt7628_rfb
154+
NAME:=MT7628 Reference Board
155+
BUILD_DEVICES:=mediatek_mt7628an-eval-board
156+
BUILD_TARGET:=ramips
157+
BUILD_SUBTARGET:=mt76x8
158+
UBOOT_CONFIG:=mt7628_rfb
159+
UBOOT_IMAGE:=u-boot-with-spl.bin
160+
endef
161+
162+
define U-Boot/ravpower_rp-wd009
163+
NAME:=RAVPower RP-WD009
164+
BUILD_TARGET:=ramips
165+
BUILD_DEVICES:=ravpower_rp-wd009
166+
BUILD_SUBTARGET:=mt76x8
167+
UBOOT_CONFIG:=ravpower-rp-wd009-ram
168+
UBOOT_IMAGE:=u-boot.bin
169+
endef
170+
95171
define U-Boot/mt7629_rfb
96172
NAME:=MT7629 Reference Board
97173
BUILD_SUBTARGET:=mt7629
98174
BUILD_DEVICES:=mediatek_mt7629-rfb
99175
UBOOT_CONFIG:=mt7629_rfb
100176
endef
101177

178+
define U-Boot/mt7986_rfb
179+
NAME:=MT7986 Reference Board
180+
BUILD_SUBTARGET:=filogic
181+
BUILD_DEVICES:=mediatek_mt7986-rfb
182+
UBOOT_CONFIG:=mt7986_rfb
183+
UBOOT_IMAGE:=u-boot.fip
184+
BL2_BOOTDEV:=sdmmc
185+
BL2_SOC:=mt7986
186+
BL2_DDRTYPE:=ddr4
187+
DEPENDS:=+trusted-firmware-a-mt7986-sdmmc-ddr4
188+
endef
189+
190+
define U-Boot/mt7986_bananapi_bpi-r3-emmc
191+
NAME:=BananaPi BPi-R3
192+
BUILD_SUBTARGET:=filogic
193+
BUILD_DEVICES:=bananapi_bpi-r3
194+
UBOOT_CONFIG:=mt7986a_bpi-r3-emmc
195+
UBOOT_IMAGE:=u-boot.fip
196+
BL2_BOOTDEV:=emmc
197+
BL2_SOC:=mt7986
198+
BL2_DDRTYPE:=ddr4
199+
DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4
200+
endef
201+
202+
define U-Boot/mt7986_bananapi_bpi-r3-sdmmc
203+
NAME:=BananaPi BPi-R3
204+
BUILD_SUBTARGET:=filogic
205+
BUILD_DEVICES:=bananapi_bpi-r3
206+
UBOOT_CONFIG:=mt7986a_bpi-r3-sd
207+
UBOOT_IMAGE:=u-boot.fip
208+
BL2_BOOTDEV:=sdmmc
209+
BL2_SOC:=mt7986
210+
BL2_DDRTYPE:=ddr4
211+
DEPENDS:=+trusted-firmware-a-mt7986-sdmmc-ddr4
212+
endef
213+
214+
define U-Boot/mt7986_bananapi_bpi-r3-snand
215+
NAME:=BananaPi BPi-R3
216+
BUILD_SUBTARGET:=filogic
217+
BUILD_DEVICES:=bananapi_bpi-r3
218+
UBOOT_CONFIG:=mt7986a_bpi-r3-snand
219+
UBOOT_IMAGE:=u-boot.fip
220+
BL2_BOOTDEV:=spim-nand
221+
BL2_SOC:=mt7986
222+
BL2_DDRTYPE:=ddr4
223+
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr4
224+
endef
225+
226+
define U-Boot/mt7986_bananapi_bpi-r3-nor
227+
NAME:=BananaPi BPi-R3
228+
BUILD_SUBTARGET:=filogic
229+
BUILD_DEVICES:=bananapi_bpi-r3
230+
UBOOT_CONFIG:=mt7986a_bpi-r3-nor
231+
UBOOT_IMAGE:=u-boot.fip
232+
BL2_BOOTDEV:=nor
233+
BL2_SOC:=mt7986
234+
BL2_DDRTYPE:=ddr4
235+
DEPENDS:=+trusted-firmware-a-mt7986-nor-ddr4
236+
FIP_COMPRESS:=1
237+
endef
238+
102239
UBOOT_TARGETS := \
240+
mt7620_mt7530_rfb \
241+
mt7620_rfb \
242+
mt7621_nand_rfb \
243+
mt7621_rfb \
103244
mt7622_bananapi_bpi-r64-emmc \
104245
mt7622_bananapi_bpi-r64-sdmmc \
105246
mt7622_bananapi_bpi-r64-snand \
@@ -108,23 +249,46 @@ UBOOT_TARGETS := \
108249
mt7622_ubnt_unifi-6-lr \
109250
mt7623n_bpir2 \
110251
mt7623a_unielec_u7623 \
111-
mt7629_rfb
252+
mt7628_rfb \
253+
ravpower_rp-wd009 \
254+
mt7629_rfb \
255+
mt7986_bananapi_bpi-r3-emmc \
256+
mt7986_bananapi_bpi-r3-sdmmc \
257+
mt7986_bananapi_bpi-r3-snand \
258+
mt7986_bananapi_bpi-r3-nor \
259+
mt7986_rfb
112260

261+
ifdef CONFIG_TARGET_mediatek
113262
UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE:.fip=.bin)
114-
115-
Build/Exports:=$(Host/Exports)
263+
endif
116264

117265
define Build/fip-image
118266
$(if $(FIP_COMPRESS),\
119-
xz -f -e -k -9 -C crc32 $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin ;\
267+
xz -f -e -k -9 -C crc32 $(STAGING_DIR_IMAGE)/$(if $(BL2_SOC),$(BL2_SOC),$(BUILD_SUBTARGET))-$(BL2_BOOTDEV)-$(if $(BL2_DDRTYPE),$(BL2_DDRTYPE)-)$(if $(BL2_DDRBLOB),$(BL2_DDRBLOB)ddr-)bl31.bin ;\
120268
xz -f -e -k -9 -C crc32 $(PKG_BUILD_DIR)/u-boot.bin \
121269
)
122270
$(STAGING_DIR_HOST)/bin/fiptool create \
123-
--soc-fw $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin$(if $(FIP_COMPRESS),.xz) \
271+
--soc-fw $(STAGING_DIR_IMAGE)/$(if $(BL2_SOC),$(BL2_SOC),$(BUILD_SUBTARGET))-$(BL2_BOOTDEV)-$(if $(BL2_DDRTYPE),$(BL2_DDRTYPE)-)$(if $(BL2_DDRBLOB),$(BL2_DDRBLOB)ddr-)bl31.bin$(if $(FIP_COMPRESS),.xz) \
124272
--nt-fw $(PKG_BUILD_DIR)/u-boot.bin$(if $(FIP_COMPRESS),.xz) \
125273
$(PKG_BUILD_DIR)/u-boot.fip
126274
endef
127275

276+
ifdef CONFIG_TARGET_ramips_mt7621
277+
define Build/Prepare
278+
$(call Build/Prepare/Default)
279+
ifdef CONFIG_DEBUG
280+
$(CP) $(DL_DIR)/mt7621_stage_sram.bin $(PKG_BUILD_DIR)/
281+
else
282+
$(CP) $(DL_DIR)/mt7621_stage_sram_noprint.bin $(PKG_BUILD_DIR)/mt7621_stage_sram.bin
283+
endif
284+
endef
285+
endif
286+
287+
define Build/Configure
288+
$(call Build/Configure/U-Boot)
289+
sed -i 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
290+
endef
291+
128292
define Build/Compile
129293
$(call Build/Compile/U-Boot)
130294
ifeq ($(UBOOT_IMAGE),u-boot.fip))
@@ -133,8 +297,10 @@ endif
133297
endef
134298

135299
# don't stage files to bindir, let target/linux/mediatek/image/*.mk do that
300+
ifdef CONFIG_TARGET_mediatek
136301
define Package/u-boot/install
137302
endef
303+
endif
138304

139305
define Build/InstallDev
140306
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)

0 commit comments

Comments
 (0)