Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp839587rwe; Wed, 31 Aug 2022 12:00:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5i6ISOSegzCRThHysVsu3mQ525qJj1cKJ8zwglHKbRMRsxo8T7Cjp/oZiTj8TkWnCzSD0W X-Received: by 2002:a17:902:b109:b0:174:fd03:8c3e with SMTP id q9-20020a170902b10900b00174fd038c3emr11678486plr.23.1661972408436; Wed, 31 Aug 2022 12:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661972408; cv=none; d=google.com; s=arc-20160816; b=jQLXTzIqSlOckXdspjvszJmn95+FDodqhDKfqqKCn0ilkYMSzzAXgsQwBgIs/Qzq1N OdcbVYSLl06Pw0HyfPafInuEi907dWTS1HMwE/4N7k7h8U2OPhlyYe0gf+O4abymNx+p mf6ge4SQrLNcGOlXS41cgi6+jcFC0LA584m09EvaM0ml+cBboCGY94PGUHXWEI6rSMAa AJz+e53d8CIcOZBQoO3woQB1pyEv7gkd6lLGcsezLOocS+fSw0INlMWdSwFOizZSDEUP h+AJMa2/uumRJThkY/A7TkkdDaXby9fJhAZzrzw6oZtqW5pfHXAHjesVeIWtaR8csWTJ or3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KNckTVR+y8/95K7MzzJnDQWpSnMvy9T5kfgKRyzn7Y0=; b=q2zTQmlFkUoufV8zl8KFD+2cGHL8zh62ULC9hsOR8/qpNGNFwh5bkbrdCq+Cp0bHYY MF8b9V4Y1ehZHSKR2/9cZlgzyxCDxuYMzD1/BCO91X0HitpeNfpqBK3IkW/9iD7sW0g0 AeExBvlzNxsdGS3l+RKDKUibwv0CQcBECIPvyp7A/AImI4Zyr9vzeC1JM9XURDKQCT18 UBH1bZOlQdYl2HoaaWX7xtMXSu9yyfIRDIJ+HbEbVsnhn/iSwSPXdQjuIhRebUnBowLt p22zNVCDxveQ6EdQGRNm4bB58H57dRCDYbnSIXJvm+mXdQz0udOEzSQxzU2scuCpALUb SETQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="s+q/JbhA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020a63e543000000b0041296d838c6si5777231pgj.105.2022.08.31.11.59.57; Wed, 31 Aug 2022 12:00:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="s+q/JbhA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232974AbiHaS1B (ORCPT + 99 others); Wed, 31 Aug 2022 14:27:01 -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: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org 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/selftests/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 = $(SUBARCH) endif +# kernel image names by architecture +IMAGE_i386 = arch/x86/boot/bzImage +IMAGE_x86 = arch/x86/boot/bzImage +IMAGE_arm64 = arch/arm64/boot/Image +IMAGE_arm = arch/arm/boot/zImage +IMAGE_mips = vmlinuz +IMAGE_riscv = arch/riscv/boot/Image +IMAGE = $(IMAGE_$(ARCH)) +IMAGE_NAME = $(notdir $(IMAGE)) + # OUTPUT is only set when run from the main makefile, otherwise # it defaults to this nolibc directory. OUTPUT ?= $(CURDIR)/ @@ -36,6 +46,9 @@ initramfs: nolibc-test $(call QUIET_INSTALL, initramfs/init) $(Q)cp nolibc-test initramfs/init +kernel: initramfs + $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs + clean: $(call QUIET_CLEAN, nolibc-test) $(Q)rm -f nolibc-test -- 2.31.1.189.g2e36527f23