u-boot-brain/include/environment/ti/dfu.h
Jean-Jacques Hiblot 7a53a1a811 ARM: ti: Update layout for MMC and eMMC (env and dfu)
The problems with the current DFU layout are:
MMC: The space allocated for u-boot is too small for the latest u-boot
     (>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
eMMC: region "u-boot.img.raw" overlaps the environment area and the region
      "spl-os-image.raw".
both: region "spl-os-image.raw" is quite small and can't handle android
      kernels

Fixing this requires growing some regions and moving others.
Care has been taken to leave some room for further growth of
"spl-os-args.raw".
Also the "env" now appears in the dfu so that it's apparent that the
region is not free space that can be used to grow "u-boot.img.raw".
The MLO region is 0x100 sectors wide but the 0x100 are unused in case the
MLO comes too overflow this areas.
The total space allocated for those raw binaries is 16MB, of which 13+MB
are reserved for the kernel image.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-06-05 14:13:10 -04:00

78 lines
2.0 KiB
C

/*
* Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com
*
* Environment variable definitions for DFU on TI boards.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#define DFU_ALT_INFO_MMC \
"dfu_alt_info_mmc=" \
"boot part 0 1;" \
"rootfs part 0 2;" \
"MLO fat 0 1;" \
"MLO.raw raw 0x100 0x100;" \
"u-boot.img.raw raw 0x300 0x1000;" \
"u-env.raw raw 0x1300 0x200;" \
"spl-os-args.raw raw 0x1500 0x200;" \
"spl-os-image.raw raw 0x1700 0x6900;" \
"spl-os-args fat 0 1;" \
"spl-os-image fat 0 1;" \
"u-boot.img fat 0 1;" \
"uEnv.txt fat 0 1\0"
#define DFU_ALT_INFO_EMMC \
"dfu_alt_info_emmc=" \
"rawemmc raw 0 3751936;" \
"boot part 1 1;" \
"rootfs part 1 2;" \
"MLO fat 1 1;" \
"MLO.raw raw 0x100 0x100;" \
"u-boot.img.raw raw 0x300 0x1000;" \
"u-env.raw raw 0x1300 0x200;" \
"spl-os-args.raw raw 0x1500 0x200;" \
"spl-os-image.raw raw 0x1700 0x6900;" \
"spl-os-args fat 1 1;" \
"spl-os-image fat 1 1;" \
"u-boot.img fat 1 1;" \
"uEnv.txt fat 1 1\0"
#ifdef CONFIG_NAND
#define DFU_ALT_INFO_NAND \
"dfu_alt_info_nand=" \
"SPL part 0 1;" \
"SPL.backup1 part 0 2;" \
"SPL.backup2 part 0 3;" \
"SPL.backup3 part 0 4;" \
"u-boot part 0 5;" \
"u-boot-spl-os part 0 6;" \
"kernel part 0 8;" \
"rootfs part 0 9\0"
#else
#define DFU_ALT_INFO_NAND ""
#endif
#define DFU_ALT_INFO_RAM \
"dfu_alt_info_ram=" \
"kernel ram 0x80200000 0x4000000;" \
"fdt ram 0x80f80000 0x80000;" \
"ramdisk ram 0x81000000 0x4000000\0"
#define DFU_ALT_INFO_QSPI_XIP \
"dfu_alt_info_qspi=" \
"u-boot.bin raw 0x0 0x080000;" \
"u-boot.backup raw 0x080000 0x080000;" \
"u-boot-spl-os raw 0x100000 0x010000;" \
"u-boot-env raw 0x110000 0x010000;" \
"u-boot-env.backup raw 0x120000 0x010000;" \
"kernel raw 0x130000 0x800000\0"
#define DFU_ALT_INFO_QSPI \
"dfu_alt_info_qspi=" \
"MLO raw 0x0 0x040000;" \
"u-boot.img raw 0x040000 0x0100000;" \
"u-boot-spl-os raw 0x140000 0x080000;" \
"u-boot-env raw 0x1C0000 0x010000;" \
"u-boot-env.backup raw 0x1D0000 0x010000;" \
"kernel raw 0x1E0000 0x800000\0"