From patchwork Thu Jan 12 22:45:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hollis Blanchard X-Patchwork-Id: 714703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3v017b2SDmz9t0G for ; Fri, 13 Jan 2017 09:45:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9E93886DD9; Thu, 12 Jan 2017 22:45:45 +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 nGlOVvzN3noW; Thu, 12 Jan 2017 22:45:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C9D2586A50; Thu, 12 Jan 2017 22:45:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 025A01C001E for ; Thu, 12 Jan 2017 22:45:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EFDFB86A50 for ; Thu, 12 Jan 2017 22:45:42 +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 uFCeKZhGqEfr for ; Thu, 12 Jan 2017 22:45:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2741B86A4B for ; Thu, 12 Jan 2017 22:45:42 +0000 (UTC) Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1cRo7o-0005Xd-1R from Hollis_Blanchard@mentor.com ; Thu, 12 Jan 2017 14:45:40 -0800 Received: from [172.30.9.149] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Thu, 12 Jan 2017 14:45:39 -0800 To: Arnout Vandecappelle , Thomas Petazzoni References: <1475880304-21773-1-git-send-email-hollis_blanchard@mentor.com> <1475880304-21773-2-git-send-email-hollis_blanchard@mentor.com> <20161025235728.796804cc@free-electrons.com> <34543eb7-53cc-957b-31af-88a8319e3208@mentor.com> <6451f7b7-abcb-e3ad-eb21-973265a89321@mind.be> From: Hollis Blanchard Organization: Mentor Graphics Emulation Division Message-ID: <0863737f-d337-2a87-1928-5c96d97e7281@mentor.com> Date: Thu, 12 Jan 2017 14:45:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <6451f7b7-abcb-e3ad-eb21-973265a89321@mind.be> Cc: buildroot@busybox.net Subject: Re: [Buildroot] [PATCH] boot-wrapper-aarch64: Allow users to specify an initrd/initramfs file. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" On 01/12/2017 02:30 PM, Arnout Vandecappelle wrote: > On 12-01-17 00:55, Hollis Blanchard wrote: >> On 10/25/2016 02:57 PM, Thomas Petazzoni wrote: >>>> boot/boot-wrapper-aarch64/Config.in | 8 ++++++++ >>>> boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk | 4 ++++ >>>> 2 files changed, 12 insertions(+), 0 deletions(-) >>> [...] >>> >>> 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 >> I'm preparing a resend on this, but I'm having trouble with the dependency: >> >> $ rm /scratch1/hblancha/build/buildroot/images/rootfs.cpio >> $ make O=/scratch1/hblancha/build/buildroot boot-wrapper-aarch64-dirclean all >> [...] >> /scratch1/hblancha/build/buildroot/host/usr/bin/aarch64-buildroot-linux-gnu-ld: >> cannot find /scratch1/hblancha/build/buildroot/images/rootfs.cpio >> >> I can see that rootfs-* is defined and used in fs/, but, well, ... it doesn't >> seem to be working in this boot/ Makefile. Any advice? > Difficult to say without seeing the patch. Does it work correctly if you call > 'make rootfs-cpio boot-wrapper-arch64'? Same error. Earlier I see this: make: Circular /scratch1/hblancha/build/buildroot/build/boot-wrapper-aarch64-4266507a84f8c06452109d38e0350d4759740694/.stamp_configured <- rootfs-cpio dependency dropped. Full patch is here: Author: Hollis Blanchard Date: Mon Sep 26 15:48:12 2016 -0700 boot-wrapper-aarch64: Allow users to specify an initrd/initramfs file. Signed-off-by: Hollis Blanchard Hollis Blanchard Mentor Graphics Emulation Division diff --git a/boot/boot-wrapper-aarch64/Config.in b/boot/boot-wrapper-aarch64/Config.in index efb70dc..d9d7ce6 100644 --- a/boot/boot-wrapper-aarch64/Config.in +++ b/boot/boot-wrapper-aarch64/Config.in @@ -32,6 +32,30 @@ config BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS Kernel bootargs to embed inside the image generated by the boot wrapper. +choice + prompt "Embedded ramdisk" + default BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_NONE + help + Embed an initramfs file in the bootwrapper image, and provide + linux,initrd-start and linux,initrd-end properties in the /chosen + device tree node. + +config BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_NONE + bool "None" + +config BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_BUILDROOT + bool "Buildroot ramdisk" + depends on BR2_TARGET_ROOTFS_CPIO + +config BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_CUSTOM + bool "Custom ramdisk" + +endchoice + +config BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_CUSTOM_PATH + depends on BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_CUSTOM + string "Path to external ramdisk" + config BR2_TARGET_BOOT_WRAPPER_AARCH64_PSCI bool "Boot secondary SMP cores using PSCI" help diff --git a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk index 601cfab..88816a4 100644 --- a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk +++ b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk @@ -36,6 +36,13 @@ else BOOT_WRAPPER_AARCH64_CONF_OPTS += --disable-psci endif +ifneq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_BUILDROOT),) +BOOT_WRAPPER_AARCH64_CONF_OPTS += --with-initrd=$(BINARIES_DIR)/rootfs.cpio +BOOT_WRAPPER_AARCH64_DEPENDENCIES += rootfs-cpio +else ifneq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_CUSTOM),) +BOOT_WRAPPER_AARCH64_CONF_OPTS += --with-initrd=$(BR2_TARGET_BOOT_WRAPPER_AARCH64_RAMDISK_CUSTOM_PATH) +endif + # We need to convince the configure script that the Linux kernel tree # exists, as well as the DTB and the kernel Image. Even though those # are available on the build machine, the configure script uses