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: 10516973 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 549D56032A for ; Tue, 10 Jul 2018 13:16:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42A0B28CB8 for ; Tue, 10 Jul 2018 13:16:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3772328EDC; Tue, 10 Jul 2018 13:16:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 653BE28CB8 for ; Tue, 10 Jul 2018 13:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mWxX3Nbcc4GHRWC7sgDZJsoH0ffjKsUGQtv1/6ZqhFE=; b=pq6HcjbPmIqJ9nXx8HthBaCqfg 46xUkkSnWSIn9ci/Qj6FpIuY0fej76zqxRYoACwj/NItb5ZuG9AhXIKZECpOCvhG7l270XCJixmiF bKHUp2DBw5IU4Q1OubVT7dGekR9qkwYz3LUOWXEDH0utG2ppZyTNRkZ2/C3iXP3nrKfB1ppnueDMf MFNDeToUgc74iNvxG4CEoe5FnLI9OFCKrdZxuX4It0ImrXq/AtqYCvkwHw9VuBU/jXtLvlFpHAv0K VvMJ6K54G/MjaMnPKeYDowm+bwRSWlSzXJMxvAd4JAB8DouA8h5oNXnct6Q9N1roVJWQ4w6Ld9N/P jYOoefDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcsUq-0000EC-OK; Tue, 10 Jul 2018 13:16:00 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcsUl-0000AL-W6 for linux-amlogic@lists.infradead.org; Tue, 10 Jul 2018 13:15:59 +0000 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 Subject: [PATCH 1/1] Fix README for Khadas VIM board 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180710_061556_183749_D2D64D7B X-CRM114-Status: GOOD ( 10.33 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, sjg@chromium.org, trini@konsulko.com, narmstrong@baylibre.com MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 \