[SLOF] [PATCH slof v3 5/5] fdt: Pass the resulting device tree to QEMU
Segher Boessenkool
segher at kernel.crashing.org
Fri Oct 13 23:45:02 AEDT 2017
On Fri, Oct 13, 2017 at 07:26:02PM +1100, Alexey Kardashevskiy wrote:
> diff --git a/slof/fs/client.fs b/slof/fs/client.fs
> index 7d537a6..67976fb 100644
> --- a/slof/fs/client.fs
> +++ b/slof/fs/client.fs
> @@ -308,4 +308,18 @@ ALSO client-voc DEFINITIONS
> : set-callback ( newfunc -- oldfunc )
> client-callback @ swap client-callback ! ;
>
> +\ Curtom method to get FDT blob
s/r/s/
> +: fdt-fetch ( buf len -- 0 )
> + " /" find-node fdt-flatten-tree ( buf len dtb )
" /" find-node is device-tree @
> + dup >r
> + >fdth_tsize l@ ( buf len size r: dtb )
> + min ( buf minsize r: dtb )
> + r@ -rot
> + move
> +
> + r> fdt-flatten-tree-free
> +
> + 0
> +;
That "min" isn't correct I think -- if the DTB doesn't fit, you want to
complain loudly and/or return an error to the caller.
Segher
More information about the SLOF
mailing list