1 \ *****************************************************************************
2 \ * Copyright (c) 2004, 2008 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
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
13 \ this creates the root and common branches of the device tree
18 \ defined in slof/fs/client.fs
26 drop s" /chosen" find-node dup to chosen-node
30 : set-chosen ( prop len name len -- )
33 : get-chosen ( name len -- [ prop len ] success )
34 chosen get-property 0= ;
36 \ Look for an exising root, create one if needed
37 " /" find-node dup 0= IF
45 \ Create /chosen if it doesn't exist
46 " /chosen" find-node dup 0= IF
49 s" chosen" device-name
50 s" " encode-string s" bootargs" property
51 s" " encode-string s" bootpath" property
59 s" aliases" device-name
64 s" options" device-name
69 s" openprom" device-name
70 0 0 s" relative-addressing" property
75 #include <packages.fs>