On 2015-05-03, Ian Campbell wrote:
> On Tue, 2015-04-21 at 08:54 -0700, Vagrant Cascadian wrote:
>>    load ${device} ${partition} ${loadaddr} ${pathprefix}vmlinuz-${kvers} \
>> -  && load ${device} ${partition} ${fdtaddr} ${pathprefix}dtb-${kvers} \
>> +  && load ${device} ${partition} ${fdtaddr} 
>> ${pathprefix}dtbs-${kvers}/${fdtfile} \
>> +  || load ${device} ${partition} ${fdtaddr} ${pathprefix}dtb-${kvers} \
>
> Does the precedence of && vs || work out correctly if the file at
> ${pathprefix}dtbs-${kvers}/${fdtfile} isn't present?

It seems to work correctly in that it attempts to load the one dtb and
if that fails, loads another, and then continues to load the initrd (if
a dtb was successfully loaded)...


> Do you know how prevalent the hush shell is in practice? It has if,
> continue and exit syntax which we might use to make the script a bit
> more readable and less error prone by doing "if ! load something ; then
> echo ... ; continue ... ; fi".

I'm amenable to using more explicity if/then/else structures; I was just
keeping the patch consistant with the style already implemented.

It looks like CONFIG_SYS_HUSH_PARSER is defined in
include/config_distro_defaults.h, so I think that means at least all of
the platforms that implement config_distro_bootcmd should work.


> For the non-generic bootscr can we switch unconditionally to fdtfile on
> platforms where it always exists? That would simplify things I think and
> keep the complexity in the generic case only.

It is tempting, though it's been hard-coded to use /boot/dtb for so long
it seems like keeping backwards compatibility for a while might be good?


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to