From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Jonas Bonn <jonas@southpole.se>, <linux-kbuild@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux@openrisc.net>
Subject: Re: [PATCH] [RFC] initramfs: Prefix simple paths with $(srctree)
Date: Fri, 15 Nov 2013 11:25:05 +0530 [thread overview]
Message-ID: <5285B739.9060000@synopsys.com> (raw)
In-Reply-To: <1384467283-14806-1-git-send-email-geert@linux-m68k.org>
On 11/15/2013 03:44 AM, Geert Uytterhoeven wrote:
> If CONFIG_INITRAMFS_SOURCE contains relative paths inside the source tree
> (e.g. in a defconfig pointing to arch-specific files), the corresponding
> file system entries are not found when building outside the source tree.
>
> Prefix all simple paths (paths not starting with "/", "../", or "./") with
> $(srctree) to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> This issue happens when building an OpenRISC defconfig from
> git://openrisc.net/jonas/linux. Mainline doesn't have the OpenRISC
> initramfs.
+1.
This applies to ARC defconfig too.
>
> Questions:
> 1. Is this an acceptable solution for mainline?
> 2. My make-foo is limited. is there a better way to accomplish this, than
> by prefixing all paths and removing the prefixes again where they're
> not wanted?
>
> usr/Makefile | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/usr/Makefile b/usr/Makefile
> index e767f019accf..2170c38936ce 100644
> --- a/usr/Makefile
> +++ b/usr/Makefile
> @@ -41,6 +41,12 @@ hostprogs-y := gen_init_cpio
> initramfs := $(CONFIG_SHELL) $(srctree)/scripts/gen_initramfs_list.sh
> ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \
> $(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d)
> +ifneq ("$(ramfs-input)", "-d")
> +ramfs-input := $(patsubst %, $(srctree)/%, $(ramfs-input))
> +ramfs-input := $(patsubst $(srctree)//%, /%, $(ramfs-input))
> +ramfs-input := $(patsubst $(srctree)/../%, ../%, $(ramfs-input))
> +ramfs-input := $(patsubst $(srctree)/./%, ./%, $(ramfs-input))
> +endif
> ramfs-args := \
> $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \
> $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID))
>
prev parent reply other threads:[~2013-11-15 5:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 22:14 [PATCH] [RFC] initramfs: Prefix simple paths with $(srctree) Geert Uytterhoeven
2013-11-15 5:55 ` Vineet Gupta [this message]
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=5285B739.9060000@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=geert@linux-m68k.org \
--cc=jonas@southpole.se \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@openrisc.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;
as well as URLs for NNTP newsgroup(s).