mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-24 23:31:31 +00:00
am335x_evm: Consolidate DFU environment parts into the DFU part of the file
To make managing the environment easier, add DFUARGS to CONFIG_EXTRA_ENV_SETTINGS. Then we set DFUARGS down in the DFU part of the file, and include (or not) the NAND part, based on if NAND is set. Signed-off-by: Tom Rini <trini@ti.com>
This commit is contained in:
parent
3e51b7c8b8
commit
ba481c58df
1 changed files with 15 additions and 8 deletions
|
@ -39,7 +39,6 @@
|
||||||
"${optargs} " \
|
"${optargs} " \
|
||||||
"root=${nandroot} " \
|
"root=${nandroot} " \
|
||||||
"rootfstype=${nandrootfstype}\0" \
|
"rootfstype=${nandrootfstype}\0" \
|
||||||
"dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \
|
|
||||||
"nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
|
"nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
|
||||||
"nandrootfstype=ubifs rootwait=1\0" \
|
"nandrootfstype=ubifs rootwait=1\0" \
|
||||||
"nandboot=echo Booting from nand ...; " \
|
"nandboot=echo Booting from nand ...; " \
|
||||||
|
@ -66,8 +65,6 @@
|
||||||
"fdtfile=undefined\0" \
|
"fdtfile=undefined\0" \
|
||||||
"console=ttyO0,115200n8\0" \
|
"console=ttyO0,115200n8\0" \
|
||||||
"optargs=\0" \
|
"optargs=\0" \
|
||||||
"dfu_alt_info_mmc=" DFU_ALT_INFO_MMC "\0" \
|
|
||||||
"dfu_alt_info_emmc=rawemmc mmc 0 3751936\0" \
|
|
||||||
"mmcdev=0\0" \
|
"mmcdev=0\0" \
|
||||||
"mmcroot=/dev/mmcblk0p2 ro\0" \
|
"mmcroot=/dev/mmcblk0p2 ro\0" \
|
||||||
"mmcrootfstype=ext4 rootwait\0" \
|
"mmcrootfstype=ext4 rootwait\0" \
|
||||||
|
@ -99,7 +96,6 @@
|
||||||
"loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
|
"loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
|
||||||
"importbootenv=echo Importing environment from mmc ...; " \
|
"importbootenv=echo Importing environment from mmc ...; " \
|
||||||
"env import -t $loadaddr $filesize\0" \
|
"env import -t $loadaddr $filesize\0" \
|
||||||
"dfu_alt_info_ram=" DFU_ALT_INFO_RAM "\0" \
|
|
||||||
"ramargs=setenv bootargs console=${console} " \
|
"ramargs=setenv bootargs console=${console} " \
|
||||||
"${optargs} " \
|
"${optargs} " \
|
||||||
"root=${ramroot} " \
|
"root=${ramroot} " \
|
||||||
|
@ -162,7 +158,8 @@
|
||||||
"setenv fdtfile am335x-evmsk.dtb; fi; " \
|
"setenv fdtfile am335x-evmsk.dtb; fi; " \
|
||||||
"if test $fdtfile = undefined; then " \
|
"if test $fdtfile = undefined; then " \
|
||||||
"echo WARNING: Could not determine device tree to use; fi; \0" \
|
"echo WARNING: Could not determine device tree to use; fi; \0" \
|
||||||
NANDARGS
|
NANDARGS \
|
||||||
|
DFUARGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
@ -309,6 +306,7 @@
|
||||||
#define CONFIG_DFU_MMC
|
#define CONFIG_DFU_MMC
|
||||||
#define CONFIG_CMD_DFU
|
#define CONFIG_CMD_DFU
|
||||||
#define DFU_ALT_INFO_MMC \
|
#define DFU_ALT_INFO_MMC \
|
||||||
|
"dfu_alt_info_mmc=" \
|
||||||
"boot part 0 1;" \
|
"boot part 0 1;" \
|
||||||
"rootfs part 0 2;" \
|
"rootfs part 0 2;" \
|
||||||
"MLO fat 0 1;" \
|
"MLO fat 0 1;" \
|
||||||
|
@ -319,10 +317,11 @@
|
||||||
"spl-os-args fat 0 1;" \
|
"spl-os-args fat 0 1;" \
|
||||||
"spl-os-image fat 0 1;" \
|
"spl-os-image fat 0 1;" \
|
||||||
"u-boot.img fat 0 1;" \
|
"u-boot.img fat 0 1;" \
|
||||||
"uEnv.txt fat 0 1"
|
"uEnv.txt fat 0 1\0"
|
||||||
#ifdef CONFIG_NAND
|
#ifdef CONFIG_NAND
|
||||||
#define CONFIG_DFU_NAND
|
#define CONFIG_DFU_NAND
|
||||||
#define DFU_ALT_INFO_NAND \
|
#define DFU_ALT_INFO_NAND \
|
||||||
|
"dfu_alt_info_nand=" \
|
||||||
"SPL part 0 1;" \
|
"SPL part 0 1;" \
|
||||||
"SPL.backup1 part 0 2;" \
|
"SPL.backup1 part 0 2;" \
|
||||||
"SPL.backup2 part 0 3;" \
|
"SPL.backup2 part 0 3;" \
|
||||||
|
@ -330,13 +329,21 @@
|
||||||
"u-boot part 0 5;" \
|
"u-boot part 0 5;" \
|
||||||
"u-boot-spl-os part 0 6;" \
|
"u-boot-spl-os part 0 6;" \
|
||||||
"kernel part 0 8;" \
|
"kernel part 0 8;" \
|
||||||
"rootfs part 0 9"
|
"rootfs part 0 9\0"
|
||||||
|
#else
|
||||||
|
#define DFU_ALT_INFO_NAND ""
|
||||||
#endif
|
#endif
|
||||||
#define CONFIG_DFU_RAM
|
#define CONFIG_DFU_RAM
|
||||||
#define DFU_ALT_INFO_RAM \
|
#define DFU_ALT_INFO_RAM \
|
||||||
|
"dfu_alt_info_ram=" \
|
||||||
"kernel ram 0x80200000 0xD80000;" \
|
"kernel ram 0x80200000 0xD80000;" \
|
||||||
"fdt ram 0x80F80000 0x80000;" \
|
"fdt ram 0x80F80000 0x80000;" \
|
||||||
"ramdisk ram 0x81000000 0x4000000"
|
"ramdisk ram 0x81000000 0x4000000\0"
|
||||||
|
#define DFUARGS \
|
||||||
|
"dfu_alt_info_emmc=rawemmc mmc 0 3751936\0" \
|
||||||
|
DFU_ALT_INFO_MMC \
|
||||||
|
DFU_ALT_INFO_RAM \
|
||||||
|
DFU_ALT_INFO_NAND
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default to using SPI for environment, etc.
|
* Default to using SPI for environment, etc.
|
||||||
|
|
Loading…
Add table
Reference in a new issue