aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2018-03-01 11:36:32 +0530
committerAlexey Kardashevskiy <aik@ozlabs.ru>2018-03-05 14:55:59 +1100
commit8128b8e3ea76f8fcfdde6605bfa25fcdc13a5ab7 (patch)
tree739f42a916d75cd0af29a81d698454523c55b463
parentfa981320a1e0968d6fc1b8de319723ff8212b337 (diff)
downloadSLOF-8128b8e3ea76f8fcfdde6605bfa25fcdc13a5ab7.zip
SLOF-8128b8e3ea76f8fcfdde6605bfa25fcdc13a5ab7.tar.gz
SLOF-8128b8e3ea76f8fcfdde6605bfa25fcdc13a5ab7.tar.bz2
OF: Use new property "stdout-path" for boot console
Linux kernel commit 2a9d832cc9aae21ea827520fef635b6c49a06c6d (of: Add bindings for chosen node, stdout-path) deprecated chosen property "linux,stdout-path" and "stdout". Check for new property "stdout-path" first and as a fallback check "linux,stdout-path". This older property can be deprecated after 5 years. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--board-qemu/slof/OF.fs12
1 files changed, 11 insertions, 1 deletions
diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
index 35fe233..a85f6c5 100644
--- a/board-qemu/slof/OF.fs
+++ b/board-qemu/slof/OF.fs
@@ -214,8 +214,18 @@ romfs-base 400000 0 ' claim CATCH IF ." claim failed!" cr 2drop THEN drop
8d0 cp
+: get-stdout-path ( - [ prop len ] success )
+ \ Check for new property
+ s" stdout-path" get-chosen ?dup NOT IF
+ \ May be running on older qemu, this property will be deprecated
+ s" linux,stdout-path" get-chosen ?dup NOT IF
+ FALSE
+ THEN
+ THEN
+;
+
: set-default-console
- s" linux,stdout-path" get-chosen IF
+ get-stdout-path IF
decode-string
." Using default console: " 2dup type cr
io