These instructions are for 64-bit load/store. On ARMv5TE, the CPU
requires addresses to be aligned to 64-bit. When misaligned, behavior is
undefined (effectively either loads the same word twice on LDRD, or
corrupts surrounding memory on STRD).
On ARMv6 and newer, unaligned access is safe.
Removing these instructions for ARMv5TE is necessary, because GCC
ignores alignment information in pointers and does unsafe optimizations
that have shown up as bugs in various places.
This patch was originally added more than 11 years ago in commit b050f87d13,
but got lost 6 years ago, when gcc 9.1 was added in 88c07c6552.
This primarily affects the kirkwood and ixp4xx targets
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This file should be generated automatically at runtime by the kernel
build system.
Link: https://github.com/openwrt/openwrt/pull/19473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Fix bootloop on TP-Link EAP615-Wall v1 by reducing LZMA dictionary
size. Before this patch and after an upgrade to kernel 6.12 this
device couldn't boot a kernel because of an error: "lzma compressed:
uncompress error 1".
I have chosen -d22 as dictionary size as suggested by @namiltd.
The usual sizes for problematic devices are -d16, -d20, -d22. I
have confirmed with my tests that this device can boot with a value
up to -d27, but there is no size benefit from values above -d21,
therefore -d22 is good enough.
See also: https://github.com/openwrt/openwrt/issues/19403
Signed-off-by: Marcin FM <marcin@ipv8.pl>
Link: https://github.com/openwrt/openwrt/pull/19433
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Specification
-------------
- SoC : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3GHz
- RAM : DDR3 256Mbytes, ESMT M15T2G16128A
- Flash : 128Mbytes NAND Flash, ESMT F50L1G41LB
- WLAN : MediaTek MT7976CN dual-band Wi-Fi 6
- 2.4GHz : b/g/n/ax, MU-MIMO
- 5GHz : a/n/ac/ax, MU-MIMO
- Ethernet : MediaTek MT7531AE
- LAN : 10/100/1000 Mbps x4
- WAN : 10/100/1000 Mbps x1
- UART : 1x4 pin header on PCB
- [J6] TX, RX, GND, 3.3V (115200, 8N1)
- Buttons : WPS, Reset
- LEDs : 1x CPU (Amber)
1x Wi-Fi 5GHz (Amber)
1x Wi-Fi 2.4GHz (Amber)
1x WAN activity (Amber)
4x LAN activity (Amber)
- Power : 12VDC, 1A (Center positive polarity)
MAC address
-----------
+-----------+-------------------+-----------------------+
| Interface | MAC | Algorithm |
+-----------+-------------------+-----------------------+
| WLAN 2.4G | B0:38:6C:48:xx:xx | label |
| WLAN 5G | B2:38:6C:48:xx:xx | label with LA Bit Set |
| WAN | B0:38:6C:48:xx:xx | label + 1 |
| LAN | B0:38:6C:48:xx:xx | label + 3 |
+-----------+-------------------+-----------------------+
The WLAN 2.4G MAC was found in 'Factory' partition, 0x4
Installation
------------
1. Download the OEM recovery software from the manufacturer's website
2. Download the *squashfs-factory.bin file from the OpenWrt website
3. Press a reset button, and power up the router(keep pressing the reset button)
4. Wait more than 10 seconds until the CPU LED stop blinking
5. Connect the router(LAN port) to the PC
6. Replace a file in the OEM recovery software with the file from step 2
7. Run the OEM recovery software and follow the instructions
8. Wait for the router to boot from *squashfs-factory.bin
Signed-off-by: Donghyun Ko <nyankosoftware@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19368
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Some NanoPC-T6 boards with A3A444 eMMC chips experience I/O errors and
corruption when using HS400 mode. Downgrade to HS200 mode to ensure
stable operation.
Fixes: #18844
Signed-off-by: Grzegorz Sterniczuk <grzegorz@sternicz.uk>
Link: https://github.com/openwrt/openwrt/pull/19398
[Add patch header]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6953f19 wireless-regdb: Update regulatory info for Indonesia (ID) for 2025
2e8214e wireless-regdb: Permit 320 MHz bandwidth in 6 GHz band for GB
a94f685 wireless-regdb: Update regulatory info for Egypt (EG) for 2024
7628ce2 wireless-regdb: Update regulatory rules for Brazil (BR) on 6GHz
4411b39 wireless-regdb: Update regulatory info for Vietnam (VN) for 2025
490f136 wireless-regdb: Update regulatory info for Estonia (EE) for 2024
c56c663 wireless-regdb: update regulatory rules for Paraguay (PY) on 6 GHz for 2025
5a8ced5 wireless-regdb: Update regulatory info for CEPT countries for 6GHz listed by WiFi Alliance
5fd8ee3 wireless-regdb: update regulatory rules for Bosnia and Herzegovina (BA) for 6 GHz
e05260a wireless-regdb: update regulatory database based on preceding changes
Link: https://github.com/openwrt/openwrt/pull/19474
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit increases the SPI bus frequency from 20 to 52 MHz. Reduces boot
time by 2s. Below is a performance comparison.
Before:
root@OpenWrt:~# dd if=/dev/mtd5 of=/dev/null bs=10M count=1 status=progress
10485760 bytes (10 MB, 10 MiB) copied, 2 s, 5.8 MB/
After:
root@OpenWrt:~# dd if=/dev/mtd5 of=/dev/null bs=10M count=1 status=progress
10485760 bytes (10 MB, 10 MiB) copied, 1 s, 9.7 MB/s
Taken from PR #18752 as each device should be tested individually, so I have
created a separate PR for this.
Signed-off-by: Sky Huang <SkyLake.Huang@mediatek.com>
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/19439
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
There is some confusion in the Git log of this file. Specifically,
the commit message on 7b7f1702 incorrectly indicates that there was
"potential fear" about copyright infringement.
Upon review of this situation, there is, in my opinion, no concern of
copyright infringement here. This is not legal advice; it is my
opinion based of years of work on copyright policy for FOSS.
However, Elliott Mitchell's idea was obviously helpful as inspiration
in writing this script and deserves credit. Ideas alone, however,
are not to my knowledge copyrightable anywhere in the world.
Signed-off-by: Bradley M. Kuhn <bkuhn@sfconservancy.org>
With the switch to Linux 6.12 this driver was enabled by accident.
However, it doesn't support any of the router SoCs but is meant to be
used only by the smartphone, tablet and chromebook SoCs.
Disable the driver again to silence a kernel error logline during boot.
Fixes: 0a0f5f94ec ("mediatek: mt7623: update config-6.12")
Fixes: 029b7ed9c4 ("mediatek: mt7622: update config-6.12")
Reported-by: https://aparcar.org/openwrt-tests/119/
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
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>
The 6.12 testing kernel for ipq40xx target is ready now.
Tested on SKSpruce WIA3300-20.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
On the ipq40xx platform, the bus range is 1 - 255. Therefore, bus
number 0 is clearly incorrect. Change the bus number to 1, just
like other ipq40xx devices. This patch fixes the following dtc
warnings on 6.12 kernel:
qcom-ipq4019.dtsi:476.5-29: Warning (pci_device_bus_num): /soc/pcie@40000000/pcie@0/wifi@0,0:bus-range: PCI bus number 0 out of range, expected (1 - 255)
qcom-ipq4019.dtsi:476.5-29: Warning (pci_device_bus_num): /soc/pcie@40000000/pcie@0/wifi@0,0:bus-range: PCI bus number 0 out of range, expected (1 - 255)
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
- Remove duplicate PCIe bridge. A default bridge node has been
added upstream.
- Do not refer to the qca807x node. This node label has been
removed. We can disable the qca807x phy in mdio node.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add a bridge node label so that we can insert PCIe peripheral nodes.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Copy arch directory from 6.12 kernel to restore the default
6.6 device tree files.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Copy patches and kernel configs from 6.12 kernel to restore the
default 6.6 kernel support files.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is a preparation for 6.12 kernel support. It can help us
track the device tree files history by using the Git tool.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is a preparation for 6.12 kernel support. It can help us
track the patches and Kconfig history by using the Git tool.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is a preparation for introducing the 6.12 kernel support.
All configs are automatically refreshed. In theory, they will
generate the same .config files in the kernel build directory
as before.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The prototype of `devm_platform_ioremap_resource_byname()` was defined
in `linux/platform_device.h`.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This function is only used by the current source file gcc-ipq4019.c.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The node name should include the reg property value. Fix warning:
qcom-ipq4019-lbr20.dts:415.17-449.4: Warning (i2c_bus_reg): /soc/i2c@78b7000/led-controller: I2C bus unit address format error, expected "27"
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The DRM modules for simple (ie. raw, non-eDP) panels can be used also
by platforms others than Freescale i.MX.
Create an individual package for it.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Not all targets support power management, some older or more simple
targets don't have CONFIG_PM set. Allow kernel module packages to
depend on USES_PM to only be available on targets which got
CONFIG_PM=y in their kernel config.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Partially revert commit 332645a610 ("uboot-mediatek: sync with
mtk-openwrt/u-boot 20250711") by dropping unused PHY drivers which come
with large embedded firmware (and are hence inacceptable for upstream)
and restoring our previous version of the Airoha EN8811H driver which is
known to work and load firmware from the eMMC boot1 hardware partition
instead of embedding it in the driver.
In future we may switch to the upstream Airoha EN8811H driver which
allows loading the firmware either from a filesystem or overloading the
en8811h_read_fw() for board which may eg. store that firmware directly
inside a eMMC hardware partition or UBI volume, like the BPi-R3 mini
does.
See also:
https://patchwork.ozlabs.org/project/uboot/patch/20250615131243.30770-1-lucienzx159@gmail.com/
Fixes: 332645a610 ("uboot-mediatek: sync with mtk-openwrt/u-boot 20250711")
Reported-by: Adrian Bente
Signed-off-by: Daniel Golle <daniel@makrotopia.org>