From: Sam Protsenko Date: Wed, 9 Jul 2025 22:29:21 +0000 (-0500) Subject: board: samsung: e850-96: Add dfu_alt_info X-Git-Tag: v2025.10-rc1~10^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0a8b48b71a7907fe16c278211a3f80b16f56731;p=thirdparty%2Fu-boot.git board: samsung: e850-96: Add dfu_alt_info Add 'dfu_alt_info' environment variable which contains: - Linux eMMC partitions ('esp' and 'rootfs') - eMMC Boot Partition A layout, where all the firmware reside It makes it possible to update the bootloader (U-Boot). All sizes in 'dfu_alt_info' are given in 512B blocks (LBA). eMMC size is 58.2 GiB. The eMMC Boot Partition A (mmc0boot0) layout looks like this: boot0 partition (4 MiB) 0x0 +----------------------------------+ | fwbl1 (12 KiB) | 0x18 +----------------------------------+ | epbl (76 KiB) | 0xb0 +----------------------------------+ | bl2 (256 KiB) | 0x2b0 +----------------------------------+ | dram_train (16 KiB) | 0x2d0 +----------------------------------+ | ect_test (50 KiB) | 0x334 +----------------------------------+ | acpm_test (130 KiB) | 0x438 +----------------------------------+ | bootloader (2 MiB) | 0x1438 +----------------------------------+ | el3_mon (256 KiB) | 0x1638 +----------------------------------+ where U-Boot should be flashed into 'bootloader' partition. So U-Boot binary size should be 2 MiB or less. The whole boot0 partition is 4 MiB, but only 2.8 MiB is currently used. With this change, the U-Boot binary can be updated on eMMC like this: => dfu 0 mmc 0 $ dfu-util -D u-boot.bin -a bootloader Looking at E850-96 booting diagram at [1,2], it's easy to see how these binaries are being executed in the same order they are placed in mmc0boot0 area. E.g. fwbl1 is definitely BL1 (software part of Boot ROM). So it's obvious the ROM code just reads the binary from eMMC at 0x0 offset into RAM (SRAM?) and executes it. All mentioned images can be found at [3], as stated in E850-96 U-Boot documentation. 'dram_train', 'ect_test' and 'acpm_test' areas should be ignored -- they are not flashed with real images. [1] doc/board/samsung/e850-96.rst [2] https://docs.u-boot.org/en/latest/board/samsung/e850-96.html [3] https://gitlab.com/Linaro/96boards/e850-96/images/-/tree/master/images Signed-off-by: Sam Protsenko Signed-off-by: Minkyu Kang --- diff --git a/board/samsung/e850-96/e850-96.env b/board/samsung/e850-96/e850-96.env index 5ac76bcef02..c76ea6acdc3 100644 --- a/board/samsung/e850-96/e850-96.env +++ b/board/samsung/e850-96/e850-96.env @@ -7,5 +7,18 @@ pxefile_addr_r=0x8c200000 ramdisk_addr_r=0x8c300000 fdtfile=CONFIG_DEFAULT_FDT_FILE +dfu_alt_info= + rawemmc raw 0 0x747c000 mmcpart 1; + esp part 0 1; + rootfs part 0 2; + fwbl1 raw 0x0 0x18 mmcpart 1; + epbl raw 0x18 0x98 mmcpart 1; + bl2 raw 0xb0 0x200 mmcpart 1; + dram_train raw 0x2b0 0x20 mmcpart 1; + ect_test raw 0x2d0 0x64 mmcpart 1; + acpm_test raw 0x334 0x104 mmcpart 1; + bootloader raw 0x438 0x1000 mmcpart 1; + el3_mon raw 0x1438 0x200 mmcpart 1 + partitions=name=esp,start=512K,size=128M,bootable,type=system; partitions+=name=rootfs,size=-,bootable,type=linux