Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 5/9] linux: enable initrd/initramfs support when cpio rootfs is chosen
Date: Sat, 28 Dec 2013 20:49:24 +0100	[thread overview]
Message-ID: <20131228194924.GJ3373@free.fr> (raw)
In-Reply-To: <1388242600-2580-6-git-send-email-thomas.petazzoni@free-electrons.com>

Thomas, All,

On 2013-12-28 15:56 +0100, Thomas Petazzoni spake thusly:
> When one enables the generation of a cpio archive of the root
> filesystem, the most likely usage is as an initramfs for the
> kernel. This commit ensures that the kernel has initramfs support when
> the rootfs cpio image format is chosen.
> 
> This will for example ensure that if the user selects the ISO9660
> filesystem format (which uses a cpio initramfs), the kernel will have
> proper support to load and use the initramfs.
> 
> It is worth mentionning that when BR2_TARGET_ROOTFS_INITRAMFS is
> enabled, then BR2_TARGET_ROOTFS_CPIO is always enabled. That's why we
> move the enabling of CONFIG_BLK_DEV_INITRD from the initramfs case to
> the cpio case.

Do we even want to expose cpio in the first place?

The way I see it:
  - if someone wants an archive, then a tarball is a more common archive
    type than cpio is, so we need not expose cpio. If the user wants an
    archive, then he should just use a tarball.
  - thus, as cpio is just a requirement for initramfs, there is no
    reason to expose cpio in the menu, and just merge cpio as a internal
    step of initramfs

> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  linux/linux.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index 5af167d..fa8aa0c 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -169,13 +169,14 @@ define LINUX_CONFIGURE_CMDS
>  	rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
>  	$(if $(BR2_arm)$(BR2_armeb),
>  		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
> +	$(if $(BR2_TARGET_ROOTFS_CPIO),
> +		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config))
>  	# As the kernel gets compiled before root filesystems are
>  	# built, we create a fake cpio file. It'll be
>  	# replaced later by the real cpio archive, and the kernel will be
>  	# rebuilt using the linux26-rebuild-with-initramfs target.
>  	$(if $(BR2_TARGET_ROOTFS_INITRAMFS),
>  		touch $(BINARIES_DIR)/rootfs.cpio
> -		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)
>  		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.cpio\",$(@D)/.config)
>  		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
>  		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config))
> -- 
> 1.8.3.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2013-12-28 19:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28 14:56 [Buildroot] [PATCH 0/9] iso9660/grub improvements Thomas Petazzoni
2013-12-28 14:56 ` [Buildroot] [PATCH 1/9] fs/iso9660: put the Buildroot boot entry first in Grub menu.lst Thomas Petazzoni
2013-12-28 19:33   ` Yann E. MORIN
2013-12-28 14:56 ` [Buildroot] [PATCH 2/9] grub: enclose network driver options in a sub-menu Thomas Petazzoni
2013-12-28 19:35   ` Yann E. MORIN
2013-12-28 14:56 ` [Buildroot] [PATCH 3/9] grub: replace string option for filesystem selection by booleans Thomas Petazzoni
2013-12-28 19:38   ` Yann E. MORIN
2013-12-28 14:56 ` [Buildroot] [PATCH 4/9] fs/iso9660: select ISO9660 support in Grub Thomas Petazzoni
2013-12-28 19:38   ` Yann E. MORIN
2013-12-28 14:56 ` [Buildroot] [PATCH 5/9] linux: enable initrd/initramfs support when cpio rootfs is chosen Thomas Petazzoni
2013-12-28 19:49   ` Yann E. MORIN [this message]
2013-12-29 10:13     ` Thomas Petazzoni
2013-12-29 16:34       ` Yann E. MORIN
2013-12-29 17:00         ` Thomas Petazzoni
2013-12-28 14:56 ` [Buildroot] [PATCH 6/9] fs/iso9660: do not use an initrd in iso image when using initramfs Thomas Petazzoni
2013-12-28 14:56 ` [Buildroot] [PATCH 7/9] grub: really disable splash screen support Thomas Petazzoni
2013-12-28 19:50   ` Yann E. MORIN
2013-12-28 14:56 ` [Buildroot] [PATCH 8/9] fs/iso9660: add Grub splashscreen support Thomas Petazzoni
2013-12-28 21:09   ` Yann E. MORIN
2013-12-29 10:24     ` Thomas Petazzoni
2013-12-29 16:45       ` Yann E. MORIN
2013-12-29 17:02         ` Thomas Petazzoni
2013-12-28 14:56 ` [Buildroot] [PATCH 9/9] grub: align splashscreen handling with iso9660 code Thomas Petazzoni
2013-12-28 21:14   ` Yann E. MORIN
2013-12-29 10:25     ` Thomas Petazzoni
2013-12-29 11:19 ` [Buildroot] [PATCH 0/9] iso9660/grub improvements Thomas Petazzoni
2013-12-29 16:59   ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131228194924.GJ3373@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox