[U-Boot] [PATCH 5/5] ls2080ardb: Convert to distro boot

Stuart Yoder stuart.yoder at nxp.com
Fri May 13 16:26:44 CEST 2016



> -----Original Message-----
> From: Alexander Graf [mailto:agraf at suse.de]
> Sent: Friday, May 13, 2016 7:22 AM
> To: u-boot at lists.denx.de
> Cc: Stuart Yoder <stuart.yoder at nxp.com>; york sun <york.sun at nxp.com>
> Subject: [PATCH 5/5] ls2080ardb: Convert to distro boot
> 
> Most new systems in U-Boot these days make use of the generic "distro"
> framework which allows a user to have U-Boot scan for a bootable OS
> on all available media types.
> 
> This patch converts the LS2080ARDB board to use that framework instead
> of booting from a hard coded flash offset.
> 
> Signed-off-by: Alexander Graf <agraf at suse.de>
> 
> ---
> 
> This obviously means that we can no longer boot from said offset. Is
> that a reasonable thing to do or should I put the bootm back into the
> default boot command and only do distro boot if it fails?

To date all armv8 FSL/NXP sdk releases, field engineers, etc have been using
bootm.  I'm a little concerned about changing the default boot command
right now...as I assume things will unexpectedly appear to just stop
working.  Or, is booting from the NOR flash one of the distro boot
"media" types?

Stuart

> ---
>  include/configs/ls2080ardb.h | 24 +++++++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
> index 5bec509..6ee6c87 100644
> --- a/include/configs/ls2080ardb.h
> +++ b/include/configs/ls2080ardb.h
> @@ -323,10 +323,25 @@ unsigned long get_board_sys_clk(void);
>  #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS      2
>  #define CONFIG_USB_STORAGE
> 
> +#undef CONFIG_CMDLINE_EDITING
> +#undef CONFIG_BOOTDELAY
> +#include <config_distro_defaults.h>
> +
> +#define BOOT_TARGET_DEVICES(func) \
> +	func(MMC, mmc, 0) \
> +	func(SCSI, scsi, 0) \
> +	func(DHCP, dhcp, na)
> +#include <config_distro_bootcmd.h>
> +
>  /* Initial environment variables */
>  #undef CONFIG_EXTRA_ENV_SETTINGS
>  #define CONFIG_EXTRA_ENV_SETTINGS		\
>  	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
> +	"scriptaddr=0x80800000\0"		\
> +	"kernel_addr_r=0x81000000\0"		\
> +	"pxefile_addr_r=0x81000000\0"		\
> +	"fdt_addr_r=0x88000000\0"		\
> +	"ramdisk_addr_r=0x89000000\0"		\
>  	"loadaddr=0x80100000\0"			\
>  	"kernel_addr=0x100000\0"		\
>  	"ramdisk_addr=0x800000\0"		\
> @@ -336,8 +351,10 @@ unsigned long get_board_sys_clk(void);
>  	"kernel_start=0x581100000\0"		\
>  	"kernel_load=0xa0000000\0"		\
>  	"kernel_size=0x2800000\0"		\
> +	"fdtfile=fsl-ls2080a-rdb.dtb\0"		\
>  	"mcinitcmd=fsl_mc start mc 0x580300000"	\
> -	" 0x580800000 \0"
> +	" 0x580800000 \0"			\
> +	BOOTENV
> 
>  #undef CONFIG_BOOTARGS
>  #define CONFIG_BOOTARGS		"console=ttyS1,115200 root=/dev/ram0 " \
> @@ -345,6 +362,11 @@ unsigned long get_board_sys_clk(void);
>  				"ramdisk_size=0x2000000 default_hugepagesz=2m" \
>  				" hugepagesz=2m hugepages=256"
> 
> +#undef CONFIG_BOOTCOMMAND
> +#define CONFIG_BOOTCOMMAND "run mcinitcmd && fsl_mc lazyapply dpl 0x580700000" \
> +			   " && setenv ethact DPMAC5 at xgmii" \
> +			   " && run distro_bootcmd"
> +
>  /* MAC/PHY configuration */
>  #ifdef CONFIG_FSL_MC_ENET
>  #define CONFIG_PHYLIB_10G
> --
> 1.8.5.6



More information about the U-Boot mailing list