Skip to contentSkip to conversation

sunxi: Fix arm64 fdtfile variable

PATCH New Andreas Färber 3 participants 5 messages Apr 14, 2017 – Apr 24, 2017 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: Fix arm64 fdtfile variable

Currently $fdtfile is constructed from CONFIG_DEFAULT_TREE, containing the filename. However on arm64 that file is located in an allwinner subdirectory.

To avoid the need for users/distros symlinking the .dtb files, prepend the vendor directory for ARM64.

This aligns Pine64 with other boards such as Raspberry Pi 3.

---
 include/configs/sunxi-common.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/configs/sunxi-common.h +7 -1
index 1d475b1..ad4012c 100644
@@ -476,11 +476,17 @@ extern int soft_i2c_gpio_scl;
 	CONSOLE_STDIN_SETTINGS \
 	CONSOLE_STDOUT_SETTINGS
 
+#ifdef CONFIG_ARM64
+#define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"
+#else
+#define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb"
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	CONSOLE_ENV_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
 	DFU_ALT_INFO_RAM \
-	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+	"fdtfile=" FDTFILE "\0" \
 	"console=ttyS0,115200\0" \
 	SUNXI_MTDIDS_DEFAULT \
 	SUNXI_MTDPARTS_DEFAULT \
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/1 sunxi: Fix arm64 fdtfile variable

Quoted 24 lines · Andreas Färber

Currently $fdtfile is constructed from CONFIG_DEFAULT_TREE, containing the filename. However on arm64 that file is located in an allwinner subdirectory.

To avoid the need for users/distros symlinking the .dtb files, prepend the vendor directory for ARM64.

This aligns Pine64 with other boards such as Raspberry Pi 3.

---
 include/configs/sunxi-common.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/configs/sunxi-common.h +2 -0
index 1d475b1..ad4012c 100644
@@ -476,11 +476,17 @@ extern int soft_i2c_gpio_scl;
        CONSOLE_STDIN_SETTINGS \
        CONSOLE_STDOUT_SETTINGS
 
+#ifdef CONFIG_ARM64
+#define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"

include/configs/sunxi-common.h extern int soft_i2c_gpio_scl; · line 489

Quoted 10 lines
include/configs/sunxi-common.h +5 -1
+#else
+#define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb"
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
        CONSOLE_ENV_SETTINGS \
        MEM_LAYOUT_ENV_SETTINGS \
        DFU_ALT_INFO_RAM \
-       "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+       "fdtfile=" FDTFILE "\0" \

__stringify(FDTFILE) ?

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#2 lore raw

PATCH 1/1 sunxi: Fix arm64 fdtfile variable

Am 18.04.2017 um 07:45 schrieb Jagan Teki:

Quoted 23 lines · Andreas Färber
Quoted 22 lines

Currently $fdtfile is constructed from CONFIG_DEFAULT_TREE, containing the filename. However on arm64 that file is located in an allwinner subdirectory.

To avoid the need for users/distros symlinking the .dtb files, prepend the vendor directory for ARM64.

This aligns Pine64 with other boards such as Raspberry Pi 3.

---
 include/configs/sunxi-common.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/configs/sunxi-common.h +0 -0
index 1d475b1..ad4012c 100644
@@ -476,11 +476,17 @@ extern int soft_i2c_gpio_scl;
        CONSOLE_STDIN_SETTINGS \
        CONSOLE_STDOUT_SETTINGS
 
Quoted 14 lines

include/configs/sunxi-common.h extern int soft_i2c_gpio_scl; · line 489

Quoted 12 lines
include/configs/sunxi-common.h +7 -1
+#ifdef CONFIG_ARM64
+#define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"
+#else
+#define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb"
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
        CONSOLE_ENV_SETTINGS \
        MEM_LAYOUT_ENV_SETTINGS \
        DFU_ALT_INFO_RAM \
-       "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+       "fdtfile=" FDTFILE "\0" \

__stringify(FDTFILE) ?

Why? You didn't do that before, and it worked fine for me on Pine64 and Orange Pi PC 2. Do you have a test case that breaks?

Thanks,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
#3 lore raw

PATCH 1/1 sunxi: Fix arm64 fdtfile variable

In reply to Andreas Färber
Quoted 10 lines · Andreas Färber

Currently $fdtfile is constructed from CONFIG_DEFAULT_TREE, containing the filename. However on arm64 that file is located in an allwinner subdirectory.

To avoid the need for users/distros symlinking the .dtb files, prepend the vendor directory for ARM64.

This aligns Pine64 with other boards such as Raspberry Pi 3.

Looks reasonable to me.

Alex

#4 lore raw

PATCH 1/1 sunxi: Fix arm64 fdtfile variable

Quoted 9 lines · Alexander Graf
Quoted 8 lines · Andreas Färber

Currently $fdtfile is constructed from CONFIG_DEFAULT_TREE, containing the filename. However on arm64 that file is located in an allwinner subdirectory.

To avoid the need for users/distros symlinking the .dtb files, prepend the vendor directory for ARM64.

Quoted 8 lines
Quoted 3 lines

This aligns Pine64 with other boards such as Raspberry Pi 3.

Looks reasonable to me.

Applied to u-boot-sunxi/master

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.