Skip to content

Commit 3a05242

Browse files
Merge branch 'openwrt:main' into wax206
2 parents dd3465e + 93e9e67 commit 3a05242

190 files changed

Lines changed: 4066 additions & 1521 deletions

File tree

Some content is hidden

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

include/kernel.mk

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,15 @@ define KernelPackage
219219
$(call KernelPackage/$(1))
220220
$(call KernelPackage/$(1)/$(BOARD))
221221
$(call KernelPackage/$(1)/$(BOARD)/$(SUBTARGET))
222+
223+
# Add an implicit self-provide. apk can't handle self provides, be it
224+
# versioned or virtual, so opt for a prefix and a suffix instead. Package
225+
# name without a prefix/suffix is too generic and might conflict with other
226+
# packages, e.g. wireguard. This allows several variants to provide the same
227+
# virtual package without adding extra provides to the default one, e.g.
228+
# r8169 implicitly provides kmod-r8169-any and is marked as default, so
229+
# r8125 can explicitly provide @kmod-r8169-any as well.
230+
PROVIDES+=@kmod-$(1)-any
222231
endef
223232

224233
ifdef KernelPackage/$(1)/conffiles
@@ -306,4 +315,3 @@ kernel_patchver_ge=$(call kernel_version_cmp,-ge,$(KERNEL_PATCHVER),$(1))
306315
kernel_patchver_eq=$(call kernel_version_cmp,-eq,$(KERNEL_PATCHVER),$(1))
307316
kernel_patchver_le=$(call kernel_version_cmp,-le,$(KERNEL_PATCHVER),$(1))
308317
kernel_patchver_lt=$(call kernel_version_cmp,-lt,$(KERNEL_PATCHVER),$(1))
309-

include/package-pack.mk

Lines changed: 88 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,89 @@ define FixupDependencies
7878
$(call AddDependency,$(1),$$(DEPS))
7979
endef
8080

81+
# Format provide and add ABI and version if it's not a virtual provide marked
82+
# with an @.
83+
#
84+
# 1: provide name
85+
# 2: provide version
86+
# 3: (optional) ABI preformatted by FormatABISuffix
87+
define AddProvide
88+
$(if $(filter @%,$(1)),$(patsubst @%,%,$(1)),$(1)$(3)=$(2))
89+
endef
90+
91+
# Remove virtual provides prefix and self. apk doesn't like it when packages
92+
# specify a redundant provide pointing to self.
93+
#
94+
# 1: package name
95+
# 2: list of provides
96+
define SanitizeProvides
97+
$(filter-out $(1),$(patsubst @%,%,$(2)))
98+
endef
99+
100+
# Format provides both for apk and control
101+
#
102+
# - If ABI version is defined:
103+
# - package is named `${package_name}${ABI_version}`
104+
# if a `package_name` ends in a number, the `ABI_version` will be prefixed
105+
# with a - sign, e.g.: libsqlite3-0
106+
# - package implicitly provides
107+
# `${package_name}${ABI_version}=${package_version}`
108+
# this implies that only one version of a package per ABI can be installed
109+
# at the same time
110+
# - additionally provide `${package_name}` so multiple packages can be looked
111+
# up by its base name
112+
# - for each `provides`, provide `${provide}${ABI_version}=${package_version}`
113+
# this implies that only one version of a provide can be installed at the
114+
# same time
115+
#
116+
# - else if ABI version is _not_ defined
117+
# - package is named `${package_name}`
118+
# - package implicitly provides `${package_name}=${package_version}`
119+
# this implies that only one version of a package can be installed at the
120+
# same time
121+
# - if `alternatives` is defined
122+
# - for each `provides`, provide `${provide}`
123+
# this implies that multiple versions of a provide can be installed at the
124+
# same time
125+
# - else if `alternatives` is _not_ defined
126+
# - for each `provides`, provide `${provide}=${package_version}`
127+
# this implies that only one version of a provide can be installed at the
128+
# same time
129+
#
130+
# - Both with and without an ABI, if a provide starts with an @, treat it as a
131+
# virtual provide, that doesn't own the name by not appending version.
132+
# Multiple packages with the same virtual provides can be installed
133+
# side-by-side.
134+
#
135+
# - apk doesn't like it when packages specify a redundant provide pointing to
136+
# self. Filter it out, but keep virtual self provides, in the form of
137+
# @(kmod-)?${package_name}-any.
138+
#
139+
# - Packages implicitly add a virtual @${package_name}-any provide in Package.
140+
#
141+
# - kmods implicitly add a virtual @kmod-${package_name}-any provide in
142+
# KernelPackage.
143+
#
144+
# 1: package name
145+
# 2: package version
146+
# 3: list of provides
147+
# 4: list of alternatives
148+
define FormatProvides
149+
$(strip $(if $(ABIV_$(1)), \
150+
$(1) $(foreach provide, \
151+
$(filter-out $(1),$(3)), \
152+
$(call AddProvide,$(provide),$(2),$(ABIV_$(1))) \
153+
), \
154+
$(if $(4), \
155+
$(filter-out $(1),$(3)), \
156+
$(foreach provide, \
157+
$(filter-out $(1),$(3)), \
158+
$(call AddProvide,$(provide),$(2)) \
159+
) \
160+
) \
161+
))
162+
endef
163+
81164
ifneq ($(PKG_NAME),toolchain)
82165
define CheckDependencies
83166
@( \
@@ -193,7 +276,7 @@ endif
193276
$(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || { \
194277
mkdir -p $(PKG_INFO_DIR); \
195278
echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version; \
196-
$(foreach pkg,$(filter-out $(1),$(PROVIDES)), \
279+
$(foreach pkg,$(call SanitizeProvides,$(1),$(PROVIDES)), \
197280
cp $(PKG_INFO_DIR)/$(1).version $(PKG_INFO_DIR)/$(pkg).version; \
198281
) \
199282
} )
@@ -241,14 +324,14 @@ endif
241324
Package/$(1)/DEPENDS := $$(call mergelist,$$(Package/$(1)/DEPENDS))
242325
endif
243326

244-
$$(info $(1) fused dependencies: $$(Package/$(1)/DEPENDS))
327+
Package/$(1)/PROVIDES := $$(call FormatProvides,$(1),$(VERSION),$(PROVIDES),$(ALTERNATIVES))
245328

246329
$(_define) Package/$(1)/CONTROL
247330
Package: $(1)$$(ABIV_$(1))
248331
Version: $(VERSION)
249332
$$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
250333
)$$(call addfield,Conflicts,$$(call mergelist,$(CONFLICTS))
251-
)$$(call addfield,Provides,$$(call mergelist,$$(filter-out $(1)$$(ABIV_$(1)),$(PROVIDES)$$(if $$(ABIV_$(1)), $(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1))))))
334+
)$$(call addfield,Provides,$$(call mergelist,$$(Package/$(1)/PROVIDES))
252335
)$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES))
253336
)$$(call addfield,Source,$(SOURCE)
254337
)$$(call addfield,SourceName,$(PKG_NAME)
@@ -292,7 +375,7 @@ endif
292375
fi; \
293376
done; $(Package/$(1)/extra_provides) \
294377
) | sort -u > $(PKG_INFO_DIR)/$(1).provides
295-
$(if $(PROVIDES),@for pkg in $(filter-out $(1),$(PROVIDES)); do cp $(PKG_INFO_DIR)/$(1).provides $(PKG_INFO_DIR)/$$$$pkg.provides; done)
378+
$(if $(PROVIDES),@for pkg in $(call SanitizeProvides,$(1),$(PROVIDES)); do cp $(PKG_INFO_DIR)/$(1).provides $(PKG_INFO_DIR)/$$$$pkg.provides; done)
296379
$(CheckDependencies)
297380

298381
$(RSTRIP) $$(IDIR_$(1))
@@ -433,13 +516,7 @@ else
433516
--info "origin:$(SOURCE)" \
434517
--info "url:$(URL)" \
435518
--info "maintainer:$(MAINTAINER)" \
436-
--info "provides:$$(if $$(ABIV_$(1)), \
437-
$(1) $(foreach provide,$(PROVIDES), $(provide)$$(ABIV_$(1))=$(VERSION)), \
438-
$(if $(ALTERNATIVES), \
439-
$(PROVIDES), \
440-
$(foreach provide,$(PROVIDES), $(provide)=$(VERSION)) \
441-
) \
442-
)" \
519+
$$(if $$(Package/$(1)/PROVIDES),--info "provides:$$(Package/$(1)/PROVIDES)") \
443520
$(if $(DEFAULT_VARIANT),--info "provider-priority:100",$(if $(PROVIDES),--info "provider-priority:1")) \
444521
$$(APK_SCRIPTS_$(1)) \
445522
--info "depends:$$(foreach depends,$$(subst $$(comma),$$(space),$$(subst $$(space),,$$(subst $$(paren_right),,$$(subst $$(paren_left),,$$(Package/$(1)/DEPENDS))))),$$(depends))" \

include/package.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,13 @@ define BuildPackage
332332
$(eval $(Package/Default))
333333
$(eval $(Package/$(1)))
334334

335+
# Add an implicit self-provide. apk can't handle self provides, be it
336+
# versioned or virtual, so opt for a suffix instead. This allows several
337+
# variants to provide the same virtual package without adding extra provides
338+
# to the default one, e.g. wget implicitly provides wget-any and is marked as
339+
# default, so wget-ssl can explicitly provide @wget-any as well.
340+
PROVIDES+=@$(1)-any
341+
335342
ifdef DESCRIPTION
336343
$$(error DESCRIPTION:= is obsolete, use Package/PKG_NAME/description)
337344
endif

include/u-boot.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ define Build/U-Boot/Target
104104
endif
105105
endif
106106
$(if $(DEFAULT),DEFAULT:=$(DEFAULT))
107-
URL:=http://www.denx.de/wiki/U-Boot
107+
URL:=https://docs.u-boot.org/en/latest/
108108
endef
109109

110110
define Package/u-boot-$(1)/install

package/base-files/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ define Package/base-files
4545
+SELINUX:procd-selinux +!SELINUX:procd +USE_SECCOMP:procd-seccomp \
4646
+SELINUX:busybox-selinux +!SELINUX:busybox
4747
TITLE:=Base filesystem for OpenWrt
48-
URL:=http://openwrt.org/
48+
URL:=https://openwrt.org/
4949
VERSION:=$(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION)))
5050
endef
5151

package/boot/arm-trusted-firmware-mediatek/Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ define Trusted-Firmware-A/mt7981-spim-nand-ubi-ddr4
262262
USE_UBI:=1
263263
endef
264264

265-
define Trusted-Firmware-A/mt7981-cudy-tr3000-v1
266-
NAME:=Cudy TR3000 v1 (SPI-NAND via SPIM, DDR3)
265+
define Trusted-Firmware-A/mt7981-cudy-ddr3
266+
NAME:=Cudy (SPI-NAND via SPIM, DDR3)
267267
BOOT_DEVICE:=spim-nand
268268
BUILD_SUBTARGET:=filogic
269269
PLAT:=mt7981
@@ -440,6 +440,14 @@ define Trusted-Firmware-A/mt7987-sdmmc-ddr4-4bg
440440
DDR4_4BG_MODE:=1
441441
endef
442442

443+
define Trusted-Firmware-A/mt7987-spim-nand0
444+
NAME:=MediaTek MT7987 (SPI-NAND via SPIM)
445+
BOOT_DEVICE:=spim-nand
446+
BUILD_SUBTARGET:=filogic
447+
PLAT:=mt7987
448+
SPIM_CTRL:=0
449+
endef
450+
443451
define Trusted-Firmware-A/mt7987-spim-nand0-ubi-comb
444452
NAME:=MediaTek MT7987 (SPI-NAND via SPIM, UBI)
445453
BOOT_DEVICE:=spim-nand
@@ -664,7 +672,7 @@ TFA_TARGETS:= \
664672
mt7981-emmc-ddr4 \
665673
mt7981-sdmmc-ddr4 \
666674
mt7981-spim-nand-ddr4 \
667-
mt7981-cudy-tr3000-v1 \
675+
mt7981-cudy-ddr3 \
668676
mt7986-ram-ddr3 \
669677
mt7986-emmc-ddr3 \
670678
mt7986-nor-ddr3 \
@@ -685,6 +693,7 @@ TFA_TARGETS:= \
685693
mt7987-nor-comb \
686694
mt7987-sdmmc-comb \
687695
mt7987-sdmmc-ddr4-4bg \
696+
mt7987-spim-nand0 \
688697
mt7987-spim-nand0-ubi-comb \
689698
mt7987-spim-nand2-ubi-comb \
690699
mt7987-ram-comb \

package/boot/grub2/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ define Package/grub2/Default
3434
CATEGORY:=Boot Loaders
3535
SECTION:=boot
3636
TITLE:=GRand Unified Bootloader ($(2))
37-
URL:=http://www.gnu.org/software/grub/
37+
URL:=https://www.gnu.org/software/grub/
3838
DEPENDS:=@TARGET_$(1)
3939
VARIANT:=$(2)
4040
endef
@@ -49,7 +49,7 @@ define Package/grub2-editenv
4949
SECTION:=utils
5050
SUBMENU:=Boot Loaders
5151
TITLE:=Grub2 Environment editor
52-
URL:=http://www.gnu.org/software/grub/
52+
URL:=https://www.gnu.org/software/grub/
5353
DEPENDS:=@TARGET_x86
5454
VARIANT:=none
5555
endef
@@ -63,7 +63,7 @@ define Package/grub2-bios-setup
6363
SECTION:=utils
6464
SUBMENU:=Boot Loaders
6565
TITLE:=Grub2 BIOS boot setup tool
66-
URL:=http://www.gnu.org/software/grub/
66+
URL:=https://www.gnu.org/software/grub/
6767
DEPENDS:=@TARGET_x86
6868
VARIANT:=none
6969
endef

package/boot/uboot-mediatek/Makefile

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,20 @@ define U-Boot/mt7981_cudy_tr3000-v1
309309
BUILD_DEVICES:=cudy_tr3000-v1-ubootmod
310310
UBOOT_CONFIG:=mt7981_cudy_tr3000-v1
311311
UBOOT_IMAGE:=u-boot.fip
312-
BL2_BOOTDEV:=cudy-tr3000-v1
312+
BL2_BOOTDEV:=cudy-ddr3
313313
BL2_SOC:=mt7981
314-
DEPENDS:=+trusted-firmware-a-mt7981-cudy-tr3000-v1
314+
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
315+
endef
316+
317+
define U-Boot/mt7981_cudy_wbr3000uax-v1
318+
NAME:=Cudy WBR3000UAX v1
319+
BUILD_SUBTARGET:=filogic
320+
BUILD_DEVICES:=cudy_wbr3000uax-v1-ubootmod
321+
UBOOT_CONFIG:=mt7981_cudy_wbr3000uax-v1
322+
UBOOT_IMAGE:=u-boot.fip
323+
BL2_BOOTDEV:=cudy-ddr3
324+
BL2_SOC:=mt7981
325+
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
315326
endef
316327

317328
define U-Boot/mt7981_glinet_gl-mt2500
@@ -870,6 +881,17 @@ define U-Boot/mt7987_bananapi_bpi-r4-lite-nor
870881
FIP_COMPRESS:=1
871882
endef
872883

884+
define U-Boot/mt7987_routerich_be7200
885+
NAME:=Routerich BE7200
886+
BUILD_SUBTARGET:=filogic
887+
BUILD_DEVICES:=routerich_be7200
888+
UBOOT_CONFIG:=mt7987a_routerich_be7200
889+
UBOOT_IMAGE:=u-boot.fip
890+
BL2_BOOTDEV:=spim-nand0
891+
BL2_SOC:=mt7987
892+
DEPENDS:=+trusted-firmware-a-mt7987-spim-nand0
893+
endef
894+
873895
define U-Boot/mt7988_arcadyan_mozart
874896
NAME:=Arcadyan Mozart
875897
BUILD_SUBTARGET:=filogic
@@ -1091,6 +1113,7 @@ UBOOT_TARGETS := \
10911113
mt7981_cmcc_rax3000m-nand-ddr4 \
10921114
mt7981_comfast_cf-wr632ax \
10931115
mt7981_cudy_tr3000-v1 \
1116+
mt7981_cudy_wbr3000uax-v1 \
10941117
mt7981_gatonetworks_gdsp \
10951118
mt7981_glinet_gl-mt2500 \
10961119
mt7981_glinet_gl-x3000 \
@@ -1140,6 +1163,7 @@ UBOOT_TARGETS := \
11401163
mt7987_rfb-emmc \
11411164
mt7987_rfb-sd \
11421165
mt7987_rfb-spim-nand \
1166+
mt7987_routerich_be7200 \
11431167
mt7988_arcadyan_mozart \
11441168
mt7988_asus_zenwifi-bt8 \
11451169
mt7988_bananapi_bpi-r4-emmc \

package/boot/uboot-mediatek/patches/448-add-comfast_cf-wr632ax.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,16 @@
283283
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
284284
+bootmenu_default=0
285285
+bootmenu_delay=0
286-
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
286+
+bootmenu_title= ( ( ( OpenWrt ) ) )
287287
+bootmenu_0=Initialize environment.=run _firstboot
288288
+bootmenu_0d=Run default boot command.=run boot_default
289289
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
290290
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
291291
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
292292
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
293293
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
294-
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
295-
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
294+
+bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
295+
+bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
296296
+bootmenu_8=Reboot.=reset
297297
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
298298
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
@@ -320,4 +320,4 @@
320320
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
321321
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
322322
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
323-
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
323+
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"

0 commit comments

Comments
 (0)