[U-Boot] [PATCH 1/1] distro_bootcmd: Switch bootefi to use loadaddr by default.

Kristian Amlie kristian.amlie at northern.tech
Mon Aug 6 12:00:14 UTC 2018


Ping. Any objections to this change?

-- 
Kristian

On 10/07/18 15:29, Kristian Amlie wrote:
> loadaddr is configurable in Kconfig using CONFIG_LOADADDR, while
> kernel_addr_r is not. Hence, loadaddr is the future. Provide the
> existing kernel_addr_r as a fallback if loadaddr is not set.
> 
> Signed-off-by: Kristian Amlie <kristian.amlie at northern.tech>
> ---
>  include/config_distro_bootcmd.h | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
> index d672e8e..839afcc 100644
> --- a/include/config_distro_bootcmd.h
> +++ b/include/config_distro_bootcmd.h
> @@ -129,12 +129,15 @@
>  		"else "                                                   \
>  			"bootefi bootmgr ${fdtcontroladdr};"              \
>  		"fi;"                                                     \
> +		"if test -z \"${loadaddr}\"; then "                       \
> +			"setenv loadaddr ${kernel_addr_r};"               \
> +		"fi;"                                                     \
>  		"load ${devtype} ${devnum}:${distro_bootpart} "           \
> -			"${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; "      \
> +			"${loadaddr} efi/boot/"BOOTEFI_NAME"; "           \
>  		"if fdt addr ${fdt_addr_r}; then "                        \
> -			"bootefi ${kernel_addr_r} ${fdt_addr_r};"         \
> +			"bootefi ${loadaddr} ${fdt_addr_r};"              \
>  		"else "                                                   \
> -			"bootefi ${kernel_addr_r} ${fdtcontroladdr};"     \
> +			"bootefi ${loadaddr} ${fdtcontroladdr};"          \
>  		"fi\0"                                                    \
>  	\
>  	"load_efi_dtb="                                                   \
> @@ -277,12 +280,15 @@
>  	"setenv efi_old_arch ${bootp_arch};"                              \
>  	"setenv bootp_vci " BOOTENV_EFI_PXE_VCI ";"                       \
>  	"setenv bootp_arch " BOOTENV_EFI_PXE_ARCH ";"                     \
> -	"if dhcp ${kernel_addr_r}; then "                                 \
> +	"if test -z \"${loadaddr}\"; then "                               \
> +		"setenv loadaddr ${kernel_addr_r};"                       \
> +	"fi;"                                                             \
> +	"if dhcp ${loadaddr}; then "                                      \
>  		"tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};"              \
>  		"if fdt addr ${fdt_addr_r}; then "                        \
> -			"bootefi ${kernel_addr_r} ${fdt_addr_r}; "        \
> +			"bootefi ${loadaddr} ${fdt_addr_r}; "             \
>  		"else "                                                   \
> -			"bootefi ${kernel_addr_r} ${fdtcontroladdr};"     \
> +			"bootefi ${loadaddr} ${fdtcontroladdr};"          \
>  		"fi;"                                                     \
>  	"fi;"                                                             \
>  	"setenv bootp_vci ${efi_old_vci};"                                \
> 



More information about the U-Boot mailing list