The vendor u-boot knows nothing about UBI, and we used to have a
fixed-size kernel partition for vendor u-boot and UBI for rootfs.
However, that fixed partition becomes too small eventually, and
expanding it requires complicated procedure.
This commit changed the flash layout and added a second u-boot
where the kernel supposed to be.
Now the vendor u-boot chainloads our mainline u-boot, and our
u-boot reads kernel+rootfs from UBI, verifies it, and boot
into OpenWrt.
There are two possible ways to convert from the old fw:
Flash the factory image using mtd (provided by @rany2):
mount -o remount,ro /
mount -o remount,ro /overlay
cd /tmp
dd if=factory.bin bs=1M count=4 | mtd write - kernel
dd if=factory.bin bs=1M skip=4 | mtd -r write - ubi
Or, flash the 2nd u-boot via mtd and upload the firmware
to the 2nd u-boot using tftp:
1. prepare a tftp server at 192.168.1.254 to serve the
sysupgrade image:
openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-squashfs-sysupgrade.itb
2. upload the ubi-loader.itb to OpenWrt /tmp, and flash it to
the old kernel partition:
mtd -r write openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-ubi-loader.itb
3. The router should reboot and flash the sysupgrade image via TFTP.
Procedure for flashing from vendor firmware shouldn't change.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Add support for Xiaomi Redmi AX6S to be used as a second-stage
UBI loader.
The defconfig/env is minimal: Boot fit from UBI. If that failed,
load and boot initramfs image from TFTP.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
PKG_MIRROR_HASH was accidentally generated with already APK-adapted
version string in the filename. That can't work (yet). Regenerate and
hash the file with the currently used version scheme to fix that.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
e91ed40 ubus: assume that the service iface can be NULL
4094a3c interface: remove unused peer field
8a0c9db interface: add missing cache cleanup on interface free
3b341f4 add the ability to announce additional hostnames
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Make sure /etc/umdns/ is accessiable for the umdns process if it
exists and umdns is run with umdns.@umdns[0].jail='1'.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
With kernel 6.1 image size is too large for Edgerouter X current size
limit and is causing the buildbots to fail building so images for other
devices are not updated as well.
So, disable building Edgerouter X images until a workaround is found.
Signed-off-by: Robert Marko <robimarko@gmail.com>
That new version seems to work more stable including mesh.
On version 2.4.0.1-01746 rproc was immediately crashing if mesh was
active.
Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Upstream commit e298d8a38b23 [0] changed method how to blink delays are pased
to function. Downstream commit must follow it.
[0] https://lore.kernel.org/r/20230510162234.291439-2-hdegoede@redhat.com
Reported-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Currently, 6 MAC addresses are read from the "boarddata1" partition and set for network interfaces in sequence.
This partition only contains 3 MAC addresses:
1. lan mac
2. wan mac
3. wlan5g mac
As result only lan2, lan3 and lan4 have correct (OUI) MAC addresses.
lan1, lan5 and wan interfaces get MAC addresses with incorrect OUI from random data on "boarddata1" partition.
This commit fix this and use first MAC for lan and second MAC for wan interfaces.
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
The port 5 of most ipq60xx devices is connected to qca8075,
a few are connected to qca8081. So assume that the default
connection is qca8075 and set the phy mode to psgmii.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
a903d3169193 wifi: mt76: mt7921: fix a potential association failure upon resuming
eb0d0ce344f3 wifi: mt76: mt7921: fix suspend issue on MediaTek COB platform
841bf82e9958 wifi: mt76: fix the issue of missing txpwr settings from ch153 to ch177
ce7ccc540168 wifi: mt76: Remove redundant assignment to variable tidno
a238df940d6f wifi: mt76: mt7915: initialize rssi on adding stations
46c7d1849dbd wifi: mt76: replace skb_put with skb_put_zero
b5640b3153c7 wifi: mt76: fix tx packet loss when scanning on DBDC
7b054e5cb3af wifi: mt76: mt7915: fix mcu command format for mt7915 tx stats
3f27a64a8010 wifi: mt76: mt7915: fix bogus Tx/Rx airtime duration values
4f681a8fbc91 wifi: mt76: mt7915: fix HE PHY capabilities IE for station mode
8ede229eb8b5 wifi: mt76: mt7915: only set MT76_MCU_RESET for the main phy
2330781b8c5f wifi: mt76: mt7996: only set MT76_MCU_RESET for the main phy
e5fb6995e7eb wifi: mt76: mt7915: add support for disabling in-band discovery
b4a917417c85 wifi: mt76: mt7915: add mt7986, mt7916 and mt7981 pre-calibration
2135e201e7a9 mt76: mt7915: add fallback in case of missing precal data
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Build and package driver for MediaTek PCIe 5G WWAN modem T7xx device
available in Linux 6.1 and 6.6 as kmod-mtk-t7xx.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Marvell's thermal sensors do not support interrupts, so we need to
poll them. Reading temperature every second should be enough to
control the fan.
While at it, also make sure fan speed is reduced again if temperature
goes down.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Using := doesn't fly well when including other variables. In fact this
would cause the variable to be empty and break cloning of the git repo.
Fix: "c354c069b3 uci: fix Makefile formatting"
Signed-off-by: Paul Spooren <mail@aparcar.org>
On Buffalo WXR-5590AX12, some LEDs don't have "function" property and
only "color" property is available for the newer binding of LED on
Linux Kernel.
2e659930d3 ("qualcommax: drop redundant label with new LED
color/function format") removes "label" property from LEDs, then,
multiple "<color>:" (ex.: "white:"/"red:") will be appeared as LED names
and renamed to "<color>:_<num>" ("ex.: "white:_1", "green:_2", ...) by
kernel.
logs:
[ 5.372863] leds-gpio leds: Led white: renamed to white:_1 due to name collision
[ 5.375796] leds-gpio leds: Led red: renamed to red:_1 due to name collision
/sys/class/leds:
root@OpenWrt:/# ls /sys/class/leds/
red: red:power white: white:power
red:_1 red:wlan white:_1 white:wlan
Fix this issue by adding missing "function" property to LEDs on Buffalo
WXR-5950AX12.
Note: there are no appropriate functions in dt-bindings/leds/common.h
for some LEDs, so use the hardcoded strings for them instead.
Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
On QNAP QHora-301W, all LEDs don't have "function" property and only
"color" property is available for the newer binding of LED on Linux
Kernel.
2e659930d3 ("qualcommax: drop redundant label with new LED
color/function format") removes "label" property from LEDs, then,
multiple "<color>:" (ex.: "amber:"/"green:"/"red:") will be appeared as
LED names and renamed to "<color>:_<num>" ("ex.: "green:_1", "green:_2",
...) by kernel.
logs:
[ 4.246494] leds-gpio leds: Led green: renamed to green:_1 due to name collision
[ 4.248978] leds-gpio leds: Led green: renamed to green:_2 due to name collision
[ 4.256345] leds-gpio leds: Led green: renamed to green:_3 due to name collision
[ 4.263770] leds-gpio leds: Led green: renamed to green:_4 due to name collision
[ 4.271105] leds-gpio leds: Led amber: renamed to amber:_1 due to name collision
[ 4.278487] leds-gpio leds: Led green: renamed to green:_5 due to name collision
[ 4.285856] leds-gpio leds: Led amber: renamed to amber:_2 due to name collision
[ 4.293257] leds-gpio leds: Led green: renamed to green:_6 due to name collision
[ 4.300616] leds-gpio leds: Led amber: renamed to amber:_3 due to name collision
[ 4.308002] leds-gpio leds: Led green: renamed to green:_7 due to name collision
[ 4.315384] leds-gpio leds: Led amber: renamed to amber:_4 due to name collision
[ 4.322760] leds-gpio leds: Led green: renamed to green:_8 due to name collision
[ 4.330135] leds-gpio leds: Led amber: renamed to amber:_5 due to name collision
/sys/class/leds:
amber: amber:_4 green:_2 green:_6
amber:_1 green:_5 green:_3 green:_7
amber:_2 green: green:_4 green:_8
amber:_3 green:_1 green:_5 red:
Fix this issue by adding missing "function" (and "function-enumerator")
property to LEDs on QNAP QHora-301W.
Note: there are no appropriate functions in dt-bindings/leds/common.h
for some LEDs, so use the hardcoded strings for them instead.
Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
This is an automatically generated commit.
During a `git bisect` session, `git bisect --skip` is needed recommended.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Dual-slot NAS based on Marvell Kirkwood.
Specifications:
- Marvell 88F6281 @1GHz
- 128Mb RAM
- 256Mb NAND
- 1x GbE LAN (Marvell 88E1116)
- 1x USB 2.0
- 2x SATA
- PCF8563 RTC
- LM75 sensor
- TC654 PWM fan controller
- Serial on J2 (115200,8n1)
- Newer bootROM so kwboot-ing via serial is possible
Installation:
1. Serial console
- Connect your levelshifter to the serial console
on J2 (refer to the wiki page for pinout)
2. Update u-boot
- Download the u-boot.kwb image for the device
- Powercycle the NAS
- Run "kwboot -b ./u-boot.kwb /dev/ttyUSB0 -p"
- Connect to the serial console with minicom
- tftp 0x0800000 netgear_stora-u-boot.kwb
- nand erase 0x0 100000
- nand write 0x0800000 0x0 0x100000
- reset
3. Install OpenWrt
- Boot up the initramfs image
- tftpboot 0x800000 openwrt-kirkwood-netgear_stora-initramfs-uImage; bootm 0x800000
- Download the sysupgrade image and perform sysupgrade
The fan is controlled in 3 stages by a script running every minute
from cron, measuring the CPU temperature.
Snippets taken from bodhi <mibodhi@gmail.com>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
The dir variable has been used uninitialized since the port to 5.10, and
somehow this remains undetected by GCC.
Fixes: b10d604459 ("kernel: add linux 5.10 support")
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
Most mt7622 devices use the mt7531 switch, which have been
switched to dsa driver for a long time. So use dsa as the
default configuration and configure these rtl8367s devices
separately. This reduces the amount of code.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
In kernel 6.6, dts files for mediatek arm target are moved into
arch/arm/boot/dts/mediatek instead of legacy path arch/arm/boot/dts.
To avoid dts compile failure, change DTS_DIR to the mediatek subfolder
for kernel 6.6.
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Add a separate bit in struct ieee80211_tx_info to indicate airtime tracked
as broadcast/multicast. This avoids a race condition where airtime from
stations that were just removed wasn't getting subtracted from the total
PHY airtime.
Fixes: 95e633efbd ("mac80211: add AQL support for broadcast/multicast packets")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Also backport most recent MHI modem additions to Linux 6.6.
Adds support for generic SDX75-based modems.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
drm-amdgpu and drm-radeon require drm-exec and/or drm-suballoc-helper in
6.6, so since we have them packaged separately include them when required.
Fixes: 5b08b56007 ("kernel: modules: video: adapt for kernel 6.6")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Linux 6.4 has split out the previously AMDGPU specific suballocation
helper into a generic one and it has its own symbol now.
So, lets package it as a separate helper as AMDGPU still requires it
for 6.6.
Signed-off-by: Robert Marko <robimarko@gmail.com>
As part of adding kernel 6.6 support, DRM_EXEC and DRM_SUBALLOC_HELPER were
added to the kmod-drm, however these are only used by drm-amdgpu and
drm-radeon which are only supported on x86.
So, lets start fixing building of other targets by removing these from the
main kmod-drm, in follow-up commits they will be packaged separately and
selected when required.
Fixes: 5b08b56007 ("kernel: modules: video: adapt for kernel 6.6")
Signed-off-by: Robert Marko <robimarko@gmail.com>
After a long time QCA has pushed an updated release of 2.9.0.1 firmware
for IPQ8074 and QCN9074, so lets update to 2.9.0.1-01977.
Sadly, still nothing new for IPQ6018.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add missing CLK_TOP_PEXTP_Px_SEL clock for each of the 4 PCIe interfaces
of the MT7988 SoC. Without that clock PCIe doesn't work reliable.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>