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

Alexander Graf agraf at suse.de
Thu Oct 20 10:36:32 CEST 2016


> On 20 Oct 2016, at 00:44, york sun <york.sun at nxp.com> wrote:
> 
> On 10/19/2016 09:31 AM, Alexander Graf wrote:
>> 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 extends the LS2080ARDB board to use that framework if the
>> hard coded NOR flash location does not contain a bootable image.
>> 
>> Signed-off-by: Alexander Graf <agraf at suse.de>
>> 
>> ---
>> 
>> v1 -> v2:
>> 
>>  - Boot NOR flash before distro boot
>> 
>> v2 -> v3:
>> 
>>  - Actually run distro boot (s/&&/||/ after bootm)
>> 
>> v3 -> v4:
>> 
>>  - Add CONFIG_CMD_FS_GENERIC to defconfig
>> 
>> v4 -> v5:
>> 
>>  - Add qspi board
>>  - Don't overwrite ethact
>> 
>> v5 -> v6:
>> 
>>  - Move distro conversion to end of queue
>>  - use CONFIG_DISTRO_DEFAULTS
>> ---
>> Kconfig                      |  1 +
>> include/configs/ls2080ardb.h | 25 ++++++++++++++++++++++++-
>> 2 files changed, 25 insertions(+), 1 deletion(-)
>> 
>> diff --git a/Kconfig b/Kconfig
>> index 1263d0b..f3a9f73 100644
>> --- a/Kconfig
>> +++ b/Kconfig
>> @@ -56,6 +56,7 @@ config CC_OPTIMIZE_FOR_SIZE
>> config DISTRO_DEFAULTS
>> 	bool "Select defaults suitable for booting general purpose Linux distributions"
>> 	default y if ARCH_SUNXI
>> +	default y if ARCH_LS2080A
>> 	default n
>> 	select CMD_BOOTZ if ARM && !ARM64
>> 	select CMD_BOOTI if ARM64
>> diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
>> index ee0f5fc..045cee6 100644
>> --- a/include/configs/ls2080ardb.h
>> +++ b/include/configs/ls2080ardb.h
>> @@ -318,10 +318,24 @@ unsigned long get_board_sys_clk(void);
>> #define CONFIG_USB_MAX_CONTROLLER_COUNT         2
>> #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS      2
>> 
>> +#undef CONFIG_CMDLINE_EDITING
>> +#include <config_distro_defaults.h>
>> +
>> +#define BOOT_TARGET_DEVICES(func) \
>> +	func(MMC, mmc, 0) \
>> +	func(SCSI, scsi, 0) \
>> +	func(DHCP, dhcp, na)
> 
> How about USB? During the initial test, I used USB disk as you 
> suggested. It is not a reason to respin this patch, just in case you do 
> it for other reason.

No particular reason, just oversight. I can send a follow-up patch on top of this set to add usb support as well.

Alex



More information about the U-Boot mailing list