[U-Boot] [PATCH v4 26/26] sunxi: A64: add 32-bit SPL support

Maxime Ripard maxime.ripard at free-electrons.com
Mon Jan 16 14:41:15 CET 2017


On Mon, Jan 16, 2017 at 09:47:06AM +0000, André Przywara wrote:
> On 16/01/17 08:55, Maxime Ripard wrote:
> > On Fri, Jan 13, 2017 at 09:42:28AM +0000, Andre Przywara wrote:
> >>> Re wanting to build SPL either as 32-bit or 64-bit, could this be a
> >>> Kconfig option perhaps?
> >>
> >> Sounds like a direction worth to investigate.
> >> In the moment we have two separate defconfig files, because CPU_V7 and
> >> ARM64 are actually mutually exclusive, which is really a pain and the
> >> main reason that part wasn't merged.
> > 
> > I really like that option.
> 
> So I gave this a try this weekend, I have something like:
> 
> +choice
> +	prompt "32/64 bit build selection"
> +	depends on MACH_SUN50I
> +
> +config SUNXI_64BIT_BUILD
> +	bool "64-bit Aarch64 build"
> +	select ARM64
> +
> +config SUNXI_32BIT_BUILD
> +	bool "32-bit ARM build"
> +	select CPU_V7
> +	select PHYS_64BIT
> +
> +endchoice
> 
> I then set CONFIG_SUNXI_64BIT_BUILD=y in the defconfig.
> That seems to work, however switching to a 32-bit build requires either
> a) a separate defconfig - which is what we didn't want
> b) manually toggling this via menuconfig
> c) sed-ing these two lines in .config
> 
> I was hoping that there was some simple command line way of toggling a
> Kconfig option, à la:
> $ make pine64_plus_defconfig CONFIG_SUNXI_32BIT_BUILD=y
> 
> But that didn't work.
> mergeconfig.sh wasn't helpful as well.
> 
> Any ideas on how we could easily switch between the two options?

I know that Linux has a way to append defconfig fragments (originally
for android options iirc). That could be worth a look.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170116/b3d21b78/attachment.sig>


More information about the U-Boot mailing list