mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 08:47:51 +04:00
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.53 Removed upstreamed: target/linux/airoha/patches-6.18/160-v7.2-net-airoha-Reserve-RX-headroom-to-avoid-skb-realloca.patch [1] target/linux/airoha/patches-6.18/220-08-usb-host-add-ARCH_AIROHA-in-XHCI-MTK-dependency.patch [2] target/linux/ath79/patches-6.18/341-wifi-ath9k-obtain-system-gpios.patch [3] target/linux/bcm27xx/patches-6.18/0850-dmaengine-dw-axi-dmac-Wait-for-runtime-resume.patch [4] target/linux/econet/patches-6.18/040-v7.2-PCI-mediatek-Protect-root-bus-removal-with-rescan-lo.patch [5] target/linux/econet/patches-6.18/781-v7.3-net-dsa-mt7530-add-en7528-support.patch [6] target/linux/generic/backport-6.18/706-v7.2-bus-mhi-host-pci_generic-round-up-nr_irqs-to-a-power-of-two.patch [7] target/linux/generic/backport-6.18/751-v7.2-net-dsa-qca8k-add-support-for-force-mode-for-fixed-l.patch [8] target/linux/generic/backport-6.18/852-v7.1-rtc-cmos-use-platform_get_irq_optional.patch [9] target/linux/generic/backport-6.18/941-v7.2-net-dsa-realtek-rtl8365mb-add-support-for-rtl8367sb.patch [10] target/linux/generic/backport-6.18/946-v7.3-net-dsa-mt7530-populate-lpi_interfaces-to-fix-EEE-support.patch [11] target/linux/generic/backport-6.18/947-v7.3-net-ethernet-mtk_eth_soc-populate-lpi_interfaces-to-fix-EEE-support.patch [12] target/linux/ramips/patches-6.18/102-01-pwm-mediatek-set-mt7628-pwm45_fixup-flag-to-false.patch [13] target/linux/generic/hack-6.18/890-serial-8250-add-UPIO_AU-case-to-set_io_from_upio.patch [14] target/linux/generic/backport-6.18/895-v7.2-Bluetooth-btusb-Add-Mercusys-MA530-for-Realtek-RTL87.patch [15] Manually rebased: target/linux/generic/pending-6.18/737-10-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch target/linux/ath79/patches-6.18/900-unaligned_access_hacks.patch target/linux/bcm27xx/patches-6.18/0372-i2c-designware-Add-support-for-bus-clear-feature.patch target/linux/econet/patches-6.18/310-usb-enable-econet-usb.patch Added: target/linux/ath79/patches-6.18/341-wifi-ath9k-always-register-system-gpios.patch All other patches automatically rebased via update_kernel.sh 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=20f46d0077f7a6d2f8078d0ed6a4c5a8062bea01 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=a5ff304195ca4c91425425136435fd2c3bde53ff 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=70d472076ce472b4ea605f06f14893eb17894720 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=626e080d297db7996d6995620bb4eeebd928067e 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=a568939487dcbc1a3e341208585e224be897e25e 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=fe997254b17dcaa19b7f559bc66730bc8cf1ad6f 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=05b9953e40d53acac86144a92724d4fab9ac5ac9 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=a726cc53424a6fdbd4e45e53b8e1d60a6ae75411 9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=9811e2c321f779902a79bb0d9035a8848d8f0d39 10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=f3e0f9c64a8557370437b961bb7e0425d87875db 11. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=3c367198e2e2825aae445497b3f7195329009aa1 12. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=9edd644864787a8c8ed24f6cdc20a652b4408726 13. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=b3674e8c01b36825879abff2f82697827b007a70 14. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=9f67997353caa29c6a080789a1fb6e01fb50c118 15. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.53&id=0f7f58ea629699c0fcd68fd01e41c2f6ac6c63d1 Build system: x86/64 Build-tested: mediatek/filogic Run-tested: mediatek/filogic Signed-off-by: Edoardo Pinci <epinci@outlook.com> Link: https://github.com/openwrt/openwrt/pull/25331 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
72 lines
1.9 KiB
Diff
72 lines
1.9 KiB
Diff
From: Imre Kaloz <kaloz@openwrt.org>
|
|
Subject: init: add CONFIG_MANGLE_BOOTARGS and disable it by default
|
|
|
|
Enabling this option renames the bootloader supplied root=
|
|
and rootfstype= variables, which might have to be know but
|
|
would break the automatisms OpenWrt uses.
|
|
|
|
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
|
---
|
|
init/Kconfig | 9 +++++++++
|
|
init/main.c | 24 ++++++++++++++++++++++++
|
|
2 files changed, 33 insertions(+)
|
|
|
|
--- a/init/Kconfig
|
|
+++ b/init/Kconfig
|
|
@@ -2015,6 +2015,15 @@ config ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPIN
|
|
For complete descriptions of memory sealing, please see
|
|
Documentation/userspace-api/mseal.rst
|
|
|
|
+config MANGLE_BOOTARGS
|
|
+ bool "Rename offending bootargs"
|
|
+ depends on EXPERT
|
|
+ help
|
|
+ Sometimes the bootloader passed bogus root= and rootfstype=
|
|
+ parameters to the kernel, and while you want to ignore them,
|
|
+ you need to know the values f.e. to support dual firmware
|
|
+ layouts on the flash.
|
|
+
|
|
config HAVE_PERF_EVENTS
|
|
bool
|
|
help
|
|
--- a/init/main.c
|
|
+++ b/init/main.c
|
|
@@ -596,6 +596,29 @@ static inline void setup_nr_cpu_ids(void
|
|
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
|
|
#endif
|
|
|
|
+#ifdef CONFIG_MANGLE_BOOTARGS
|
|
+static void __init mangle_bootargs(char *command_line)
|
|
+{
|
|
+ char *rootdev;
|
|
+ char *rootfs;
|
|
+
|
|
+ rootdev = strstr(command_line, "root=/dev/mtdblock");
|
|
+
|
|
+ if (rootdev)
|
|
+ memcpy(rootdev, "mangled_rootblock=", 18);
|
|
+
|
|
+ rootfs = strstr(command_line, "rootfstype");
|
|
+
|
|
+ if (rootfs)
|
|
+ memcpy(rootfs, "mangled_fs", 10);
|
|
+
|
|
+}
|
|
+#else
|
|
+static void __init mangle_bootargs(char *command_line)
|
|
+{
|
|
+}
|
|
+#endif
|
|
+
|
|
/*
|
|
* We need to store the untouched command line for future reference.
|
|
* We also need to store the touched command line since the parameter
|
|
@@ -894,6 +917,7 @@ void start_kernel(void)
|
|
jump_label_init();
|
|
static_call_init();
|
|
early_security_init();
|
|
+ mangle_bootargs(command_line);
|
|
setup_boot_config();
|
|
setup_command_line(command_line);
|
|
setup_nr_cpu_ids();
|