Skip to contentSkip to conversation

armv8: ls1088ardb: Add distro boot support

PATCH Superseded Ashish Kumar 2 participants 5 messages Nov 6, 2017 – Nov 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 armv8: ls1088ardb: Add distro boot support

Distro boot support gives flexibility to run distro RFS like Ubuntu's being deployed from SD card or SATA drive. If it fails
to detect external storage, fall back to qspi/sd boot.

Enable this by default in RDB's defconfig by selecting CONFIG_DISTRO_DEFAULTS

---

v2:
1. Fix typo in commit msg
2. Fix indentation
3. Squash patch-set to one
4. Remove USB distro option as USB config are
not supported in sd boot defconfig yet.

 configs/ls1088ardb_qspi_defconfig        |   1 +
 configs/ls1088ardb_sdcard_qspi_defconfig |   1 +
 include/configs/ls1088ardb.h             | 113 ++++++++++++++++++++++++-------
 3 files changed, 89 insertions(+), 26 deletions(-)
configs/ls1088ardb_qspi_defconfig +1 -0
index db15d31..ea0f077 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_TARGET_LS1088ARDB=y
 CONFIG_FSL_LS_PPA=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
+CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/ls1088ardb_sdcard_qspi_defconfig +1 -0
index 8abc313..8e5cf3b 100644
@@ -7,6 +7,7 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-rdb"
+CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
include/configs/ls1088ardb.h +87 -26

134 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 armv8: ls1088ardb: Add distro boot support

Quoted 17 lines · Ashish Kumar

Distro boot support gives flexibility to run distro RFS like Ubuntu's being deployed from SD card or SATA drive. If it fails
to detect external storage, fall back to qspi/sd boot.

Enable this by default in RDB's defconfig by selecting CONFIG_DISTRO_DEFAULTS

---

v2:
1. Fix typo in commit msg
2. Fix indentation
3. Squash patch-set to one
4. Remove USB distro option as USB config are
not supported in sd boot defconfig yet.

<snip>

Quoted 62 lines
include/configs/ls1088ardb.h +20 -25
index eef9a07..e6bf2b8 100644
@@ -258,40 +258,102 @@
 
 /* Initial environment variables */
 #if defined(CONFIG_QSPI_BOOT)
-#undef CONFIG_EXTRA_ENV_SETTINGS
-#define CONFIG_EXTRA_ENV_SETTINGS		\
-	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
-	"loadaddr=0x90100000\0"			\
-	"kernel_addr=0x100000\0"		\
-	"ramdisk_addr=0x800000\0"		\
-	"ramdisk_size=0x2000000\0"		\
-	"fdt_high=0xa0000000\0"			\
-	"initrd_high=0xffffffffffffffff\0"	\
-	"kernel_start=0x1000000\0"		\
-	"kernel_load=0xa0000000\0"		\
-	"kernel_size=0x2800000\0"		\
+#define MC_INIT_CMD				\
 	"mcinitcmd=sf probe 0:0;sf read 0x80000000 0xA00000 0x100000;"	\
-	"sf read 0x80100000 0xE00000 0x100000;" \
-	"fsl_mc start mc 0x80000000 0x80100000\0"	\
-	"mcmemsize=0x70000000 \0"
+	"sf read 0x80100000 0xE00000 0x100000;"				\
+	"fsl_mc start mc 0x80000000 0x80100000\0"			\
+	"mcmemsize=0x70000000\0"
 #elif defined(CONFIG_SD_BOOT)
+#define MC_INIT_CMD				\
+	"mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;"		\
+	"mmc read 0x80100000 0x7000 0x800;"				\
+	"fsl_mc start mc 0x80000000 0x80100000\0"			\
+	"mcmemsize=0x70000000\0"
+#endif
+
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS		\
+	"BOARD=ls1088ardb\0"			\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
-	"loadaddr=0x90100000\0"			\
-	"kernel_addr=0x800\0"			\
 	"ramdisk_addr=0x800000\0"		\
 	"ramdisk_size=0x2000000\0"		\
 	"fdt_high=0xa0000000\0"			\
 	"initrd_high=0xffffffffffffffff\0"	\
-	"kernel_start=0x8000\0"			\
-	"kernel_load=0xa0000000\0"		\
-	"kernel_size=0x14000\0"			\
-	"mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;"	\
-	"mmc read 0x80100000 0x7000 0x800;"	\
-	"fsl_mc start mc 0x80000000 0x80100000\0"	\
-	"mcmemsize=0x70000000 \0"
-
+	"fdt_addr=0x64f00000\0"			\
+	"kernel_addr=0x1000000\0"		\
+	"kernel_addr_sd=0x8000\0"		\
+	"kernel_start=0x580100000\0"		\
+	"kernelheader_start=0x580800000\0"	\
+	"scriptaddr=0x80000000\0"		\
+	"scripthdraddr=0x80080000\0"		\
+	"fdtheader_addr_r=0x80100000\0"		\

include/configs/ls1088ardb.h line 299

Quoted 10 lines
include/configs/ls1088ardb.h +10 -0
+	"kernelheader_addr=0x800000\0"		\
+	"kernelheader_addr_r=0x80200000\0"	\
+	"kernel_addr_r=0x81000000\0"		\
+	"kernelheader_size=0x40000\0"		\
+	"fdt_addr_r=0x90000000\0"		\
+	"load_addr=0xa0000000\0"		\
+	"kernel_size=0x2800000\0"		\
+	"kernel_size_sd=0x14000\0"		\
+	MC_INIT_CMD				\
+	BOOTENV					\

What do you do with BOOTENV? This causes compiling error. Please verify. I tested this patch on top of you v6 SD patches.

York

#2 lore raw

PATCH v2 1/1 armv8: ls1088ardb: Add distro boot support

Hello York,

Please see inline.

-----Original Message-----
From: York Sun
Sent: Tuesday, November 07, 2017 2:11 AM
To: Ashish Kumar <[email protected]>; u-boot at lists.denx.de
Cc: Zhang Ying <[email protected]>
Subject: Re: [PATCH v2] armv8: ls1088ardb: Add distro boot support

Quoted 17 lines · Ashish Kumar

Distro boot support gives flexibility to run distro RFS like Ubuntu's being deployed from SD card or SATA drive. If it fails to detect external storage, fall back to qspi/sd boot.

Enable this by default in RDB's defconfig by selecting CONFIG_DISTRO_DEFAULTS

---

v2:
1. Fix typo in commit msg
2. Fix indentation
3. Squash patch-set to one
4. Remove USB distro option as USB config are
not supported in sd boot defconfig yet.

<snip>

Quoted 62 lines
(quoted diff) +0 -0

b/include/configs/ls1088ardb.h index eef9a07..e6bf2b8 100644

include/configs/ls1088ardb.h +20 -25
@@ -258,40 +258,102 @@
 
 /* Initial environment variables */
 #if defined(CONFIG_QSPI_BOOT)
-#undef CONFIG_EXTRA_ENV_SETTINGS
-#define CONFIG_EXTRA_ENV_SETTINGS		\
-	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
-	"loadaddr=0x90100000\0"			\
-	"kernel_addr=0x100000\0"		\
-	"ramdisk_addr=0x800000\0"		\
-	"ramdisk_size=0x2000000\0"		\
-	"fdt_high=0xa0000000\0"			\
-	"initrd_high=0xffffffffffffffff\0"	\
-	"kernel_start=0x1000000\0"		\
-	"kernel_load=0xa0000000\0"		\
-	"kernel_size=0x2800000\0"		\
+#define MC_INIT_CMD				\
 	"mcinitcmd=sf probe 0:0;sf read 0x80000000 0xA00000 0x100000;"	\
-	"sf read 0x80100000 0xE00000 0x100000;" \
-	"fsl_mc start mc 0x80000000 0x80100000\0"	\
-	"mcmemsize=0x70000000 \0"
+	"sf read 0x80100000 0xE00000 0x100000;"				\
+	"fsl_mc start mc 0x80000000 0x80100000\0"			\
+	"mcmemsize=0x70000000\0"
 #elif defined(CONFIG_SD_BOOT)
+#define MC_INIT_CMD				\
+	"mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;"		\
+	"mmc read 0x80100000 0x7000 0x800;"				\
+	"fsl_mc start mc 0x80000000 0x80100000\0"			\
+	"mcmemsize=0x70000000\0"
+#endif
+
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS		\
+	"BOARD=ls1088ardb\0"			\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
-	"loadaddr=0x90100000\0"			\
-	"kernel_addr=0x800\0"			\
 	"ramdisk_addr=0x800000\0"		\
 	"ramdisk_size=0x2000000\0"		\
 	"fdt_high=0xa0000000\0"			\
 	"initrd_high=0xffffffffffffffff\0"	\
-	"kernel_start=0x8000\0"			\
-	"kernel_load=0xa0000000\0"		\
-	"kernel_size=0x14000\0"			\
-	"mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;"	\
-	"mmc read 0x80100000 0x7000 0x800;"	\
-	"fsl_mc start mc 0x80000000 0x80100000\0"	\
-	"mcmemsize=0x70000000 \0"
-
+	"fdt_addr=0x64f00000\0"			\
+	"kernel_addr=0x1000000\0"		\
+	"kernel_addr_sd=0x8000\0"		\
+	"kernel_start=0x580100000\0"		\
+	"kernelheader_start=0x580800000\0"	\
+	"scriptaddr=0x80000000\0"		\
+	"scripthdraddr=0x80080000\0"		\
+	"fdtheader_addr_r=0x80100000\0"		\

include/configs/ls1088ardb.h line 299

Quoted 10 lines
include/configs/ls1088ardb.h +10 -0
+	"kernelheader_addr=0x800000\0"		\
+	"kernelheader_addr_r=0x80200000\0"	\
+	"kernel_addr_r=0x81000000\0"		\
+	"kernelheader_size=0x40000\0"		\
+	"fdt_addr_r=0x90000000\0"		\
+	"load_addr=0xa0000000\0"		\
+	"kernel_size=0x2800000\0"		\
+	"kernel_size_sd=0x14000\0"		\
+	MC_INIT_CMD				\
+	BOOTENV					\

What do you do with BOOTENV? This causes compiling error. Please verify. I tested this patch on top of you v6 SD patches.

Quoted 1 line
Quoted 1 line

Sorry, for not highlighting the dependency, this distro patch also depends upon the SCSI patch-set.

And SD boot depends upon the armv8-ls1088-CONFIG_SPI_SPANSON-to-defconfig.patch

Here is the order for application of these patch

git am 06-nov-17/0002-armv8-ls1088-Move-CONFIG_SPI_SPANSON-to-defconfig.patch
Applying: armv8: ls1088: Move CONFIG_SPI_SPANSON to defconfig

git am 06-nov-17/0003-armv8-lsch3-Add-imply-SCSI-for-ls1088.patch
Applying: armv8: lsch3: Add imply SCSI for ls1088

git am 06-nov-17/0004-armv8-ls1088-Enable-SATA-for-ls1088.patch
Applying: armv8: ls1088: Enable SATA for ls1088

git am 06-nov-17/0005-armv8-ls1088ardb-Add-SD-boot-support-for-ls1088.patch
Applying: armv8: ls1088ardb: Add SD boot support for ls1088

git am 06-nov-17/0006-armv8-ls1088aqds-Add-SD-boot-support-for-ls1088qds.patch
Applying: armv8: ls1088aqds: Add SD boot support for ls1088qds

git am 06-nov-17/0007-armv8-ls1088ardb-Add-distro-boot-support.patch
Applying: armv8: ls1088ardb: Add distro boot support

Regards
Ashish

York

#3 lore raw

PATCH v2 1/1 armv8: ls1088ardb: Add distro boot support

Quoted 3 lines · Ashish Kumar

Hello York,

Please see inline.

Please avoid using this "inline" style and follow the list style when you reply to any email.

Quoted 119 lines

-----Original Message-----
From: York Sun
Sent: Tuesday, November 07, 2017 2:11 AM
To: Ashish Kumar <[email protected]>; u-boot at lists.denx.de
Cc: Zhang Ying <[email protected]>
Subject: Re: [PATCH v2] armv8: ls1088ardb: Add distro boot support

Quoted 17 lines · Ashish Kumar

Distro boot support gives flexibility to run distro RFS like Ubuntu's being deployed from SD card or SATA drive. If it fails to detect external storage, fall back to qspi/sd boot.

Enable this by default in RDB's defconfig by selecting CONFIG_DISTRO_DEFAULTS

---

v2:
1. Fix typo in commit msg
2. Fix indentation
3. Squash patch-set to one
4. Remove USB distro option as USB config are
not supported in sd boot defconfig yet.

<snip>

Quoted 62 lines
(quoted diff) +0 -0

b/include/configs/ls1088ardb.h index eef9a07..e6bf2b8 100644

include/configs/ls1088ardb.h +20 -25
@@ -258,40 +258,102 @@
 
 /* Initial environment variables */
 #if defined(CONFIG_QSPI_BOOT)
-#undef CONFIG_EXTRA_ENV_SETTINGS
-#define CONFIG_EXTRA_ENV_SETTINGS		\
-	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
-	"loadaddr=0x90100000\0"			\
-	"kernel_addr=0x100000\0"		\
-	"ramdisk_addr=0x800000\0"		\
-	"ramdisk_size=0x2000000\0"		\
-	"fdt_high=0xa0000000\0"			\
-	"initrd_high=0xffffffffffffffff\0"	\
-	"kernel_start=0x1000000\0"		\
-	"kernel_load=0xa0000000\0"		\
-	"kernel_size=0x2800000\0"		\
+#define MC_INIT_CMD				\
 	"mcinitcmd=sf probe 0:0;sf read 0x80000000 0xA00000 0x100000;"	\
-	"sf read 0x80100000 0xE00000 0x100000;" \
-	"fsl_mc start mc 0x80000000 0x80100000\0"	\
-	"mcmemsize=0x70000000 \0"
+	"sf read 0x80100000 0xE00000 0x100000;"				\
+	"fsl_mc start mc 0x80000000 0x80100000\0"			\
+	"mcmemsize=0x70000000\0"
 #elif defined(CONFIG_SD_BOOT)
+#define MC_INIT_CMD				\
+	"mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;"		\
+	"mmc read 0x80100000 0x7000 0x800;"				\
+	"fsl_mc start mc 0x80000000 0x80100000\0"			\
+	"mcmemsize=0x70000000\0"
+#endif
+
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS		\
+	"BOARD=ls1088ardb\0"			\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
-	"loadaddr=0x90100000\0"			\
-	"kernel_addr=0x800\0"			\
 	"ramdisk_addr=0x800000\0"		\
 	"ramdisk_size=0x2000000\0"		\
 	"fdt_high=0xa0000000\0"			\
 	"initrd_high=0xffffffffffffffff\0"	\
-	"kernel_start=0x8000\0"			\
-	"kernel_load=0xa0000000\0"		\
-	"kernel_size=0x14000\0"			\
-	"mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;"	\
-	"mmc read 0x80100000 0x7000 0x800;"	\
-	"fsl_mc start mc 0x80000000 0x80100000\0"	\
-	"mcmemsize=0x70000000 \0"
-
+	"fdt_addr=0x64f00000\0"			\
+	"kernel_addr=0x1000000\0"		\
+	"kernel_addr_sd=0x8000\0"		\
+	"kernel_start=0x580100000\0"		\
+	"kernelheader_start=0x580800000\0"	\
+	"scriptaddr=0x80000000\0"		\
+	"scripthdraddr=0x80080000\0"		\
+	"fdtheader_addr_r=0x80100000\0"		\

include/configs/ls1088ardb.h line 299

Quoted 10 lines
include/configs/ls1088ardb.h +10 -0
+	"kernelheader_addr=0x800000\0"		\
+	"kernelheader_addr_r=0x80200000\0"	\
+	"kernel_addr_r=0x81000000\0"		\
+	"kernelheader_size=0x40000\0"		\
+	"fdt_addr_r=0x90000000\0"		\
+	"load_addr=0xa0000000\0"		\
+	"kernel_size=0x2800000\0"		\
+	"kernel_size_sd=0x14000\0"		\
+	MC_INIT_CMD				\
+	BOOTENV					\

What do you do with BOOTENV? This causes compiling error. Please verify. I tested this patch on top of you v6 SD patches.

Quoted 1 line
Quoted 1 line

Sorry, for not highlighting the dependency, this distro patch also depends upon the SCSI patch-set.

And SD boot depends upon the armv8-ls1088-CONFIG_SPI_SPANSON-to-defconfig.patch

Here is the order for application of these patch

git am 06-nov-17/0002-armv8-ls1088-Move-CONFIG_SPI_SPANSON-to-defconfig.patch
Applying: armv8: ls1088: Move CONFIG_SPI_SPANSON to defconfig

git am 06-nov-17/0003-armv8-lsch3-Add-imply-SCSI-for-ls1088.patch
Applying: armv8: lsch3: Add imply SCSI for ls1088

git am 06-nov-17/0004-armv8-ls1088-Enable-SATA-for-ls1088.patch
Applying: armv8: ls1088: Enable SATA for ls1088

Quoted 9 lines

git am 06-nov-17/0005-armv8-ls1088ardb-Add-SD-boot-support-for-ls1088.patch
Applying: armv8: ls1088ardb: Add SD boot support for ls1088

git am 06-nov-17/0006-armv8-ls1088aqds-Add-SD-boot-support-for-ls1088qds.patch
Applying: armv8: ls1088aqds: Add SD boot support for ls1088qds

git am 06-nov-17/0007-armv8-ls1088ardb-Add-distro-boot-support.patch
Applying: armv8: ls1088ardb: Add distro boot support

I will try again following your patch order. It would be helpful to list all dependency.

York

Applied
#4 lore raw

PATCH v2 1/1 armv8: ls1088ardb: Add distro boot support

In reply to Ashish Kumar
Quoted 9 lines · Ashish Kumar

Distro boot support gives flexibility to run distro RFS like Ubuntu's being deployed from SD card or SATA drive. If it fails
to detect external storage, fall back to qspi/sd boot.

Enable this by default in RDB's defconfig by selecting CONFIG_DISTRO_DEFAULTS

Quoted 8 lines

---

v2:
1. Fix typo in commit msg
2. Fix indentation
3. Squash patch-set to one
4. Remove USB distro option as USB config are
not supported in sd boot defconfig yet.

Applied to fsl-qoriq master. Thanks.

York