Commit Graph

408 Commits

Author SHA1 Message Date
Tianling Shen
acd9f15ee2
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-30 01:38:51 +08:00
Jordan Woyak
f9f2426e39 config: Enable ext4 journaling by default.
Not having a journal by default is a major "gotcha".

Because openwrt does not fsck on boot, a power loss without journaling
can result in a dirty filesystem that openwrt will mount as read-only
which requires intervention to restore the router to working order.

Signed-off-by: Jordan Woyak <jordan.woyak@gmail.com>
2024-03-29 17:49:53 +01:00
Tianling Shen
4d22a8a2c4
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-24 21:24:08 +08:00
Qingfang Deng
686cc58c10 kernel: support RISC-V PMU
Add RISC-V PMU config symbols and enable them for riscv64.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-23 17:28:55 +01:00
Tianling Shen
3e82899a72
kernel: enable BTF by default only in buildbot
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-03-19 13:02:05 +08:00
Tianling Shen
f6a1194762
kernel: add missing Kconfig symbol
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2024-03-15 18:30:24 +08:00
Tianling Shen
01bf2bdda1
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2024-03-09 13:53:56 +08:00
Qingfang Deng
a646e4f697 kernel: enable KASAN option for more architectures
KASAN has supported more architectures, such as ARM, PPC32 and RISC-V 64.
Enable KASAN option for those architectures.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-08 16:07:48 +08:00
Tianling Shen
c5048f245b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-04 15:56:19 +08:00
Felix Fietkau
e772b75d5d broadcom-wl: remove package
Also remove remaining wireless extension support, since this package
was the only in-tree user of it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-03 16:16:36 +01:00
Tianling Shen
3db6161c85
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-20 13:01:37 +08:00
Cedric DOURLENT
869f8b21e7 build: add option for building with stack-protector-all
The GCC option -fstack-protector-all is a security feature used to protect against stack-smashing attacks.
This option enhances the stack-smashing protection provided by -fstack-protector-strong.
-fstack-protector-all option applies stack protection to all functions, regardless of their characteristics.
While this offers the most comprehensive protection against stack-smashing attacks, it can significantly impact
the performance of the program because every function call includes additional checks for stack integrity.
This option can incur a performance penalty because of the extra checks added to every function call,
but it significantly enhances security, making it harder for attackers to exploit buffer overflows to execute arbitrary code.
It's particularly useful in scenarios where security is paramount and performance trade-offs are acceptable.

Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
2024-01-19 21:27:14 +01:00
Tianling Shen
a97a7d4575
qualcommax: disable BTF by default
The newly added device Linksys MX4200, however, has limited kernel
partition and it's too small to place BTF kernel there.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-11 10:40:42 +08:00
Tianling Shen
43d8ab5600
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-30 17:22:48 +08:00
Hauke Mehrtens
4211eab085 target: Make TARGET_SERIAL independent of GRUB configuration
GRUB_SERIAL is also used for the default serial on the target and not
only in grub. When no grub was build it was not available and the build
fails.

Rename GRUB_SERIAL to TARGET_SERIAL and make it always available on x86
and armsr targets.

Fixes: #14063
Fixes: b10768476f ("x86,armsr: interpolate GRUB_SERIAL into /etc/inittab")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-29 23:43:01 +01:00
Tianling Shen
31f2c18a35
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-10 13:02:09 +08:00
Rafał Miłecki
4fb8e68bc4 kernel: provide better control & help for SLUB configuration
Allow selecting KERNEL_SLUB_DEBUG and KERNEL_SLUB_DEBUG_ON manually and
provide detailed help for both.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-09 21:23:01 +01:00
Tianling Shen
2f82b4d83f
Config-kernel: enable BTF for ipq806x/chromium by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-03 19:04:25 +08:00
Tianling Shen
3f9bf2c41b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-02 12:47:23 +08:00
Petr Štetiar
d604a07225
build: add CycloneDX SBOM JSON support
CycloneDX is an open source standard developed by the OWASP foundation.
It supports a wide range of development ecosystems, a comprehensive set
of use cases, and focuses on automation, ease of adoption, and
progressive enhancement of SBOMs (Software Bill Of Materials) throughout
build pipelines.

So lets add support for CycloneDX SBOM for packages and images
manifests.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-11-01 11:14:41 +00:00
Tianling Shen
3077a06278
kernel: xdp-sockets-diag: adjust dependency
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-17 21:31:54 +08:00
Tianling Shen
a37b79d082
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-16 14:36:05 +08:00
Mathew McBride
76d4a7c84a kernel: default ARM_PMU on for armsr/armv8
CONFIG_ARM_PMU (Arm Performance Monitor Unit) is a requirement
to use KVM (virtualization) from Linux 5.11+, as the virtualised
guest has virtualized PMU access.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-08-15 15:55:00 +02:00
Tianling Shen
772e135630
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-11 08:33:22 +08:00
Zhen XIN
d2af5ab850 build: Add option KERNEL_KASAN_SW_TAGS and HW_TAGS
Currently KASAN is supported but only the generic one. SW-tag and HW-tag
based KASAN have less impact on memory footprint or performance, and are
worth supporting.

Add choice menu for software and hardware Tag-Based KASAN, in addition
to the generic one.

Signed-off-by: Zhen XIN <zhen.xin@nokia-sbell.com>
[Restructure commit message]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-08-10 23:09:37 +02:00
Tianling Shen
1abf539b41
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-07-08 16:21:58 +08:00
Tianling Shen
06e64f9b36 kernel: modules: add xdp-sockets-diag support
Support for PF_XDP sockets monitoring interface used by the ss tool.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-07-05 20:02:12 +02:00
Tianling Shen
94812e90ec
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-07-05 20:40:39 +08:00
Andre Heider
65a716bb95
config: add a knob to use the mold linker for packages
Building it requires gcc >= 10.2 or clang >= 12.

Using sstrip with its -z argument can produce non-working binaries, like
a segfaulting `getrandom`, so don't allow that combination.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-07-04 20:25:40 +02:00
Andre Heider
d026b19cdc
build: replace SSTRIP_ARGS with SSTRIP_DISCARD_TRAILING_ZEROES
sstrip only has one functional arg. Make that a bool option, which can
easily depend on other knobs then.

This is required to be disabled for the mold linker.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-07-04 20:25:40 +02:00
Petr Štetiar
ce8c639a6c
kernel: introduce KERNEL_WERROR config option
In commit b2d1eb717b ("generic: 5.15: enable Werror by default for
kernel compile") CONFIG_WERROR=y was enabled and all warnings/errors
reported with GCC 12 were fixed.

Keeping this in sync with past/future GCC versions is going to be uphill
battle, so lets introduce new KERNEL_WERROR config option, enable it by
default only for tested/known working combinations and on buildbots.

References: #12687
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-07-04 07:14:22 +02:00
Tianling Shen
c47fe16af0
kernel: disable BTF for sifiveu and 32bit x86 by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-27 16:01:37 +08:00
Tianling Shen
b0063446b8
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-17 14:19:10 +08:00
Robert Marko
f02f6aaa8d
ipq807x: rename target to qualcommax
Currently, ipq807x only covers Qualcomm IPQ807x SoC-s.
However, Qualcomm also has IPQ60xx and IPQ50xx SoC-s under the AX WiSoC-s
and they share a lot of stuff with IPQ807x, especially IPQ60xx so to avoid
duplicating kernel patches and everything lets make a common target with
per SoC subtargets.

Start doing that by renaming ipq807x to qualcommax so that dependencies
on ipq807x target can be updated.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-06-16 11:11:08 +02:00
Tianling Shen
3810066f16
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-15 00:50:02 +08:00
Tianling Shen
6f053d268e
Config-images: build qcow2 image for armsr target
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-13 03:04:53 +08:00
Tianling Shen
9f0e1eb555
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-11 13:16:13 +08:00
Mathew McBride
40ce6a7920
config: change references from armvirt to armsr
armvirt target has been renamed to armsr (Arm SystemReady),
so the config defaults need to be changed as well.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-10 21:30:20 +02:00
Tianling Shen
3495f95618
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-06 23:19:38 +08:00
Tianling Shen
95d86d92c9
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-02 19:52:24 +08:00
Mathew McBride
f899e0e024
build: enable vmdk/vmware images for arm64 target
This is useful for VMware's ARM64 products, e.g Fusion for M1/ARM Macs.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:19 +02:00
Mathew McBride
71e56b2ff1
build: use 128MiB as the boot/kernel partition size on armvirt target
The nominal partition type for EFI boot partitions is FAT32,
which has a minimum size of 32MiB on a 512-byte-sector block device.

To ensure that the boot partition is created as FAT32 set a size
well above this minimum.

A useful discussion about EFI partition sizes can be found here:
https://superuser.com/questions/1310927/what-is-the-absolute-minimum-size-a-uefi-system-partition-can-be

I have found 128MiB works pretty consistently across both
tools (mkfs.fat) and firmwares (EDKII)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:18 +02:00
Mathew McBride
8f29b1573d
grub2: enable EFI for armvirt
This adds a separate package for EFI on Arm SystemReady
compatible machines. 32-bit Arm UEFI is supported as well.

It is very similar to x86-64 EFI setup, without the
need for BIOS backward compatibility and slightly
different default modules.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:12 +02:00
Hauke Mehrtens
16a20512d8
kernel: Set CONFIG_FRAME_WARN depending on target
This set the CONFIG_FRAME_WARN option depending on some target settings.
It will use the default from the upstream kernel and not the hard coded
value of 1024 now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-02 11:19:32 +02:00
Tianling Shen
90719e02f0 kernel: add option for BPF_STREAM_PARSER and XDP_SOCKETS_DIAG
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-23 15:44:27 +08:00
Tianling Shen
c07038da27 kernel: add MODULE_ALLOW_BTF_MISMATCH option
BTF mismatch can occur for a separately-built module even when the ABI
is otherwise compatible and nothing else would prevent successfully
loading. Add a new config to control how mismatches are handled. By
default, preserve the current behavior of refusing to load the
module. If MODULE_ALLOW_BTF_MISMATCH is enabled, load the module but
ignore its BTF information.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-18 16:17:52 +02:00
Tianling Shen
73e56799fe
kernel: allow loading modules with non-matching BTF type info by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-16 12:39:58 +08:00
Tianling Shen
85d11b468b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-12 19:20:08 +08:00
Nick Hainke
047361dee4
treewide: cleanup kernel symbol references
We only use 5.15 kernel. So remove all those unnecessary symbols
referencing 5.10 or 5.15 kernel.

Can be found with:
  git grep -E 'LINUX_5_1(0|5)'

Note that we remove the dependency from "sound-soc-chipdip-dac" instead
of removing the complete kernel package. The 5.15 version bump forgot to
delete the "@LINUX_5_10" dependency. The kernel package is still needed
in 5.15 kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:44 +02:00
Tianling Shen
963553fef9
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-05 19:43:20 +08:00