[Buildroot] [PATCH] linux: Fix powerpc64le defconfig selection
Arnout Vandecappelle
arnout at mind.be
Wed May 18 17:32:43 UTC 2022
On 17/05/2022 08:13, Joel Stanley wrote:
> On Fri, 13 May 2022 at 21:52, Arnout Vandecappelle <arnout at mind.be> wrote:
[snip]
>> So I guess we should use a specific defconfig for *all* powerpc.
>>
>> The arch-default defconfig is generally not really reliable, for example for
>> arm it always takes v7_multi, but that won't work for v7m targets...
>
> I noticed that. It is similarly broken if you expected a kernel that
> worked on armv5.
>
> Should we disable BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG for
> platforms that don't have a single defconfig?
>
> The other option I considered was removing ARCH_DEFAULT_CONFIG and
> providing a default for platforms where we could suggest one. It would
> look something like this:
>
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -176,10 +176,15 @@ endchoice
> config BR2_LINUX_KERNEL_DEFCONFIG
> string "Defconfig name"
> depends on BR2_LINUX_KERNEL_USE_DEFCONFIG
> + default "ppc64le_defconfig" if BR2_powerpc_powerpc64le
> + default "ppc64_defconfig" if BR2_powerpc_powerpc64
> + default "ppc_defconfig" if BR2_powerpc_powerpc
> + default "mutli_v5_defconfig" if BR2_ARM_CPU_ARMV5
> + default "mutli_v7_defconfig" if BR2_ARM_CPU_ARMV7A
> + default "defconfig"
> help
> - Name of the kernel defconfig file to use, without the
> - trailing _defconfig. The defconfig is located in
> - arch/<arch>/configs in the kernel tree.
> + Name of the kernel defconfig file to use. The defconfig is located in
> + arch/<arch>/configs in the kernel tree
>
> It would need to change the option to include the _defconfig (in order
> to support plain old "defconfig"), or we could add some logic in the
> .mk to add _defconfig only if the name is not "defconfig".
I like that idea! It allows us to gradually complete the list of defconfigs
with better defaults. We could also add a condition after the "defconfig" to
allow it only for the cases which are known to actually work (not much more than
aarch64 and s390x, I think...).
Note that changing it so that _defconfig needs to be added is not acceptable,
because it breaks existing configs too much. We can easily work around that by
special-casing the "defconfig" string in the .mk file.
Regards,
Arnout
More information about the buildroot
mailing list