aboutsummaryrefslogtreecommitdiff
path: root/board-qemu/slof/qemu-bootlist.fs
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-12-03 15:02:36 +1100
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-03-22 15:22:00 +0100
commit39426bad550f340dcf2b544ae23f465fbbbc42f5 (patch)
tree1974f16adec8b1322b4adeaa65783780a5ebeb25 /board-qemu/slof/qemu-bootlist.fs
parentcf69a59a3edefc3bea57cceea2cbedd25c7b680d (diff)
downloadSLOF-39426bad550f340dcf2b544ae23f465fbbbc42f5.zip
SLOF-39426bad550f340dcf2b544ae23f465fbbbc42f5.tar.gz
SLOF-39426bad550f340dcf2b544ae23f465fbbbc42f5.tar.bz2
Initial qemu/KVM board support
Added a new board for SLOF running on KVM/qemu. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'board-qemu/slof/qemu-bootlist.fs')
-rw-r--r--board-qemu/slof/qemu-bootlist.fs38
1 files changed, 38 insertions, 0 deletions
diff --git a/board-qemu/slof/qemu-bootlist.fs b/board-qemu/slof/qemu-bootlist.fs
new file mode 100644
index 0000000..6b52b97
--- /dev/null
+++ b/board-qemu/slof/qemu-bootlist.fs
@@ -0,0 +1,38 @@
+\ *****************************************************************************
+\ * Copyright (c) 2011 IBM Corporation
+\ * All rights reserved.
+\ * This program and the accompanying materials
+\ * are made available under the terms of the BSD License
+\ * which accompanies this distribution, and is available at
+\ * http://www.opensource.org/licenses/bsd-license.php
+\ *
+\ * Contributors:
+\ * IBM Corporation - initial implementation
+\ ****************************************************************************/
+
+defer set-boot-device
+defer add-boot-device
+
+: qemu-read-bootlist ( -- )
+ 0 0 set-boot-device
+
+ \ check nvram
+ " boot-device" evaluate swap drop 0 <> IF EXIT THEN
+
+ \ check qemu boot list
+ " qemu,boot-device" get-chosen not IF EXIT THEN
+
+ 0 ?DO
+ dup i + c@ CASE
+ 0 OF ENDOF
+ [char] a OF ENDOF
+ [char] b OF ENDOF
+ [char] c OF " disk" add-boot-device ENDOF
+ [char] d OF " cdrom" add-boot-device ENDOF
+ [char] n OF " net" add-boot-device ENDOF
+ ENDCASE cr
+ LOOP
+ drop
+;
+
+' qemu-read-bootlist to read-bootlist