[U-Boot] [PATCH 4/6] efi_loader: Improve .dtb search for arm64

Alexander Graf agraf at suse.de
Tue Jul 12 09:29:03 CEST 2016



On 12.07.16 06:21, Andreas Färber wrote:
> On arm64 Linux device trees are organized by SoC vendor. Therefore we
> need to search the vendor subdirectory as well.
> 
> Since the SoC vendor may be different from ${vendor}, introduce a new
> ${soc_vendor}. If this is not set, the behavior remains unchanged.
> 
> Cc: Alexander Graf <agraf at suse.de>
> Signed-off-by: Andreas Färber <afaerber at suse.de>

Stephen had pretty strong opinions on the naming, mostly because "pxe
boot" uses the same naming scheme. So we should either change it there
as well to stay consistent or just make the implicit ruling always work :).

I guess the best case would be to fix up the path names of boards so
that $vendor is always $soc_vendor. Do you have an example where that
wouldn't work?


Alex

> ---
>  include/config_distro_bootcmd.h | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
> index eadec2e..8f14457 100644
> --- a/include/config_distro_bootcmd.h
> +++ b/include/config_distro_bootcmd.h
> @@ -113,6 +113,15 @@
>  #define BOOTENV_EFI_SET_FDTFILE_FALLBACK
>  #endif
>  
> +#if defined(CONFIG_ARM64)
> +#define BOOTENV_EFI_SET_FDTFILE_VENDOR                                    \
> +	"if test -n \"${soc_vendor}\"; then "                             \
> +		"setenv efi_dtb_vendor_prefix ${soc_vendor}/; "           \
> +	"fi; "
> +#else
> +#define BOOTENV_EFI_SET_FDTFILE_VENDOR
> +#endif
> +
>  #define BOOTENV_SHARED_EFI                                                \
>  	"boot_efi_binary="                                                \
>  		"load ${devtype} ${devnum}:${distro_bootpart} "           \
> @@ -125,18 +134,25 @@
>  	\
>  	"load_efi_dtb="                                                   \
>  		"load ${devtype} ${devnum}:${efi_bootpart} ${fdt_addr_r} "\
> -			"${prefix}${dtb_prefix}${efi_fdtfile}\0"          \
> +			"${prefix}${dtb_prefix}${dtb_vendor_prefix}"      \
> +			"${efi_fdtfile}\0"                                \
>  	\
>  	"efi_dtb_prefixes=\"\" dtb/ dtb/current/\0"                       \
>  	"scan_dev_for_efi_fdt="                                           \
>  		"for prefix in ${boot_prefixes}; do "                     \
>  			"for dtb_prefix in ${efi_dtb_prefixes}; do "      \
> +			    BOOTENV_EFI_SET_FDTFILE_VENDOR                \
> +			    "for dtb_vendor_prefix in \"\" "              \
> +					"${efi_dtb_vendor_prefix}; do "   \
>  				"if test -e ${devtype} "                  \
>  					"${devnum}:${efi_bootpart} "      \
>  					"${prefix}${dtb_prefix}"          \
> +					"${dtb_vendor_prefix}"            \
>  					"${efi_fdtfile}; then "           \
>  					"run load_efi_dtb; "              \
>  				"fi; "                                    \
> +			    "done; "                                      \
> +			    "setenv efi_dtb_vendor_prefix; "              \
>  			"done; "                                          \
>  		"done\0"                                                  \
>  	"scan_dev_for_efi="                                               \
> 


More information about the U-Boot mailing list