aboutsummaryrefslogtreecommitdiff
path: root/slof/fs/root.fs
blob: 67df8113d25c2ddd0d68d7dc8da45fe9dbd1924e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
\ *****************************************************************************
\ * Copyright (c) 2004, 2007 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
\ ****************************************************************************/

\ this creates the root and common branches of the device tree

defer (client-exec)
defer client-exec

\ defined in slof/fs/client.fs
defer callback
defer continue-client

: set-chosen ( prop len name len -- )
  s" /chosen" find-node set-property ;

: get-chosen ( name len -- [ prop len ] success )
  s" /chosen" find-node get-property 0= ;

new-device
  s" /" device-name
  new-device
    s" chosen" device-name
    s" " encode-string s" bootargs" property
    s" " encode-string s" bootpath" property
  finish-device

  new-device
    s" aliases" device-name
  finish-device

  new-device
    s" options" device-name
  finish-device


  new-device
    s" openprom" device-name
    s" BootROM" device-type
  finish-device

  new-device 
#include <packages.fs>
  finish-device

: open true ;
: close ;

finish-device