[SLOF] [PATCH] qemu-bootlist: Take the "-boot strict=off" setting properly into account

Thomas Huth thuth at redhat.com
Tue Feb 28 23:15:56 AEDT 2017


SLOF currently completely ignores the "-boot strict=off" setting from
QEMU as soon as the user specified one of the devices with a "bootindex"
parameter. We should continue booting from other devices if strict
booting is disabled.

Signed-off-by: Thomas Huth <thuth at redhat.com>
---
 board-qemu/slof/qemu-bootlist.fs | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/board-qemu/slof/qemu-bootlist.fs b/board-qemu/slof/qemu-bootlist.fs
index 4778e16..fe04b86 100644
--- a/board-qemu/slof/qemu-bootlist.fs
+++ b/board-qemu/slof/qemu-bootlist.fs
@@ -28,12 +28,19 @@ defer add-boot-device
 : qemu-read-bootlist ( -- )
    \ See if QEMU has set exact boot device list
    " qemu,boot-list" get-chosen IF
-        s" boot-device" $setenv
-        EXIT
+      1-        \ Ignore the trailing NUL character
+      2dup set-boot-device
+      \ strict boot order is enabled if the last word in qemu,boot-list
+      \ is "HALT". In that case, do not add other boot devices.
+      dup 4 > IF
+         + 4 - 4 s" HALT" str= IF EXIT THEN
+      ELSE
+         2drop
+      THEN
+   ELSE
+      0 0 set-boot-device
    THEN
 
-   0 0 set-boot-device
-
    " qemu,boot-device" get-chosen not IF
       \ No boot list set from qemu, so check nvram
       " boot-device" evaluate swap drop 0= IF
-- 
1.8.3.1



More information about the SLOF mailing list