linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nicolas Schier <nicolas@fjasle.eu>, Willy Tarreau <w@1wt.eu>,
	Shuah Khan <shuah@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH RFC 1/3] kbuild: add toplevel target for usr/gen_init_cpio
Date: Sun, 17 Sep 2023 00:54:56 +0900	[thread overview]
Message-ID: <CAK7LNATru0tQYF+Kehb33pJV8xQKBCUEHcoC_M3EX8xCrzQ-NA@mail.gmail.com> (raw)
In-Reply-To: <20230916-nolibc-initramfs-v1-1-4416ecedca6d@weissschuh.net>

On Sat, Sep 16, 2023 at 4:13 PM Thomas Weißschuh <linux@weissschuh.net> wrote:
>
> The nolibc testsuite wants to generate an initrams without linking it
> into the kernel for which it needs access to gen_init_cpio.
> Add a new toplevel target for it so it can be built standalone.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
> ---
>
> Kbuild maintainers:
>
> If there is a way that does not require modification of the toplevel
> Makefile that would be nice, too.
> I followed the example of the "scripts_unifdef" target.


This worked for me.


masahiro@zoe:~/ref/linux$ make -s mrproper
masahiro@zoe:~/ref/linux$ make -s defconfig
masahiro@zoe:~/ref/linux$ make run-command KBUILD_RUN_COMMAND='$(MAKE)
$(build)=usr usr/gen_init_cpio'
  HOSTCC  usr/gen_init_cpio








> ---
>  Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index ceb23eed4dce..1caa4429eceb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1812,6 +1812,10 @@ endif
>
>  endif # KBUILD_EXTMOD
>
> +PHONY += usr_gen_init_cpio
> +usr_gen_init_cpio:
> +       $(Q)$(MAKE) $(build)=usr usr/gen_init_cpio
> +
>  # ---------------------------------------------------------------------------
>  # Modules
>
>
> --
> 2.42.0
>


-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2023-09-16 15:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16  7:13 [PATCH RFC 0/3] selftests/nolibc: avoid spurious kernel relinks Thomas Weißschuh
2023-09-16  7:13 ` [PATCH RFC 1/3] kbuild: add toplevel target for usr/gen_init_cpio Thomas Weißschuh
2023-09-16 15:54   ` Masahiro Yamada [this message]
2023-09-16  7:13 ` [PATCH RFC 2/3] selftests/nolibc: don't embed initramfs into kernel image Thomas Weißschuh
2023-09-16  7:13 ` [PATCH RFC 3/3] selftests/nolibc: drop target "rerun" Thomas Weißschuh
2023-09-17  3:22 ` [PATCH RFC 0/3] selftests/nolibc: avoid spurious kernel relinks Willy Tarreau
2023-09-17 14:44   ` Thomas Weißschuh

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=CAK7LNATru0tQYF+Kehb33pJV8xQKBCUEHcoC_M3EX8xCrzQ-NA@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=shuah@kernel.org \
    --cc=w@1wt.eu \
    /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).