Skip to contentSkip to conversation

wandboard: Set fdt based on board_rev and board_name

PATCH New Otavio Salvador 5 participants 15 messages Jul 10, 2017 – Jul 11, 2017 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

From: Fabio Berton <[email protected]>

New kernel linux-wandboard version 4.1.15_1.1.0_ga changed device tree name adding board revision on file name. The new names are:

- imx6dl-wandboard-revb1
- imx6dl-wandboard-revc1
- imx6q-wandboard-revb1
- imx6q-wandboard-revc1

This fixes the Wandboard C1 revision device tree files.

---

 include/configs/wandboard.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/wandboard.h +2 -2
index 2a6c6fbb70..4291be4068 100644
@@ -105,9 +105,9 @@
 		"fi\0" \
 	"findfdt="\
 		"if test $board_name = C1 && test $board_rev = MX6Q ; then " \
-			"setenv fdtfile imx6q-wandboard.dtb; fi; " \
+			"setenv fdtfile imx6q-wandboard-revc1.dtb; fi; " \
 		"if test $board_name = C1 && test $board_rev = MX6DL ; then " \
-			"setenv fdtfile imx6dl-wandboard.dtb; fi; " \
+			"setenv fdtfile imx6dl-wandboard-revc1.dtb; fi; " \
 		"if test $board_name = B1 && test $board_rev = MX6Q ; then " \
 			"setenv fdtfile imx6q-wandboard-revb1.dtb; fi; " \
 		"if test $board_name = B1 && test $board_rev = MX6DL ; then " \
Signature · 1 line
2.13.2
#1 lore raw

PATCH 2/4 wandboard: Use PARTUUID to specify the rootfs location

From: Fabio Berton <[email protected]>

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

---

 include/configs/wandboard.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/wandboard.h +2 -0
index 4291be4068..88d387f025 100644
@@ -89,6 +89,7 @@
 	"fdt_addr=0x18000000\0" \
 	"ip_dyn=yes\0" \
 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
+	"finduuid=part uuid mmc 0:1 uuid\0" \
 	"update_sd_firmware_filename=u-boot.imx\0" \
 	"update_sd_firmware=" \
 		"if test ${ip_dyn} = yes; then " \
@@ -130,6 +131,7 @@
 
 #define CONFIG_BOOTCOMMAND \
 	   "run findfdt; " \
+	   "run finduuid; " \
 	   "run distro_bootcmd"
 
 #include <config_distro_bootcmd.h>
Signature · 1 line
2.13.2
#3 lore raw

PATCH 3/4 mx6cuboxi: Use PARTUUID to specify the rootfs location

In reply to Otavio Salvador

From: Fabio Berton <[email protected]>

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

---

 include/configs/mx6cuboxi.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/mx6cuboxi.h +2 -0
index bc22f56d1d..35a9ef6df7 100644
@@ -84,6 +84,7 @@
 	"console=" CONSOLE_DEV ",115200\0" \
 	"bootm_size=0x10000000\0" \
 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
+	"finduuid=part uuid mmc 0:1 uuid\0" \
 	"update_sd_firmware=" \
 		"if test ${ip_dyn} = yes; then " \
 			"setenv get_cmd dhcp; " \
@@ -112,6 +113,7 @@
 
 #define CONFIG_BOOTCOMMAND \
 	"run findfdt; " \
+	"run finduuid; " \
 	"run distro_bootcmd"
 
 #define BOOT_TARGET_DEVICES(func) \
Signature · 1 line
2.13.2
#5 lore raw

PATCH 4/4 embestmx6boards: Use PARTUUID to specify the rootfs location

In reply to Otavio Salvador

From: Fabio Berton <[email protected]>

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

Also add CONFIG_BOOTCOMMAND to run finduuid function and distro_bootcmd.

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

---

 include/configs/embestmx6boards.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/configs/embestmx6boards.h +5 -1
index 749a9e3bc1..61f0c95d55 100644
@@ -15,7 +15,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART2_BASE
 #define CONSOLE_DEV		"ttymxc1"
-#define CONFIG_MMCROOT			"/dev/mmcblk1p2"
 
 #define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
 
@@ -140,6 +139,10 @@
 	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
+#define CONFIG_BOOTCOMMAND \
+	"run finduuid; " \
+	"run distro_bootcmd"
+
 #include <config_distro_bootcmd.h>
 
 #define CONSOLE_STDIN_SETTINGS \
@@ -157,6 +160,7 @@
 	CONSOLE_ENV_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
 	"fdtfile=" CONFIG_FDTFILE "\0" \
+	"finduuid=part uuid mmc 0:1 uuid\0" \
 	BOOTENV
 
 #endif                         /* __RIOTBOARD_CONFIG_H */
Signature · 1 line
2.13.2
#7 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

In reply to Otavio Salvador
Quoted 24 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

New kernel linux-wandboard version 4.1.15_1.1.0_ga changed device tree name adding board revision on file name. The new names are:

- imx6dl-wandboard-revb1
- imx6dl-wandboard-revc1
- imx6q-wandboard-revb1
- imx6q-wandboard-revc1

This fixes the Wandboard C1 revision device tree files.

---

 include/configs/wandboard.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/wandboard.h +0 -0
index 2a6c6fbb70..4291be4068 100644

include/configs/wandboard.h line 108

Quoted 5 lines
include/configs/wandboard.h +1 -1
@@ -105,9 +105,9 @@
                "fi\0" \
        "findfdt="\
                "if test $board_name = C1 && test $board_rev = MX6Q ; then " \
-                       "setenv fdtfile imx6q-wandboard.dtb; fi; " \
+                       "setenv fdtfile imx6q-wandboard-revc1.dtb; fi; " \

This breaks the usage of mainline kernel as there is no -revc1 suffix in the wandboard dtb files there.

linux-wandboard needs to rename the dts files like mainline does:

imx6q-wandboard.dtb (for rev C1)
imx6q-wandboard-revb1.dtb
imx6dl-wandboard.dtb (for rev C1)
imx6dl-wandboard-revb1.dtb

If they can't rename their dts, then they would need to carry this patch on their own U-Boot tree.

#8 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

Quoted 37 lines · Fabio Estevam
Quoted 24 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

New kernel linux-wandboard version 4.1.15_1.1.0_ga changed device tree name adding board revision on file name. The new names are:

- imx6dl-wandboard-revb1
- imx6dl-wandboard-revc1
- imx6q-wandboard-revb1
- imx6q-wandboard-revc1

This fixes the Wandboard C1 revision device tree files.

---

 include/configs/wandboard.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/wandboard.h +0 -0
index 2a6c6fbb70..4291be4068 100644

include/configs/wandboard.h line 108

Quoted 5 lines
include/configs/wandboard.h +1 -1
@@ -105,9 +105,9 @@
                "fi\0" \
        "findfdt="\
                "if test $board_name = C1 && test $board_rev = MX6Q ; then " \
-                       "setenv fdtfile imx6q-wandboard.dtb; fi; " \
+                       "setenv fdtfile imx6q-wandboard-revc1.dtb; fi; " \

This breaks the usage of mainline kernel as there is no -revc1 suffix in the wandboard dtb files there.

linux-wandboard needs to rename the dts files like mainline does:

Quoted 7 lines

imx6q-wandboard.dtb (for rev C1)
imx6q-wandboard-revb1.dtb
imx6dl-wandboard.dtb (for rev C1)
imx6dl-wandboard-revb1.dtb

If they can't rename their dts, then they would need to carry this patch on their own U-Boot tree.

No problem; I am sending it here so people can look and if there is interest possibly help improving Wandboard kernel. We carry this on u-boot-fslc fork so it is fine for me.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#9 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

Quoted 43 lines · Otavio Salvador
Quoted 42 lines · Fabio Estevam
Quoted 24 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

New kernel linux-wandboard version 4.1.15_1.1.0_ga changed device tree name adding board revision on file name. The new names are:

- imx6dl-wandboard-revb1
- imx6dl-wandboard-revc1
- imx6q-wandboard-revb1
- imx6q-wandboard-revc1

This fixes the Wandboard C1 revision device tree files.

---

 include/configs/wandboard.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/wandboard.h +0 -0
index 2a6c6fbb70..4291be4068 100644

include/configs/wandboard.h line 108

Quoted 5 lines
include/configs/wandboard.h +1 -1
@@ -105,9 +105,9 @@
                "fi\0" \
        "findfdt="\
                "if test $board_name = C1 && test $board_rev = MX6Q ; then " \
-                       "setenv fdtfile imx6q-wandboard.dtb; fi; " \
+                       "setenv fdtfile imx6q-wandboard-revc1.dtb; fi; " \

This breaks the usage of mainline kernel as there is no -revc1 suffix in the wandboard dtb files there.

linux-wandboard needs to rename the dts files like mainline does:

imx6q-wandboard.dtb (for rev C1)
imx6q-wandboard-revb1.dtb
imx6dl-wandboard.dtb (for rev C1)
imx6dl-wandboard-revb1.dtb

Quoted 6 lines
Quoted 2 lines

If they can't rename their dts, then they would need to carry this patch on their own U-Boot tree.

No problem; I am sending it here so people can look and if there is interest possibly help improving Wandboard kernel. We carry this on u-boot-fslc fork so it is fine for me.

How do you guys want to do the revd1'?

imx6<>-wandboard-revd1.dtb ?

https://github.com/wandboard-org/linux/commit/e093a1186879eef78d91f22f1e47089565bde8e9

(let's make sure we don't rename the dtb like we did in the revb1 -> revc1 era, that was shortsighted mess)

Regards,

Signature · 2 lines
Robert Nelson
https://rcn-ee.com/
#2 lore raw

PATCH 2/4 wandboard: Use PARTUUID to specify the rootfs location

In reply to Otavio Salvador
Quoted 9 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

Quoted 6 lines

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

#4 lore raw

PATCH 3/4 mx6cuboxi: Use PARTUUID to specify the rootfs location

In reply to Otavio Salvador
Quoted 9 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

Quoted 6 lines

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

#6 lore raw

PATCH 4/4 embestmx6boards: Use PARTUUID to specify the rootfs location

In reply to Otavio Salvador
Quoted 9 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs location.

Quoted 8 lines

Also add CONFIG_BOOTCOMMAND to run finduuid function and distro_bootcmd.

This change was made based on U-Boot commit:

- ca4f338e2efece5196eb2178e5f7d07be828da6e

#11 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam
Quoted 4 lines · Robert Nelson

How do you guys want to do the revd1'?

imx6<>-wandboard-revd1.dtb ?

Quoted 7 lines
Quoted 1 line

https://github.com/wandboard-org/linux/commit/e093a1186879eef78d91f22f1e47089565bde8e9

Looking at this dts it seems we only need to add a imx6qp variant.

The other revd1 changes do not affect mainline as far as I can see.

I don't have access to a imx6qp wandboard myself to mainline the dts.

They added a real pmic, to the board: ;)

https://github.com/wandboard-org/linux/commit/e093a1186879eef78d91f22f1e47089565bde8e9#diff-7ea50fb49a19acc65fa0f48cd855a153R328

I've recently picked up the quad/quadplus, but been to busy to test u-boot/kernel on it yet..

Regards,

Signature · 2 lines
Robert Nelson
https://rcn-ee.com/
#12 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

In reply to Otavio Salvador

Hi Otavio, Fabio,

Quoted 26 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

New kernel linux-wandboard version 4.1.15_1.1.0_ga changed device tree name adding board revision on file name. The new names are:

- imx6dl-wandboard-revb1
- imx6dl-wandboard-revc1
- imx6q-wandboard-revb1
- imx6q-wandboard-revc1

This fixes the Wandboard C1 revision device tree files.

---

 include/configs/wandboard.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/wandboard.h +0 -0
index 2a6c6fbb70..4291be4068 100644
@@ -105,9 +105,9 @@
 		"fi\0" \

include/configs/wandboard.h line 113

Quoted 10 lines
include/configs/wandboard.h +2 -2
 	"findfdt="\
 		"if test $board_name = C1 && test $board_rev = MX6Q ; then " \
-			"setenv fdtfile imx6q-wandboard.dtb; fi; " \
+			"setenv fdtfile imx6q-wandboard-revc1.dtb; fi; " \
 		"if test $board_name = C1 && test $board_rev = MX6DL ; then " \
-			"setenv fdtfile imx6dl-wandboard.dtb; fi; " \
+			"setenv fdtfile imx6dl-wandboard-revc1.dtb; fi; " \
 		"if test $board_name = B1 && test $board_rev = MX6Q ; then " \
 			"setenv fdtfile imx6q-wandboard-revb1.dtb; fi; " \
 		"if test $board_name = B1 && test $board_rev = MX6DL ; then " \

Fine with me - I will push the series to -next.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#13 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

Hi Stefano,

Quoted 1 line · Stefano Babic

Fine with me - I will push the series to -next.

Please do not apply this one 1/4 as it will break the usage of U-Boot with mainline kernel.

The other three patches are OK.

Thanks

#14 lore raw

PATCH 1/4 wandboard: Set fdt based on board_rev and board_name

Quoted 8 lines · Fabio Estevam

Hi Stefano,

Quoted 1 line · Stefano Babic

Fine with me - I will push the series to -next.

Please do not apply this one 1/4 as it will break the usage of U-Boot with mainline kernel.

imx6dl-wandboard.dts is already for C1. Thanks for pointing this !

Quoted 2 lines

The other three patches are OK.

Ok, they will be merged.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================