This adds basic support for passing intird to Linux Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- arch/arm/lib64/armlinux.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c index afa56792f..31bd987f1 100644 --- a/arch/arm/lib64/armlinux.c +++ b/arch/arm/lib64/armlinux.c @@ -37,6 +37,7 @@ static int do_bootm_linux(struct image_data *data) unsigned long x3); resource_size_t start, end; unsigned long text_offset, image_size, devicetree, kernel; + unsigned long image_end; int ret; void *fdt; @@ -53,7 +54,18 @@ static int do_bootm_linux(struct image_data *data) if (ret) goto out; - devicetree = ALIGN(kernel + image_size, PAGE_SIZE); + image_end = PAGE_ALIGN(kernel + image_size); + + if (bootm_has_initrd(data)) { + ret = bootm_load_initrd(data, image_end); + if (ret) + return ret; + + image_end += resource_size(data->initrd_res); + image_end = PAGE_ALIGN(image_end); + } + + devicetree = image_end; fdt = bootm_get_devicetree(data); if (IS_ERR(fdt)) { -- 2.21.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox