All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	 Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	 Nicolas Schier <nicolas@fjasle.eu>,
	soc@kernel.org, Mark Rutland <mark.rutland@arm.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	linux-arm-kernel@lists.infradead.org,
	 linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] arm64: configs: Add virtconfig
Date: Sat, 11 Feb 2023 16:37:02 +0900	[thread overview]
Message-ID: <CAK7LNASRz-apG_pNwvNOqxXy+-tp+WGHV--g6yYU-UQnZx5tgA@mail.gmail.com> (raw)
In-Reply-To: <20230203-arm64-defconfigs-v1-3-cd0694a05f13@kernel.org>

On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
>
> Provide a slimline configuration intended to be booted on virtual
> machines, with the goal of providing a light configuration which will
> boot on and enable features available in mach-virt.  This is defined in
> terms of the standard defconfig, with an additional virt.config fragment
> which disables options unneeded in a virtual configuration.
>
> As a first step we just disable all the ARCH_ configuration options,
> disabling the build of all the SoC specific drivers.  This results in a
> kernel that builds about 25% faster in my testing, if this approach
> works for people we can add further options.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  arch/arm64/Makefile            |  6 ++++++
>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index c33b5da95b4a..2d49aea0ff67 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -205,6 +205,12 @@ ifdef CONFIG_COMPAT_VDSO
>  endif
>  endif
>
> +include $(srctree)/scripts/Makefile.defconf
> +
> +PHONY += virtconfig
> +virtconfig:
> +       $(call merge_into_defconfig_override,defconfig,virt)
> +
>  define archhelp
>    echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
>    echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
> diff --git a/arch/arm64/configs/virt.config b/arch/arm64/configs/virt.config
> new file mode 100644
> index 000000000000..6ef0a739717f
> --- /dev/null
> +++ b/arch/arm64/configs/virt.config
> @@ -0,0 +1,39 @@
> +# CONFIG_ARCH_ACTIONS is not set
> +# CONFIG_ARCH_SUNXI is not set
> +# CONFIG_ARCH_ALPINE is not set
> +# CONFIG_ARCH_APPLE is not set
> +# CONFIG_ARCH_BCM is not set
> +# CONFIG_ARCH_BCM2835 is not set
> +# CONFIG_ARCH_BCMBCA is not set
> +# CONFIG_ARCH_BCM_IPROC is not set
> +# CONFIG_ARCH_BERLIN is not set
> +# CONFIG_ARCH_BRCMSTB is not set
> +# CONFIG_ARCH_EXYNOS is not set
> +# CONFIG_ARCH_K3 is not set
> +# CONFIG_ARCH_LAYERSCAPE is not set
> +# CONFIG_ARCH_LG1K is not set
> +# CONFIG_ARCH_HISI is not set
> +# CONFIG_ARCH_KEEMBAY is not set
> +# CONFIG_ARCH_MEDIATEK is not set
> +# CONFIG_ARCH_MESON is not set
> +# CONFIG_ARCH_MVEBU is not set
> +# CONFIG_ARCH_NXP is not set
> +# CONFIG_ARCH_MXC is not set
> +# CONFIG_ARCH_NPCM is not set
> +# CONFIG_ARCH_QCOM is not set
> +# CONFIG_ARCH_RENESAS is not set
> +# CONFIG_ARCH_ROCKCHIP is not set
> +# CONFIG_ARCH_S32 is not set
> +# CONFIG_ARCH_SEATTLE is not set
> +# CONFIG_ARCH_INTEL_SOCFPGA is not set
> +# CONFIG_ARCH_SYNQUACER is not set
> +# CONFIG_ARCH_TEGRA is not set
> +# CONFIG_ARCH_TESLA_FSD is not set
> +# CONFIG_ARCH_SPRD is not set
> +# CONFIG_ARCH_THUNDER is not set
> +# CONFIG_ARCH_THUNDER2 is not set
> +# CONFIG_ARCH_UNIPHIER is not set
> +# CONFIG_ARCH_VEXPRESS is not set
> +# CONFIG_ARCH_VISCONTI is not set
> +# CONFIG_ARCH_XGENE is not set
> +# CONFIG_ARCH_ZYNQMP is not set
>
> --
> 2.30.2
>



Yeah, I have a _local_ script to apply
a similar config fragragment.

When I run QEMU, I disable unneeded CONFIG_ARCH_*,
and also disable unneeded sub-systems.

Not only me, many people are doing similar in their local env,
I guess.


Of course, I will not upstream my set of CONFIG options
since it is just my preference.
After all, this depends on people in my opinion.


BTW, the minimal set for booting + minimal features
might be similar to what Buildroot provides?
I do not know... It booted at least when I tried some years ago.

https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-virt/linux.config






--
Best Regards
Masahiro Yamada

WARNING: multiple messages have this Message-ID (diff)
From: Masahiro Yamada <masahiroy@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	 Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	 Nicolas Schier <nicolas@fjasle.eu>,
	soc@kernel.org, Mark Rutland <mark.rutland@arm.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	linux-arm-kernel@lists.infradead.org,
	 linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] arm64: configs: Add virtconfig
Date: Sat, 11 Feb 2023 16:37:02 +0900	[thread overview]
Message-ID: <CAK7LNASRz-apG_pNwvNOqxXy+-tp+WGHV--g6yYU-UQnZx5tgA@mail.gmail.com> (raw)
In-Reply-To: <20230203-arm64-defconfigs-v1-3-cd0694a05f13@kernel.org>

On Sat, Feb 11, 2023 at 4:54 AM Mark Brown <broonie@kernel.org> wrote:
>
> Provide a slimline configuration intended to be booted on virtual
> machines, with the goal of providing a light configuration which will
> boot on and enable features available in mach-virt.  This is defined in
> terms of the standard defconfig, with an additional virt.config fragment
> which disables options unneeded in a virtual configuration.
>
> As a first step we just disable all the ARCH_ configuration options,
> disabling the build of all the SoC specific drivers.  This results in a
> kernel that builds about 25% faster in my testing, if this approach
> works for people we can add further options.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  arch/arm64/Makefile            |  6 ++++++
>  arch/arm64/configs/virt.config | 39 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index c33b5da95b4a..2d49aea0ff67 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -205,6 +205,12 @@ ifdef CONFIG_COMPAT_VDSO
>  endif
>  endif
>
> +include $(srctree)/scripts/Makefile.defconf
> +
> +PHONY += virtconfig
> +virtconfig:
> +       $(call merge_into_defconfig_override,defconfig,virt)
> +
>  define archhelp
>    echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
>    echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
> diff --git a/arch/arm64/configs/virt.config b/arch/arm64/configs/virt.config
> new file mode 100644
> index 000000000000..6ef0a739717f
> --- /dev/null
> +++ b/arch/arm64/configs/virt.config
> @@ -0,0 +1,39 @@
> +# CONFIG_ARCH_ACTIONS is not set
> +# CONFIG_ARCH_SUNXI is not set
> +# CONFIG_ARCH_ALPINE is not set
> +# CONFIG_ARCH_APPLE is not set
> +# CONFIG_ARCH_BCM is not set
> +# CONFIG_ARCH_BCM2835 is not set
> +# CONFIG_ARCH_BCMBCA is not set
> +# CONFIG_ARCH_BCM_IPROC is not set
> +# CONFIG_ARCH_BERLIN is not set
> +# CONFIG_ARCH_BRCMSTB is not set
> +# CONFIG_ARCH_EXYNOS is not set
> +# CONFIG_ARCH_K3 is not set
> +# CONFIG_ARCH_LAYERSCAPE is not set
> +# CONFIG_ARCH_LG1K is not set
> +# CONFIG_ARCH_HISI is not set
> +# CONFIG_ARCH_KEEMBAY is not set
> +# CONFIG_ARCH_MEDIATEK is not set
> +# CONFIG_ARCH_MESON is not set
> +# CONFIG_ARCH_MVEBU is not set
> +# CONFIG_ARCH_NXP is not set
> +# CONFIG_ARCH_MXC is not set
> +# CONFIG_ARCH_NPCM is not set
> +# CONFIG_ARCH_QCOM is not set
> +# CONFIG_ARCH_RENESAS is not set
> +# CONFIG_ARCH_ROCKCHIP is not set
> +# CONFIG_ARCH_S32 is not set
> +# CONFIG_ARCH_SEATTLE is not set
> +# CONFIG_ARCH_INTEL_SOCFPGA is not set
> +# CONFIG_ARCH_SYNQUACER is not set
> +# CONFIG_ARCH_TEGRA is not set
> +# CONFIG_ARCH_TESLA_FSD is not set
> +# CONFIG_ARCH_SPRD is not set
> +# CONFIG_ARCH_THUNDER is not set
> +# CONFIG_ARCH_THUNDER2 is not set
> +# CONFIG_ARCH_UNIPHIER is not set
> +# CONFIG_ARCH_VEXPRESS is not set
> +# CONFIG_ARCH_VISCONTI is not set
> +# CONFIG_ARCH_XGENE is not set
> +# CONFIG_ARCH_ZYNQMP is not set
>
> --
> 2.30.2
>



Yeah, I have a _local_ script to apply
a similar config fragragment.

When I run QEMU, I disable unneeded CONFIG_ARCH_*,
and also disable unneeded sub-systems.

Not only me, many people are doing similar in their local env,
I guess.


Of course, I will not upstream my set of CONFIG options
since it is just my preference.
After all, this depends on people in my opinion.


BTW, the minimal set for booting + minimal features
might be similar to what Buildroot provides?
I do not know... It booted at least when I tried some years ago.

https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-virt/linux.config






--
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-02-11  7:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 19:52 [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests Mark Brown
2023-02-10 19:52 ` Mark Brown
2023-02-10 19:52 ` [PATCH 1/3] scripts: merge_config: Add option to suppress warning on overrides Mark Brown
2023-02-10 19:52   ` Mark Brown
2023-02-10 19:52 ` [PATCH 2/3] kbuild: Provide a version of merge_into_defconfig without override warnings Mark Brown
2023-02-10 19:52   ` Mark Brown
2023-02-10 19:52 ` [PATCH 3/3] arm64: configs: Add virtconfig Mark Brown
2023-02-10 19:52   ` Mark Brown
2023-02-11  7:37   ` Masahiro Yamada [this message]
2023-02-11  7:37     ` Masahiro Yamada
2023-02-11 23:10     ` Mark Brown
2023-02-11 23:10       ` Mark Brown
2023-02-13 15:15     ` Arnd Bergmann
2023-02-13 15:15       ` Arnd Bergmann
2023-02-13 15:48       ` Mark Brown
2023-02-13 15:48         ` Mark Brown
2023-02-13 16:18       ` Masahiro Yamada
2023-02-13 16:18         ` Masahiro Yamada
2023-02-10 23:51 ` [PATCH 0/3] arm64: configs: Provide slimmed down configuration for guests Mark Brown
2023-02-10 23:51   ` Mark Brown
2023-02-13 19:30 ` patchwork-bot+linux-soc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNASRz-apG_pNwvNOqxXy+-tp+WGHV--g6yYU-UQnZx5tgA@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=peterz@infradead.org \
    --cc=soc@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.