ARM: aarch64: Add support for passing initrd to Linux
PATCH 1/1 ARM: aarch64: Add support for passing initrd to Linux
This adds basic support for passing intird to Linux
Signed-off-by Andrey Smirnov <[email protected]>
--- arch/arm/lib64/armlinux.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
arch/arm/lib64/armlinux.c +13 -1
@@ -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)) {
Signature · 7 lines
2.21.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 6 lines · Andrey Smirnov
This adds basic support for passing intird to Linux
Signed-off-by Andrey Smirnov <[email protected]>--- arch/arm/lib64/armlinux.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox