[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#783074: flash-kernel: improvements to uboot-generic bootscript



On 2015-05-03, Ian Campbell wrote:
> On Tue, 2015-04-21 at 09:12 -0700, Vagrant Cascadian wrote:
>> This patch adds a few improvements to the uboot-generic bootscript:
>> 
>> * Use kernel version in versioned files
>> * Include kernel version, device and partition in boot message
>> * Set the console in bootargs
>> * Set workaround for console value for some imx systems
>> 
>> The kernel versioning its also make it possible to use a kernel without
>> relying on the various vmlinuz, initrd, dtb smlinks being valid, or for
>> troubleshooting an alternate version.
>
> What do you think about wrapping the load in a "for kver in -${kvers '';
> do" and loading e.g. ${prefix}vmlinuz${kver}. IOW making it so that it
> will try the suffixed version first but fallback to the symlinks if that
> fails?

I like the idea, but the for loop implementation seems to ignore '', "",
' ' or " " in the loop... I'm not sure how to get it to respect an empty
value.


>> Including some or all of these could remove the need for several
>> board-specific boot scripts, and possibly allow a reasonable default
>> for unknown systems.
>> 
>> diff --git a/bootscript/bootscr.uboot-generic b/bootscript/bootscr.uboot-generic
>> index 7451112..e68c306 100644
>> --- a/bootscript/bootscr.uboot-generic
>> +++ b/bootscript/bootscr.uboot-generic
>> @@ -13,11 +13,21 @@
>>  #
>>  # The uboot must support the bootz and generic filesystem load commands.
>>  
>> +if test "${console}" = "ttymxc0" && test -n "${baudrate}"; then
>
> The changelog says "some imx systems", do you have a list I could drop
> in a comment or should I just say "#Workaround lack of console on
> someIMX systems"?

I can confirm that wandboard, cubox-i and hummingboard all default to
console=ttymxc0, and several other boards by grepping through u-boot's
include/configs. Some actually do "setenv bootargs
console=ttymxc0,${baudrate}" before their various boot commands.

If you prefer a more specific comment, maybe "Workaround lack of
baudrate included with console on various iMX systems (e.g. wandboard,
cubox-i, hummingboard)." An exhaustive list might prove more trouble
than it's worth. :)


>> +  setenv console "${console},${baudrate}"
>> +fi
>> +
>> +if test -n "${console}"; then
>> +  setenv bootargs "${bootargs} console=${console}"
>> +fi
>
> I suppose hush doesn't have sufficient power to check for an existing
> console= in bootargs?

Not that I'm aware of.


> My concern is that on devices with graphics capabilities it may be
> tricky to avoid the above sending everything to the serial.

Indeed; there is some forward-progress with this by using the
stdout/chosen feature, but I don't think that consistantly supported
everywhere yet.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


Reply to: