From patchwork Sun Mar 5 04:06:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Gray X-Patchwork-Id: 735367 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3vbTrf6S3Wz9s7s for ; Sun, 5 Mar 2017 15:06:57 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 44D30C21CAF; Sun, 5 Mar 2017 04:06:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E86D0C21C32; Sun, 5 Mar 2017 04:06:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AE33CC21C32; Sun, 5 Mar 2017 04:06:36 +0000 (UTC) Received: from lechuck.jsg.id.au (jsg.id.au [210.15.216.215]) by lists.denx.de (Postfix) with ESMTPS id 5F0E5C21C27 for ; Sun, 5 Mar 2017 04:06:33 +0000 (UTC) Received: from largo.jsg.id.au (largo.jsg.id.au [192.168.1.43]) by lechuck.jsg.id.au (OpenSMTPD) with ESMTP id d6abae79; Sun, 5 Mar 2017 15:06:27 +1100 (AEDT) Received: from localhost (largo.jsg.id.au [local]) by largo.jsg.id.au (OpenSMTPD) with ESMTPA id 9fddbf7d; Sun, 5 Mar 2017 15:06:26 +1100 (AEDT) Date: Sun, 5 Mar 2017 15:06:26 +1100 From: Jonathan Gray To: Andre Przywara Message-ID: <20170305040626.GB87322@largo.jsg.id.au> References: <20170301190338.3UX0CAJi@smtp1m.mail.yandex.net> <20170303092242.ebtkp2w7vybgqrgc@lukather> <28cdd899-89b9-4e19-9e31-77fa03f7e74a@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <28cdd899-89b9-4e19-9e31-77fa03f7e74a@arm.com> User-Agent: Mutt/1.6.2 (2016-07-01) Cc: Tom Rini , Michal Simek , u-boot@lists.denx.de, linux-sunxi@googlegroups.com, Icenowy Zheng , Maxime Ripard , Philipp Tomsich , Jagan Teki Subject: Re: [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" On Fri, Mar 03, 2017 at 09:55:25AM +0000, Andre Przywara wrote: > Hi, > > On 03/03/17 09:22, Maxime Ripard wrote: > > On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote: > >> > >> 2017???3???1??? 23:51??? Maxime Ripard ????????? > >>> > >>> Hi Andre, > >>> > >>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: > >>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an > >>>> ARM Trusted Firmware image beside the actual U-Boot proper. > >>>> This can now be easily achieved by using the just extended SPL FIT > >>>> loading support, so enable it in the Pine64 defconfig. > >>>> Also add the FIT image as a build target to 64-bit sunxi board to > >>>> trigger the respective Makefile rules. > >>>> > >>>> Signed-off-by: Andre Przywara > >>>> --- > >>>> configs/pine64_plus_defconfig | 6 ++++++ > >>>> include/configs/sunxi-common.h | 4 ++++ > >>>> 2 files changed, 10 insertions(+) > >>>> > >>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig > >>>> index 7c7d86f..2b47157 100644 > >>>> --- a/configs/pine64_plus_defconfig > >>>> +++ b/configs/pine64_plus_defconfig > >>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y > >>>> CONFIG_ARCH_SUNXI=y > >>>> CONFIG_MACH_SUN50I=y > >>>> CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" > >>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" > >>>> # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set > >>>> CONFIG_CONSOLE_MUX=y > >>>> CONFIG_SPL=y > >>>> +CONFIG_FIT=y > >>>> +CONFIG_SPL_FIT=y > >>>> +CONFIG_SPL_LOAD_FIT=y > >>>> +CONFIG_SPL_OF_LIBFDT=y > >>> > >>> I'm not sure we want to force down that support to all our users. > >> > >> A64 boards are now unusable without proper ATF. > > > > That's debatable, but that's not really what I meant. What I meant was > > that they're perfectly usable without FIT. > > But this is a defconfig for a certain, and the Pine64 is not really > usable without ATF at the moment in an upstream tree. Could board/sunxi/README.pine64 be updated for the current state of things? Without FIT is it now possible with u-boot 2017.03 to use sunxi-spl.bin as a drop in replacement for Allwinner's boot0 and get a working combination of SPL/u-boot/ATF that can be redistributed when combining the parts with boot0img? Using your repositories https://github.com/apritzel/arm-trusted-firmware/tree/allwinner (for ATF) https://github.com/apritzel/pine64 (for boot0img) README.pine64 still states that there is no SPL available. Does it make any sense to build a combined spl+u-boot as is done with the armv7 sunxi targets without ATF? Or will this not boot? diff --git a/arch/arm/cpu/armv8/config.mk b/arch/arm/cpu/armv8/config.mk index 27b66d41b1..a323faf563 100644 --- a/arch/arm/cpu/armv8/config.mk +++ b/arch/arm/cpu/armv8/config.mk @@ -12,3 +12,12 @@ PLATFORM_CPPFLAGS += $(PF_NO_UNALIGNED) EFI_LDS := elf_aarch64_efi.lds EFI_CRT0 := crt0_aarch64_efi.o EFI_RELOC := reloc_aarch64_efi.o + +# Build a combined spl + u-boot image +ifdef CONFIG_ARCH_SUNXI +ifdef CONFIG_SPL +ifndef CONFIG_SPL_BUILD +ALL-y += u-boot-sunxi-with-spl.bin +endif +endif +endif