Message ID | 20230916-nolibc-initramfs-v1-1-4416ecedca6d@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1624762vqi; Sat, 16 Sep 2023 05:12:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGr9h55zA+PNh91xSjhfaph7+wgegthpD36eVsN2rs1rsShIXmMSLYKDnMBdQG9CNTVAQ3S X-Received: by 2002:a17:90b:818:b0:26f:b733:6887 with SMTP id bk24-20020a17090b081800b0026fb7336887mr3214393pjb.27.1694866378833; Sat, 16 Sep 2023 05:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694866378; cv=none; d=google.com; s=arc-20160816; b=Hforj54/PjUalkKz5pZ7wq3F+ViXTUWO0HWj0x6UbOqienUaB/xyEoVCRZkTk6tCXX D5nMdlVELfdg+CNUXKW0Iht7QY3HBuPBpUyiUwd1mxZK+NrgmQFdgabZad6vycbY/AnD XZPHQxVgg2ZLOTXOp+LhJhXoUH1d6fmCORHjzLYLAz4AeUlOcAZUCNNHhxf+x/8A4byD eA+XEKjWNi7FT8BJl7/1dfwjEJmzSP3ibKrDRGEdH825IelgMz6FQVlSngfXrVbQjZkw ZZhaWrslL5/0rlK/WbQEjEnBcmGnWNtmdfwAT6lUBNUnqFvz7UvSForX7xdHhOcay0Vh lc/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=L4MBybyLGObSVrASN6ttMFJx0aeB/+5vM5VyG66WGm4=; fh=1RJOXoR66dTpI6bZFe2nJ1z8thLy2iHoPKQ+QSstjLw=; b=W2MEbiLirErL72uPYAnJhzuRN2NuUnNNfyoOYMS2SYSa8tm9r2jKMYOkPV0R6BhTj9 /aw9r3HAEQy1etuARof6eSWE0ntiVyuGI466ga1ZpVTt03qvPGdLSRC84j5/shL07iNn DRl0tdBY5WbcYpZt5fTDoDGCm77F24e+OIacq/LI5Co7kRGHOox5i9VhAQvhVnAHdeze yt0gz3064ucXE9/qadPVS3LR++qAdiyz6ubZLigzfABwz6/XVW2mqQb648CciiTRRlww DrN9AxhO4WEb51qCvHoLYs6U3aXXd3vzQbg9ehsYunryyt/MZY11hRm3LvBj7Du+1Qow I7RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=augLYVjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id z16-20020a656650000000b00563ef54582bsi4613533pgv.105.2023.09.16.05.12.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 05:12:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=augLYVjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D4DFC84D572B; Sat, 16 Sep 2023 00:17:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238841AbjIPHO3 (ORCPT <rfc822;toshivichauhan@gmail.com> + 27 others); Sat, 16 Sep 2023 03:14:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231906AbjIPHN5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 16 Sep 2023 03:13:57 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6C73CD8; Sat, 16 Sep 2023 00:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1694848422; bh=N0u5CeBhd0jeZ72RH1KvQRJvme7lnR8v86eiHR768eA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=augLYVjbQcljGggD5qeSqYYRU5WC7gfXQEiSnnCrypztUS3jhu2zLHTz/2dS/JyYE o+RlvUUAomea51gY787k3m90sbwPo2kWvivjFSoxH6IinQSKPN2KnGqiN3p6z/pijy 6ntMLymfLzmK329uMjt861kPaOq0RPPQM3U89xgQ= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> Date: Sat, 16 Sep 2023 09:13:27 +0200 Subject: [PATCH RFC 1/3] kbuild: add toplevel target for usr/gen_init_cpio MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230916-nolibc-initramfs-v1-1-4416ecedca6d@weissschuh.net> References: <20230916-nolibc-initramfs-v1-0-4416ecedca6d@weissschuh.net> In-Reply-To: <20230916-nolibc-initramfs-v1-0-4416ecedca6d@weissschuh.net> To: Masahiro Yamada <masahiroy@kernel.org>, 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> Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1694848421; l=887; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=N0u5CeBhd0jeZ72RH1KvQRJvme7lnR8v86eiHR768eA=; b=D/hhNRXl2GztEC1PQG3thapDENVP/CxmF97SvrXxLGAzYCCHDXpFLXQBLdh/P/leibxfDH+yN 5qLcNhqpDb9BB9AnpCG8CBg082F5DayoQ4Wwasi2WdoTwtDoM3J8a0W X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 16 Sep 2023 00:17:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777196208121021901 X-GMAIL-MSGID: 1777196208121021901 |
Series |
selftests/nolibc: avoid spurious kernel relinks
|
|
Commit Message
Thomas Weißschuh
Sept. 16, 2023, 7:13 a.m. UTC
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.
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
Comments
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 >
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