From nobody Tue Apr 7 03:50:45 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD42ECAAD1 for ; Wed, 31 Aug 2022 18:27:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232680AbiHaS1C (ORCPT ); Wed, 31 Aug 2022 14:27:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232785AbiHaSZl (ORCPT ); Wed, 31 Aug 2022 14:25:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AF83F2D55 for ; Wed, 31 Aug 2022 11:21:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9FA9C61CE7 for ; Wed, 31 Aug 2022 18:21:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9830BC4314F; Wed, 31 Aug 2022 18:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661970110; bh=2xQ5ecRyKfR7ptHCLyMP99aehKiar5JnTBnRAnso19o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s+q/JbhAYVX+CsSD2e5YBXtKSE8T/MmpXUOG78n9m2juOQohoMZ3bvWE+le5pPMbq xl4DX5AjyCW2YXcg6o8QaWBkoNMKiW7ejLALPrD6bPcnkpBh62aQRYKGqx5KGpwX0q 5JHqiubOx0U9bUrSVPo2OUxauLWT40HqThmgOS0f365wSZ69ACJM5depZke8jv3z+P 6GsFFpbJ5hLaQXtWOIyHBgwOisa4YmAacvnxKq0f9f7IwrtLEeiGM5U17NRHu/kbRg aqradmgQlJppWarSVjNcTM1cxI4a5Qe8dXxfb66W9QmljOSEBXUbAsC/HNXo6ii6Hy uaVSUsSJBLnOg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id E93815C0DA6; Wed, 31 Aug 2022 11:21:49 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@fb.com, w@lwt.eu, Willy Tarreau , "Paul E . McKenney" Subject: [PATCH nolibc 13/18] selftests/nolibc: add a "kernel" target to build the kernel with the initramfs Date: Wed, 31 Aug 2022 11:21:43 -0700 Message-Id: <20220831182148.2698489-15-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20220831182113.GA2697286@paulmck-ThinkPad-P17-Gen-1> References: <20220831182113.GA2697286@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Willy Tarreau The "kernel" target rebuilds the kernel with the current config for the selected arch, with an initramfs containing the nolibc-test utility. Since image names depend on the architecture, the currently supported ones are referenced and resolved based on the architecture. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/testing/selftests/nolibc/Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile index fd0a670823340..4a2ab0e73ce2e 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -12,6 +12,16 @@ include $(srctree)/scripts/subarch.include ARCH =3D $(SUBARCH) endif =20 +# kernel image names by architecture +IMAGE_i386 =3D arch/x86/boot/bzImage +IMAGE_x86 =3D arch/x86/boot/bzImage +IMAGE_arm64 =3D arch/arm64/boot/Image +IMAGE_arm =3D arch/arm/boot/zImage +IMAGE_mips =3D vmlinuz +IMAGE_riscv =3D arch/riscv/boot/Image +IMAGE =3D $(IMAGE_$(ARCH)) +IMAGE_NAME =3D $(notdir $(IMAGE)) + # OUTPUT is only set when run from the main makefile, otherwise # it defaults to this nolibc directory. OUTPUT ?=3D $(CURDIR)/ @@ -36,6 +46,9 @@ initramfs: nolibc-test $(call QUIET_INSTALL, initramfs/init) $(Q)cp nolibc-test initramfs/init =20 +kernel: initramfs + $(Q)$(MAKE) -C $(srctree) ARCH=3D$(ARCH) CC=3D$(CC) CROSS_COMPILE=3D$(CRO= SS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=3D$(CURDIR)/initramfs + clean: $(call QUIET_CLEAN, nolibc-test) $(Q)rm -f nolibc-test --=20 2.31.1.189.g2e36527f23