[SLOF] [PATCH] boot: stop booting when we encounter HALT

Alexey Kardashevskiy aik at ozlabs.ru
Mon Oct 26 15:20:05 AEDT 2015


On 10/26/2015 03:05 PM, Nikunj A Dadhania wrote:
> Alexey Kardashevskiy <aik at ozlabs.ru> writes:
>
>> On 10/14/2015 10:25 PM, Nikunj A Dadhania wrote:
>>> QEMU when started with "-boot strict=on", appends "HALT" at the end of
>>> the bootlist. Handle this in the boot order.
>>
>>
>> Without an additional comment, handling looks like ignoring which is ok but
>> why exactly? We stop after the end of the bootlist anyway?
>
> Without this patch SLOF tries to boot from device named "HALT" :-)

Sure.

> It fails and with error saying failed booting from device HALT, which is
> confusing.


QEMU's c8a6ae8bb9547 "add a boot option to do strict boot" says:
===
Seabios already added a new device type to halt booting.
Qemu can add "HALT" at the end of bootindex string, then
seabios will halt booting after trying to boot from all
selected devices.
===

So seabios works different with and without this "HALT" - it stops booting 
or continues trying other boot targets. But you just ignore this. This part 
confuses me.



>
>>
>>
>>>
>>> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
>>> ---
>>>    slof/fs/boot.fs | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/slof/fs/boot.fs b/slof/fs/boot.fs
>>> index a0fe29a..e0b6281 100644
>>> --- a/slof/fs/boot.fs
>>> +++ b/slof/fs/boot.fs
>>> @@ -181,6 +181,7 @@ defer go ( -- )
>>>          \ with watchdog timeout.
>>>          4ec set-watchdog
>>>       THEN
>>> +   2dup " HALT" str= IF 2drop 0 EXIT THEN
>>>       my-self >r current-node @ >r         \ Save my-self
>>>       ." Trying to load: " $bootargs type ."  from: " 2dup type ."  ... "
>>>       2dup open-dev dup IF
>>>
>>
>>
>> --
>> Alexey
>


-- 
Alexey


More information about the SLOF mailing list