From patchwork Tue Oct 10 12:34:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13415338 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 98ABBCD80BD for ; Tue, 10 Oct 2023 12:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbjJJMeX (ORCPT ); Tue, 10 Oct 2023 08:34:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbjJJMeU (ORCPT ); Tue, 10 Oct 2023 08:34:20 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3727310C; Tue, 10 Oct 2023 05:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1696941246; bh=itCOy/n/isHYcQulK5emf3FoLnD4SemWjOxOW/MPxRU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cFd0HdMoqAGecyLpraySfzYGr81X8M9XAdG8/b2/LiqZQyHu/7QsZQ8ET5a3nVkgZ 6QgRnssxfnhVUh0zzE6GweAt8SXRQO1vtH9Hw9LtGsL1XKlkRSRPFNQcOSxbqi99jZ YTpdmdeQK5MQksUv/baRtd2BraVENnyBcd84/mH0= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 10 Oct 2023 14:34:00 +0200 Subject: [PATCH 5/5] selftests/nolibc: generate config automatically MIME-Version: 1.0 Message-Id: <20231010-nolibc-out-of-tree-v1-5-b6a263859596@weissschuh.net> References: <20231010-nolibc-out-of-tree-v1-0-b6a263859596@weissschuh.net> In-Reply-To: <20231010-nolibc-out-of-tree-v1-0-b6a263859596@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: Zhangjin Wu , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1696941244; l=1742; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=itCOy/n/isHYcQulK5emf3FoLnD4SemWjOxOW/MPxRU=; b=FZZ9E3TluP14IhqlqbPbtRKKsEauXukQv98Yt6wYhopJ6+aRz22BRfiyu+SEtUioUGvNvBZen sJzKTnj2q8jCBaMkfPEKO/yzZN3Yn+fUb3FskXxux3tYKjmUAjq9frV X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This new target generates a .config if none exists yet. Also drop the defconfig target with its hidden call to 'mrproper' which is fairly invasive. If users want to overwrite their kernel existing kernel configuration they can do so easily from the toplevel directory. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 21e3f7da2ecf..5a3623680f1a 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -173,7 +173,7 @@ all: run sysroot: sysroot/$(ARCH)/include -sysroot/$(ARCH)/include: +sysroot/$(ARCH)/include: $(objtree)/.config $(Q)rm -rf sysroot/$(ARCH) sysroot/sysroot $(QUIET_MKDIR)mkdir -p sysroot $(Q)$(MAKE) -C $(srctree) outputmakefile @@ -216,13 +216,13 @@ initramfs: nolibc-test $(call QUIET_INSTALL, initramfs/init) $(Q)cp nolibc-test initramfs/init -defconfig: - $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) mrproper $(DEFCONFIG) prepare +$(objtree)/.config: + $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(DEFCONFIG) -kernel: +kernel: $(objtree)/.config $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) -kernel-standalone: initramfs +kernel-standalone: $(objtree)/.config initramfs $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs # run the tests after building the kernel