From patchwork Sun Dec 29 17:33:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 305661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 5E4E72C00BB for ; Mon, 30 Dec 2013 04:33:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ADC878C356; Sun, 29 Dec 2013 17:33:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AYt99pTERz2u; Sun, 29 Dec 2013 17:33:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 488808C2C5; Sun, 29 Dec 2013 17:33:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9E5551C2B35 for ; Sun, 29 Dec 2013 17:33:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9617633151 for ; Sun, 29 Dec 2013 17:33:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g2CzPkGSIEhG for ; Sun, 29 Dec 2013 17:33:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by silver.osuosl.org (Postfix) with ESMTP id D0062200B7 for ; Sun, 29 Dec 2013 17:33:50 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 4AE248A1; Sun, 29 Dec 2013 18:34:05 +0100 (CET) Received: from localhost (AToulouse-651-1-180-103.w109-222.abo.wanadoo.fr [109.222.115.103]) by mail.free-electrons.com (Postfix) with ESMTPSA id 0F1217BB for ; Sun, 29 Dec 2013 18:34:05 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sun, 29 Dec 2013 18:33:45 +0100 Message-Id: <1388338428-19833-2-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1388338428-19833-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1388338428-19833-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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. Signed-off-by: Thomas Petazzoni Acked-by: "Yann E. MORIN" --- 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))