Re: Fwd: Shouldn't boot_board be called from boot instead of init?

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

 



Hello,

2016-08-18 8:31 GMT+02:00 Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>:
> Hi,
>
> On Tue, Aug 16, 2016 at 10:42:32AM +0200, Guillermo Rodriguez Garcia wrote:
>> Hello all,
>>
>> Currently, for defaultenv v1, the /env/bin/boot_board script is called
>> from /env/bin/init.
>>
>> However this means boot_board will not be run if booting manually (by
>> running 'boot' from the barebox console).
>>
>> Shouldn't this script be called from /env/bin/boot instead? If a board
>> needs any specific stuff to be done when booting, this probably
>> applies both when autobooting and when booting manually (otherwise,
>> anything that only applies only when autobooting could also be done
>> from init_board instead of boot_board).
>
> The only boot_board script we have is
> arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board. Here a menu is
> built which I think makes sense at that stage and not at init_board.

The thing is, if boot_board is called from init, then it will not be
called if autoboot is interrupted and you later boot manually with the
boot command.

We actually use boot_board to do some board-specific processing that
should be done both when autobooting and when booting "manually". The
way it is right now, this is not possible.

With the change I am proposing, boards such as at91sam9m10g45ek could
still do what they are doing now (just move the code to init_board
instead). Or, with some tweaking, perhaps it could even be left in
boot_board (with boot_board being called from boot).

Is this specific board the only objection to the change I am
proposing? If so I could try to come up with a patch which accomodates
this specific case. Or are there other, more general objections?

>
> However, I would be glad to get rid of defaultenv-1 rather sooner than
> later.

Uhm. I actually like defaultenv-1 better than defaultenv-2. Why not
keep both? Everyone can then make their choice :)

Regards,

Guillermo Rodriguez Garcia
guille.rodriguez@xxxxxxxxx

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux