Message ID | 6c58b9bec8fdf593d5dd1d5ba55aabddb0ce02d1.1689759351.git.falcon@tinylab.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2456352vqt; Wed, 19 Jul 2023 06:57:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlFw4hPafvPVkgv8WZLqRwAlpsGl9Z+AkdKnWAENV+6Pm4jkgy5LgC9qVbFn73/K3N+0qq9V X-Received: by 2002:a05:6358:7e16:b0:137:7bfd:7466 with SMTP id o22-20020a0563587e1600b001377bfd7466mr2765567rwm.6.1689775040611; Wed, 19 Jul 2023 06:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689775040; cv=none; d=google.com; s=arc-20160816; b=viQGY1D0csizXRtMmIS1IUD5Dfap1aFml7OLmfL7bEW3gCVw8neA55eFwZrfB+V8xE aiuG/C6XR+fN1jynlrZslPAjZvk/HsdvTbysXGYep2kkLYwlEOCXvbszHYoBkBZMF2IP y/DcxopMcOB8JbKwL4iXWms07uQcvcrK0lbBvYCz8Ghok+pFfZBUILNzjtcXwLWe5rLx BOnPfBGixNWSOcieXmv9fFgszAnljg/hnJJIaswz+Mb1rwwm6ewkq8TGtk0YXsO5QrcX GgsxFD40ekSxi7zC9uig7LDa0bSXygF6ezJXb0siMT31JjEgm7TsN0JyDNzcAzhOS3kH 32tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=kbL2AEmG6TX3R5tFji3Z0MBDzXMf2ap1wLfmzOCQo7c=; fh=LUnDCxFG3oyWlcYTkiNww5x4+0V5pkm51/GfDl61ZDU=; b=palL8td2J39eumSyI1pRCwEkkMnIsf5Q+NMXgo7FgyPx3bo/pwyTGZsCNsPw2AvEL+ 3s0xomWJBoTGelIHv/KQtuosGTp5BVvEeoFcVoYvwyZy4aNfEsyX8QHMBZNE/fZ4a6dT qXoULhA93HWQnqODaG8xobAEIi6DPeCaS1W8wvxT3UCdTlgCVl58B0gedzrwIM928UzY MgdathEaHd5ECwPNUvRilQgDlTHh5zL/oFjBFWaSGTvVIn+0tyuaQU8BMX00HK18lRJp ATa9gxo0J3GYrFK2J7U5RTnPu91OdPsICjAZzTB/Oc4/G/s5v/FCTYNtDBzjvt+Q5+77 4/Jw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j184-20020a6380c1000000b0055ffed90ccasi3471239pgd.459.2023.07.19.06.57.06; Wed, 19 Jul 2023 06:57:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231149AbjGSNao (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Wed, 19 Jul 2023 09:30:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231308AbjGSNam (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Jul 2023 09:30:42 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D3E9119; Wed, 19 Jul 2023 06:30:41 -0700 (PDT) X-QQ-mid: bizesmtp91t1689773432tb4871u6 Received: from linux-lab-host.localdomain ( [119.123.130.39]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 19 Jul 2023 21:30:31 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: znfcQSa1hKZ1OQVbZm+fYY1B+tno47akE8kAbUd2dOiIVMXsv+x77PjmcbbxG QQwSGPDuT2Ta2tyfCPgJY0MbBj9YfjoJ1G63UpQHS/gKrKTZWF++i0e3ZjQNw/Z8CKGWKdB jF77VI+jRPKeoa1A1rgUNQ7srXpFh8OB2c2l1RsiS2WbFGnj7zvSg/1UXBoZ8XXgHrsCP5A py/ktvPqt7OISRTjBkt2laot2vDJ1SlnxBw60YFam56zhhmiFedmCPa/SxegPJVvV9KYwEY I5kQ3aNo3tF5EmEyMQp9Burv6ssscVMLThU5PMviXGQF8IR99S//QS8OD15WS/+Tu5DLwhg JDPLtJcquCPYyBWUNYr/bzIwCulI5ZFzjUAwmBBkFp/BHR0VKvvIHRb0+1A7A== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4621016987773429501 From: Zhangjin Wu <falcon@tinylab.org> To: w@1wt.eu Cc: thomas@t-8ch.de, arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 12/14] selftests/nolibc: add tinyconfig target Date: Wed, 19 Jul 2023 21:30:30 +0800 Message-Id: <6c58b9bec8fdf593d5dd1d5ba55aabddb0ce02d1.1689759351.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1689759351.git.falcon@tinylab.org> References: <cover.1689759351.git.falcon@tinylab.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771857552932483136 X-GMAIL-MSGID: 1771857552932483136 |
Series |
selftests/nolibc: add minimal kernel config support - part1
|
|
Commit Message
Zhangjin Wu
July 19, 2023, 1:30 p.m. UTC
The original tinyconfig target only enables minimal kernel config
options, it can speed up the kernel build and nolibc test a lot and also
brings us with smaller kernel image size.
But the default enabled options are not enough for qemu boot and console
print, some additional config options should be added for every
architecture individually.
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
tools/testing/selftests/nolibc/Makefile | 3 +++
1 file changed, 3 insertions(+)
Comments
On Wed, Jul 19, 2023 at 09:30:30PM +0800, Zhangjin Wu wrote: > The original tinyconfig target only enables minimal kernel config > options, it can speed up the kernel build and nolibc test a lot and also > brings us with smaller kernel image size. > > But the default enabled options are not enough for qemu boot and console > print, some additional config options should be added for every > architecture individually. > > Signed-off-by: Zhangjin Wu <falcon@tinylab.org> > --- > tools/testing/selftests/nolibc/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > index eec2935672ad..f42782fa78a9 100644 > --- a/tools/testing/selftests/nolibc/Makefile > +++ b/tools/testing/selftests/nolibc/Makefile > @@ -218,6 +218,9 @@ mrproper: > defconfig: > $(Q)$(MAKE_KERNEL) $(DEFCONFIG) prepare > > +tinyconfig: > + $(Q)$(MAKE_KERNEL) tinyconfig prepare So for the same reasons as defconfig above, I'd actually keep mrproper here. And if we figure that tinyconfig is never called by the user directly but as a dependency from the makefile itself or scripts, then we likely don't even need to create a visible entry for it. Willy
> On Wed, Jul 19, 2023 at 09:30:30PM +0800, Zhangjin Wu wrote: > > The original tinyconfig target only enables minimal kernel config > > options, it can speed up the kernel build and nolibc test a lot and also > > brings us with smaller kernel image size. > > > > But the default enabled options are not enough for qemu boot and console > > print, some additional config options should be added for every > > architecture individually. > > > > Signed-off-by: Zhangjin Wu <falcon@tinylab.org> > > --- > > tools/testing/selftests/nolibc/Makefile | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > > index eec2935672ad..f42782fa78a9 100644 > > --- a/tools/testing/selftests/nolibc/Makefile > > +++ b/tools/testing/selftests/nolibc/Makefile > > @@ -218,6 +218,9 @@ mrproper: > > defconfig: > > $(Q)$(MAKE_KERNEL) $(DEFCONFIG) prepare > > > > +tinyconfig: > > + $(Q)$(MAKE_KERNEL) tinyconfig prepare > > So for the same reasons as defconfig above, I'd actually keep mrproper > here. Ok, let's add mrproper back here, since tinyconfig is fast enough, so, a mrproper is not that time cost and a cleanup is really good prepare. > And if we figure that tinyconfig is never called by the user > directly but as a dependency from the makefile itself or scripts, > then we likely don't even need to create a visible entry for it. > Great idea, At first, tinyconfig can be triggered by something like: $ make run defconfig DEFCONFIG=tinyconfig Perhaps we can let $(KERNEL_CONFIG) depends on the top-level 'tinyconfig' and trigger it by default: $(KERNEL_CONFIG): $(Q)if [ ! -f "$(KERNEL_CONFIG)" ]; then $(MAKE_KERNEL) --no-print-directory mrproper tinyconfig prepare; fi Of course, we should triger the extra config above. But this change must delay after we add tinyconfig support for all of the nolibc supported architectures. before that, we should use 'defconfig' as we do currently. So, it may be ok for us to drop this patch, but we also need to update some commit messages who uses tinyconfig target directly. Thanks, Zhangjin > Willy
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index eec2935672ad..f42782fa78a9 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -218,6 +218,9 @@ mrproper: defconfig: $(Q)$(MAKE_KERNEL) $(DEFCONFIG) prepare +tinyconfig: + $(Q)$(MAKE_KERNEL) tinyconfig prepare + PHONY += $(KERNEL_CONFIG) $(KERNEL_CONFIG): $(Q)if [ ! -f "$(KERNEL_CONFIG)" ]; then $(MAKE) --no-print-directory defconfig; fi