mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
arm: ls1043ardb: Add NAND secure boot target
Add NAND secure boot target for ls1043ardb. - Change the u-boot size defined by a macro for copying the main U-Boot by SPL to also include the u-boot Secure Boot header size as header is appended to u-boot image. So header will also be copied from SD to DDR. - MACRO for CONFIG_BOOTSCRIPT_COPY_RAM is enabled to copy Bootscript from NAND to DDR. Offsets for Bootscript on NAND and DDR have been also defined. Signed-off-by: Vinitha Pillai <vinitha.pillai@nxp.com> Signed-off-by: Sumit Garg <sumit.garg@nxp.com> Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
@@ -81,17 +81,18 @@
|
||||
"setenv bs_size " __stringify(CONFIG_BS_SIZE)";"
|
||||
|
||||
/* For secure boot flow, default environment used will be used */
|
||||
#if defined(CONFIG_SYS_RAMBOOT)
|
||||
#if defined(CONFIG_RAMBOOT_NAND)
|
||||
#if defined(CONFIG_SYS_RAMBOOT) || defined(CONFIG_NAND_BOOT) || \
|
||||
defined(CONFIG_SD_BOOT)
|
||||
#if defined(CONFIG_RAMBOOT_NAND) || defined(CONFIG_NAND_BOOT)
|
||||
#define CONFIG_BS_COPY_CMD \
|
||||
"nand read $bs_hdr_ram $bs_hdr_device $bs_hdr_size ;" \
|
||||
"nand read $bs_ram $bs_device $bs_size ;"
|
||||
#endif /* CONFIG_RAMBOOT_NAND */
|
||||
#elif defined(CONFIG_SD_BOOT)
|
||||
#define CONFIG_BS_COPY_CMD \
|
||||
"mmc read $bs_hdr_ram $bs_hdr_device $bs_hdr_size ;" \
|
||||
"mmc read $bs_ram $bs_device $bs_size ;"
|
||||
#else /* CONFIG_SD_BOOT */
|
||||
#endif
|
||||
#else
|
||||
#define CONFIG_BS_COPY_CMD \
|
||||
"cp.b $bs_hdr_device $bs_hdr_ram $bs_hdr_size ;" \
|
||||
"cp.b $bs_device $bs_ram $bs_size ;"
|
||||
|
||||
@@ -110,7 +110,23 @@
|
||||
#define CONFIG_SPL_BSS_START_ADDR 0x80100000
|
||||
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
|
||||
#define CONFIG_SPL_BSS_MAX_SIZE 0x80000
|
||||
#define CONFIG_SYS_MONITOR_LEN 0xa0000
|
||||
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
||||
#endif /* ifdef CONFIG_SECURE_BOOT */
|
||||
|
||||
#ifdef CONFIG_U_BOOT_HDR_SIZE
|
||||
/*
|
||||
* HDR would be appended at end of image and copied to DDR along
|
||||
* with U-Boot image. Here u-boot max. size is 512K. So if binary
|
||||
* size increases then increase this size in case of secure boot as
|
||||
* it uses raw u-boot image instead of fit image.
|
||||
*/
|
||||
#define CONFIG_SYS_MONITOR_LEN (0x100000 + CONFIG_U_BOOT_HDR_SIZE)
|
||||
#else
|
||||
#define CONFIG_SYS_MONITOR_LEN 0x100000
|
||||
#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
|
||||
|
||||
#endif
|
||||
|
||||
/* IFC */
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
#ifdef CONFIG_NAND_BOOT
|
||||
#define CONFIG_SPL_PAD_TO 0x20000 /* block aligned */
|
||||
#define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_PAD_TO
|
||||
#define CONFIG_SYS_NAND_U_BOOT_SIZE (640 << 10)
|
||||
#define CONFIG_SYS_NAND_U_BOOT_SIZE (1024 << 10)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user