From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6156C4338F for ; Sun, 15 Aug 2021 19:26:57 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 981AA6128C for ; Sun, 15 Aug 2021 19:26:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 981AA6128C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B8FC8200B; Sun, 15 Aug 2021 21:26:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ENQrYF/a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1FE2B82959; Sun, 15 Aug 2021 21:26:52 +0200 (CEST) Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0AF8E8200B for ; Sun, 15 Aug 2021 21:26:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=paul.liu@linaro.org Received: by mail-yb1-xb32.google.com with SMTP id z128so28903796ybc.10 for ; Sun, 15 Aug 2021 12:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4j0LNTYpsFG1HxBfKIgwEoMHggyfUjV29t6xxqzfQ5s=; b=ENQrYF/aDzPwMXWsCDV5FZEnx1C1i2VTBT6LdyqhWIrtBrGSZl/tOL/gKZOq4fVCpe MaGrLpoozdxhNSJqRJ8x+hO869EvcIrmj8G/K+51047xscZSYgnPb4cXBNukMFYCEsQm XLicn+4XEX6I7t4snV4gKM9arSiUKX632MxQKsl09+p25LmUt9mXPPzrstQ/R1Yfw3ZT /hfbiRVtKVgXC+8DLBf0xrm0R3eW0wQmu9oiWdw2I+8VESw1B4mjCLF4lCiJFIDM8drI WERJE0fgtdx1PRHg/Cmf3yvi+fCuliLJwZx8s7J6vqltzUjgb4PfDFhBtq6pqWLGeOwD HiWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4j0LNTYpsFG1HxBfKIgwEoMHggyfUjV29t6xxqzfQ5s=; b=nhIaTMB4BRi2ZP5Qss69heTx011NjPQZyYyFzei6lxfccjMSavJhOzW0FlhczOt+hn 0rGo8aweilkRI7OyqSmuEImL5AF2IO8YG6jekqYF7Ip4/BMX19i7VfnJk7dcyX4l2sNV O6M1ILjuJ/Y4CBgCQnxzV84IkTHV3S93Y/Y0QS+/3YbrBCoZmy0FqKI44H/IIU+x8N+g ApPLlwjsrM0oh/WUXr5OZ+ruw3c1y1JIoB2lL6VNpfVQOqUwS+skv3B+8tw91sz7Iqrm kCCDl6/bmF4NZRRvdouMVSepgX1arQWHnZLGlXCGxH+TN02pVko9yqBpz/AX1d33tK1b kPNg== X-Gm-Message-State: AOAM530tcL1LEg9UHrPs/ldUN/+8eK0bsVPigu+egCMWAzotrVUJAuOT fZ2hAOTyO9QTDCMnFBneoOIiQpL3b984N5XUQsNFXw== X-Google-Smtp-Source: ABdhPJymQohN3KiiuG/5Ypn0EcUC7tNwEpGPg7e521fJ8XXSeh5+H2zJy6tYZ3psskvNM8/d/qD8OHtrwQIOlamkuQY= X-Received: by 2002:a25:c402:: with SMTP id u2mr14535634ybf.19.1629055605362; Sun, 15 Aug 2021 12:26:45 -0700 (PDT) MIME-Version: 1.0 References: <20210813005901.16839-1-festevam@denx.de> <04480f602808792b607089e5c2868ec9@denx.de> In-Reply-To: <04480f602808792b607089e5c2868ec9@denx.de> From: Paul Liu Date: Mon, 16 Aug 2021 03:26:34 +0800 Message-ID: Subject: Re: [PATCH 1/2] imx8mm-cl-iot-gate: Do not build fip.bin by default To: Fabio Estevam Cc: sbabic@denx.de, Kirill Kapranov , Uri Mashiach , Valentin Raevsky , U-Boot-Denx Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Fabio, No. I think they actually use fip.bin but just not upstreamed yet. Please see the "Firmware version" in the list. For Compulab we are using mainline U-boot. But for imx8mm-evk it is NXP released firmware. And yes we do use mainline ATF and mainline OPTEE. I'll explain how to build all of them. # OPTEE 1. export ARCH=arm 2. export CROSS_COMPILE=arm-linux-gnueabihf- 3. export CROSS_COMPILE64=aarch64-linux-gnu- 4. make PLATFORM=imx PLATFORM_FLAVOR=mx8mm_cl_iot_gate O=build.mx8mmevk \ CFG_TEE_CORE_LOG_LEVEL=2 \ CFG_TEE_TA_LOG_LEVEL=2 \ CFG_TEE_CORE_DEBUG=y \ CFG_EXTERNAL_DTB_OVERLAY=y \ CFG_DT=y \ CFG_DT_ADDR=0x52000000 \ CFG_DEBUG_INFO=y And we got tee-header_v2.bin tee-pager_v2.bin and tee-pageable_v2.bin. These files will be used in the TF-A stage. Then we start building U-boot (BL31). # U-boot (BL31) 1. export ARCH=arm64 2. export CROSS_COMPILE=aarch64-linux-gnu- 3. export ATF_LOAD_ADDR=0x920000 4. make O=/tmp/uboot-imx8 imx8mm-cl-iot-gate_defconfig 5. make O=/tmp/uboot-imx8 We got u-boot.bin at this stage. u-boot.bin is needed for the next stage. # TF-A make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- PLAT=imx8mm \ SPD=opteed BL32_BASE=0x7e000000 IMX_BOOT_UART_BASE=0x30880000 \ NEED_BL32=yes NEED_BL33=yes NEED_BL2=yes \ LOG_LEVEL=50 \ USE_TBBR_DEFS=1 GENERATE_COT=1 TRUSTED_BOARD_BOOT=1 \ MBEDTLS_DIR=../mbedtls \ BL32=../optee_os/build.mx8mmevk/core/tee-header_v2.bin \ BL32_EXTRA1=../optee_os/build.mx8mmevk/core/tee-pager_v2.bin \ BL32_EXTRA2=../optee_os/build.mx8mmevk/core/tee-pageable_v2.bin \ BL33=/tmp/uboot-imx8/u-boot.bin BL2_CFLAGS=-DIMX8M_FIP_MMAP \ fip bl2 bl31 Now we have bl2.bin and fip.bin in build/imx8mm/release for the next stage. # U-boot (generate flash.bin and u-boot.itb) 1. export NXP_FIRMWARE=firmware-imx-8.8.bin 2. wget -c http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/${NXP_FIRMWARE} 3. bash -x ${NXP_FIRMWARE} --auto-accept 4. cp -v $(find firmware* | awk '/train|hdmi_imx8|dp_imx8/' ORS=" ") /tmp/uboot-imx8 5. cp -v ../trusted-firmware-a/build/imx8mm/release/bl2.bin /tmp/uboot-imx8/bl31.bin 6. cp -v ../trusted-firmware-a/build/imx8mm/release/fip.bin /tmp/uboox-imx8/fip.bin 7. export ARCH=arm64 8. export CROSS_COMPILE=aarch64-linux-gnu- 9. export ATF_LOAD_ADDR=0x920000 10. make O=/tmp/uboot-imx8 So now it shouldn't complain about missing images. Yours, Paul On Fri, 13 Aug 2021 at 20:15, Fabio Estevam wrote: > Hi Paul, > > On 13/08/2021 06:59, Paul Liu wrote: > > Hi Fabio, > > > > Can we think of a way to keep this fip.bin feature? This is part of > > the SystemReady IR certificate for this Compulab board. [1] > > > > [1] > > > https://developer.arm.com/architectures/system-architectures/arm-systemready/ir > > i.MX8MM EVK is also listed there and we don't use fip.bin on this > platform (and > not on any other i.MX8MM platform in mainline U-Boot). > > If you really want to use fip.bin, could you please let me know the > exact > build procedure for AT-F? Do you use mainline ATF? > > As a user of the IOT-GATE-iMX8, I would just like to be able to flash > mainline > U-Boot and move forward. Even better if I could use the same procedure > that has been used on other i.MX8MM boards. > > Regards, > > Fabio Estevam > -- > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: > festevam@denx.de >