[PATCH 3/3] ARM: cleanup 32bit/64bit support in Kconfig

Masahiro YAMADA mappyland78 at gmail.com
Fri Mar 24 21:46:39 PDT 2023


On Fri, Mar 24, 2023 at 9:20 PM Sascha Hauer <s.hauer at pengutronix.de> wrote:
>
> The decision whether to build a 32bit or 64bit barebox has to be made
> first before anything else, so this makes CONFIG_64BIT a toplevel option
> without any further dependencies.
>
> With this patch we will only present the SoCs/boards which are actually
> supported by the selected code model in Kconfig.
>
> Without this patch it was often possible to select 32bit boards on a
> 64bit build or vice versa, which resulted in a broken build.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>


>
> -choice
> -       prompt "Barebox code model"
> -       help
> -         You should only select this option if you have a workload that
> -         actually benefits from 64-bit processing or if your machine has
> -         large memory. You will only be presented a single option in this
> -         menu if your system does not support both 32-bit and 64-bit modes.
> -
> -config 32BIT
> -       bool "32-bit barebox"
> -       depends on CPU_SUPPORTS_32BIT_KERNEL
> -       help
> -         Select this option if you want to build a 32-bit barebox.
> -
>  config 64BIT
> -       bool "64-bit barebox"
> -       depends on CPU_SUPPORTS_64BIT_KERNEL
> +       bool "64bit barebox" if "$(ARCH)" != "arm64"
> +       default "$(ARCH)" = "arm64"
>         select ARCH_DMA_ADDR_T_64BIT
>         help
>           Select this option if you want to build a 64-bit barebox.
>
> -endchoice
> +config 32BIT
> +       bool
> +       default !64BIT
> +       help
> +         Select this option if you want to build a 32-bit barebox.
>


This help message is a bit strange - it is automatically
selected / unselected since it has no "prompt".





I see more CONFIG options with a weird help.





config 64BIT
        def_bool y if X86_EFI
        select ARCH_DMA_ADDR_T_64BIT
        help
          Say yes to build a 64-bit binary - formerly known as x86_64
          Say no to build a 32-bit binary - formerly known as i386.



You cannot say yes or no here since Kconfig
does not show a prompt in the first place.



More information about the barebox mailing list