[U-Boot] [PATCH] pxe: automatically add console= to bootargs when not specified in append

Hans de Goede hdegoede at redhat.com
Fri Aug 1 10:35:39 CEST 2014


Hi,

On 08/01/2014 10:20 AM, Hans de Goede wrote:
> Hi,
> 
> On 08/01/2014 09:46 AM, Hans de Goede wrote:
>> From: Dennis Gilmore <dennis at ausil.us>
>>
>> if there is a console variable in the u-boot environment and not one on
>> the append line from syslinux config add what is in the environment to
>> the bootargs.
>>
>> This is necessary to allow distros to have a single extlinux/extlinux.conf
>> file which will work on multiple boards, even if these boards have different
>> consoles (e.g. ttyS0 vs ttyAMA0).
>>
>> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> 
> I asked Dennis for its Signed-off-by for this, and instead I got this:

s/its/his/ sorry.

>> NAK, I was planning to drop the patch entirely, while its useful in
>> some cases, it breaks things like plymouth working, as well it will
>> force anaconda installs to always be text over the serial port.
>> wandboard and cubox-i for instance boot happily without a console= line
>> and you get plymouth on the screen when video is initialised. having it
>> add the console line if u-boot has the console set to serial would be
>> okay. I think it needs some more thought and careful planning.
>>
>> Dennis
> 
> So lets drop this one for now.

So if we're not going to do this one we're going to need something else,
because without this sunxi is useless, as the last message the
user sees is "Starting kernel ..." and then nothing.

Sow how about allowing the use of u-boot environment variables in append,
so that extlinux.conf can have:

label Fedora-Minimal-armhfp-rawhide-20140731 (3.16.0-0.rc7.git1.1.fc22.armv7hl)
        kernel /vmlinuz-3.16.0-0.rc7.git1.1.fc22.armv7hl
        append ro root=UUID=a6446dcb-320d-421f-9b71-725b68e5a41b console=$console
        fdtdir /dtb-3.16.0-0.rc7.git1.1.fc22.armv7hl/
        initrd /initramfs-3.16.0-0.rc7.git1.1.fc22.armv7hl.img

And then put 2 entries in extlinux.conf one for booting with the console on
the framebuffer, and one for using the serial console ?  Even with systems
where we have video the user may not have the video hooked up and use the
serial console for initial setup.

Alternatively we could use something like this:

console=tty0 console=ttyS0,115200 that will give us boot messages on both
video out and ttyS0, dunno what firstboot will do in this case.

Anyways I think we need to separate this discussion in 2 things:

1) Mechanism: u-boot should offer a way for extlinux.conf to find out the right
device + baudrate for the serial console. Traditionally this has been done
through the console environment variable. If we teach u-boot's extlinux support
to interpret $foo variables in the append string, then that mechanism can be
used for extlinux.conf booting too, and I think this is the best way to do
this.

2) Policy: Once we have 1). the question becomes how to use it in generic ARM
distros like Fedora, that discussion is probably best held on the Fedora ARM
list and not here.

Regards,

Hans


More information about the U-Boot mailing list