|
|
1.1 root 1: \ *****************************************************************************
2: \ * Copyright (c) 2011 IBM Corporation
3: \ * All rights reserved.
4: \ * This program and the accompanying materials
5: \ * are made available under the terms of the BSD License
6: \ * which accompanies this distribution, and is available at
7: \ * http://www.opensource.org/licenses/bsd-license.php
8: \ *
9: \ * Contributors:
10: \ * IBM Corporation - initial implementation
11: \ ****************************************************************************/
12:
13: defer set-boot-device
14: defer add-boot-device
15:
16: : qemu-read-bootlist ( -- )
17: 0 0 set-boot-device
18:
19: \ check nvram
20: " boot-device" evaluate swap drop 0 <> IF EXIT THEN
21:
22: \ check qemu boot list
23: " qemu,boot-device" get-chosen not IF EXIT THEN
24:
25: 0 ?DO
26: dup i + c@ CASE
27: 0 OF ENDOF
28: [char] a OF ENDOF
29: [char] b OF ENDOF
30: [char] c OF " disk" add-boot-device ENDOF
31: [char] d OF " cdrom" add-boot-device ENDOF
32: [char] n OF " net" add-boot-device ENDOF
33: ENDCASE cr
34: LOOP
35: drop
36: ;
37:
38: ' qemu-read-bootlist to read-bootlist
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.