136 Commits

Author SHA1 Message Date
6bc682795c u-boot: translate Web UI to Chinese
Translate Web UI pages to Chinese for better usability.
2026-03-10 16:47:51 +08:00
b62bb2fefb network: add MediaTek DHCPD support
- Add header: include/net/mtk_dhcpd.h
- Add implementation: net/mtk_dhcpd.c
- Add Kconfig option: CONFIG_MTK_DHCPD (depends on CONFIG_HTTPD)
- Include mtk_dhcpd.o in net/Makefile
- failsafe/failsafe.c:
    - call mtk_dhcpd_start() before Web failsafe starts
    - call mtk_dhcpd_stop() after Web failsafe exits
- net/net.c: call mtk_dhcpd_start() after net_loop(TCP) initialization
  to provide a fallback hook
2026-03-10 11:59:05 +08:00
Ashley Lee
dfd96ba113 mediatek:add Ruijie-EW6000GX-Pro support (#141) 2025-08-29 20:04:23 +08:00
Tianling Shen
46adcea5d3 uboot: sync dosilicon/fmsh/gsto code from linux-rockchip
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-22 19:23:30 +08:00
Tianling Shen
8d0a22474b uboot: mt7622: do not auto erase uboot env when reset button is pressed (#131)
Fixes: 84cfb1511b ("uboot: mt7622: add rootdisk support from openwrt")

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-19 16:28:25 +08:00
Tianling Shen
6416a8200b mt7986: add netcore n60 (pro) support (#126)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-19 16:27:52 +08:00
Tianling Shen
7aa1d56981 mt7981: add cudy tr3000 v1 support (#125)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-19 16:27:33 +08:00
Tianling Shen
475f1640d3 mt7986: add missing config for ruijie rg-x60 (#116)
CONFIG_ENV_IMPORT_FDT won't take effect without
CONFIG_ENV_VARS_UBOOT_CONFIG enabled.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-19 16:26:33 +08:00
Tianling Shen
4e54179aba uboot: do not erase ubi if fip volume is found (#112)
In this case FIP and all other data are stored in ubi.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-19 16:26:14 +08:00
Ashley Lee
0aa0e7eb59 mt7986: add support for Ruijie RG-X60 (NEW) (#95)
* mt7986: add support for Ruijie RG-X60 (NEW)

uboot: add customed bootconf

mt7981: fix Ruijie RG-X30E and Ruijie RG-X30E Pro default config name typo

Signed-off-by: Ashley Lee <code@emtips.net>

* Update uboot-mtk-20220606/arch/arm/dts/mt7986a-ruijie-rg-x60.dts

Co-authored-by: Tianling Shen <cnsztl@gmail.com>

* uboot: using ENV_IMPORT_FDT to setup ruijie x60 bootconf env

---------

Signed-off-by: Ashley Lee <code@emtips.net>
Co-authored-by: hanwckf <my375229675@gmail.com>
Co-authored-by: Tianling Shen <cnsztl@gmail.com>
2024-11-15 02:01:08 +08:00
hanwckf
880d7df742 uboot: add support for xiaomi ax3000t an8855 variant 2024-11-12 00:19:11 +08:00
hanwckf
9c22e498bf uboot-2022: fix build error 2024-10-28 23:58:24 +08:00
Tianling Shen
c57c434e89 uboot-mtk-20220818: bootmenu_emmc: apply changes to mt7622/mt7988
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-25 21:53:37 +08:00
Tianling Shen
8064c275a5 uboot: fix erasing ubi when flash fit firmware
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-25 21:53:15 +08:00
Tianling Shen
fb350b9cca uboot-mtk-20220606: port mtd_*_skip_bad func from uboot-2023
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-25 21:53:15 +08:00
Tianling Shen
58370a2264 uboot: renew glinet gl-mt2500 support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-25 21:52:48 +08:00
Tianling Shen
d2772cc419 uboot: renew glinet gl-mt3000 support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-25 21:52:48 +08:00
Tianling Shen
914e22af6e mt7981: add openembed som7981 support
Signed-off-by: Tianling Shen <i@cnsztl.eu.org>
2024-10-25 21:52:20 +08:00
Tianling Shen
5bfaac82d9 uboot: increase flashing timeout to 180s
Mainly for spi-nor flash, requires more time to complete.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-16 11:03:11 +08:00
Tianling Shen
45c8c841d2 uboot-mtk-20220606: fix read nor again
should read fit size instead of page size.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-16 11:03:11 +08:00
Tianling Shen
018351a4a6 uboot-mtk-20220606: boot_helper: fix read snor
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-14 01:21:18 +08:00
Ssunk
668c84ad5e uboot: mtd: spi: spi-nor-ids: Add more XM25Q series chips
- XM25QH128C
- XM25QH256C
- XM25QU256C
- XM25QH512C
- XM25QU512C

Signed-off-by: Kankan Sun <ssunkkan@gmail.com>
[jagan: update the commit message]
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2024-10-14 01:21:18 +08:00
Ricardo Pardini
50e99574a1 uboot: mtd: spi-nor: Add support for XMC XM25QU128C
Add support for XMC XM25QU128C (128M-bit) Serial Flash memory. Used on
the Xunlong Orange Pi 3B, 5 and 5 Plus boards.

Datasheet:
https://www.xmcwh.com/uploads/806/XM25QU128C_Ver2.0.pdf

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
[jonas@kwiboo.se: update commit message]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-10-14 01:21:18 +08:00
Tianling Shen
290e6a9ce0 uboot: fix boot fit image from mtd
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-07 10:45:56 +08:00
Tianling Shen
985b24e379 uboot: mt7622: enable pstore
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-07 10:45:44 +08:00
Tianling Shen
84cfb1511b uboot: mt7622: add rootdisk support from openwrt
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-07 10:45:44 +08:00
Tianling Shen
3788274583 uboot: add glbtn header
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-07 10:40:45 +08:00
Tianling Shen
fefe1779a6 uboot: fix build without glbtn and httpd
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-07 10:40:45 +08:00
Tianling Shen
f6ae4782db uboot: boot_helper: increase bootcmd length to 128 chars
64 chars are not enough for some images like bpi r3 and r3 mini.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-21 02:16:05 +08:00
Tianling Shen
8dddf4ec0a uboot: refine fit ubootenv creation
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-12 17:26:18 +08:00
Tianling Shen
15ac366e7d uboot: failsafe: support boot into initramfs
sort uri handlers while at it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-12 17:26:07 +08:00
Tianling Shen
24ca421ac3 uboot: refine web helptext
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-12 17:25:53 +08:00
Tianling Shen
68913c964f uboot: support mainline FIT image
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-10 16:39:17 +08:00
Tianling Shen
1dbebb4242 uboot: board: add rootdisk support from openwrt
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-10 16:39:17 +08:00
Tianling Shen
67ab0457d2 uboot: add fit_get_totalsize support from openwrt
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-10 16:39:17 +08:00
Francesco Dolcini
068edc9ca9 uboot-mtk-20220606: fdt: Add U-Boot version to chosen node
Add a new device tree property "u-boot,version" in the chosen node to
pass the U-Boot version to the operating system.
This can be useful to implement a firmware upgrade procedure from the
operating system.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-09-10 16:39:17 +08:00
Simon Glass
dd28086282 uboot-mtk-20220606: boot: Correct handling of addresses in boot_relocate_fdt()
This code uses casts between addresses and pointers, so does not work with
sandbox. Update it so we can allow sandbox to do device tree fixups.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-10 16:39:17 +08:00
Simon Glass
9056392f74 uboot-mtk-20220606: image: Allow loading a FIT image for a particular phase
Add support for filtering out FIT images by phase. Rather than adding yet
another argument to this already overloaded function, use a composite
value, where the phase is only added in if needed.

The FIT config is still selected (and verified) as normal, but the images
are selected based on the phase.

Tests for this come in a little later, as part of the updated VPL test.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-10 16:39:17 +08:00
Simon Glass
eb7c85176b uboot-mtk-20220606: image: Add the concept of a phase to FIT
We want to be able to mark an image as related to a phase, so we can
easily load all the images for SPL or for U-Boot proper.

Add this to the FIT specification, along with some access functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-10 16:39:17 +08:00
Simon Glass
5a470aa595 uboot-mtk-20220606: image: Move comment for fit_conf_find_compat()
Move this comment to the header file, where the APIs should be defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-10 16:39:17 +08:00
Sean Anderson
45a4367ee5 uboot-mtk-20220606: image: fit: Add some helpers for getting data
Several different firmware users have repetitive code to extract the
firmware data from a FIT. Add some helper functions to reduce the amount
of repetition. fit_conf_get_prop_node (eventually) calls
fdt_check_node_offset_, so we can avoid an explicit if. In general, this
version avoids printing on error because the callers are typically
library functions, and because the FIT code generally has (debug)
prints of its own. One difference in these helpers is that they use
fit_image_get_data_and_size instead of fit_image_get_data, as the former
handles external data correctly.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-10 16:39:17 +08:00
Daniel Golle
e137e075d5 uboot-mtk-20220606: image-fit: don't set compression if it can't be read
fit_image_get_comp() should not set value -1 in case it can't read
the compression node. Instead, leave the value untouched in that case
as it can be absent and a default value previously defined by the
caller of fit_image_get_comp() should be used.

As a result the warning message
WARNING: 'compression' nodes for ramdisks are deprecated, please fix your .its file!
no longer shows if the compression node is actually absent.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-10 16:39:17 +08:00
Daniel Golle
a4a6363b73 uboot-mtk-20220606: bootm: fix typo imape_comp -> image_comp
Change variable name 'imape_comp' to the supposedly intended name
'image_comp'.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-09-10 16:39:17 +08:00
Joel Stanley
6a1cfcde40 uboot-mtk-20220606: image: fit: Use stack allocation macro
The documentation above the DEFINE_ALIGN_BUFFER says it's for use
outside functions, but we're inside one.

Instead use ALLOC_CACHE_ALIGN_BUFFER, the stack based macro, which also
includes the cache alignment.

Fixes: b583348ca8c8 ("image: fit: Align hash output buffers")
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2024-09-10 16:39:17 +08:00
Tianling Shen
65b62292c6 uboot-mtk-20220606: auto enter failsafe on autoboot failure
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-10 15:28:10 +08:00
Tianling Shen
fccfae83a6 uboot-mtk-20220606: fix auto enter failsafe on autoboot failure
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-10 15:28:10 +08:00
Aabandon
5ba6fa3783 mediatek: add support for CMCC XR30 and CMCC XR30 eMMC
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: GIGADEVICE GD5F1GM7UExxG  128MB or 64GB eMMC
RAM: DDR4 512MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, Mesh
Power: DC 12V 1.5A
2024-09-03 20:57:26 +08:00
Aabandon
11c47310b9 mediatek: add support for Newland NL-WR9103
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: GSTO GSS01GSAK1 128MB (No machine tests yet)
       WINBOND W25N01GVZE1G 128MB
RAM: DDR3 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, Mesh
Power: DC 12V 1A
2024-09-03 20:57:26 +08:00
Aabandon
635ccaace1 mediatek: add support for HONOR FUR-602/603 (HONOR XT50/XU50/XC50)
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: DOSILICON DS35Q1GA-IB 128MB (No machine tests yet)
         GIGADEVICE GD5F1GM7UExxG 128MB
         WINBOND W25N01GVZE1G 128MB
RAM: DDR3 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, Mesh
Power: DC 12V 1A
2024-09-03 20:57:26 +08:00
Aabandon
730c66a683 mediatek: add support for Newland NL-WR8103/MR3000D-CIq(256MB RAM version)
Hardware specification:
SoC: MediaTek MT7981B 2x A53
Flash: FORESEE F35SQA001G 128MB
RAM: DDR3 256MB
Ethernet: 4x 10/100/1000 Mbps
Switch: MediaTek MT7531AE
WiFi: MediaTek MT7976C
Button: Reset, Mesh
Power: DC 12V 1A
2024-09-03 20:57:26 +08:00