Skip to content

Commit 86bee3c

Browse files
committed
Merge remote-tracking branch 'other/main'
2 parents 5d58d2a + f948f71 commit 86bee3c

2,520 files changed

Lines changed: 80126 additions & 162372 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.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
* -text
22
*.patch whitespace=-indent-with-non-tab,-space-before-tab,-tab-in-indent,-trailing-space
3+
*.dts text eol=lf
4+
*.dts[io] text eol=lf

.github/labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@
126126
- "target/linux/mediatek/**"
127127
- "package/boot/arm-trusted-firmware-mediatek/**"
128128
- "package/boot/uboot-mediatek/**"
129+
"target/microchipsw":
130+
- changed-files:
131+
- any-glob-to-any-file:
132+
- "target/linux/microchipsw/**"
133+
- "package/boot/arm-trusted-firmware-microchipsw/**"
134+
- "package/boot/uboot-microchipsw/**"
129135
"target/mpc85xx":
130136
- changed-files:
131137
- any-glob-to-any-file:

.github/workflows/formal.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ on:
55

66
permissions:
77
contents: read
8+
pull-requests: write
89

910
jobs:
1011
build:
1112
name: Test Formalities
1213
uses: openwrt/actions-shared-workflows/.github/workflows/formal.yml@main
14+
# with:
15+
# # Post formality check summaries to the PR.
16+
# # Repo's permissions need to be updated for actions to modify PRs:
17+
# # https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#create-an-issue-comment
18+
# post_comment: true

config/Config-build.in

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ menu "Global build settings"
108108
config CLEAN_IPKG
109109
bool
110110
prompt "Remove ipkg/opkg status data files in final images"
111+
depends on !USE_APK
111112
help
112113
This removes all ipkg/opkg status data files from the target directory
113114
before building the root filesystem.
@@ -250,6 +251,15 @@ menu "Global build settings"
250251

251252
comment "Hardening build options"
252253

254+
config PKG_FANALYZER
255+
bool
256+
prompt "Enable gcc fanalyzer"
257+
default n
258+
help
259+
Add -fanalyzer to the CFLAGS. As a result of this option, a static analysis
260+
of the program flow is conducted, allowing interprocedural paths to be
261+
identified and warnings to be issued if problems are identified.
262+
253263
config PKG_CHECK_FORMAT_SECURITY
254264
bool
255265
prompt "Enable gcc format-security"
@@ -383,6 +393,15 @@ menu "Global build settings"
383393
bool "Full"
384394
endchoice
385395

396+
config PKG_DT_RELR
397+
bool "Link with relative relocations (RELR)"
398+
depends on (aarch64 || i386 || loongarch64 || x86_64)
399+
default y
400+
help
401+
Link all applications with -Wl,-z,pack-relative-relocs.
402+
This will reduce the size of many applications.
403+
This is only supported on a limited number of architectures.
404+
386405
config TARGET_ROOTFS_SECURITY_LABELS
387406
bool
388407
select KERNEL_SQUASHFS_XATTR

config/Config-images.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ menu "Target Images"
1818
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
1919
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
2020
default TARGET_INITRAMFS_COMPRESSION_ZSTD if TARGET_qualcommax
21+
default TARGET_INITRAMFS_COMPRESSION_ZSTD if TARGET_microchipsw
2122
default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
2223
default TARGET_INITRAMFS_COMPRESSION_NONE
2324
depends on TARGET_ROOTFS_INITRAMFS
@@ -335,7 +336,7 @@ menu "Target Images"
335336
int "Root filesystem partition size (in MiB)"
336337
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
337338
default 232 if TARGET_loongarch64
338-
default 448 if TARGET_mediatek
339+
default 448 if TARGET_mediatek || TARGET_microchipsw
339340
default 104
340341
help
341342
Select the root filesystem partition size.

config/Config-kernel.in

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -597,14 +597,12 @@ choice
597597

598598
config KERNEL_TRANSPARENT_HUGEPAGE_NEVER
599599
bool "never"
600-
depends on !LINUX_6_6
601600
endchoice
602601

603602
config KERNEL_ARM64_CONTPTE
604603
bool "Compile the kernel with Contiguous PTE mappings for user memory"
605-
depends on KERNEL_ARM64
604+
depends on aarch64
606605
depends on KERNEL_TRANSPARENT_HUGEPAGE
607-
depends on !LINUX_6_6
608606
default y
609607

610608
config KERNEL_HUGETLBFS
@@ -862,7 +860,6 @@ if KERNEL_CGROUPS
862860
config KERNEL_CPUSETS_V1
863861
bool "Legacy cgroup v1 cpusets controller"
864862
depends on KERNEL_CPUSETS
865-
depends on !LINUX_6_6
866863
default n
867864
help
868865
Legacy cgroup v1 cpusets controller which has been deprecated by
@@ -921,7 +918,6 @@ if KERNEL_CGROUPS
921918
bool "Legacy cgroup v1 memory controller"
922919
default n
923920
depends on KERNEL_MEMCG
924-
depends on !LINUX_6_6
925921
help
926922
Legacy cgroup v1 memory controller which has been deprecated by
927923
cgroup v2 implementation. The v1 is there for legacy applications

include/hardening.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ PKG_ASLR_PIE_REGULAR ?= 0
88
PKG_SSP ?= 1
99
PKG_FORTIFY_SOURCE ?= 1
1010
PKG_RELRO ?= 1
11+
PKG_DT_RELR ?= 1
12+
PKG_FANALYZER ?= 0
1113

1214
ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
1315
ifeq ($(strip $(PKG_CHECK_FORMAT_SECURITY)),1)
@@ -69,3 +71,15 @@ ifdef CONFIG_PKG_RELRO_FULL
6971
endif
7072
endif
7173

74+
ifdef CONFIG_PKG_DT_RELR
75+
ifeq ($(strip $(PKG_DT_RELR)),1)
76+
TARGET_CFLAGS += -Wl,-z,pack-relative-relocs
77+
TARGET_LDFLAGS += -zpack-relative-relocs
78+
endif
79+
endif
80+
81+
ifdef CONFIG_PKG_FANALYZER
82+
ifeq ($(strip $(PKG_FANALYZER)),1)
83+
TARGET_CFLAGS += -fanalyzer
84+
endif
85+
endif

include/image-commands.mk

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ define Build/initrd_compression
430430
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),.zstd)
431431
endef
432432

433-
define Build/fit
433+
define Build/fit-its
434434
$(if $(findstring with-rootfs,$(word 3,$(1))), \
435435
$(call locked,dd if=$(IMAGE_ROOTFS) of=$(IMAGE_ROOTFS).pagesync bs=4096 conv=sync, \
436436
gen-cpio$(if $(TARGET_PER_DEVICE_ROOTFS),.$(ROOTFS_ID/$(DEVICE_NAME)))))
@@ -452,12 +452,20 @@ define Build/fit
452452
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \
453453
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
454454
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
455+
endef
456+
457+
define Build/fit-image
455458
$(call locked,PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
456459
-E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new, \
457460
gen-cpio$(if $(TARGET_PER_DEVICE_ROOTFS),.$(ROOTFS_ID/$(DEVICE_NAME))))
458461
@mv $@.new $@
459462
endef
460463

464+
define Build/fit
465+
$(call Build/fit-its,$(1))
466+
$(call Build/fit-image,$(1))
467+
endef
468+
461469
define Build/libdeflate-gzip
462470
$(STAGING_DIR_HOST)/bin/libdeflate-gzip -f -12 -c $@ $(1) > $@.new
463471
@mv $@.new $@

include/image.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ KDIR=$(KERNEL_BUILD_DIR)
4141
KDIR_TMP=$(KDIR)/tmp
4242
DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
4343

44+
ifeq ($(EXTRA_IMAGE_NAME),)
45+
EXTRA_IMAGE_NAME:=$(call qstrip,$(CONFIG_EXTRA_IMAGE_NAME))
46+
endif
4447
IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-)
4548
IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-)
4649
IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERSION_CODE))-)

include/kernel-defaults.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
2525
define Kernel/Prepare/Default
2626
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
2727
$(Kernel/Patch)
28-
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
2928
endef
3029
else
3130
define Kernel/Prepare/Default

0 commit comments

Comments
 (0)