Re: [U-Boot] [U-Boot,v2] odroid-c2: Enable distro boot

Hi,
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
Hello Andreas,
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
This breaks package flash-kernel in Debian.
Then your package may also have problems with the Raspberry Pi 3 and further arm64 boards. For sunXi I have a pending patch to fix it. If others are not yet doing it, consider it a bug and file patches please.
Regards, Andreas

On 04/22/2017 03:10 PM, Andreas Färber wrote:
Hi,
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
Hello Andreas,
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
I am aware that in the Linux Kernel vendor subdirectories are used for arm64 dtbs.
I was questioning about U-Boot. I could not find any usage of subdirectories for other arm64 boards:
hikey_defconfig: fdtfile=hi6220-hikey.dtb dragonboard410c_defconfig: fdtfile=apq8016-sbc.dtb
but
odroid-c2_defconfig: fdtfile=amlogic/meson-gxbb-odroidc2.dtb
Best regards
Heinrich Schuchardt

Am 22.04.2017 um 16:19 schrieb Heinrich Schuchardt:
On 04/22/2017 03:10 PM, Andreas Färber wrote:
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
I am aware that in the Linux Kernel vendor subdirectories are used for arm64 dtbs.
And therefore that is the expected installation location of the .dtb files shipped with the kernel. If your distro wants to differ, you are free to compensate with symlinks - which is what has been forced onto us with the old situation.
I was questioning about U-Boot. I could not find any usage of subdirectories for other arm64 boards:
hikey_defconfig: fdtfile=hi6220-hikey.dtb dragonboard410c_defconfig: fdtfile=apq8016-sbc.dtb
but
odroid-c2_defconfig: fdtfile=amlogic/meson-gxbb-odroidc2.dtb
I mentioned RPi3:
board/raspberrypi/rpi/rpi.c:#define DTB_DIR "broadcom/"
Like I said, patches welcome. HiKey and Dragonboard410c not yet running an official JeOS image (cf. my BUD17 talk) may be one reason we haven't bothered yet. Also it wasn't clear to me what Tom wanted exactly based on his reply, so I never followed up. For sunxi, search the list for "fdtfile" in the subject. Need to do some more shopping, so can't help you search right now.
Regards, Andreas

On 04/22/2017 05:47 PM, Andreas Färber wrote:
Am 22.04.2017 um 16:19 schrieb Heinrich Schuchardt:
On 04/22/2017 03:10 PM, Andreas Färber wrote:
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
I am aware that in the Linux Kernel vendor subdirectories are used for arm64 dtbs.
And therefore that is the expected installation location of the .dtb files shipped with the kernel. If your distro wants to differ, you are free to compensate with symlinks - which is what has been forced onto us with the old situation.
I was questioning about U-Boot. I could not find any usage of subdirectories for other arm64 boards:
hikey_defconfig: fdtfile=hi6220-hikey.dtb dragonboard410c_defconfig: fdtfile=apq8016-sbc.dtb
but
odroid-c2_defconfig: fdtfile=amlogic/meson-gxbb-odroidc2.dtb
I mentioned RPi3:
board/raspberrypi/rpi/rpi.c:#define DTB_DIR "broadcom/"
Like I said, patches welcome. HiKey and Dragonboard410c not yet running an official JeOS image (cf. my BUD17 talk) may be one reason we haven't bothered yet. Also it wasn't clear to me what Tom wanted exactly based on his reply, so I never followed up. For sunxi, search the list for "fdtfile" in the subject. Need to do some more shopping, so can't help you search right now.
I am not on JeOS. I referred to Debian.
This the result for sunxi: pine64_plus_defconfig: fdtfile=sun50i-a64-pine6-plus.dtb
According doc/README.pxe ftdfile was never meant to contain a path. If you want a path this should be defined as ftddir.
So Odroid C2 is buggy and we should clean up the fdtfile variable.
Best regards
Heinrich Schuchardt
Regards, Andreas

Am 22.04.2017 um 20:32 schrieb Heinrich Schuchardt:
On 04/22/2017 05:47 PM, Andreas Färber wrote:
Am 22.04.2017 um 16:19 schrieb Heinrich Schuchardt:
On 04/22/2017 03:10 PM, Andreas Färber wrote:
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
I am aware that in the Linux Kernel vendor subdirectories are used for arm64 dtbs.
And therefore that is the expected installation location of the .dtb files shipped with the kernel. If your distro wants to differ, you are free to compensate with symlinks - which is what has been forced onto us with the old situation.
I was questioning about U-Boot. I could not find any usage of subdirectories for other arm64 boards:
hikey_defconfig: fdtfile=hi6220-hikey.dtb dragonboard410c_defconfig: fdtfile=apq8016-sbc.dtb
but
odroid-c2_defconfig: fdtfile=amlogic/meson-gxbb-odroidc2.dtb
I mentioned RPi3:
board/raspberrypi/rpi/rpi.c:#define DTB_DIR "broadcom/"
Like I said, patches welcome. HiKey and Dragonboard410c not yet running an official JeOS image (cf. my BUD17 talk) may be one reason we haven't bothered yet. Also it wasn't clear to me what Tom wanted exactly based on his reply, so I never followed up. For sunxi, search the list for "fdtfile" in the subject. Need to do some more shopping, so can't help you search right now.
I am not on JeOS. I referred to Debian.
This the result for sunxi: pine64_plus_defconfig: fdtfile=sun50i-a64-pine6-plus.dtb
According doc/README.pxe ftdfile was never meant to contain a path. If you want a path this should be defined as ftddir.
http://git.denx.de/?p=u-boot.git;a=blob;f=include/config_distro_bootcmd.h;h=...
does not have a single hit for fdtdir, so that is no solution.
Regards, Andreas
So Odroid C2 is buggy and we should clean up the fdtfile variable.
Best regards
Heinrich Schuchardt
Regards, Andreas

On 04/22/2017 03:10 PM, Andreas Färber wrote:
Hi,
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
Hello Andreas,
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
The following mail by Tom Rini just mentions the the file name should match between Linux and U-Boot but does not ask for a vendor subdirectory hardcoded in fdtfile: https://lists.denx.de/pipermail/u-boot/2016-April/251709.html
And the dragonboard ended up with fdtfile=apq8016-sbc.dtb without vendor directory.
Could you, please, refer me to the mail with the decision that you mentioned.
Regards
Heinrich Schuchardt
This breaks package flash-kernel in Debian.
Then your package may also have problems with the Raspberry Pi 3 and further arm64 boards. For sunXi I have a pending patch to fix it. If others are not yet doing it, consider it a bug and file patches please.
Regards, Andreas

Am 22.04.2017 um 16:51 schrieb Heinrich Schuchardt:
On 04/22/2017 03:10 PM, Andreas Färber wrote:
Hi,
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
Hello Andreas,
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
The following mail by Tom Rini just mentions the the file name should match between Linux and U-Boot but does not ask for a vendor subdirectory hardcoded in fdtfile: https://lists.denx.de/pipermail/u-boot/2016-April/251709.html
And the dragonboard ended up with fdtfile=apq8016-sbc.dtb without vendor directory.
Could you, please, refer me to the mail with the decision that you mentioned.
Quoting "Re: [U-Boot] [PATCH 4/6] efi_loader: Improve .dtb search for arm64" from Jul 12 2016 20:05: "Please re-work the series around this idea."
Regards, Andreas

Am 23.04.2017 um 12:41 schrieb Andreas Färber:
Am 22.04.2017 um 16:51 schrieb Heinrich Schuchardt:
On 04/22/2017 03:10 PM, Andreas Färber wrote:
Hi,
Am 22.04.2017 um 14:59 schrieb Heinrich Schuchardt:
On 01/15/2017 07:52 PM, Andreas Färber wrote:
Use the generic "distro" boot framework to enable automatic DHCP boot.
The fdt and kernel addresses are adopted from downstream; ramdisk and scriptaddr addresses were chosen arbitrarily.
Signed-off-by: Andreas Färber afaerber@suse.de
...
diff --git a/include/configs/odroid-c2.h b/include/configs/odroid-c2.h index 1d5b3d5..bf7e1af 100644 --- a/include/configs/odroid-c2.h +++ b/include/configs/odroid-c2.h @@ -12,6 +12,8 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxbb-odroidc2.dtb\0"
Hello Andreas,
do you remember why you chose to put meson-gxbb-odroidc2.dtb into subdirectory amlogic?
I chose that directory name when I added GXBaby support to the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch...
Note that we had a discussion about this a while ago when I sent patches to amend the distro framework's dtb search paths, and Tom's decision was to instead hardcode the vendor dirs inside $fdtfile.
The following mail by Tom Rini just mentions the the file name should match between Linux and U-Boot but does not ask for a vendor subdirectory hardcoded in fdtfile: https://lists.denx.de/pipermail/u-boot/2016-April/251709.html
And the dragonboard ended up with fdtfile=apq8016-sbc.dtb without vendor directory.
Could you, please, refer me to the mail with the decision that you mentioned.
Quoting "Re: [U-Boot] [PATCH 4/6] efi_loader: Improve .dtb search for arm64" from Jul 12 2016 20:05: "Please re-work the series around this idea."
... and as documented there I even brought up the point that not all distros might stick to that structure. Tom considered that unlikely. ;)
Regards, Andreas
participants (2)
-
Andreas Färber
-
Heinrich Schuchardt