258 Commits

Author SHA1 Message Date
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
Aabandon
0547d940aa uboot: add support for fmsh gsto dosilicon spi-nand 2024-09-03 20:57:26 +08:00
Patrice Chotard
7243b4de0f mtd: spinand: Fix display of unknown raw ID
In case ID is not found in manufacturer table, the raw ID is
printed using %*phN format which is not supported by lib/vsprintf.c.
The information displayed doesn't reflect the raw ID return by the
unknown spi-nand.

Use %02x format instead, as done in spi-nor-core.c.

For example, before this patch:
  ERROR: spi-nand: spi_nand flash@0: unknown raw ID f74ec040
after
  ERROR: spi-nand: spi_nand flash@0: unknown raw ID 00 c2 26 03

Fixes: 0a6d6bae0386 ("mtd: nand: Add core infrastructure to support SPI NANDs")

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-09-03 20:57:26 +08:00
hanwckf
a665a5e3cb Update README.md 2024-08-22 00:32:20 +08:00
Tianling Shen
2c152574c1 uboot-mtk-20220606: mt7981: disable MTK_UPGRADE_IMAGE_VERIFY (#74)
Otherwise upgrading firmware using tftp will fail.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-08-22 00:30:33 +08:00
thggdx
6993b31fb0 fix: Fixed an issue with undeclared function calls (#73) 2024-08-22 00:30:17 +08:00
Tianling Shen
e02fbd3d77 mt7986: add TP-Link TL-XTR8488 support (#71)
Based on An Yun's work.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-17 19:10:54 +08:00
lam-hub
81cf7a8928 cetron_3003:fix button inactive (#68)
Co-authored-by: liam <liam@cetron.cn>
2024-06-17 19:10:26 +08:00
Ashley Lee
cc14c072c6 mt7981: add support for Ruijie RG-X30E and Ruijie RG-X30E Pro (#67)
Signed-off-by: Ashley Lee <code@emtips.net>
2024-06-17 19:09:59 +08:00
Tianling Shen
262015e450 mt7981: add nokia ea0326gmp support (#64)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-17 19:08:58 +08:00
Shuanglei Tao
d74880eccc add support for failsafe boot via env (#62)
To use it in openwrt, run: fw_setenv failsafe 1
2024-06-17 19:08:39 +08:00
lgs2007m
6f1582df4d uboot-202206: mt7986/bootmenu_emmc: sync write firmware logic from 7981 (#60) 2024-06-17 19:08:19 +08:00
hanwckf
3b93bc9078 Merge pull request #53 from lgs2007m/master
atf-202206: atf-202310: fix MT7981 available DDR4 size and adjust DDR_SIZE choices in Config.in
2024-02-04 09:05:28 +08:00
lgs2007m
3aef7874ea atf-202206: atf-202310: fix MT7981 available DDR4 size and adjust DDR_SIZE choices in Config.in 2024-02-03 11:45:09 +08:00
hanwckf
1869c74691 uboot: add support for foresee spi-nand 2024-01-31 10:14:25 +08:00
hanwckf
23fb03af0f Merge pull request #50 from lgs2007m/master
uboot-202206: do not erase env after write FIP for emmc
2024-01-28 23:38:36 +08:00
lgs2007m
74bf8f786e build.sh: sync usage info with README 2024-01-28 16:02:38 +08:00
lgs2007m
d5d43529b6 uboot-202206: do not erase env after write FIP for emmc 2024-01-28 15:48:51 +08:00
Tianling Shen
751aa8271d build.sh: minor cleanup commands (#45)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-10 01:06:35 +08:00
Tianling Shen
f5cefa306e mt7986: add TP-Link TL-XDR4288/608x support (#44)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-10 01:06:25 +08:00
Tianling Shen
a2fa9d37f4 mt7986: add glinet gl-mt6000 support (#43)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-05 20:03:19 +08:00
Ashley Lee
bcb1b03e2e mt7986: add support for Ruijie RG-X60 Pro (#42)
Signed-off-by: Ashley Lee <code@emtips.net>
2024-01-05 20:03:10 +08:00
lgs2007m
3669f03979 build.sh: output BL2 when build BL2 + FIP (#38) 2023-12-26 00:06:36 +08:00
Tianling Shen
610fcad0e2 uboot-mtk-20220606: arm: Only support ARM64_CRC32 when using GCC (#36)
Today, only gcc has __builtin_aarch64_crc32b (clang-16 does not, for
example). Make this option depend on CC_IS_GCC.


Reviewed-by: Simon Glass <sjg@chromium.org>

Signed-off-by: Tom Rini <trini@konsulko.com>
Co-authored-by: Tom Rini <trini@konsulko.com>
2023-12-15 01:22:26 +08:00
lgs2007m
34446a95ff fix JDCloud RE-CP-03 and cmcc rax3000m emmc ENV OFFSET 2023-12-15 01:22:01 +08:00
lgs2007m
077102cb84 set JDCloud RE-CP-03 build BL2 and FIP 2023-12-15 01:22:01 +08:00
hanwckf
674a97a3df Merge pull request #34 from 1715173329/jdc
mt7986: add JDCloud RE-CP-03 support
2023-12-10 21:05:21 +08:00
Tianling Shen
2a510d3e0d mt7981: add missing bl2_verify node to rax3000m emmc
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-10 17:13:17 +08:00
Tianling Shen
fb79548e3e mt7986: add JDCloud RE-CP-03 support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-12-10 17:12:10 +08:00
hanwckf
16fd4837eb atf-2023: remove Werror 2023-12-03 23:41:16 +08:00
Tianling Shen
c7d9aa4f5d uboot-mtk-20220606: fix update mt7986 emmc image (#33)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-30 01:22:34 +08:00
Tianling Shen
051a5d18ce atf-20231013-0ea67d76a: import new atf
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-21 16:40:40 +08:00
Tianling Shen
3eee20818e mt7981: add h3c magic nx30 pro support (#30)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-20 17:39:27 +08:00
Shuanglei Tao
af13dbd3cc mt7981: add xiaomi ax3000t support (#26) 2023-11-02 14:49:03 +08:00
benboguan
6c5da30644 mt7981: r30b1: fix leds (#27) 2023-11-02 14:48:22 +08:00
Tianling Shen
cbed847af3 mt7981: initial cmcc rax3000m emmc support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-10-24 09:53:44 +08:00
lgs2007m
61c245c088 uboot-mtk-20220606: mt7981/bootmenu_emmc: sync upgrade logic from mt7986 2023-10-24 09:53:44 +08:00
Tianling Shen
921b9ed693 mt7981: add cmcc a10 support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-10-22 01:23:47 +08:00