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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 F35FEC4338F for ; Mon, 16 Aug 2021 21:09:56 +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 F41AB60EE5 for ; Mon, 16 Aug 2021 21:09:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F41AB60EE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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 463AB803F6; Mon, 16 Aug 2021 23:09:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Sgvz7149"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E257C807F3; Mon, 16 Aug 2021 23:09:50 +0200 (CEST) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (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 4EDCA803F6 for ; Mon, 16 Aug 2021 23:09:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=festevam@gmail.com Received: by mail-lf1-x129.google.com with SMTP id g13so37046639lfj.12 for ; Mon, 16 Aug 2021 14:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gUt2iMOJho+NDLSZHJhY8LM6YpimQOV2ww/bwo6MOIc=; b=Sgvz71492gIeFN3cr0aODyJDx4fHMB5W3FHkxdaQFJPo1o+bb03eqa5uOgRMrimF9V 8TzMmAOESkVsCjlxWsjHNwVB5rUZDKXfacTTg98ZCH3AN6hfAX3ipyyUti+XTvUZOAZf PWQojW3OeW8Q6cD+LC43NcEe8rUUGB3JyDqQjk1ZcqtdAsGUhssDcyGWK3V1YEw6N1OS ng8RjwQmw/QwuK0rkNUDsgqzTYY7ANOZc0JVMtk7AzEdnqgAj2quhbfYIHdmec0F2RGB By2S5pjl0D9HZ/lROr2jtXS5AEp/W2Ua+3xoAQPSqNf3cCWMJv4mSFK9yRRcLRKXaHuh t+xA== 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=gUt2iMOJho+NDLSZHJhY8LM6YpimQOV2ww/bwo6MOIc=; b=Lo6GAxRbhpX3kCb45lQ35P2BXnomaRWNNJvJoKK8dclJgMk33WhSk5D+3HNgZxBUUO 4dL8nJ/IM6fmdwQlaSSP2L65hjEb3NH8VIyAKfHq927sNE7g/XSlW2vgpCMxR0jhoxi3 pUyhecM0b7tMl7bD1p5VYeT0DmXhQk9AViwYvwGkkgmnyNg1reL/25n09WlU2QOlI7lq nCb6vipIHX+HKH++gFcnYfOD3eBG91en1Y89OwLFbt1DpQOG9ypuRveapPkmKxZzNvpd eBCYafDhzRN2Asv1YMClwJpJWEvGL7j+09oZKqQ/vswnHGX3q+MDWK9rjZFTUl7uprxt Wpsg== X-Gm-Message-State: AOAM532sArPrn5aA3DaoWISuDh/Rodme6m4pD2EfIK18NCTDK5KCPBgB 5vDeFTlOJP9VfddqFdK5WDthRNAD0JJHAq/eJc4= X-Google-Smtp-Source: ABdhPJyRbhnEBoHp2XhnCe60xqDGETgBmwEljYxkrX37q+H+8QnqO42M5FS6iwv2vnBABexEMswa+3TIC6MIOazl+uQ= X-Received: by 2002:a05:6512:ac3:: with SMTP id n3mr200991lfu.583.1629148185614; Mon, 16 Aug 2021 14:09:45 -0700 (PDT) MIME-Version: 1.0 References: <20210813005901.16839-1-festevam@denx.de> <04480f602808792b607089e5c2868ec9@denx.de> In-Reply-To: From: Fabio Estevam Date: Mon, 16 Aug 2021 18:09:34 -0300 Message-ID: Subject: Re: [PATCH 1/2] imx8mm-cl-iot-gate: Do not build fip.bin by default To: Paul Liu Cc: Fabio Estevam , Stefano Babic , Kirill Kapranov , Uri Mashiach , Valentin Raevsky , U-Boot-Denx Content-Type: text/plain; charset="UTF-8" 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 Paul, On Sun, Aug 15, 2021 at 4:27 PM Paul Liu wrote: > 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 Sorry, but I found this overly complicated. Makefile:1112: warning: overriding recipe for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/lib' plat/imx/imx8m/imx8mm/platform.mk:114: warning: ignoring old recipe for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/lib' Makefile:1112: warning: overriding recipe for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/romlib' plat/imx/imx8m/imx8mm/platform.mk:114: warning: ignoring old recipe for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/romlib' Makefile:1112: warning: overriding recipe for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/libwrapper' plat/imx/imx8m/imx8mm/platform.mk:114: warning: ignoring old recipe for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/libwrapper' CC services/spd/opteed/opteed_common.c CC services/spd/opteed/opteed_main.c CC services/spd/opteed/opteed_pm.c AS services/spd/opteed/opteed_helpers.S CC /home/fabio/mbedtls/library/aes.c In file included from include/drivers/auth/mbedtls/mbedtls_config.h:114, from /home/fabio/mbedtls/include/mbedtls/build_info.h:59, from /home/fabio/mbedtls/library/common.h:26, from /home/fabio/mbedtls/library/aes.c:26: /home/fabio/mbedtls/include/mbedtls/check_config.h:593:2: error: #error "MBEDTLS_SHA256_C defined without MBEDTLS_SHA224_C" 593 | #error "MBEDTLS_SHA256_C defined without MBEDTLS_SHA224_C" What about having two defconfigs for this board? imx8mm-cl-iot-gate_defconfig for the regular users. This one can be simply be built by following the README I wrote and it matches the way used on other i.MX8MM boards. imx8mm-cl-iot-gate_optee_defconfig for the users that want to use fip/optee, etc? Would you agree with such an approach? Thanks, Fabio Estevam