Re: [U-Boot] [PATCH] arm: imx: Switch Wandboard to use config_distro_bootcmd.h.

On Sat, Mar 28, 2015 at 02:15:38PM +0100, Karsten Merker wrote:
On Fri, Mar 27, 2015 at 06:24:43PM -0700, Vagrant Cascadian wrote:
This allows for more flexible and standardized boot across multiple platforms. Remove most redundant legacy boot environment.
Cc: Otavio Salvador otavio@ossystems.com.br Signed-off-by: Vagrant Cascadian vagrant@debian.org
include/configs/wandboard.h | 139 ++++++-------------------------------------- 1 file changed, 17 insertions(+), 122 deletions(-)
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
[...]
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "image=zImage\0" \ "console=ttymxc0\0" \
Hello,
regarding the boot environment standardization there is still the open topic of standardizing the console variable format for serial consoles - most platforms include the console baudrate in the console variable (e.g. "console=ttyS0,115200") while some others, in particular the i.MX6 platforms, do not. This means that distributions like Debian currently need to add special-case handling for i.MX6-based platforms in their boot scripts which goes against the idea of having one generic boot script for all platforms that use config_distro_bootcmd.h.
It would be nice if the i.MX6 platforms could - while adopting config_distro_bootcmd.h and thereby changing their default environment to a large extend - also change their console variable from console=ttymxc0 to console=ttymxc0,115200.
Yes please. And Karsten can you do a patch that updates the README to note that as an expectation? Thanks!

config_distro_bootcmd.h defines a common boot environment for multiple platforms. Document the format of the console environment variable to allow the use of generic boot scripts on all supported platforms.
Signed-off-by: Karsten Merker merker@debian.org --- doc/README.distro | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/doc/README.distro b/doc/README.distro index 0308a4c..3f7ee85 100644 --- a/doc/README.distro +++ b/doc/README.distro @@ -201,6 +201,15 @@ variables be set. Default values for these variables are often hard-coded into CONFIG_EXTRA_ENV_SETTINGS in the board's U-Boot configuration file, so that the user doesn't have to configure them.
+console: + + Mandatory. The default console device to be passed to the Linux kernel. + + The console device is specified in accordance with the guidelines + described in Documentation/serial-console.txt in the Linux kernel sources. + If the device is a serial port, the console variable must specify the + console baudrate in addition to the console device, e.g. "ttyS0,115200". + fdt_addr:
Mandatory for any system that provides the DTB in HW (e.g. ROM) and wishes

Hi,
On 29-03-15 17:55, Karsten Merker wrote:
config_distro_bootcmd.h defines a common boot environment for multiple platforms. Document the format of the console environment variable to allow the use of generic boot scripts on all supported platforms.
Signed-off-by: Karsten Merker merker@debian.org
Maybe add something that distros are not encouraged to use this ?
At least on Fedora we do not want to use it, as adding console=${console} to bootargs on systems with both video-output (e.g. hdmi out) and a serial port will cause boot messages to only be shown on the serial port as that is where the /dev/console then points.
Whereas when using the devicetree chosen/stdout-path property (which can be set either by u-boot or in the dts with the kernel), the kernel will use both /dev/tty0 (so the hdmi out) and the serial port pointed to by chosen/stdout as console, showing boot messages on both, and systemd will still automatically spawn a getty on the serial console.
Regards,
Hans
doc/README.distro | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/doc/README.distro b/doc/README.distro index 0308a4c..3f7ee85 100644 --- a/doc/README.distro +++ b/doc/README.distro @@ -201,6 +201,15 @@ variables be set. Default values for these variables are often hard-coded into CONFIG_EXTRA_ENV_SETTINGS in the board's U-Boot configuration file, so that the user doesn't have to configure them.
+console:
Mandatory. The default console device to be passed to the Linux kernel.
The console device is specified in accordance with the guidelines
described in Documentation/serial-console.txt in the Linux kernel sources.
If the device is a serial port, the console variable must specify the
console baudrate in addition to the console device, e.g. "ttyS0,115200".
fdt_addr:
Mandatory for any system that provides the DTB in HW (e.g. ROM) and wishes

Any new of this ? it can be merged ?
I have tested and successfully boot a fedora on a Wandboard Quad with this.
The improvement of the console variable management can be done with an other patch ?
Thank you for working on this.
-- XoD
2015-03-29 15:05 GMT+02:00 Tom Rini trini@konsulko.com:
On Sat, Mar 28, 2015 at 02:15:38PM +0100, Karsten Merker wrote:
On Fri, Mar 27, 2015 at 06:24:43PM -0700, Vagrant Cascadian wrote:
This allows for more flexible and standardized boot across multiple platforms. Remove most redundant legacy boot environment.
Cc: Otavio Salvador otavio@ossystems.com.br Signed-off-by: Vagrant Cascadian vagrant@debian.org
include/configs/wandboard.h | 139
++++++--------------------------------------
1 file changed, 17 insertions(+), 122 deletions(-)
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
[...]
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "image=zImage\0" \ "console=ttymxc0\0" \
Hello,
regarding the boot environment standardization there is still the open topic of standardizing the console variable format for serial consoles - most platforms include the console baudrate in the console variable (e.g. "console=ttyS0,115200") while some others, in particular the i.MX6 platforms, do not. This means that distributions like Debian currently need to add special-case handling for i.MX6-based platforms in their boot scripts which goes against the idea of having one generic boot script for all platforms that use config_distro_bootcmd.h.
It would be nice if the i.MX6 platforms could - while adopting config_distro_bootcmd.h and thereby changing their default environment to a large extend - also change their console variable from console=ttymxc0 to console=ttymxc0,115200.
Yes please. And Karsten can you do a patch that updates the README to note that as an expectation? Thanks!
-- Tom
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On 2015-05-19, XoD wrote:
Any new of this ? it can be merged ?
I think my submitted patch was a bit too invasive by removing most of the environment, and have reworked the patch to leave much of the environment:
https://anonscm.debian.org/cgit/collab-maint/u-boot.git/tree/debian/patches/...
I haven't yet reworked it for resubmission, but I'd be happy to do so.
I was hoping to see the wandboard SPL support added before reworking, as that will require a few minor changes to the config_distro_bootcmd patch as well:
https://patchwork.ozlabs.org/patch/471092/
I have tested and successfully boot a fedora on a Wandboard Quad with this.
The improvement of the console variable management can be done with an other patch ?
It would be nice if switching to config_distro_bootcmd.h was not dependent on sorting out the console variable switch... though I'd be fine with switching the default console to include the baudrate as well.
Thank you for working on this.
Thanks for testing!
live well, vagrant
2015-03-29 15:05 GMT+02:00 Tom Rini trini@konsulko.com:
On Sat, Mar 28, 2015 at 02:15:38PM +0100, Karsten Merker wrote:
On Fri, Mar 27, 2015 at 06:24:43PM -0700, Vagrant Cascadian wrote:
This allows for more flexible and standardized boot across multiple platforms. Remove most redundant legacy boot environment.
Cc: Otavio Salvador otavio@ossystems.com.br Signed-off-by: Vagrant Cascadian vagrant@debian.org
include/configs/wandboard.h | 139
++++++--------------------------------------
1 file changed, 17 insertions(+), 122 deletions(-)
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
[...]
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "image=zImage\0" \ "console=ttymxc0\0" \
Hello,
regarding the boot environment standardization there is still the open topic of standardizing the console variable format for serial consoles - most platforms include the console baudrate in the console variable (e.g. "console=ttyS0,115200") while some others, in particular the i.MX6 platforms, do not. This means that distributions like Debian currently need to add special-case handling for i.MX6-based platforms in their boot scripts which goes against the idea of having one generic boot script for all platforms that use config_distro_bootcmd.h.
It would be nice if the i.MX6 platforms could - while adopting config_distro_bootcmd.h and thereby changing their default environment to a large extend - also change their console variable from console=ttymxc0 to console=ttymxc0,115200.
Yes please. And Karsten can you do a patch that updates the README to note that as an expectation? Thanks!
-- Tom

Ok, thank you for your response.
I waiting SPL for wandboard too. I like to add Wandboard support in OpenELEC (and Lakka) with SPL (to not have separate img for Wandboard dual and Wandboard quad.)
XoD
2015-05-19 22:42 GMT+02:00 Vagrant Cascadian vagrant@debian.org:
On 2015-05-19, XoD wrote:
Any new of this ? it can be merged ?
I think my submitted patch was a bit too invasive by removing most of the environment, and have reworked the patch to leave much of the environment:
https://anonscm.debian.org/cgit/collab-maint/u-boot.git/tree/debian/patches/...
I haven't yet reworked it for resubmission, but I'd be happy to do so.
I was hoping to see the wandboard SPL support added before reworking, as that will require a few minor changes to the config_distro_bootcmd patch as well:
https://patchwork.ozlabs.org/patch/471092/
I have tested and successfully boot a fedora on a Wandboard Quad with
this.
The improvement of the console variable management can be done with an other patch ?
It would be nice if switching to config_distro_bootcmd.h was not dependent on sorting out the console variable switch... though I'd be fine with switching the default console to include the baudrate as well.
Thank you for working on this.
Thanks for testing!
live well, vagrant
2015-03-29 15:05 GMT+02:00 Tom Rini trini@konsulko.com:
On Sat, Mar 28, 2015 at 02:15:38PM +0100, Karsten Merker wrote:
On Fri, Mar 27, 2015 at 06:24:43PM -0700, Vagrant Cascadian wrote:
This allows for more flexible and standardized boot across multiple platforms. Remove most redundant legacy boot environment.
Cc: Otavio Salvador otavio@ossystems.com.br Signed-off-by: Vagrant Cascadian vagrant@debian.org
include/configs/wandboard.h | 139
++++++--------------------------------------
1 file changed, 17 insertions(+), 122 deletions(-)
diff --git a/include/configs/wandboard.h
b/include/configs/wandboard.h
[...]
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "image=zImage\0" \ "console=ttymxc0\0" \
Hello,
regarding the boot environment standardization there is still the open topic of standardizing the console variable format for serial consoles - most platforms include the console baudrate in the console variable (e.g. "console=ttyS0,115200") while some others, in particular the i.MX6 platforms, do not. This means that distributions like Debian currently need to add special-case handling for i.MX6-based platforms in their boot scripts which goes against the idea of having one generic boot script for all platforms that use config_distro_bootcmd.h.
It would be nice if the i.MX6 platforms could - while adopting config_distro_bootcmd.h and thereby changing their default environment to a large extend - also change their console variable from console=ttymxc0 to console=ttymxc0,115200.
Yes please. And Karsten can you do a patch that updates the README to note that as an expectation? Thanks!
-- Tom

Hello, I have now tested upstream uboot-imx with OpenELEC with SPL suppport for wandbard.
It's work great without your patch. but with your path, OpenELEC don't boot.
The default uboot config assume than kernel file name is zImage. But OpenELEC use a filename KERNEL. The actual version of OpenELEC use a uEnv.txt file with this line : zImage=/KERNEL bootfile=/KERNEL But this no longer work with your patch.
How I can configure uboot to open a file named KERNEL instead of zImage (at build time or at runtime) ?
Thank you.
2015-05-20 9:36 GMT+02:00 XoD xoddark@gmail.com:
Ok, thank you for your response.
I waiting SPL for wandboard too. I like to add Wandboard support in OpenELEC (and Lakka) with SPL (to not have separate img for Wandboard dual and Wandboard quad.)
XoD
2015-05-19 22:42 GMT+02:00 Vagrant Cascadian vagrant@debian.org:
On 2015-05-19, XoD wrote:
Any new of this ? it can be merged ?
I think my submitted patch was a bit too invasive by removing most of the environment, and have reworked the patch to leave much of the environment:
https://anonscm.debian.org/cgit/collab-maint/u-boot.git/tree/debian/patches/...
I haven't yet reworked it for resubmission, but I'd be happy to do so.
I was hoping to see the wandboard SPL support added before reworking, as that will require a few minor changes to the config_distro_bootcmd patch as well:
https://patchwork.ozlabs.org/patch/471092/
I have tested and successfully boot a fedora on a Wandboard Quad with
this.
The improvement of the console variable management can be done with an other patch ?
It would be nice if switching to config_distro_bootcmd.h was not dependent on sorting out the console variable switch... though I'd be fine with switching the default console to include the baudrate as well.
Thank you for working on this.
Thanks for testing!
live well, vagrant
2015-03-29 15:05 GMT+02:00 Tom Rini trini@konsulko.com:
On Sat, Mar 28, 2015 at 02:15:38PM +0100, Karsten Merker wrote:
On Fri, Mar 27, 2015 at 06:24:43PM -0700, Vagrant Cascadian wrote:
This allows for more flexible and standardized boot across multiple platforms. Remove most redundant legacy boot environment.
Cc: Otavio Salvador otavio@ossystems.com.br Signed-off-by: Vagrant Cascadian vagrant@debian.org
include/configs/wandboard.h | 139
++++++--------------------------------------
1 file changed, 17 insertions(+), 122 deletions(-)
diff --git a/include/configs/wandboard.h
b/include/configs/wandboard.h
[...]
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "image=zImage\0" \ "console=ttymxc0\0" \
Hello,
regarding the boot environment standardization there is still the open topic of standardizing the console variable format for serial consoles - most platforms include the console baudrate in the console variable (e.g. "console=ttyS0,115200") while some others, in particular the i.MX6 platforms, do not. This means that distributions like Debian currently need to add special-case handling for i.MX6-based platforms in their boot scripts which goes against the idea of having one generic boot script for all platforms that use config_distro_bootcmd.h.
It would be nice if the i.MX6 platforms could - while adopting config_distro_bootcmd.h and thereby changing their default environment to a large extend - also change their console variable from console=ttymxc0 to console=ttymxc0,115200.
Yes please. And Karsten can you do a patch that updates the README to note that as an expectation? Thanks!
-- Tom

Hi XoD,
On 06/26/2015 02:54 PM, XoD wrote:
Hello, I have now tested upstream uboot-imx with OpenELEC with SPL suppport for wandbard.
It's work great without your patch. but with your path, OpenELEC don't boot.
The default uboot config assume than kernel file name is zImage. But OpenELEC use a filename KERNEL. The actual version of OpenELEC use a uEnv.txt file with this line : zImage=/KERNEL bootfile=/KERNEL But this no longer work with your patch.
How I can configure uboot to open a file named KERNEL instead of zImage (at build time or at runtime) ?
config_distro_bootcmd uses a cool feature called "extlinux", which allows you to define a boot configuration without hacking in U-Boot source/configuration. Here's how it works:
1. U-Boot scans a list of boot devices (mmc, usb, pxe, dhcp) 2. When it find a bootable local storage (mmc, usb) it looks for the first bootable partition, or just first one if no partition was marked as bootable 3. U-Boot looks for extlinux.conf in "/" and "/boot". This file contains the actual boot configuration (kernel image, bootargs, etc) that will be executed on boot. Here's how a simple extlinux.conf looks like:
-----> cut <----- default linux
label linux kernel /boot/zImage devicetree /boot/mydevicetree.dtb append console=ttymxc1,115200 root=/dev/mmcblk0p1 rw -----> cut <-----
4. U-Boot boots the "default" configuration.
Hope this helps.
Regards, Nikolay

Ok, great, I use a little the file extlinux with Fedora on Wandboard.
Thank you for your detailed answer.
Le vendredi 26 juin 2015, Nikolay Dimitrov picmaster@mail.bg a écrit :
Hi XoD,
On 06/26/2015 02:54 PM, XoD wrote:
Hello, I have now tested upstream uboot-imx with OpenELEC with SPL suppport for wandbard.
It's work great without your patch. but with your path, OpenELEC don't boot.
The default uboot config assume than kernel file name is zImage. But OpenELEC use a filename KERNEL. The actual version of OpenELEC use a uEnv.txt file with this line : zImage=/KERNEL bootfile=/KERNEL But this no longer work with your patch.
How I can configure uboot to open a file named KERNEL instead of zImage (at build time or at runtime) ?
config_distro_bootcmd uses a cool feature called "extlinux", which allows you to define a boot configuration without hacking in U-Boot source/configuration. Here's how it works:
- U-Boot scans a list of boot devices (mmc, usb, pxe, dhcp)
- When it find a bootable local storage (mmc, usb) it looks for the
first bootable partition, or just first one if no partition was marked as bootable 3. U-Boot looks for extlinux.conf in "/" and "/boot". This file contains the actual boot configuration (kernel image, bootargs, etc) that will be executed on boot. Here's how a simple extlinux.conf looks like:
-----> cut <----- default linux
label linux kernel /boot/zImage devicetree /boot/mydevicetree.dtb append console=ttymxc1,115200 root=/dev/mmcblk0p1 rw -----> cut <-----
- U-Boot boots the "default" configuration.
Hope this helps.
Regards, Nikolay
participants (6)
-
Hans de Goede
-
Karsten Merker
-
Nikolay Dimitrov
-
Tom Rini
-
Vagrant Cascadian
-
XoD