v3: * Evaluate /chosen mmu property rather than device_type "cpu".
Signed-off-by: Andreas Färber andreas.faerber@web.de --- forth/admin/devices.fs | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/forth/admin/devices.fs b/forth/admin/devices.fs index db7b48c..ecd2358 100644 --- a/forth/admin/devices.fs +++ b/forth/admin/devices.fs @@ -333,6 +333,13 @@ active-package get-nodename " memory" strcmp 0= if 2over " available" strcmp 0= if .p-reg 2drop exit then then + " /chosen" find-dev if + " mmu" rot get-package-property 0= if + decode-int nip nip ihandle>phandle active-package = if + 2over " available" strcmp 0= if .p-reg 2drop exit then + then + then + then
2swap 2drop ( data len ) (.property)