[U-Boot] [PATCH v8 2/7] arm: socfpga: update de0 nano default environment

Alexander Graf agraf at suse.de
Mon Jan 30 16:04:53 CET 2017


On 01/29/2017 12:05 AM, Dalon Westergreen wrote:
> From: Dalon Westergreen <dalon.westergreen at intel.com>
>
> Remove the default environment as it is now in a common
> header.
>
> Add the CONFIG_DEFAULT_DEVICE_TREE to the board's defconfig
> to set the linux devicetree name.
>
> Signed-off-by: Dalon Westergreen <dalon.westergreen at intel.com>
> Acked-by: Marek Vasut <marex at denx.de>
> ---
>   configs/socfpga_de0_nano_soc_defconfig |  3 +--
>   include/configs/socfpga_common.h       |  2 +-
>   include/configs/socfpga_de0_nano_soc.h | 19 +------------------
>   3 files changed, 3 insertions(+), 21 deletions(-)
>
> diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
> index af41e1e..4837809 100644
> --- a/configs/socfpga_de0_nano_soc_defconfig
> +++ b/configs/socfpga_de0_nano_soc_defconfig
> @@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
>   CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y
>   CONFIG_SPL_STACK_R_ADDR=0x00800000
>   CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc"
> +CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_sockit.dtb"
>   CONFIG_FIT=y
>   CONFIG_SYS_CONSOLE_IS_IN_ENV=y
>   CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
> @@ -20,7 +21,6 @@ CONFIG_CMD_ASKENV=y
>   CONFIG_CMD_GREPENV=y
>   # CONFIG_CMD_FLASH is not set
>   CONFIG_CMD_MMC=y
> -CONFIG_CMD_SF=y

This change is not mentioned in teh change log?

>   CONFIG_CMD_SPI=y
>   CONFIG_CMD_I2C=y
>   CONFIG_CMD_USB=y
> @@ -35,7 +35,6 @@ CONFIG_CMD_EXT4=y
>   CONFIG_CMD_EXT4_WRITE=y
>   CONFIG_CMD_FAT=y
>   CONFIG_CMD_FS_GENERIC=y
> -CONFIG_CMD_UBI=y

Neither is this.

>   CONFIG_SPL_DM=y
>   CONFIG_DFU_MMC=y
>   CONFIG_DM_GPIO=y
> diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
> index 744aee9..ed6d8ea 100644
> --- a/include/configs/socfpga_common.h
> +++ b/include/configs/socfpga_common.h
> @@ -319,7 +319,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
>   #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	2
>   #endif
>   #else
> -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION	3
> +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION	1
>   #endif
>   #endif
>   
> diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
> index 6b9546e..97216ea 100644
> --- a/include/configs/socfpga_de0_nano_soc.h
> +++ b/include/configs/socfpga_de0_nano_soc.h
> @@ -18,7 +18,7 @@
>   #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB */
>   
>   /* Booting Linux */
> -#define CONFIG_BOOTFILE		"fitImage"
> +#define CONFIG_BOOTFILE		"zImage"
>   #define CONFIG_BOOTARGS		"console=ttyS0," __stringify(CONFIG_BAUDRATE)
>   #define CONFIG_BOOTCOMMAND	"run mmcload; run mmcboot"

... oh, I see. So the default boot command is defined per-target rather 
than generically.

Loading a predefined file name (usually also + initrd file) + dtb file 
from mmc sounds like something that would be generically useful to 
boards that want to support legacy boot paths. Take a look at the 
SCAN_DEV_FOR_EFI define in include/config_distro_bootcmd.h. Something 
along those lines to replace mmcload/mmcboot should work for you, right?

That way your boot script would search for legacy boot options as well 
as fancy awesome state-of-the-art extlinux/efi ones.


Alex



More information about the U-Boot mailing list