From patchwork Sun Nov 5 11:34:58 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: 741175 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 2D99CC0018A for ; Sun, 5 Nov 2023 11:35:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229527AbjKELfL (ORCPT ); Sun, 5 Nov 2023 06:35:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjKELfJ (ORCPT ); Sun, 5 Nov 2023 06:35:09 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CB05EB; Sun, 5 Nov 2023 03:35:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1699184102; bh=bfoswv7ncWkCUqW4AE0EZoLtlErB+6knnnYOlA24mFg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ggObUooOsP16O4x6BewBPKt6dbJAKMDPCMukaNrJQ4tPmNjjhReY/M/3h2igCqr9e 8QDP9goT7oeZIGARnHqLn5ovBLbsZDsGMGdu0gdHzujocpCrT2c2D4SvmTm8BtFWmq HZob2QtRpfTDqOfB4RWC1qBbqcLoN1DTldflgf14= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sun, 05 Nov 2023 12:34:58 +0100 Subject: [PATCH v2 1/6] tools/nolibc: error out on unsupported architecture MIME-Version: 1.0 Message-Id: <20231105-nolibc-mips-be-v2-1-4ec993cb5407@weissschuh.net> References: <20231105-nolibc-mips-be-v2-0-4ec993cb5407@weissschuh.net> In-Reply-To: <20231105-nolibc-mips-be-v2-0-4ec993cb5407@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: Zhangjin Wu , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1699184102; l=839; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=bfoswv7ncWkCUqW4AE0EZoLtlErB+6knnnYOlA24mFg=; b=h1P8i1kDOIISeYbFLfzWqMLh6zBFs5DBo7Ec2xs4xRvaX+LTXzcXL3OdniFMrew7OO+bp1Vbg 4liZd88i89SDABWH8QxgfHjGsWri5e7JtAdVORS/QKYZtWAg8u/Az5q X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org When an architecture is unsupported arch.h would silently continue. This leads to a lot of followup errors because my_syscallX() is not defined and the startup code is missing. Avoid these confusing errors and fail the build early with a clear error message and location. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau --- tools/include/nolibc/arch.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/nolibc/arch.h b/tools/include/nolibc/arch.h index e276fb0680af..2f72ccac0378 100644 --- a/tools/include/nolibc/arch.h +++ b/tools/include/nolibc/arch.h @@ -33,6 +33,8 @@ #include "arch-s390.h" #elif defined(__loongarch__) #include "arch-loongarch.h" +#else +#error Unsupported Architecture #endif #endif /* _NOLIBC_ARCH_H */ From patchwork Sun Nov 5 11:35:02 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: 741176 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 8D44EC4167D for ; Sun, 5 Nov 2023 11:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230221AbjKELfK (ORCPT ); Sun, 5 Nov 2023 06:35:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKELfJ (ORCPT ); Sun, 5 Nov 2023 06:35:09 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BEC2F2; Sun, 5 Nov 2023 03:35:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1699184103; bh=nyrjPvpNj7WNK2ijhv221XrS7R5GMOB+fysjKb+NE6o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=msFqDpcXSSjuZeof1fOOu4F3KvdFjPlRQWnmsbkx5IncwISbVjpvwj1+4HSuM14NX mpPaEfVWolk/aS1Vg1HWeHSomdt/kCxJL9Oe/EC8g0GVQ+cSdnRImwt7jO4a+NJHT0 QsaOO4ZajOXcaaF3oKamxoRIjWA3iE2L8ukPUUPk= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sun, 05 Nov 2023 12:35:02 +0100 Subject: [PATCH v2 5/6] selftests/nolibc: extraconfig support MIME-Version: 1.0 Message-Id: <20231105-nolibc-mips-be-v2-5-4ec993cb5407@weissschuh.net> References: <20231105-nolibc-mips-be-v2-0-4ec993cb5407@weissschuh.net> In-Reply-To: <20231105-nolibc-mips-be-v2-0-4ec993cb5407@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: Zhangjin Wu , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1699184102; l=1285; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=nyrjPvpNj7WNK2ijhv221XrS7R5GMOB+fysjKb+NE6o=; b=pMFDcAOHYf4oHIZkEkSHQT55uQDBq91NgSrk1f7kzN2JjkQ9CLhIP4kxLS0KgKkI32bVdqLIH 2KcXs4Yuyf3DEiRrfyVY62+QU7RUH9pQxmmtF8Ce1pAS4EZ0OTMGa1l X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Allow some postprocessing of defconfig files. Suggested-by: Zhangjin Wu Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau --- tools/testing/selftests/nolibc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 6a5e67f65daa..6a1f7f9edf91 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -81,6 +81,8 @@ DEFCONFIG_s390 = defconfig DEFCONFIG_loongarch = defconfig DEFCONFIG = $(DEFCONFIG_$(XARCH)) +EXTRACONFIG = $(EXTRACONFIG_$(XARCH)) + # optional tests to run (default = all) TEST = @@ -227,6 +229,10 @@ initramfs: nolibc-test defconfig: $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) mrproper $(DEFCONFIG) prepare + $(Q)if [ -n "$(EXTRACONFIG)" ]; then \ + $(srctree)/scripts/config --file $(objtree)/.config $(EXTRACONFIG); \ + $(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) olddefconfig < /dev/null; \ + fi kernel: $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME)