[U-Boot] [PATCH] imx: nitrogen6x: Convert Sabrelite to distro boot support

Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com --- include/configs/nitrogen6x.h | 86 ++++++++++---------------------------------- 1 file changed, 18 insertions(+), 68 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index c73cfb7f7e..2e2c499cb6 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -102,82 +102,32 @@ #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
#if defined(CONFIG_SABRELITE) +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ + func(SATA, sata, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) + +#include <config_distro_bootcmd.h> + #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=imx6q-sabrelite.dtb\0" \ + "fdtfile=imx6q-sabrelite.dtb\0" \ "fdt_addr=0x18000000\0" \ - "boot_fdt=try\0" \ + "fdt_addr_r=0x18000000\0" \ + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ + "ramdisk_addr_r=0x13000000\0" \ + "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \ - "mmcdevs=0 1\0" \ - "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ - "loadbootscript=" \ - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ - "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" \ - "netargs=setenv bootargs console=${console},${baudrate} " \ - "root=/dev/nfs " \ - "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ - "netboot=echo Booting from net ...; " \ - "run netargs; " \ - "if test ${ip_dyn} = yes; then " \ - "setenv get_cmd dhcp; " \ - "else " \ - "setenv get_cmd tftp; " \ - "fi; " \ - "${get_cmd} ${uimage}; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" + BOOTENV
-#define CONFIG_BOOTCOMMAND \ - "for mmcdev in ${mmcdevs}; do " \ - "mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "fi; " \ - "fi; " \ - "fi; " \ - "done; " \ - "run netboot; " #else #define CONFIG_EXTRA_ENV_SETTINGS \ "bootdevs=" CONFIG_DRIVE_TYPES "\0" \

Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com
--- Changes in V2: * add mx6qsabrelite_defconfig update
configs/mx6qsabrelite_defconfig | 16 ++------ include/configs/nitrogen6x.h | 86 +++++++++-------------------------------- 2 files changed, 22 insertions(+), 80 deletions(-)
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 7499704058..c644754929 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -3,17 +3,15 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_TARGET_NITROGEN6X=y CONFIG_CMD_HDMIDETECT=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE" CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y -CONFIG_SUPPORT_RAW_INITRD=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 -CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y -CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y @@ -22,21 +20,15 @@ CONFIG_CMD_SATA=y CONFIG_CMD_SF=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set +# CONFIG_EFI_PARTITION is not set CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_DWC_AHSATA=y -CONFIG_FSL_ESDHC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 7d2cf0bd8c..3161b1dd79 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -102,82 +102,32 @@ #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
#if defined(CONFIG_SABRELITE) +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ + func(SATA, sata, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) + +#include <config_distro_bootcmd.h> + #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=imx6q-sabrelite.dtb\0" \ + "fdtfile=imx6q-sabrelite.dtb\0" \ "fdt_addr=0x18000000\0" \ - "boot_fdt=try\0" \ + "fdt_addr_r=0x18000000\0" \ + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ + "ramdisk_addr_r=0x13000000\0" \ + "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \ - "mmcdevs=0 1\0" \ - "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ - "loadbootscript=" \ - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ - "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" \ - "netargs=setenv bootargs console=${console},${baudrate} " \ - "root=/dev/nfs " \ - "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ - "netboot=echo Booting from net ...; " \ - "run netargs; " \ - "if test ${ip_dyn} = yes; then " \ - "setenv get_cmd dhcp; " \ - "else " \ - "setenv get_cmd tftp; " \ - "fi; " \ - "${get_cmd} ${uimage}; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" + BOOTENV
-#define CONFIG_BOOTCOMMAND \ - "for mmcdev in ${mmcdevs}; do " \ - "mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "fi; " \ - "fi; " \ - "fi; " \ - "done; " \ - "run netboot; " #else #define CONFIG_EXTRA_ENV_SETTINGS \ "bootdevs=" CONFIG_DRIVE_TYPES "\0" \

This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
Changes in V3: * Add imx6 soc definition * Also update nitrogen6x config, not only sabrelite * Split mx6qsabrelite_defconfig update to a separate patch Changes in V2: * add mx6qsabrelite_defconfig update
Guillaume GARDET (3): imx6: Define 'soc' env var for imx6 SoC imx6: Convert sabrelite and nitrogen6x boards to distro boot support imx6: sabrelite: update defconfig to use distro defaults
arch/arm/mach-imx/mx6/soc.c | 34 ++++++++ configs/mx6qsabrelite_defconfig | 15 ++-- include/configs/nitrogen6x.h | 180 ++++++++++++---------------------------- 3 files changed, 93 insertions(+), 136 deletions(-)

Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- arch/arm/mach-imx/mx6/soc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 9b3d8f69b2..c4cb752c76 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -446,6 +446,40 @@ int arch_cpu_init(void) return 0; }
+ #ifdef CONFIG_ARCH_MISC_INIT + int arch_misc_init(void) + { + #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG + if (is_cpu_type(MXC_CPU_MX6QP)) + env_set("soc", "imx6qp"); + else if (is_cpu_type(MXC_CPU_MX6Q)) + env_set("soc", "imx6q"); + else if (is_cpu_type(MXC_CPU_MX6DP)) + env_set("soc", "imx6dp"); + else if (is_cpu_type(MXC_CPU_MX6D)) + env_set("soc", "imx6d"); + else if (is_mx6dl( )) + env_set("soc", "imx6dl"); + else if (is_mx6sx( )) + env_set("soc", "imx6sx"); + else if (is_mx6sl( )) + env_set("soc", "imx6sl"); + else if (is_mx6solo( )) + env_set("soc", "imx6solo"); + else if (is_mx6ul( )) + env_set("soc", "imx6ul"); + else if (is_mx6ull( )) + env_set("soc", "imx6ull"); + else if (is_mx6sll( )) + env_set("soc", "imx6sll"); + else + env_set("soc", "imx6"); + #endif + + return 0; + } + #endif + #ifdef CONFIG_ENV_IS_IN_MMC __weak int board_mmc_get_env_dev(int devno) {

Hi Guillaume,
On Wed, Apr 11, 2018 at 7:38 AM, Guillaume GARDET guillaume.gardet@free.fr wrote:
Please explain in the commit log why this is needed. Thanks
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com

Hi,
Le 11/04/2018 à 16:23, Fabio Estevam a écrit :
Hi Guillaume,
On Wed, Apr 11, 2018 at 7:38 AM, Guillaume GARDET guillaume.gardet@free.fr wrote:
Please explain in the commit log why this is needed. Thanks
This is for efi fdtfile fallback definition for default distro config for nitrogen6x board. Is it ok for you?
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com

On Wed, Apr 11, 2018 at 11:41 AM, Guillaume Gardet guillaume.gardet@free.fr wrote:
This is for efi fdtfile fallback definition for default distro config for nitrogen6x board. Is it ok for you?
Yes, this is the explanation that I was looking for :-)
Please send a new version with this info added in the commit log.
Thanks

Hi Guillaume,
On Wed, Apr 11, 2018 at 12:38:48PM +0200, Guillaume GARDET wrote:
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
arch/arm/mach-imx/mx6/soc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 9b3d8f69b2..c4cb752c76 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -446,6 +446,40 @@ int arch_cpu_init(void) return 0; }
- #ifdef CONFIG_ARCH_MISC_INIT
- int arch_misc_init(void)
- {
- #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
- if (is_cpu_type(MXC_CPU_MX6QP))
env_set("soc", "imx6qp");
- else if (is_cpu_type(MXC_CPU_MX6Q))
env_set("soc", "imx6q");
- else if (is_cpu_type(MXC_CPU_MX6DP))
env_set("soc", "imx6dp");
If we want that soc variable to be used for dtb names, then the above won't work. A i.MX6DP platform has its dtb named imx6qp-board.dtb.
- else if (is_cpu_type(MXC_CPU_MX6D))
env_set("soc", "imx6d");
Same here, a Dual CPU actually uses a imx6q-board.dtb.
- else if (is_mx6dl( ))
env_set("soc", "imx6dl");
- else if (is_mx6sx( ))
env_set("soc", "imx6sx");
- else if (is_mx6sl( ))
env_set("soc", "imx6sl");
- else if (is_mx6solo( ))
env_set("soc", "imx6solo");
Same here, a Solo CPU uses a imx6dl-board.dtb.
- else if (is_mx6ul( ))
env_set("soc", "imx6ul");
- else if (is_mx6ull( ))
env_set("soc", "imx6ull");
- else if (is_mx6sll( ))
env_set("soc", "imx6sll");
- else
env_set("soc", "imx6");
In that case we most likely miss a CPU definition, maybe "unknown" would be more explicit?
Regards, Gary

Le 11/04/2018 à 17:46, Gary Bisson a écrit :
Hi Guillaume,
On Wed, Apr 11, 2018 at 12:38:48PM +0200, Guillaume GARDET wrote:
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
arch/arm/mach-imx/mx6/soc.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 9b3d8f69b2..c4cb752c76 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -446,6 +446,40 @@ int arch_cpu_init(void) return 0; }
- #ifdef CONFIG_ARCH_MISC_INIT
- int arch_misc_init(void)
- {
- #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
- if (is_cpu_type(MXC_CPU_MX6QP))
env_set("soc", "imx6qp");
- else if (is_cpu_type(MXC_CPU_MX6Q))
env_set("soc", "imx6q");
- else if (is_cpu_type(MXC_CPU_MX6DP))
env_set("soc", "imx6dp");
If we want that soc variable to be used for dtb names, then the above won't work. A i.MX6DP platform has its dtb named imx6qp-board.dtb.
- else if (is_cpu_type(MXC_CPU_MX6D))
env_set("soc", "imx6d");
Same here, a Dual CPU actually uses a imx6q-board.dtb.
- else if (is_mx6dl( ))
env_set("soc", "imx6dl");
- else if (is_mx6sx( ))
env_set("soc", "imx6sx");
- else if (is_mx6sl( ))
env_set("soc", "imx6sl");
- else if (is_mx6solo( ))
env_set("soc", "imx6solo");
Same here, a Solo CPU uses a imx6dl-board.dtb.
So, how to handle dtb filenames? Update with wrong soc definition ? Or drop this patch and define a FDTFILE for each flavor?
- else if (is_mx6ul( ))
env_set("soc", "imx6ul");
- else if (is_mx6ull( ))
env_set("soc", "imx6ull");
- else if (is_mx6sll( ))
env_set("soc", "imx6sll");
- else
env_set("soc", "imx6");
In that case we most likely miss a CPU definition, maybe "unknown" would be more explicit?
Currently soc is defined to imx6, so I think it is a good idea to keep imx6 definition.
Guillaume
Regards, Gary

On Wed, Apr 11, 2018 at 12:52 PM, Guillaume Gardet guillaume.gardet@free.fr wrote:
So, how to handle dtb filenames? Update with wrong soc definition ? Or drop this patch and define a FDTFILE for each flavor?
You can take a look at how we handle this for wandboard, cuboxi, sabresd, for example.
Taking mx6sabresd as an example you can look at board_late_init() in board/freescale/mx6sabresd/mx6sabresd.c
Then inside include/configs/mx6sabre_common.h check for the findfdt script that picks the correct dtb.

Le 11/04/2018 à 18:06, Fabio Estevam a écrit :
On Wed, Apr 11, 2018 at 12:52 PM, Guillaume Gardet guillaume.gardet@free.fr wrote:
So, how to handle dtb filenames? Update with wrong soc definition ? Or drop this patch and define a FDTFILE for each flavor?
You can take a look at how we handle this for wandboard, cuboxi, sabresd, for example.
Taking mx6sabresd as an example you can look at board_late_init() in board/freescale/mx6sabresd/mx6sabresd.c
Then inside include/configs/mx6sabre_common.h check for the findfdt script that picks the correct dtb.
Ok. So, how would you like to proceed? Remove the generic mx6 'soc' definition and use a board sepcific 'board_rev' (or maybe a static definition if one configuration match a single dtb) to define the right dtb?
Could you tell me which DTB should work with the various nitrogen6x boards config?
Here are the one I could get from upstream kernel dts folder and possible config match: * imx6q-nitrogen6x.dts => nitrogen6q2g_defconfig nitrogen6q_defconfig * imx6q-nitrogen6_max.dts => none? * imx6q-nitrogen6_som2.dts => none? * imx6qp-nitrogen6_max.dts => none? * imx6qp-nitrogen6_som2.dts => none? * imx6dl-nitrogen6x.dts => nitrogen6dl2g_defconfig nitrogen6dl_defconfig * imx6sx-nitrogen6sx.dts => nitrogen6s1g_defconfig nitrogen6s_defconfig * imx6q-sabrelite.dts => mx6qsabrelite_defconfig * imx6dl-sabrelite.dts => none?
Guillaume

On Thu, Apr 12, 2018 at 5:13 AM, Guillaume Gardet guillaume.gardet@free.fr wrote: script that picks the correct dtb.
Ok. So, how would you like to proceed? Remove the generic mx6 'soc' definition and use a board sepcific 'board_rev' (or maybe a static definition if one configuration match a single dtb) to define the right dtb?
I prefer to keep the same solution as done in other boards sucn as mx6sabresd, wandboard and cuboxi.
Could you tell me which DTB should work with the various nitrogen6x boards config?
I will let Gary confirm this one, as I am not familiar with the board variants from Boundary Devices.

Hi Fabio, Guillaume
On Thu, Apr 12, 2018 at 08:14:51AM -0300, Fabio Estevam wrote:
On Thu, Apr 12, 2018 at 5:13 AM, Guillaume Gardet guillaume.gardet@free.fr wrote: script that picks the correct dtb.
Ok. So, how would you like to proceed? Remove the generic mx6 'soc' definition and use a board sepcific 'board_rev' (or maybe a static definition if one configuration match a single dtb) to define the right dtb?
I prefer to keep the same solution as done in other boards sucn as mx6sabresd, wandboard and cuboxi.
Ok. My suggestion was to have something generic so that it matches the fdt name set in config_distro_bootcmd.h (${soc}-${board}${boardver}.dtb).
I especially like the naming in that standard, don't think board_rev should be the SOC name.
This would also avoid redundancy in each board_late_init functions since only the board name would need to be setup (and boardver in some cases like wandboard).
Guillaume, please forget that point for now and just set your fdtfile name in the config file. I'll update the board file later on.
Regards, Gary

Le 12/04/2018 à 14:36, Gary Bisson a écrit :
Hi Fabio, Guillaume
On Thu, Apr 12, 2018 at 08:14:51AM -0300, Fabio Estevam wrote:
On Thu, Apr 12, 2018 at 5:13 AM, Guillaume Gardet guillaume.gardet@free.fr wrote: script that picks the correct dtb.
Ok. So, how would you like to proceed? Remove the generic mx6 'soc' definition and use a board sepcific 'board_rev' (or maybe a static definition if one configuration match a single dtb) to define the right dtb?
I prefer to keep the same solution as done in other boards sucn as mx6sabresd, wandboard and cuboxi.
Ok. My suggestion was to have something generic so that it matches the fdt name set in config_distro_bootcmd.h (${soc}-${board}${boardver}.dtb).
I especially like the naming in that standard, don't think board_rev should be the SOC name.
This would also avoid redundancy in each board_late_init functions since only the board name would need to be setup (and boardver in some cases like wandboard).
Guillaume, please forget that point for now and just set your fdtfile name in the config file. I'll update the board file later on.
Ok.
Could you just confirm which DTB should work with the various nitrogen6x boards config, please? Are the following ok? * imx6q-nitrogen6x.dts => nitrogen6q2g_defconfig nitrogen6q_defconfig * imx6dl-nitrogen6x.dts => nitrogen6dl2g_defconfig nitrogen6dl_defconfig * imx6sx-nitrogen6sx.dts => nitrogen6s1g_defconfig nitrogen6s_defconfig * imx6q-sabrelite.dts => mx6qsabrelite_defconfig
Guillaume

Hi Guillaume,
On Thu, Apr 12, 2018 at 02:48:07PM +0200, Guillaume Gardet wrote:
Le 12/04/2018 à 14:36, Gary Bisson a écrit :
Hi Fabio, Guillaume
On Thu, Apr 12, 2018 at 08:14:51AM -0300, Fabio Estevam wrote:
On Thu, Apr 12, 2018 at 5:13 AM, Guillaume Gardet guillaume.gardet@free.fr wrote: script that picks the correct dtb.
Ok. So, how would you like to proceed? Remove the generic mx6 'soc' definition and use a board sepcific 'board_rev' (or maybe a static definition if one configuration match a single dtb) to define the right dtb?
I prefer to keep the same solution as done in other boards sucn as mx6sabresd, wandboard and cuboxi.
Ok. My suggestion was to have something generic so that it matches the fdt name set in config_distro_bootcmd.h (${soc}-${board}${boardver}.dtb).
I especially like the naming in that standard, don't think board_rev should be the SOC name.
This would also avoid redundancy in each board_late_init functions since only the board name would need to be setup (and boardver in some cases like wandboard).
Guillaume, please forget that point for now and just set your fdtfile name in the config file. I'll update the board file later on.
Ok.
Could you just confirm which DTB should work with the various nitrogen6x boards config, please? Are the following ok?
- imx6q-nitrogen6x.dts => nitrogen6q2g_defconfig nitrogen6q_defconfig
- imx6dl-nitrogen6x.dts => nitrogen6dl2g_defconfig nitrogen6dl_defconfig
- imx6sx-nitrogen6sx.dts => nitrogen6s1g_defconfig nitrogen6s_defconfig
No, imx6sx is different than imx6s. Solo is the same as imx6dl as far as the kernl is concerned.
Maybe just leave fdt_file blank for nitrogen6x for now, it's only necessary for PXE which isn't enabled in nitrogen6*defconfig.
Regards, Gary

Le 12/04/2018 à 14:58, Gary Bisson a écrit :
Hi Guillaume,
On Thu, Apr 12, 2018 at 02:48:07PM +0200, Guillaume Gardet wrote:
Le 12/04/2018 à 14:36, Gary Bisson a écrit :
Hi Fabio, Guillaume
On Thu, Apr 12, 2018 at 08:14:51AM -0300, Fabio Estevam wrote:
On Thu, Apr 12, 2018 at 5:13 AM, Guillaume Gardet guillaume.gardet@free.fr wrote: script that picks the correct dtb.
Ok. So, how would you like to proceed? Remove the generic mx6 'soc' definition and use a board sepcific 'board_rev' (or maybe a static definition if one configuration match a single dtb) to define the right dtb?
I prefer to keep the same solution as done in other boards sucn as mx6sabresd, wandboard and cuboxi.
Ok. My suggestion was to have something generic so that it matches the fdt name set in config_distro_bootcmd.h (${soc}-${board}${boardver}.dtb).
I especially like the naming in that standard, don't think board_rev should be the SOC name.
This would also avoid redundancy in each board_late_init functions since only the board name would need to be setup (and boardver in some cases like wandboard).
Guillaume, please forget that point for now and just set your fdtfile name in the config file. I'll update the board file later on.
Ok.
Could you just confirm which DTB should work with the various nitrogen6x boards config, please? Are the following ok?
- imx6q-nitrogen6x.dts => nitrogen6q2g_defconfig nitrogen6q_defconfig
- imx6dl-nitrogen6x.dts => nitrogen6dl2g_defconfig nitrogen6dl_defconfig
- imx6sx-nitrogen6sx.dts => nitrogen6s1g_defconfig nitrogen6s_defconfig
No, imx6sx is different than imx6s. Solo is the same as imx6dl as far as the kernl is concerned.
Maybe just leave fdt_file blank for nitrogen6x for now, it's only necessary for PXE which isn't enabled in nitrogen6*defconfig.
Ok, I will leave it as is for now, but fdtfile must also be defined for EFI boot. Otherwise, you start your EFI payload without device tree.
Guillaume
Regards, Gary

Boot tested on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- include/configs/nitrogen6x.h | 180 +++++++++++++------------------------------ 1 file changed, 54 insertions(+), 126 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 7d2cf0bd8c..589c5b1ae8 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -101,140 +101,68 @@ #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
+#ifdef CONFIG_CMD_MMC +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) +#else +#define DISTRO_BOOT_DEV_MMC(func) +#endif + +#ifdef CONFIG_CMD_SATA +#define DISTRO_BOOT_DEV_SATA(func) func(SATA, sata, 0) +#else +#define DISTRO_BOOT_DEV_SATA(func) +#endif + +#ifdef CONFIG_USB_STORAGE +#define DISTRO_BOOT_DEV_USB(func) func(USB, usb, 0) +#else +#define DISTRO_BOOT_DEV_USB(func) +#endif + +#ifdef CONFIG_CMD_PXE +#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) +#else +#define DISTRO_BOOT_DEV_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) +#else +#define DISTRO_BOOT_DEV_DHCP(func) +#endif + + #if defined(CONFIG_SABRELITE) +#define FDTFILE "fdtfile=imx6q-sabrelite.dtb\0" +#else +/* fdtfile depends on nitrogen6x board used, so leave it to config distro fallback */ +#define FDTFILE +#endif + +#define BOOT_TARGET_DEVICES(func) \ + DISTRO_BOOT_DEV_MMC(func) \ + DISTRO_BOOT_DEV_SATA(func) \ + DISTRO_BOOT_DEV_USB(func) \ + DISTRO_BOOT_DEV_PXE(func) \ + DISTRO_BOOT_DEV_DHCP(func) + +#include <config_distro_bootcmd.h> + #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=imx6q-sabrelite.dtb\0" \ - "fdt_addr=0x18000000\0" \ - "boot_fdt=try\0" \ + "fdt_addr_r=0x18000000\0" \ + FDTFILE \ + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ + "ramdisk_addr_r=0x13000000\0" \ + "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \ - "mmcdevs=0 1\0" \ - "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ - "loadbootscript=" \ - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ - "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" \ - "netargs=setenv bootargs console=${console},${baudrate} " \ - "root=/dev/nfs " \ - "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ - "netboot=echo Booting from net ...; " \ - "run netargs; " \ - "if test ${ip_dyn} = yes; then " \ - "setenv get_cmd dhcp; " \ - "else " \ - "setenv get_cmd tftp; " \ - "fi; " \ - "${get_cmd} ${uimage}; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" - -#define CONFIG_BOOTCOMMAND \ - "for mmcdev in ${mmcdevs}; do " \ - "mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "fi; " \ - "fi; " \ - "fi; " \ - "done; " \ - "run netboot; " -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootdevs=" CONFIG_DRIVE_TYPES "\0" \ - "umsdevs=" CONFIG_UMSDEVS "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ - "sf erase 0xc0000 0x2000 && " \ - "echo restored environment to factory default ; fi\0" \ - "bootcmd=for dtype in ${bootdevs}" \ - "; do " \ - "if itest.s "xusb" == "x${dtype}" ; then " \ - "usb start ;" \ - "fi; " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load " \ - "${dtype} ${disk}:1 " \ - "10008000 " \ - "/6x_bootscript" \ - "&& source 10008000 ; " \ - "done ; " \ - "done; " \ - "setenv stdout serial,vga ; " \ - "echo ; echo 6x_bootscript not found ; " \ - "echo ; echo serial console at 115200, 8N1 ; echo ; " \ - "echo details at http://boundarydevices.com/6q_bootscript ; " \ - "setenv stdout serial;" \ - "setenv stdin serial,usbkbd;" \ - "for dtype in ${umsdevs} ; do " \ - "if itest.s sata == ${dtype}; then " \ - "initcmd='sata init' ;" \ - "else " \ - "initcmd='mmc rescan' ;" \ - "fi; " \ - "for disk in 0 1 ; do " \ - "if $initcmd && $dtype dev $disk ; then " \ - "setenv stdout serial,vga; " \ - "echo expose ${dtype} ${disk} " \ - "over USB; " \ - "ums 0 $dtype $disk ;" \ - "fi; " \ - " done; " \ - "done ;" \ - "setenv stdout serial,vga; " \ - "echo no block devices found;" \ - "\0" \ - "initrd_high=0xffffffff\0" \ - "upgradeu=for dtype in ${bootdevs}" \ - "; do " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load ${dtype} ${disk}:1 10008000 " \ - "/6x_upgrade " \ - "&& source 10008000 ; " \ - "done ; " \ - "done\0" \ + BOOTENV
-#endif /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x10000000 #define CONFIG_SYS_MEMTEST_END 0x10010000

Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- configs/mx6qsabrelite_defconfig | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 7499704058..fee33cfff1 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -3,15 +3,15 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_TARGET_NITROGEN6X=y CONFIG_CMD_HDMIDETECT=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE" CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y -CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 -CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_FLASH is not set @@ -22,17 +22,12 @@ CONFIG_CMD_SATA=y CONFIG_CMD_SF=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set +# CONFIG_EFI_PARTITION is not set CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_DWC_AHSATA=y

This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Currently, only the Sabrelite has fdtfile defined.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
Changes in V4: * Remove imx6 soc definition * Change comment on not defined fdtfile (no more fallback)
Changes in V3: * Add imx6 soc definition * Also update nitrogen6x config, not only sabrelite * Split mx6qsabrelite_defconfig update to a separate patch Changes in V2: * add mx6qsabrelite_defconfig update
Guillaume GARDET (2): imx6: Convert sabrelite and nitrogen6x boards to distro boot support imx6: sabrelite: update defconfig to use distro defaults
configs/mx6qsabrelite_defconfig | 15 ++-- include/configs/nitrogen6x.h | 180 ++++++++++++---------------------------- 2 files changed, 59 insertions(+), 136 deletions(-)

Boot tested on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- include/configs/nitrogen6x.h | 180 +++++++++++++------------------------------ 1 file changed, 54 insertions(+), 126 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 7d2cf0bd8c..f6dce6c069 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -101,140 +101,68 @@ #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
+#ifdef CONFIG_CMD_MMC +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) +#else +#define DISTRO_BOOT_DEV_MMC(func) +#endif + +#ifdef CONFIG_CMD_SATA +#define DISTRO_BOOT_DEV_SATA(func) func(SATA, sata, 0) +#else +#define DISTRO_BOOT_DEV_SATA(func) +#endif + +#ifdef CONFIG_USB_STORAGE +#define DISTRO_BOOT_DEV_USB(func) func(USB, usb, 0) +#else +#define DISTRO_BOOT_DEV_USB(func) +#endif + +#ifdef CONFIG_CMD_PXE +#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) +#else +#define DISTRO_BOOT_DEV_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) +#else +#define DISTRO_BOOT_DEV_DHCP(func) +#endif + + #if defined(CONFIG_SABRELITE) +#define FDTFILE "fdtfile=imx6q-sabrelite.dtb\0" +#else +/* FIXME: nitrogen6x covers multiple configs. Define fdtfile for each supported config. */ +#define FDTFILE +#endif + +#define BOOT_TARGET_DEVICES(func) \ + DISTRO_BOOT_DEV_MMC(func) \ + DISTRO_BOOT_DEV_SATA(func) \ + DISTRO_BOOT_DEV_USB(func) \ + DISTRO_BOOT_DEV_PXE(func) \ + DISTRO_BOOT_DEV_DHCP(func) + +#include <config_distro_bootcmd.h> + #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=imx6q-sabrelite.dtb\0" \ - "fdt_addr=0x18000000\0" \ - "boot_fdt=try\0" \ + "fdt_addr_r=0x18000000\0" \ + FDTFILE \ + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ + "ramdisk_addr_r=0x13000000\0" \ + "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \ - "mmcdevs=0 1\0" \ - "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ - "loadbootscript=" \ - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ - "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" \ - "netargs=setenv bootargs console=${console},${baudrate} " \ - "root=/dev/nfs " \ - "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ - "netboot=echo Booting from net ...; " \ - "run netargs; " \ - "if test ${ip_dyn} = yes; then " \ - "setenv get_cmd dhcp; " \ - "else " \ - "setenv get_cmd tftp; " \ - "fi; " \ - "${get_cmd} ${uimage}; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" - -#define CONFIG_BOOTCOMMAND \ - "for mmcdev in ${mmcdevs}; do " \ - "mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "fi; " \ - "fi; " \ - "fi; " \ - "done; " \ - "run netboot; " -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootdevs=" CONFIG_DRIVE_TYPES "\0" \ - "umsdevs=" CONFIG_UMSDEVS "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ - "sf erase 0xc0000 0x2000 && " \ - "echo restored environment to factory default ; fi\0" \ - "bootcmd=for dtype in ${bootdevs}" \ - "; do " \ - "if itest.s "xusb" == "x${dtype}" ; then " \ - "usb start ;" \ - "fi; " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load " \ - "${dtype} ${disk}:1 " \ - "10008000 " \ - "/6x_bootscript" \ - "&& source 10008000 ; " \ - "done ; " \ - "done; " \ - "setenv stdout serial,vga ; " \ - "echo ; echo 6x_bootscript not found ; " \ - "echo ; echo serial console at 115200, 8N1 ; echo ; " \ - "echo details at http://boundarydevices.com/6q_bootscript ; " \ - "setenv stdout serial;" \ - "setenv stdin serial,usbkbd;" \ - "for dtype in ${umsdevs} ; do " \ - "if itest.s sata == ${dtype}; then " \ - "initcmd='sata init' ;" \ - "else " \ - "initcmd='mmc rescan' ;" \ - "fi; " \ - "for disk in 0 1 ; do " \ - "if $initcmd && $dtype dev $disk ; then " \ - "setenv stdout serial,vga; " \ - "echo expose ${dtype} ${disk} " \ - "over USB; " \ - "ums 0 $dtype $disk ;" \ - "fi; " \ - " done; " \ - "done ;" \ - "setenv stdout serial,vga; " \ - "echo no block devices found;" \ - "\0" \ - "initrd_high=0xffffffff\0" \ - "upgradeu=for dtype in ${bootdevs}" \ - "; do " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load ${dtype} ${disk}:1 10008000 " \ - "/6x_upgrade " \ - "&& source 10008000 ; " \ - "done ; " \ - "done\0" \ + BOOTENV
-#endif /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x10000000 #define CONFIG_SYS_MEMTEST_END 0x10010000

Hi Guillaume,
On Thu, Apr 12, 2018 at 03:28:21PM +0200, Guillaume GARDET wrote:
Boot tested on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
include/configs/nitrogen6x.h | 180 +++++++++++++------------------------------ 1 file changed, 54 insertions(+), 126 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 7d2cf0bd8c..f6dce6c069 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -101,140 +101,68 @@ #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
Many of the macros above this line are obsolete with that patch, please remove.
@@ -80,27 +80,6 @@
#define CONFIG_PREBOOT ""
-#ifdef CONFIG_CMD_SATA -#define CONFIG_DRIVE_SATA "sata " -#else -#define CONFIG_DRIVE_SATA -#endif - -#ifdef CONFIG_CMD_MMC -#define CONFIG_DRIVE_MMC "mmc " -#else -#define CONFIG_DRIVE_MMC -#endif - -#ifdef CONFIG_USB_STORAGE -#define CONFIG_DRIVE_USB "usb " -#else -#define CONFIG_DRIVE_USB -#endif - -#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB -#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC - #ifdef CONFIG_CMD_MMC
+#ifdef CONFIG_CMD_MMC +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) +#else +#define DISTRO_BOOT_DEV_MMC(func) +#endif
+#ifdef CONFIG_CMD_SATA +#define DISTRO_BOOT_DEV_SATA(func) func(SATA, sata, 0) +#else +#define DISTRO_BOOT_DEV_SATA(func) +#endif
+#ifdef CONFIG_USB_STORAGE +#define DISTRO_BOOT_DEV_USB(func) func(USB, usb, 0) +#else +#define DISTRO_BOOT_DEV_USB(func) +#endif
+#ifdef CONFIG_CMD_PXE +#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) +#else +#define DISTRO_BOOT_DEV_PXE(func) +#endif
+#ifdef CONFIG_CMD_DHCP +#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) +#else +#define DISTRO_BOOT_DEV_DHCP(func) +#endif
#if defined(CONFIG_SABRELITE) +#define FDTFILE "fdtfile=imx6q-sabrelite.dtb\0" +#else +/* FIXME: nitrogen6x covers multiple configs. Define fdtfile for each supported config. */ +#define FDTFILE +#endif
+#define BOOT_TARGET_DEVICES(func) \
- DISTRO_BOOT_DEV_MMC(func) \
- DISTRO_BOOT_DEV_SATA(func) \
- DISTRO_BOOT_DEV_USB(func) \
- DISTRO_BOOT_DEV_PXE(func) \
- DISTRO_BOOT_DEV_DHCP(func)
+#include <config_distro_bootcmd.h>
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
- "fdt_file=imx6q-sabrelite.dtb\0" \
- "fdt_addr=0x18000000\0" \
- "boot_fdt=try\0" \
- "fdt_addr_r=0x18000000\0" \
- FDTFILE \
- "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
- "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
- "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
- "ramdisk_addr_r=0x13000000\0" \
- "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \
- "mmcdevs=0 1\0" \
- "mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
- "loadbootscript=" \
"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
"bootm ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootm; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
"bootm; " \
"fi;\0" \
- "netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
"if test ${ip_dyn} = yes; then " \
"setenv get_cmd dhcp; " \
"else " \
"setenv get_cmd tftp; " \
"fi; " \
"${get_cmd} ${uimage}; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
"bootm ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootm; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
"bootm; " \
"fi;\0"
-#define CONFIG_BOOTCOMMAND \
- "for mmcdev in ${mmcdevs}; do " \
"mmc dev ${mmcdev}; " \
"if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
"if run loaduimage; then " \
"run mmcboot; " \
"fi; " \
"fi; " \
"fi; " \
- "done; " \
- "run netboot; "
-#else -#define CONFIG_EXTRA_ENV_SETTINGS \
- "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
- "umsdevs=" CONFIG_UMSDEVS "\0" \
- "usb_pgood_delay=2000\0" \
- "console=ttymxc1\0" \
- "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
"sf erase 0xc0000 0x2000 && " \
"echo restored environment to factory default ; fi\0" \
- "bootcmd=for dtype in ${bootdevs}" \
"; do " \
"if itest.s \"xusb\" == \"x${dtype}\" ; then " \
"usb start ;" \
"fi; " \
"for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
"load " \
"${dtype} ${disk}:1 " \
"10008000 " \
"/6x_bootscript" \
"&& source 10008000 ; " \
"done ; " \
"done; " \
"setenv stdout serial,vga ; " \
"echo ; echo 6x_bootscript not found ; " \
"echo ; echo serial console at 115200, 8N1 ; echo ; " \
"echo details at http://boundarydevices.com/6q_bootscript ; " \
"setenv stdout serial;" \
"setenv stdin serial,usbkbd;" \
"for dtype in ${umsdevs} ; do " \
"if itest.s sata == ${dtype}; then " \
"initcmd='sata init' ;" \
"else " \
"initcmd='mmc rescan' ;" \
"fi; " \
"for disk in 0 1 ; do " \
"if $initcmd && $dtype dev $disk ; then " \
"setenv stdout serial,vga; " \
"echo expose ${dtype} ${disk} " \
"over USB; " \
"ums 0 $dtype $disk ;" \
"fi; " \
" done; " \
"done ;" \
"setenv stdout serial,vga; " \
"echo no block devices found;" \
"\0" \
- "initrd_high=0xffffffff\0" \
- "upgradeu=for dtype in ${bootdevs}" \
"; do " \
"for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
"load ${dtype} ${disk}:1 10008000 " \
"/6x_upgrade " \
"&& source 10008000 ; " \
"done ; " \
- "done\0" \
- BOOTENV
-#endif /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END 0x10010000
2.13.6
Regards, Gary

Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- configs/mx6qsabrelite_defconfig | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 7499704058..fee33cfff1 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -3,15 +3,15 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_TARGET_NITROGEN6X=y CONFIG_CMD_HDMIDETECT=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE" CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y -CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 -CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_FLASH is not set @@ -22,17 +22,12 @@ CONFIG_CMD_SATA=y CONFIG_CMD_SF=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set +# CONFIG_EFI_PARTITION is not set CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_DWC_AHSATA=y

This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Currently, only the Sabrelite has fdtfile defined.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
Changes in V5: * remove obsolete code from include/configs/nitrogen6x.h
Changes in V4: * Remove imx6 soc definition * Change comment on not defined fdtfile (no more fallback)
Changes in V3: * Add imx6 soc definition * Also update nitrogen6x config, not only sabrelite * Split mx6qsabrelite_defconfig update to a separate patch Changes in V2: * add mx6qsabrelite_defconfig update
Guillaume GARDET (2): imx6: Convert sabrelite and nitrogen6x boards to distro boot support imx6: sabrelite: update defconfig to use distro defaults
configs/mx6qsabrelite_defconfig | 15 ++-- include/configs/nitrogen6x.h | 179 ++++++++++------------------------------ 2 files changed, 48 insertions(+), 146 deletions(-)

Boot tested on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- include/configs/nitrogen6x.h | 179 +++++++++++-------------------------------- 1 file changed, 43 insertions(+), 136 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 7d2cf0bd8c..0d0be2a955 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -80,161 +80,68 @@
#define CONFIG_PREBOOT ""
-#ifdef CONFIG_CMD_SATA -#define CONFIG_DRIVE_SATA "sata " +#ifdef CONFIG_CMD_MMC +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) #else -#define CONFIG_DRIVE_SATA +#define DISTRO_BOOT_DEV_MMC(func) #endif
-#ifdef CONFIG_CMD_MMC -#define CONFIG_DRIVE_MMC "mmc " +#ifdef CONFIG_CMD_SATA +#define DISTRO_BOOT_DEV_SATA(func) func(SATA, sata, 0) #else -#define CONFIG_DRIVE_MMC +#define DISTRO_BOOT_DEV_SATA(func) #endif
#ifdef CONFIG_USB_STORAGE -#define CONFIG_DRIVE_USB "usb " +#define DISTRO_BOOT_DEV_USB(func) func(USB, usb, 0) #else -#define CONFIG_DRIVE_USB +#define DISTRO_BOOT_DEV_USB(func) +#endif + +#ifdef CONFIG_CMD_PXE +#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) +#else +#define DISTRO_BOOT_DEV_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) +#else +#define DISTRO_BOOT_DEV_DHCP(func) #endif
-#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB -#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
#if defined(CONFIG_SABRELITE) +#define FDTFILE "fdtfile=imx6q-sabrelite.dtb\0" +#else +/* FIXME: nitrogen6x covers multiple configs. Define fdtfile for each supported config. */ +#define FDTFILE +#endif + +#define BOOT_TARGET_DEVICES(func) \ + DISTRO_BOOT_DEV_MMC(func) \ + DISTRO_BOOT_DEV_SATA(func) \ + DISTRO_BOOT_DEV_USB(func) \ + DISTRO_BOOT_DEV_PXE(func) \ + DISTRO_BOOT_DEV_DHCP(func) + +#include <config_distro_bootcmd.h> + #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=imx6q-sabrelite.dtb\0" \ - "fdt_addr=0x18000000\0" \ - "boot_fdt=try\0" \ + "fdt_addr_r=0x18000000\0" \ + FDTFILE \ + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ + "ramdisk_addr_r=0x13000000\0" \ + "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \ - "mmcdevs=0 1\0" \ - "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ - "loadbootscript=" \ - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ - "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" \ - "netargs=setenv bootargs console=${console},${baudrate} " \ - "root=/dev/nfs " \ - "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ - "netboot=echo Booting from net ...; " \ - "run netargs; " \ - "if test ${ip_dyn} = yes; then " \ - "setenv get_cmd dhcp; " \ - "else " \ - "setenv get_cmd tftp; " \ - "fi; " \ - "${get_cmd} ${uimage}; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" - -#define CONFIG_BOOTCOMMAND \ - "for mmcdev in ${mmcdevs}; do " \ - "mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "fi; " \ - "fi; " \ - "fi; " \ - "done; " \ - "run netboot; " -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootdevs=" CONFIG_DRIVE_TYPES "\0" \ - "umsdevs=" CONFIG_UMSDEVS "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ - "sf erase 0xc0000 0x2000 && " \ - "echo restored environment to factory default ; fi\0" \ - "bootcmd=for dtype in ${bootdevs}" \ - "; do " \ - "if itest.s "xusb" == "x${dtype}" ; then " \ - "usb start ;" \ - "fi; " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load " \ - "${dtype} ${disk}:1 " \ - "10008000 " \ - "/6x_bootscript" \ - "&& source 10008000 ; " \ - "done ; " \ - "done; " \ - "setenv stdout serial,vga ; " \ - "echo ; echo 6x_bootscript not found ; " \ - "echo ; echo serial console at 115200, 8N1 ; echo ; " \ - "echo details at http://boundarydevices.com/6q_bootscript ; " \ - "setenv stdout serial;" \ - "setenv stdin serial,usbkbd;" \ - "for dtype in ${umsdevs} ; do " \ - "if itest.s sata == ${dtype}; then " \ - "initcmd='sata init' ;" \ - "else " \ - "initcmd='mmc rescan' ;" \ - "fi; " \ - "for disk in 0 1 ; do " \ - "if $initcmd && $dtype dev $disk ; then " \ - "setenv stdout serial,vga; " \ - "echo expose ${dtype} ${disk} " \ - "over USB; " \ - "ums 0 $dtype $disk ;" \ - "fi; " \ - " done; " \ - "done ;" \ - "setenv stdout serial,vga; " \ - "echo no block devices found;" \ - "\0" \ - "initrd_high=0xffffffff\0" \ - "upgradeu=for dtype in ${bootdevs}" \ - "; do " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load ${dtype} ${disk}:1 10008000 " \ - "/6x_upgrade " \ - "&& source 10008000 ; " \ - "done ; " \ - "done\0" \ + BOOTENV
-#endif /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x10000000 #define CONFIG_SYS_MEMTEST_END 0x10010000

Hi Guillaume,
On Mon, Apr 16, 2018 at 02:47:37PM +0200, Guillaume GARDET wrote:
Boot tested on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
Reviewed-by: Gary Bisson gary.bisson@boundarydevices.com
Regards, Gary

Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- configs/mx6qsabrelite_defconfig | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 7499704058..fee33cfff1 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -3,15 +3,15 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_TARGET_NITROGEN6X=y CONFIG_CMD_HDMIDETECT=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE" CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y -CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 -CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_FLASH is not set @@ -22,17 +22,12 @@ CONFIG_CMD_SATA=y CONFIG_CMD_SF=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set +# CONFIG_EFI_PARTITION is not set CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_DWC_AHSATA=y

Hi Guillaume,
On Mon, Apr 16, 2018 at 02:47:38PM +0200, Guillaume GARDET wrote:
Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
configs/mx6qsabrelite_defconfig | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 7499704058..fee33cfff1 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -3,15 +3,15 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_TARGET_NITROGEN6X=y CONFIG_CMD_HDMIDETECT=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE" CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y -CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_ARCH_MISC_INIT=y
The above config breaks the build since there's no arch_misc_init function in the board file.
CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 -CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_FLASH is not set
Also, can you add CMD_GPT so that GPT parition tables are supported?
Many of our OS images now rely on it.
Regards, Gary

Hi,
Le 18/04/2018 à 16:44, Gary Bisson a écrit :
Hi Guillaume,
On Mon, Apr 16, 2018 at 02:47:38PM +0200, Guillaume GARDET wrote:
Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
configs/mx6qsabrelite_defconfig | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 7499704058..fee33cfff1 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -3,15 +3,15 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_TARGET_NITROGEN6X=y CONFIG_CMD_HDMIDETECT=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE" CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y -CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_ARCH_MISC_INIT=y
The above config breaks the build since there's no arch_misc_init function in the board file.
CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 -CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_FLASH is not set
Also, can you add CMD_GPT so that GPT parition tables are supported?
Many of our OS images now rely on it.
Ok, patch V6 sent just now.
Guillaume
Regards, Gary

This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Currently, only the Sabrelite has fdtfile defined.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
Changes in V6: * added CONFIG_CMD_GPT to sabrelite defconfig * remove CONFIG_ARCH_MISC_INIT to sabrelite defconfig
Changes in V5: * remove obsolete code from include/configs/nitrogen6x.h
Changes in V4: * Remove imx6 soc definition * Change comment on not defined fdtfile (no more fallback)
Changes in V3: * Add imx6 soc definition * Also update nitrogen6x config, not only sabrelite * Split mx6qsabrelite_defconfig update to a separate patch Changes in V2: * add mx6qsabrelite_defconfig update
Guillaume GARDET (2): imx6: Convert sabrelite and nitrogen6x boards to distro boot support imx6: sabrelite: update defconfig to use distro defaults
configs/mx6qsabrelite_defconfig | 15 ++-- include/configs/nitrogen6x.h | 179 ++++++++++------------------------------ 2 files changed, 48 insertions(+), 146 deletions(-)

Boot tested on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- include/configs/nitrogen6x.h | 179 +++++++++++-------------------------------- 1 file changed, 43 insertions(+), 136 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 7d2cf0bd8c..0d0be2a955 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -80,161 +80,68 @@
#define CONFIG_PREBOOT ""
-#ifdef CONFIG_CMD_SATA -#define CONFIG_DRIVE_SATA "sata " +#ifdef CONFIG_CMD_MMC +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) #else -#define CONFIG_DRIVE_SATA +#define DISTRO_BOOT_DEV_MMC(func) #endif
-#ifdef CONFIG_CMD_MMC -#define CONFIG_DRIVE_MMC "mmc " +#ifdef CONFIG_CMD_SATA +#define DISTRO_BOOT_DEV_SATA(func) func(SATA, sata, 0) #else -#define CONFIG_DRIVE_MMC +#define DISTRO_BOOT_DEV_SATA(func) #endif
#ifdef CONFIG_USB_STORAGE -#define CONFIG_DRIVE_USB "usb " +#define DISTRO_BOOT_DEV_USB(func) func(USB, usb, 0) #else -#define CONFIG_DRIVE_USB +#define DISTRO_BOOT_DEV_USB(func) +#endif + +#ifdef CONFIG_CMD_PXE +#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) +#else +#define DISTRO_BOOT_DEV_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) +#else +#define DISTRO_BOOT_DEV_DHCP(func) #endif
-#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB -#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
#if defined(CONFIG_SABRELITE) +#define FDTFILE "fdtfile=imx6q-sabrelite.dtb\0" +#else +/* FIXME: nitrogen6x covers multiple configs. Define fdtfile for each supported config. */ +#define FDTFILE +#endif + +#define BOOT_TARGET_DEVICES(func) \ + DISTRO_BOOT_DEV_MMC(func) \ + DISTRO_BOOT_DEV_SATA(func) \ + DISTRO_BOOT_DEV_USB(func) \ + DISTRO_BOOT_DEV_PXE(func) \ + DISTRO_BOOT_DEV_DHCP(func) + +#include <config_distro_bootcmd.h> + #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=imx6q-sabrelite.dtb\0" \ - "fdt_addr=0x18000000\0" \ - "boot_fdt=try\0" \ + "fdt_addr_r=0x18000000\0" \ + FDTFILE \ + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ + "ramdisk_addr_r=0x13000000\0" \ + "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \ - "mmcdevs=0 1\0" \ - "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ - "loadbootscript=" \ - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ - "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ - "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" \ - "netargs=setenv bootargs console=${console},${baudrate} " \ - "root=/dev/nfs " \ - "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ - "netboot=echo Booting from net ...; " \ - "run netargs; " \ - "if test ${ip_dyn} = yes; then " \ - "setenv get_cmd dhcp; " \ - "else " \ - "setenv get_cmd tftp; " \ - "fi; " \ - "${get_cmd} ${uimage}; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ - "bootm ${loadaddr} - ${fdt_addr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootm; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootm; " \ - "fi;\0" - -#define CONFIG_BOOTCOMMAND \ - "for mmcdev in ${mmcdevs}; do " \ - "mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "fi; " \ - "fi; " \ - "fi; " \ - "done; " \ - "run netboot; " -#else -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootdevs=" CONFIG_DRIVE_TYPES "\0" \ - "umsdevs=" CONFIG_UMSDEVS "\0" \ - "usb_pgood_delay=2000\0" \ - "console=ttymxc1\0" \ - "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ - "sf erase 0xc0000 0x2000 && " \ - "echo restored environment to factory default ; fi\0" \ - "bootcmd=for dtype in ${bootdevs}" \ - "; do " \ - "if itest.s "xusb" == "x${dtype}" ; then " \ - "usb start ;" \ - "fi; " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load " \ - "${dtype} ${disk}:1 " \ - "10008000 " \ - "/6x_bootscript" \ - "&& source 10008000 ; " \ - "done ; " \ - "done; " \ - "setenv stdout serial,vga ; " \ - "echo ; echo 6x_bootscript not found ; " \ - "echo ; echo serial console at 115200, 8N1 ; echo ; " \ - "echo details at http://boundarydevices.com/6q_bootscript ; " \ - "setenv stdout serial;" \ - "setenv stdin serial,usbkbd;" \ - "for dtype in ${umsdevs} ; do " \ - "if itest.s sata == ${dtype}; then " \ - "initcmd='sata init' ;" \ - "else " \ - "initcmd='mmc rescan' ;" \ - "fi; " \ - "for disk in 0 1 ; do " \ - "if $initcmd && $dtype dev $disk ; then " \ - "setenv stdout serial,vga; " \ - "echo expose ${dtype} ${disk} " \ - "over USB; " \ - "ums 0 $dtype $disk ;" \ - "fi; " \ - " done; " \ - "done ;" \ - "setenv stdout serial,vga; " \ - "echo no block devices found;" \ - "\0" \ - "initrd_high=0xffffffff\0" \ - "upgradeu=for dtype in ${bootdevs}" \ - "; do " \ - "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "load ${dtype} ${disk}:1 10008000 " \ - "/6x_upgrade " \ - "&& source 10008000 ; " \ - "done ; " \ - "done\0" \ + BOOTENV
-#endif /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x10000000 #define CONFIG_SYS_MEMTEST_END 0x10010000

On 04/18/2018 06:04 PM, Guillaume GARDET wrote:
Boot tested on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
include/configs/nitrogen6x.h | 179 +++++++++++-------------------------------- 1 file changed, 43 insertions(+), 136 deletions(-)
Tested-by: Denis Pynkin denis.pynkin@collabora.com
Tested with SabreLite board:
mmc0 is current device Scanning mmc 0:1... Found /extlinux/extlinux.conf Retrieving file: /extlinux/extlinux.conf 318 bytes read in 47 ms (5.9 KiB/s) 1: Linux 4.14.0-0.bpo.2-armmp Retrieving file: /initrd.img-4.14.0-0.bpo.2-armmp 6654596 bytes read in 481 ms (13.2 MiB/s) Retrieving file: /vmlinuz-4.14.0-0.bpo.2-armmp 3985920 bytes read in 309 ms (12.3 MiB/s) append: root=UUID=ddc5cc49-8a42-4eef-b36f-c5202cb6573aconsole=tty0 console=ttymxc1,115200n8 plymouth.ignore-serial-consoles root=LABEL=system Retrieving file: /dtbs/4.14.0-0.bpo.2-armmp/imx6q-sabrelite.dtb 42927 bytes read in 614 ms (67.4 KiB/s)
Used own defconfig file with this patch and enabled "CONFIG_DISTRO_DEFAULTS=y"
Guillaume, thank you for adding the patch.

Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots on sabrelite board.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
--- configs/mx6qsabrelite_defconfig | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig index 7499704058..54a9fc84a1 100644 --- a/configs/mx6qsabrelite_defconfig +++ b/configs/mx6qsabrelite_defconfig @@ -3,36 +3,31 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_TARGET_NITROGEN6X=y CONFIG_CMD_HDMIDETECT=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE" CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y -CONFIG_SUPPORT_RAW_INITRD=y CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x12000000 -CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +# CONFIG_RANDOM_UUID is not set CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_SATA=y CONFIG_CMD_SF=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_DWC_AHSATA=y

Hi,
just a friendly reminder for those 2 patches.
Guillaume
Le 18/04/2018 à 17:04, Guillaume GARDET a écrit :
This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Currently, only the Sabrelite has fdtfile defined.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
Changes in V6:
- added CONFIG_CMD_GPT to sabrelite defconfig
- remove CONFIG_ARCH_MISC_INIT to sabrelite defconfig
Changes in V5:
- remove obsolete code from include/configs/nitrogen6x.h
Changes in V4:
- Remove imx6 soc definition
- Change comment on not defined fdtfile (no more fallback)
Changes in V3:
- Add imx6 soc definition
- Also update nitrogen6x config, not only sabrelite
- Split mx6qsabrelite_defconfig update to a separate patch
Changes in V2:
- add mx6qsabrelite_defconfig update
Guillaume GARDET (2): imx6: Convert sabrelite and nitrogen6x boards to distro boot support imx6: sabrelite: update defconfig to use distro defaults
configs/mx6qsabrelite_defconfig | 15 ++-- include/configs/nitrogen6x.h | 179 ++++++++++------------------------------ 2 files changed, 48 insertions(+), 146 deletions(-)

Hi Guillaume,
On 18/04/2018 17:04, Guillaume GARDET wrote:
This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Currently, only the Sabrelite has fdtfile defined.
Fine, but Troy is the maintainer for this board and I have not yet seen if he agrees to switch the board to the distro environment. I would like to have his ACK before pushing this.
Best regards, Stefano Babic
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr Cc: Troy Kisky troy.kisky@boundarydevices.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Gary Bisson gary.bisson@boundarydevices.com
Changes in V6:
- added CONFIG_CMD_GPT to sabrelite defconfig
- remove CONFIG_ARCH_MISC_INIT to sabrelite defconfig
Changes in V5:
- remove obsolete code from include/configs/nitrogen6x.h
Changes in V4:
- Remove imx6 soc definition
- Change comment on not defined fdtfile (no more fallback)
Changes in V3:
- Add imx6 soc definition
- Also update nitrogen6x config, not only sabrelite
- Split mx6qsabrelite_defconfig update to a separate patch
Changes in V2:
- add mx6qsabrelite_defconfig update
Guillaume GARDET (2): imx6: Convert sabrelite and nitrogen6x boards to distro boot support imx6: sabrelite: update defconfig to use distro defaults
configs/mx6qsabrelite_defconfig | 15 ++-- include/configs/nitrogen6x.h | 179 ++++++++++------------------------------ 2 files changed, 48 insertions(+), 146 deletions(-)

On 5/17/2018 2:51 AM, Stefano Babic wrote:
Hi Guillaume,
On 18/04/2018 17:04, Guillaume GARDET wrote:
This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Currently, only the Sabrelite has fdtfile defined.
Fine, but Troy is the maintainer for this board and I have not yet seen if he agrees to switch the board to the distro environment. I would like to have his ACK before pushing this.
Best regards, Stefano Babic
Sorry, for the delay
Acked-by: Troy Kisky troy.kisky@boundarydevices.com

On 17/05/2018 17:45, Troy Kisky wrote:
On 5/17/2018 2:51 AM, Stefano Babic wrote:
Hi Guillaume,
On 18/04/2018 17:04, Guillaume GARDET wrote:
This patch serie updates sabrelite and nitrogen6x boards to use distro boot support. Sabrelite has been boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots. Nitrogen6* boards have been build tested only.
Currently, only the Sabrelite has fdtfile defined.
Fine, but Troy is the maintainer for this board and I have not yet seen if he agrees to switch the board to the distro environment. I would like to have his ACK before pushing this.
Best regards, Stefano Babic
Sorry, for the delay
No worry.
Acked-by: Troy Kisky troy.kisky@boundarydevices.com
I apply the patches to u-boot-imx, thanks !
Best regards, Stefano

Hi Guillaume,
Thanks for your patch! Switching the upstream nitrogen6x configuration to distro bootcmd has been in our todo list for some time since we also use that in our own git repo.
On Fri, Apr 06, 2018 at 12:05:48PM +0200, Guillaume GARDET wrote:
Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots.
Signed-off-by: Guillaume GARDET <guillaume.gardet at free.fr> Cc: Troy Kisky <troy.kisky at boundarydevices.com> Cc: Stefano Babic <sbabic at denx.de> Cc: Fabio Estevam <fabio.estevam at nxp.com>
include/configs/nitrogen6x.h | 86 ++++++++++---------------------------------- 1 file changed, 18 insertions(+), 68 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index c73cfb7f7e..2e2c499cb6 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -102,82 +102,32 @@ #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
#if defined(CONFIG_SABRELITE)
Please also switch nitrogen6x to it, not only sabrelite.
+#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(SATA, sata, 0) \
- func(USB, usb, 0) \
- func(PXE, pxe, na) \
That currently doesn't build because CMD_PXE isn't selected in the sabrelite defconfig. "include/config_distro_bootcmd.h:319:2: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’"
Which brings a good point, all the above should depend on the storage command being present, like done here [1].
- func(DHCP, dhcp, na)
+#include <config_distro_bootcmd.h>
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
- "fdt_file=imx6q-sabrelite.dtb\0" \
- "fdtfile=imx6q-sabrelite.dtb\0" \
I wish the default efi_fdtfile would work, Fabio is there any plan to populate the ${soc} variable like it is done for i.MX7? [2] Then a small patch in the nitrogen6x.c would set the proper board env variable.
That way there would be no difference in this header between sabrelite vs. nitrogen6x.
"fdt_addr=0x18000000\0" \
Do we need to keep fdt_addr since we define fdt_addr_r below?
- "boot_fdt=try\0" \
- "fdt_addr_r=0x18000000\0" \
- "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
- "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
- "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
- "ramdisk_addr_r=0x13000000\0" \
- "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \
- "mmcdevs=0 1\0" \
- "mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
- "loadbootscript=" \
"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
"bootm ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootm; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
"bootm; " \
"fi;\0" \
- "netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
"if test ${ip_dyn} = yes; then " \
"setenv get_cmd dhcp; " \
"else " \
"setenv get_cmd tftp; " \
"fi; " \
"${get_cmd} ${uimage}; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
"bootm ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootm; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
"bootm; " \
"fi;\0"
- BOOTENV
-#define CONFIG_BOOTCOMMAND \
- "for mmcdev in ${mmcdevs}; do " \
"mmc dev ${mmcdev}; " \
"if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
"if run loaduimage; then " \
"run mmcboot; " \
"fi; " \
"fi; " \
"fi; " \
- "done; " \
- "run netboot; "
#else #define CONFIG_EXTRA_ENV_SETTINGS \ "bootdevs=" CONFIG_DRIVE_TYPES "\0" \ -- 2.13.6
The rest looks good to me.
Regards, Gary
[1] https://github.com/boundarydevices/u-boot-imx6/blob/boundary-v2017.07/includ... [2] http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/mach-imx/mx7/soc.c;hb=HEA...

Le 09/04/2018 à 16:40, Gary Bisson a écrit :
Hi Guillaume,
Thanks for your patch! Switching the upstream nitrogen6x configuration to distro bootcmd has been in our todo list for some time since we also use that in our own git repo.
On Fri, Apr 06, 2018 at 12:05:48PM +0200, Guillaume GARDET wrote:
Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots.
Signed-off-by: Guillaume GARDET <guillaume.gardet at free.fr> Cc: Troy Kisky <troy.kisky at boundarydevices.com> Cc: Stefano Babic <sbabic at denx.de> Cc: Fabio Estevam <fabio.estevam at nxp.com>
include/configs/nitrogen6x.h | 86 ++++++++++---------------------------------- 1 file changed, 18 insertions(+), 68 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index c73cfb7f7e..2e2c499cb6 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -102,82 +102,32 @@ #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
#if defined(CONFIG_SABRELITE)
Please also switch nitrogen6x to it, not only sabrelite.
Should we keep all the 6x scripts stuff or not?
+#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(SATA, sata, 0) \
- func(USB, usb, 0) \
- func(PXE, pxe, na) \
That currently doesn't build because CMD_PXE isn't selected in the sabrelite defconfig. "include/config_distro_bootcmd.h:319:2: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’"
Which brings a good point, all the above should depend on the storage command being present, like done here [1].
No, we just need to update the defconfig, see V2 of this patch sent earlier today.
- func(DHCP, dhcp, na)
+#include <config_distro_bootcmd.h>
- #define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
- "fdt_file=imx6q-sabrelite.dtb\0" \
- "fdtfile=imx6q-sabrelite.dtb\0" \
I wish the default efi_fdtfile would work, Fabio is there any plan to populate the ${soc} variable like it is done for i.MX7? [2] Then a small patch in the nitrogen6x.c would set the proper board env variable.
That way there would be no difference in this header between sabrelite vs. nitrogen6x.
"fdt_addr=0x18000000\0" \
Do we need to keep fdt_addr since we define fdt_addr_r below?
It was for backward compatibility, if people had some script using it.
- "boot_fdt=try\0" \
- "fdt_addr_r=0x18000000\0" \
- "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
- "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
- "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
- "ramdisk_addr_r=0x13000000\0" \
- "ramdiskaddr=0x13000000\0" \ "ip_dyn=yes\0" \ "usb_pgood_delay=2000\0" \
- "mmcdevs=0 1\0" \
- "mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
- "loadbootscript=" \
"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
"bootm ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootm; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
"bootm; " \
"fi;\0" \
- "netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
"run netargs; " \
"if test ${ip_dyn} = yes; then " \
"setenv get_cmd dhcp; " \
"else " \
"setenv get_cmd tftp; " \
"fi; " \
"${get_cmd} ${uimage}; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
"bootm ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
"bootm; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
"bootm; " \
"fi;\0"
- BOOTENV
-#define CONFIG_BOOTCOMMAND \
- "for mmcdev in ${mmcdevs}; do " \
"mmc dev ${mmcdev}; " \
"if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
"if run loaduimage; then " \
"run mmcboot; " \
"fi; " \
"fi; " \
"fi; " \
- "done; " \
- "run netboot; " #else #define CONFIG_EXTRA_ENV_SETTINGS \ "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
-- 2.13.6
The rest looks good to me.
Ok. Thanks.
Guillaume
Regards, Gary
[1] https://github.com/boundarydevices/u-boot-imx6/blob/boundary-v2017.07/includ... [2] http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/mach-imx/mx7/soc.c;hb=HEA...

Hi Guillaume,
On Mon, Apr 09, 2018 at 05:17:44PM +0200, Guillaume Gardet wrote:
Le 09/04/2018 à 16:40, Gary Bisson a écrit :
Hi Guillaume,
Thanks for your patch! Switching the upstream nitrogen6x configuration to distro bootcmd has been in our todo list for some time since we also use that in our own git repo.
On Fri, Apr 06, 2018 at 12:05:48PM +0200, Guillaume GARDET wrote:
Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots.
Signed-off-by: Guillaume GARDET <guillaume.gardet at free.fr> Cc: Troy Kisky <troy.kisky at boundarydevices.com> Cc: Stefano Babic <sbabic at denx.de> Cc: Fabio Estevam <fabio.estevam at nxp.com>
include/configs/nitrogen6x.h | 86 ++++++++++---------------------------------- 1 file changed, 18 insertions(+), 68 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index c73cfb7f7e..2e2c499cb6 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -102,82 +102,32 @@ #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC #if defined(CONFIG_SABRELITE)
Please also switch nitrogen6x to it, not only sabrelite.
Should we keep all the 6x scripts stuff or not?
No, we need to switch to something standard, let's remove it.
+#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(SATA, sata, 0) \
- func(USB, usb, 0) \
- func(PXE, pxe, na) \
That currently doesn't build because CMD_PXE isn't selected in the sabrelite defconfig. "include/config_distro_bootcmd.h:319:2: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’"
Which brings a good point, all the above should depend on the storage command being present, like done here [1].
No, we just need to update the defconfig, see V2 of this patch sent earlier today.
I know updating the defconfig makes it build. My point is that it would be more flexible to do like in the link provided so that someone that removes CMD_PXE from the defconfig for any reason can still build.
- func(DHCP, dhcp, na)
+#include <config_distro_bootcmd.h>
- #define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
- "fdt_file=imx6q-sabrelite.dtb\0" \
- "fdtfile=imx6q-sabrelite.dtb\0" \
I wish the default efi_fdtfile would work, Fabio is there any plan to populate the ${soc} variable like it is done for i.MX7? [2] Then a small patch in the nitrogen6x.c would set the proper board env variable.
That way there would be no difference in this header between sabrelite vs. nitrogen6x.
"fdt_addr=0x18000000\0" \
Do we need to keep fdt_addr since we define fdt_addr_r below?
It was for backward compatibility, if people had some script using it.
I think it should be dropped.
Regards, Gary

On Tue, Apr 10, 2018 at 6:50 AM, Gary Bisson gary.bisson@boundarydevices.com wrote:
Hi Guillaume,
On Mon, Apr 09, 2018 at 05:17:44PM +0200, Guillaume Gardet wrote:
Le 09/04/2018 à 16:40, Gary Bisson a écrit :
Hi Guillaume,
Thanks for your patch! Switching the upstream nitrogen6x configuration to distro bootcmd has been in our todo list for some time since we also use that in our own git repo.
On Fri, Apr 06, 2018 at 12:05:48PM +0200, Guillaume GARDET wrote:
Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots.
Signed-off-by: Guillaume GARDET <guillaume.gardet at free.fr> Cc: Troy Kisky <troy.kisky at boundarydevices.com> Cc: Stefano Babic <sbabic at denx.de> Cc: Fabio Estevam <fabio.estevam at nxp.com>
include/configs/nitrogen6x.h | 86 ++++++++++---------------------------------- 1 file changed, 18 insertions(+), 68 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index c73cfb7f7e..2e2c499cb6 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -102,82 +102,32 @@ #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC #if defined(CONFIG_SABRELITE)
Please also switch nitrogen6x to it, not only sabrelite.
Should we keep all the 6x scripts stuff or not?
No, we need to switch to something standard, let's remove it.
+#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(SATA, sata, 0) \
- func(USB, usb, 0) \
- func(PXE, pxe, na) \
That currently doesn't build because CMD_PXE isn't selected in the sabrelite defconfig. "include/config_distro_bootcmd.h:319:2: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’"
Which brings a good point, all the above should depend on the storage command being present, like done here [1].
No, we just need to update the defconfig, see V2 of this patch sent earlier today.
I know updating the defconfig makes it build. My point is that it would be more flexible to do like in the link provided so that someone that removes CMD_PXE from the defconfig for any reason can still build.
Agreed. Also, be careful to check for CONFIG_CMD_DHCP and CONFIG_CMD_PXE for the PXE case.
- func(DHCP, dhcp, na)
+#include <config_distro_bootcmd.h>
- #define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
- "fdt_file=imx6q-sabrelite.dtb\0" \
- "fdtfile=imx6q-sabrelite.dtb\0" \
I wish the default efi_fdtfile would work, Fabio is there any plan to populate the ${soc} variable like it is done for i.MX7? [2] Then a small patch in the nitrogen6x.c would set the proper board env variable.
That way there would be no difference in this header between sabrelite vs. nitrogen6x.
"fdt_addr=0x18000000\0" \
Do we need to keep fdt_addr since we define fdt_addr_r below?
It was for backward compatibility, if people had some script using it.
I think it should be dropped.
Regards, Gary _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Hi Gary,
On Mon, Apr 9, 2018 at 11:40 AM, Gary Bisson gary.bisson@boundarydevices.com wrote:
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
"fdt_file=imx6q-sabrelite.dtb\0" \
"fdtfile=imx6q-sabrelite.dtb\0" \
I wish the default efi_fdtfile would work, Fabio is there any plan to populate the ${soc} variable like it is done for i.MX7? [2]
It seems we didn't need to do this yet, but if you see a need for it, please post a patch.
Thanks

Hi Fabio,
On Mon, Apr 09, 2018 at 02:27:31PM -0300, Fabio Estevam wrote:
Hi Gary,
On Mon, Apr 9, 2018 at 11:40 AM, Gary Bisson gary.bisson@boundarydevices.com wrote:
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \ "console=ttymxc1\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
"fdt_file=imx6q-sabrelite.dtb\0" \
"fdtfile=imx6q-sabrelite.dtb\0" \
I wish the default efi_fdtfile would work, Fabio is there any plan to populate the ${soc} variable like it is done for i.MX7? [2]
It seems we didn't need to do this yet, but if you see a need for it, please post a patch.
Will do.
Thanks, Gary
participants (8)
-
Denis Pynkin
-
Fabio Estevam
-
Gary Bisson
-
Guillaume GARDET
-
Guillaume Gardet
-
Joe Hershberger
-
Stefano Babic
-
Troy Kisky