tegra: use generic fs commands in BOOTCOMMAND

Modify tegra-common-post.h's BOOTCOMMAND definition to use the generic
filesystem command load rather than separate fatload and ext2load.
This removes the need to iterate over supported filesystem types in the
boot command.

This requires editing all board config headers to enable the new
commands. The now-unused commands are left enabled to assue backwards
compatibility with any user scripts. Boards (all from Avionic Design)
which define custom BOOTCOMMAND values are not affected.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
tegra generic fs cmds fixup
Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
Stephen Warren 2012-11-05 13:22:00 +00:00 committed by Tom Warren
parent ef24c38a6f
commit 3786a942b5
7 changed files with 34 additions and 23 deletions

View file

@ -58,8 +58,11 @@
#define CONFIG_DOS_PARTITION #define CONFIG_DOS_PARTITION
#define CONFIG_EFI_PARTITION #define CONFIG_EFI_PARTITION
#define CONFIG_FS_EXT4
#define CONFIG_FS_FAT
#define CONFIG_CMD_EXT2 #define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT #define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
/* NAND support */ /* NAND support */
#define CONFIG_CMD_NAND #define CONFIG_CMD_NAND

View file

@ -45,8 +45,11 @@
#define CONFIG_DOS_PARTITION #define CONFIG_DOS_PARTITION
#define CONFIG_EFI_PARTITION #define CONFIG_EFI_PARTITION
#define CONFIG_FS_EXT4
#define CONFIG_FS_FAT
#define CONFIG_CMD_EXT2 #define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT #define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
/* Environment in eMMC, at the end of 2nd "boot sector" */ /* Environment in eMMC, at the end of 2nd "boot sector" */
#define CONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_IS_IN_MMC

View file

@ -72,8 +72,11 @@
#define CONFIG_DOS_PARTITION #define CONFIG_DOS_PARTITION
#define CONFIG_EFI_PARTITION #define CONFIG_EFI_PARTITION
#define CONFIG_FS_EXT4
#define CONFIG_FS_FAT
#define CONFIG_CMD_EXT2 #define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT #define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
/* Environment in eMMC, at the end of 2nd "boot sector" */ /* Environment in eMMC, at the end of 2nd "boot sector" */
#define CONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_IS_IN_MMC

View file

@ -30,18 +30,6 @@
#else #else
#ifdef CONFIG_CMD_EXT2
#define BOOT_FSTYPE_EXT2 "ext2 "
#else
#define BOOT_FSTYPE_EXT2 ""
#endif
#ifdef CONFIG_CMD_FAT
#define BOOT_FSTYPE_FAT "fat"
#else
#define BOOT_FSTYPE_FAT ""
#endif
#ifdef CONFIG_CMD_MMC #ifdef CONFIG_CMD_MMC
#define BOOTCMDS_MMC \ #define BOOTCMDS_MMC \
"mmc_boot=" \ "mmc_boot=" \
@ -98,7 +86,7 @@
"rootpart=1\0" \ "rootpart=1\0" \
\ \
"script_boot=" \ "script_boot=" \
"if ${fs}load ${devtype} ${devnum}:${rootpart} " \ "if load ${devtype} ${devnum}:${rootpart} " \
"${scriptaddr} ${prefix}${script}; then " \ "${scriptaddr} ${prefix}${script}; then " \
"echo ${script} found! Executing ...;" \ "echo ${script} found! Executing ...;" \
"source ${scriptaddr};" \ "source ${scriptaddr};" \
@ -106,11 +94,9 @@
\ \
"scan_boot=" \ "scan_boot=" \
"echo Scanning ${devtype} ${devnum}...; " \ "echo Scanning ${devtype} ${devnum}...; " \
"for fs in ${boot_fstypes}; do " \ "for prefix in ${boot_prefixes}; do " \
"for prefix in ${boot_prefixes}; do " \ "for script in ${boot_scripts}; do " \
"for script in ${boot_scripts}; do " \ "run script_boot; " \
"run script_boot; " \
"done; " \
"done; " \ "done; " \
"done;\0" \ "done;\0" \
\ \
@ -120,11 +106,6 @@
BOOT_TARGETS_DHCP " " \ BOOT_TARGETS_DHCP " " \
"\0" \ "\0" \
\ \
"boot_fstypes=" \
BOOT_FSTYPE_EXT2 " " \
BOOT_FSTYPE_FAT " " \
"\0" \
\
"boot_prefixes=/ /boot/\0" \ "boot_prefixes=/ /boot/\0" \
\ \
"boot_scripts=boot.scr.uimg boot.scr\0" \ "boot_scripts=boot.scr.uimg boot.scr\0" \
@ -207,12 +188,24 @@
#ifdef CONFIG_EFI_PARTITION #ifdef CONFIG_EFI_PARTITION
#undef CONFIG_EFI_PARTITION #undef CONFIG_EFI_PARTITION
#endif #endif
#ifdef CONFIG_CMD_FS_GENERIC
#undef CONFIG_CMD_FS_GENERIC
#endif
#ifdef CONFIG_CMD_EXT4
#undef CONFIG_CMD_EXT4
#endif
#ifdef CONFIG_CMD_EXT2 #ifdef CONFIG_CMD_EXT2
#undef CONFIG_CMD_EXT2 #undef CONFIG_CMD_EXT2
#endif #endif
#ifdef CONFIG_CMD_FAT #ifdef CONFIG_CMD_FAT
#undef CONFIG_CMD_FAT #undef CONFIG_CMD_FAT
#endif #endif
#ifdef CONFIG_FS_EXT4
#undef CONFIG_FS_EXT4
#endif
#ifdef CONFIG_FS_FAT
#undef CONFIG_FS_FAT
#endif
/* remove USB */ /* remove USB */
#ifdef CONFIG_USB_EHCI #ifdef CONFIG_USB_EHCI

View file

@ -69,8 +69,11 @@
#define CONFIG_DOS_PARTITION #define CONFIG_DOS_PARTITION
#define CONFIG_EFI_PARTITION #define CONFIG_EFI_PARTITION
#define CONFIG_FS_EXT4
#define CONFIG_FS_FAT
#define CONFIG_CMD_EXT2 #define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT #define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
/* Environment in SPI */ /* Environment in SPI */
#define CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_IS_IN_SPI_FLASH

View file

@ -52,8 +52,11 @@
#define CONFIG_DOS_PARTITION #define CONFIG_DOS_PARTITION
#define CONFIG_EFI_PARTITION #define CONFIG_EFI_PARTITION
#define CONFIG_FS_EXT4
#define CONFIG_FS_FAT
#define CONFIG_CMD_EXT2 #define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT #define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
/* Environment in eMMC, at the end of 2nd "boot sector" */ /* Environment in eMMC, at the end of 2nd "boot sector" */
#define CONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_IS_IN_MMC

View file

@ -61,8 +61,11 @@
#define CONFIG_DOS_PARTITION #define CONFIG_DOS_PARTITION
#define CONFIG_EFI_PARTITION #define CONFIG_EFI_PARTITION
#define CONFIG_FS_EXT4
#define CONFIG_FS_FAT
#define CONFIG_CMD_EXT2 #define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT #define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
/* /*
* Environment in eMMC, at the end of 2nd "boot sector". Note: This assumes * Environment in eMMC, at the end of 2nd "boot sector". Note: This assumes