Add new mtdsplit parser "mstc-boot" for the devices manufactured by MSTC
(Mitra Star Technology Corp.). This is necessary to handle dual-boot on
those devices.
This parser splits kernel+rootfs or only rootfs(or UBI) based on the
image in the firmware partition or pre-defined partitions in dts, and
"bootnum" value in the "persist" (or "working") partition.
Note: "bootnum" is used for switching active firmware partitions on the
devices manufactured by MSTC and '1' or '2' are used on most
devices. But some devices use '0' or '1'. (example: I-O DATA
WN-DEAX1800GR)
Sequence:
1. obtain "bootnum" value
2. child nodes exsist (regardless of bootnum)
-> fixed partitions
(active parts : without bootnum (ex.: "kernel", "rootfs")
inactive parts: with bootnum (ex.: "kernel2", "rootfs2"))
3. current partition is active (dt bootnum == mtd bootnum)
-> image-based partitions
Device Tree:
- common
- mstc,bootnum : "bootnum" value for the mtd partition (0/1/2)
- mstc,persist : phandle of "persist" partition containing "bootnum"
value
- fixed partitions
- #address-cells: indicate cell count of address of child nodes (1)
- #size-cells : indicate cell count of size of child nodes (1)
- (child nodes) : define the child partitions
- reg : define the offset and size
- label-base : define the base name of the partition
- (example) : base:"kernel"->"kernel"(active)/"kernel2"(inactive)
example:
partition@3c0000 {
compatible = "mstc,boot";
reg = <0x3c0000 0x3240000>;
label = "firmware1";
mstc,bootnum = <1>;
mstc,persist = <&mtd_persist>;
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x0 0x800000>;
label-base = "kernel";
};
partition@800000 {
reg = <0x800000 0x2a40000>;
label-base = "ubi";
};
};
- image-based partitions
(no additional properties)
example:
partition@5a0000 {
compatible = "mstc,boot";
label = "firmware1";
reg = <0x5a0000 0x3200000>;
mstc,bootnum = <1>;
mstc,persist = <&mtd_persist>;
};
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18976
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Package kernel modules for PS/2 mouse support, mostly to allow
using touchpads and trackpoints built-into laptops (many of those
are connected using classic i8052-compatible PS/2 I/O).
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Import patches from kernel 6.13:
- net: dsa: realtek: Use for_each_child_of_node_scoped()
- net: dsa: realtek: rtl8365mb: Make use of irq_get_trigger_type()
- net: dsa: realtek: rtl8366rb: Make use of irq_get_trigger_type()
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/19381
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Move the following kernel symbol configs to generic:
COMPRESSED_INSTALL and IMX_SCMI related configs
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/19380
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The bootup of the armsr target sometimes failed like this:
```
[ 0.762283] NET: Registered PF_INET6 protocol family
[ 0.791987] workqueue: Failed to create a worker thread: -EAGAIN
[ 0.801986] workqueue: Failed to create a rescuer kthread for wq "mld": -EAGAIN
[ 0.964017] NET: Unregistered PF_INET6 protocol family
```
Increase the maximum number of threads the kernel allows.
Link: https://github.com/openwrt/openwrt/pull/19376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The RTL8261N driver does not work correctly on non-mediatek devices. Remove
some of the power controls for Realtek chips.
This assumes the network has been started by the bootloader already:
(rtk network on).
Co-authored-by: Sebastian Gottschall
- bf45143f03
- 2fb02a5745
- 598a16a8d8
Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19081
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add support for the RTL8264 (quad-10G phy) by matching the appropriate PHY_ID
in the driver.
Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19081
Signed-off-by: Robert Marko <robimarko@gmail.com>
Comes with kernel 6.16. I assume it will be backported at some point.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19329
Signed-off-by: Robert Marko <robimarko@gmail.com>
Patch backporting netdev_tx_reset_subqueue new OP has been already
backported in recent minor kernel version for 6.6.
Drop the related patch to fix compilation error on 6.6.
Fixes: 34ba7e8a8a ("generic: backport some flow offload helper patch")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Backport some flow offload helper patch in preparation for Airoha Flow
Offload support.
Link: https://github.com/openwrt/openwrt/pull/18166
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This broke the armsr/armv8 build.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/19200
Signed-off-by: Robert Marko <robimarko@gmail.com>
All kernel config symbols are refreshed by `make kernel_oldconfig`.
Some symbols are moved to the generic/config-6.12 because the
refresh tool will automatically trim them.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18632
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Introduced with Linux 6.7, in commit:
5c2f7727d437 ("mtd: mtdpart: check for subpartitions parsing result"),
when a parser returns an error, this will be passed up, and
consequently, all parent mtd partitions get torn down.
Adjust the mtdsplit_uimage driver to only return an error if there is a
critical problem in reading from the mtd device or allocating memory.
Otherwise return 0 to indicate that no partitions were found.
Also add logging to indicate what went wrong.
E.g. on Realtek devices that are booted for the first time through
initramfs with OpenWrt never installed before boot log will show
[ 0.975518] Creating 7 MTD partitions on "spi0.0":
[ 0.981062] 0x000000000000-0x0000000e0000 : "u-boot"
[ 1.041320] 0x0000000e0000-0x0000000f0000 : "u-boot-env"
[ 1.060683] 0x0000000f0000-0x000000100000 : "u-boot-env2"
[ 1.080992] 0x000000100000-0x000000200000 : "jffs2-cfg"
[ 1.100988] 0x000000200000-0x000000300000 : "jffs2-log"
[ 1.120599] 0x000000300000-0x000000fe0000 : "firmware"
[ 1.157426] mtdsplit_uimage: no rootfs after uImage in "firmware"
[ 1.176456] mtdsplit_uimage: no rootfs after uImage in "firmware"
[ 1.200262] 0x000000fe0000-0x000001000000 : "log"
Similar issues were fixed before with commit ade045084b
("kernel: mtdsplit_minor: return 0 if not fatal") and
c78765213e ("kernel: mtdsplit_uimage: return 0 if not fatal")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19163
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport accepted BCM5325 patches from net-next.
These patches will be merged in the v6.17 kernel window.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Continuous read does not work properly in on-die ECC mode.
Disable it to fix ubi io error on the GL.iNet GL-MT3000.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
It's time to give the patches documentation some love by:
- Using Markdown.
- Differentiating between generic and specific target patches.
- Adding deeper explanation about patch numbering.
Link: https://github.com/openwrt/openwrt/pull/19092
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reorganize backported 6.12 generic patches, grouping them by following
a standard naming XXX-XX-v6.x-patch-file-name.patch.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Add kernel package for DesignWare I2C platform controller.
This controller is used on the RP1 SoC found on RPi 5 devices.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Add kernel packages for DesignWare SPI core and MMIO controllers.
This is needed for the RP1 SoC found on RPi 5 devices.
Tested with a Microchip ENC28J60 Ethernet controller on a RPi 5.
Signed-off-by: Albrecht Lohofener <albrechtloh@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19049
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Add the following to fix builds with GCC 15.1:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/mips/vdso?h=next-20250606&id=0f4ae7c6ecb89bfda026d210dcf8216fb67d2333
% dmesg | grep gcc
[ 0.000000] Linux version 6.6.93 (facade@redline) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 15.1.0 r29972+15-7d617804cfe7) 15.1.0, GNU ld (GNU Binutils) 2.44) #0 SMP Sat Jun 7 12:13:18 2025
Error for reference:
./include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant
11 | false = 0,
| ^~~~~
./include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards
./include/linux/types.h:35:33: error: 'bool' cannot be defined via 'typedef'
35 | typedef _Bool bool;
| ^~~~
./include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23' onwards
./include/linux/types.h:35:1: error: useless type name in empty declaration [-Werror]
35 | typedef _Bool bool;
| ^~~~~~~
CC arch/mips/lib/delay.o
AR arch/mips/fw/lib/built-in.a
AR arch/mips/fw/lib/lib.a
CC arch/mips/ralink/of.o
CC fs/read_write.o
CC block/elevator.o
cc1: all warnings being treated as errors
make[9]: *** [scripts/Makefile.build:243: arch/mips/vdso/vgettimeofday.o] Error 1
make[8]: *** [scripts/Makefile.build:480: arch/mips/vdso] Error 2
Build system: x86/64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19058
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Introduced with Linux 6.7, in commit:
5c2f7727d437 ("mtd: mtdpart: check for subpartitions parsing result"),
when a parser returns an error, this will be passed up, and
consequently, all parent mtd partitions get torn down.
Adjust the mtdsplit_uimage driver to only return an error if there is a
critical problem in reading from the mtd device or allocating memory.
Otherwise return 0 to indicate that no partitions were found.
Also add logging to indicate what went wrong.
E.g. on Realtek devices that are booted for the first time through
initramfs with OpenWrt never installed before boot log will show
[ 0.932985] Creating 8 MTD partitions on "spi0.0":
[ 0.938412] 0x000000000000-0x000000080000 : "u-boot"
[ 0.990151] 0x000000080000-0x0000000c0000 : "u-boot-env"
[ 0.999907] 0x0000000c0000-0x000000100000 : "board-name"
[ 1.019971] 0x000000100000-0x000000e80000 : "firmware"
[ 1.051582] mtdsplit_uimage: no uImage found in "firmware"
[ 1.069365] 0x000000e80000-0x000001000000 : "kernel2"
[ 1.078959] 0x000001000000-0x000001040000 : "sysinfo"
[ 1.099747] 0x000001040000-0x000001c40000 : "rootfs2"
[ 1.119865] 0x000001c40000-0x000002000000 : "jffs2"
Similar issue was fixed before with commit ade045084b
("kernel: mtdsplit_minor: return 0 if not fatal")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19016
Signed-off-by: Robert Marko <robimarko@gmail.com>