From: =?UTF-8?Q?Andr=c3=a9_Przywara?= Date: Mon, 16 Jan 2017 09:47:06 +0000 Subject: [U-Boot] [PATCH v4 26/26] sunxi: A64: add 32-bit SPL support In-Reply-To: <20170116085523.ten5la63epbbthk2@lukather> References: <1483357730-6800-1-git-send-email-andre.przywara@arm.com> <1483357730-6800-27-git-send-email-andre.przywara@arm.com> <53551715-c704-c1a9-fb74-9f125ceec0a6@arm.com> <20170116085523.ten5la63epbbthk2@lukather> Message-ID: <5b5e58a2-34d5-1d29-ebcb-9f943ee17ef9@arm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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? Cheers, Andre.