diff --git a/slof/fs/client.fs b/slof/fs/client.fs index 7d537a6..8a7f6ac 100644 --- a/slof/fs/client.fs +++ b/slof/fs/client.fs @@ -308,4 +308,20 @@ ALSO client-voc DEFINITIONS : set-callback ( newfunc -- oldfunc ) client-callback @ swap client-callback ! ; +\ Custom method to get FDT blob +: fdt-fetch ( buf len -- ret ) + fdt-flatten-tree ( buf len dtb ) + dup >r + >fdth_tsize l@ ( buf len size r: dtb ) + 2dup < IF + ." ERROR: need " .d ." bytes, the buffer is " .d ." bytes only" cr + drop + -1 + ELSE + nip r@ -rot move + 0 + THEN + r> fdt-flatten-tree-free +; + PREVIOUS DEFINITIONS