[Buildroot] [PATCH] boot-wrapper-aarch64: Allow users to specify an initrd/initramfs file.

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Oct 25 21:57:28 UTC 2016


Hello,

On Fri, 7 Oct 2016 15:45:03 -0700, Hollis Blanchard wrote:
> Signed-off-by: Hollis Blanchard <hollis_blanchard at mentor.com>
> ---
>  boot/boot-wrapper-aarch64/Config.in               |    8 ++++++++
>  boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk |    4 ++++
>  2 files changed, 12 insertions(+), 0 deletions(-)

Thanks for your patch, sorry for the somewhat slow reply.

> +config BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK
> +	string "Ramdisk"
> +	default ""

I would like this option to include the filesystem produced by
Buildroot (in cpio format) as the initramfs. So something like:

	bool "Include ramdisk in image"
	depends on BR2_TARGET_ROOTFS_CPIO

> +	help
> +	  Embed an initramfs file in the kernel image, and provide

It does not embed the initramfs in the kernel image, but in the boot
wrapper image.

> +	  linux,initrd-start and linux,initrd-end properties in the /chosen device
> +	  tree node.
> +
>  endif
> diff --git a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
> index c56bdee..28b2061 100644
> --- a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
> +++ b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
> @@ -30,6 +30,10 @@ BOOT_WRAPPER_AARCH64_CONF_OPTS = \
>  	--with-kernel-dir=$(LINUX_DIR) \
>  	--with-cmdline=$(BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS)
>  
> +ifneq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK),)
> +	BOOT_WRAPPER_AARCH64_CONF_OPTS += --with-initrd=$(BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK)

Don't indent code inside conditions.

> +endif

It should be something like:

ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK),y)
BOOT_WRAPPER_AARCH64_CONF_OPTS += --with-initrd=$(BINARIES_DIR)/rootfs.cpio
BOOT_WRAPPER_AARCH64_DEPENDENCIES += rootfs-cpio
endif

or something along those lines.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the buildroot mailing list