From patchwork Tue Jul 10 13:15:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Devulder X-Patchwork-Id: 941991 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41Q2lM5h6Hz9s0W for ; Tue, 10 Jul 2018 23:16:15 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3E7F2C21E39; Tue, 10 Jul 2018 13:16:06 +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=none 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 C5D01C21E07; Tue, 10 Jul 2018 13:15:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 27989C21C29; Tue, 10 Jul 2018 13:15:45 +0000 (UTC) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id BD3ECC21C2F for ; Tue, 10 Jul 2018 13:15:44 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 864D1AE71; Tue, 10 Jul 2018 13:15:44 +0000 (UTC) From: Loic Devulder To: u-boot@lists.denx.de Date: Tue, 10 Jul 2018 15:15:39 +0200 Message-Id: <20180710131539.32550-2-ldevulder@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20180710131539.32550-1-ldevulder@suse.de> References: <20180710131539.32550-1-ldevulder@suse.de> Cc: linux-amlogic@lists.infradead.org, trini@konsulko.com Subject: [U-Boot] [PATCH 1/1] Fix README for Khadas VIM board 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Fix documentation to be able to cross-compile U-Boot on Khadas VIM board. Signed-off-by: Loic Devulder --- board/amlogic/khadas-vim/README | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/board/amlogic/khadas-vim/README b/board/amlogic/khadas-vim/README index 7eaca724f8..0f912e9fcd 100644 --- a/board/amlogic/khadas-vim/README +++ b/board/amlogic/khadas-vim/README @@ -20,12 +20,19 @@ Currently the u-boot port supports the following devices: - serial - eMMC, microSD - Ethernet + - USB U-Boot compilation ================== + > mkdir ~/cross-compile + > cd ~/cross-compile + > wget -c https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-elf/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf.tar.xz + > tar xvfJ gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf.tar.xz + > export PATH=$PWD/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf:$PATH + > cd > export ARCH=arm - > export CROSS_COMPILE=aarch64-none-elf- + > export CROSS_COMPILE=aarch64-elf- > make khadas-vim_defconfig > make @@ -36,20 +43,31 @@ Amlogic doesn't provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor: - > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz - > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz +To be able to compile the *old* U-Boot (if needed): + > Remove the *new* gcc-7.2 from the PATH + > cd ~/cross-compile + > wget -c https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/aarch64-elf/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-elf.tar.xz > tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + > export PATH=$PWD/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-elf/bin:$PATH + +To compile the ATF firmware: + > cd ~/cross-compile + > wget -c https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz > tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz - > export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH + > export PATH=$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH + + > cd > git clone https://github.com/khadas/u-boot -b Vim vim-u-boot > cd vim-u-boot + > export ARCH=arm + > export CROSS_COMPILE=aarch64-elf- > make kvim_defconfig > make - > export FIPDIR=$PWD/fip Go back to mainline U-Boot source tree then : + > export FIPDIR=$PWD/fip + > cd > mkdir fip - > cp $FIPDIR/gxl/bl2.bin fip/ > cp $FIPDIR/gxl/acs.bin fip/ > cp $FIPDIR/gxl/bl21.bin fip/ @@ -67,7 +85,7 @@ Go back to mainline U-Boot source tree then : fip/bl30_new.bin \ bl30 - > $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 + > python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 > $FIPDIR/blx_fix.sh \ fip/bl2_acs.bin \