From patchwork Sun Aug 1 20:59:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1512131 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=G3fSVoHE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GdD6g48scz9sT6 for ; Mon, 2 Aug 2021 07:00:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E0A183239; Sun, 1 Aug 2021 23:00:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="G3fSVoHE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A4E43832CC; Sun, 1 Aug 2021 22:59:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 3C46882DD5 for ; Sun, 1 Aug 2021 22:59:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x329.google.com with SMTP id z6-20020a9d24860000b02904d14e47202cso6942595ota.4 for ; Sun, 01 Aug 2021 13:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P1f4JFZCMOzdWWP8RCIte4fRDS5N4SDoC+5TbufAWVk=; b=G3fSVoHEjVBPYsBAbVo71aHZhBE0C1afzaEv9w50HUFLc7mO+w92R4P4K745UFn63N 21AQu9HCZit71suzTVzR746+ocbtcd32iankKA6VKlv+GodqMwUGufKYmnDSdSlRhbyb gkUCzQMsEWIINqysDdm7YW6SySjmvG/ADXG3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P1f4JFZCMOzdWWP8RCIte4fRDS5N4SDoC+5TbufAWVk=; b=XRbA61GtCLUJzJjWIV0x9FKTUM3adBs3Twm3QYX9CcuTvsMTwX3R5A2vncuidaouCf GuXqWH9Jj2FIIVW2uoR641asRLW1dxg7Nc1FSLvE+uwly8XJXvL99MsSRZJeSMRT2E0z kll8k/hV93X2BQGW/FltHSAHJRLgj4rwN7jpg2WnuiiXwqqz413U/jJnWHIAON7LqVk0 cf+nY37hc/EbNYEFzbvTayP3jea3Po35lsIASxt5/wqHyGPUN8kgYwHmJDJsgk9cb17y xRzfs0XHgFjLnk8+M+l3iD3+NCZOOuzKmfBbhlXf+Xg5uWY0aJT1HbMH+GbuOs3PpmBq sQqQ== X-Gm-Message-State: AOAM53196DqK5pARiWZz+XK4vcEeVgaYv1XHpYYE6yYKTsP+Wf5GWtoj lIpbRzETDMB7pbR14WKx30CbSkOBhdyoIlC5 X-Google-Smtp-Source: ABdhPJzGU/xbC34Jn9vovnjvYEkvQclNr1nmRiA8PqZZKWSINITR8fjppMRYOENwPUsB7fJ8AU3QwQ== X-Received: by 2002:a9d:4104:: with SMTP id o4mr9839015ote.139.1627851594369; Sun, 01 Aug 2021 13:59:54 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c2sm1372083ooo.28.2021.08.01.13.59.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 13:59:53 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tim Harvey , Scott Wood , Simon Glass , Michael Walle Subject: [PATCH v3 1/3] imx8: ls1028a: Drop raw image support Date: Sun, 1 Aug 2021 14:59:48 -0600 Message-Id: <20210801205951.2202789-1-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog MIME-Version: 1.0 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 The CONFIG_SPL_RAW_IMAGE_SUPPORT option requires that binman provides an offset for the image (see spl_set_header_raw_uboot()), if binman is used. These boards use FIT to store U-Boot, so raw image support is not used. Drop this option to avoid errors once binman starts checking this. Signed-off-by: Simon Glass Acked-by: Michael Walle # for kontron_sl28 --- Changes in v3: - Add ls1028a tag since kontron_sl28 is not imx8 Changes in v2: - Add a new patch to drop raw image support for some imx8 boards configs/imx8mm-cl-iot-gate_defconfig | 1 + configs/imx8mm_evk_defconfig | 1 + configs/imx8mn_ddr4_evk_defconfig | 1 + configs/imx8mp_evk_defconfig | 1 + configs/imx8mq_cm_defconfig | 1 + configs/kontron_sl28_defconfig | 1 + configs/phycore-imx8mp_defconfig | 1 + 7 files changed, 7 insertions(+) diff --git a/configs/imx8mm-cl-iot-gate_defconfig b/configs/imx8mm-cl-iot-gate_defconfig index 79e4bde0703..7a7f9413dbc 100644 --- a/configs/imx8mm-cl-iot-gate_defconfig +++ b/configs/imx8mm-cl-iot-gate_defconfig @@ -30,6 +30,7 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg" CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C=y CONFIG_SPL_POWER=y diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig index f7f39b8dc63..8862e10ea57 100644 --- a/configs/imx8mm_evk_defconfig +++ b/configs/imx8mm_evk_defconfig @@ -27,6 +27,7 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg" CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C=y CONFIG_SPL_POWER=y diff --git a/configs/imx8mn_ddr4_evk_defconfig b/configs/imx8mn_ddr4_evk_defconfig index 78943dd91d3..ee9960e3cee 100644 --- a/configs/imx8mn_ddr4_evk_defconfig +++ b/configs/imx8mn_ddr4_evk_defconfig @@ -30,6 +30,7 @@ CONFIG_DEFAULT_FDT_FILE="imx8mn-ddr4-evk.dtb" CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_BOOTROM_SUPPORT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C=y CONFIG_SPL_WATCHDOG=y diff --git a/configs/imx8mp_evk_defconfig b/configs/imx8mp_evk_defconfig index 2c6fc16cdf5..b39333eff7e 100644 --- a/configs/imx8mp_evk_defconfig +++ b/configs/imx8mp_evk_defconfig @@ -31,6 +31,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_BOOTROM_SUPPORT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C=y diff --git a/configs/imx8mq_cm_defconfig b/configs/imx8mq_cm_defconfig index e0a038b168c..ab02312c143 100644 --- a/configs/imx8mq_cm_defconfig +++ b/configs/imx8mq_cm_defconfig @@ -25,6 +25,7 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/ronetix/imx8mq-cm/imximage-8mq-lpddr4.cfg" CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C=y CONFIG_SYS_PROMPT="u-boot=> " diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig index 29a45ec54bc..3868d7c39b0 100644 --- a/configs/kontron_sl28_defconfig +++ b/configs/kontron_sl28_defconfig @@ -31,6 +31,7 @@ CONFIG_USE_BOOTARGS=y CONFIG_BOARD_LATE_INIT=y CONFIG_PCI_INIT_R=y CONFIG_SPL_BOARD_INIT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y CONFIG_SPL_SPI_LOAD=y diff --git a/configs/phycore-imx8mp_defconfig b/configs/phycore-imx8mp_defconfig index 84a0a5cbaf2..e90c583c85c 100644 --- a/configs/phycore-imx8mp_defconfig +++ b/configs/phycore-imx8mp_defconfig @@ -27,6 +27,7 @@ CONFIG_DEFAULT_FDT_FILE="oftree" CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_BOOTROM_SUPPORT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C=y From patchwork Sun Aug 1 20:59:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1512133 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=JjrfaRf2; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GdD711wh2z9sT6 for ; Mon, 2 Aug 2021 07:00:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 464CB832D2; Sun, 1 Aug 2021 23:00:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="JjrfaRf2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0BE1083239; Sun, 1 Aug 2021 23:00:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 E5D388311A for ; Sun, 1 Aug 2021 22:59:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x329.google.com with SMTP id a5-20020a05683012c5b029036edcf8f9a6so15694226otq.3 for ; Sun, 01 Aug 2021 13:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fr9HRuMMeid4v4H25Tl2c3NNHmMsSP16sGuEXi0mcC0=; b=JjrfaRf24fUpC/n+2I9FuFvkqsHlVmA4SDhWkEzU2gyQ6evHP8kMntGBOsR2tXXsMx ueHoz2e59QhsQHCqjejOM6500ABDZT2Ytrit+Y00iqysQztsL26GpGaQiisZ6s3tHlVf G2tiSLkw/FHigo2jpQ8P0V8IVb8YeL8nBUgvw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fr9HRuMMeid4v4H25Tl2c3NNHmMsSP16sGuEXi0mcC0=; b=pVMBlA8rH/2EmyvXBi9wJDrepVEdZQbjrIiKzzWLhC7MpwZ36TCmeFWUKxmaIP2n5c 9uV7/2YX16i1vdM21EGKx+rDbipvqEpIK0nEGTaYoWZ/FMjFu6dYntxxune13e/Ra1Jt T3hzi/ZDSU8HcOmDHKZT7CF5Cm6E8P7cZKV+RHXc/mrumswobYFM7KEx3tR1SUdlJcy2 PjrXuEkLZZobwYFgbPeMmW+1nGr6rYg4IJaXD5DG5CUr5zpuTZLmVAz8YtFMJQHZUdLn S4njbK6iBPF4v5CY6Z1kPtXJ5k5Ck2Rde4IqfiXXRYDapnW8n9Am/qEyAYmrqaQYbyKM JnBw== X-Gm-Message-State: AOAM530C9v521+2ooTYD7z3T+yZsPPHAXjZxYlGPeWMG1cenSiV/n9bf mk7CkHaJ+IRuNs78HPpMV0T45C2xcaq2iWm1 X-Google-Smtp-Source: ABdhPJx0zF1m2lNHW2KpN1Ug9IksBIBl71ai3P824Ub422H6vF421wkVkpsN9bo3+ZQCJ/7qrFkSPg== X-Received: by 2002:a05:6830:3484:: with SMTP id c4mr9489382otu.212.1627851595354; Sun, 01 Aug 2021 13:59:55 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c2sm1372083ooo.28.2021.08.01.13.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 13:59:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tim Harvey , Scott Wood , Simon Glass , Albert Aribaud , Tom Rini Subject: [PATCH v3 2/3] arm: Add an __image_copy_start symbol for ARMv8 Date: Sun, 1 Aug 2021 14:59:49 -0600 Message-Id: <20210801205951.2202789-2-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog In-Reply-To: <20210801205951.2202789-1-sjg@chromium.org> References: <20210801205951.2202789-1-sjg@chromium.org> MIME-Version: 1.0 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 This symbol is needed for binman to locate the start of the image. Add it. Note: the existing line to bring in the .__image_copy_start symbol does not appear to do anything. Signed-off-by: Simon Glass --- I have copied Scott Wood who originally added the line about the __image_copy_start in the hope that he can decide if we should remove it. (no changes since v2) Changes in v2: - Add new patch to add an __image_copy_start symbol for ARMv8 arch/arm/cpu/armv8/u-boot-spl.lds | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds index 9edb662b094..2827a07590d 100644 --- a/arch/arm/cpu/armv8/u-boot-spl.lds +++ b/arch/arm/cpu/armv8/u-boot-spl.lds @@ -22,6 +22,7 @@ ENTRY(_start) SECTIONS { .text : { + __image_copy_start = .; . = ALIGN(8); *(.__image_copy_start) CPUDIR/start.o (.text*) From patchwork Sun Aug 1 20:59:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1512134 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=OnlXEJlK; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GdD744bq1z9sT6 for ; Mon, 2 Aug 2021 07:00:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBDCC832E9; Sun, 1 Aug 2021 23:00:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OnlXEJlK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 20ED68322E; Sun, 1 Aug 2021 23:00:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 D2C398322E for ; Sun, 1 Aug 2021 22:59:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id 19-20020a9d08930000b02904b98d90c82cso15679764otf.5 for ; Sun, 01 Aug 2021 13:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R8ehMQA3aZ2WdICjGHVcCOqAgA2ik+jnnsFLgs5W5Yc=; b=OnlXEJlK//UX5QXubiMVv+6EvpzAmZWq6JSs28W62Ens3Cy9lOkrAHsEiE8QumnWf/ dPfwy2HtI0q0g3cnliXcnM1cz9WpivwKJyMoisxv0CKkAVKsYMUw0R0N/x6/TZO0Dj6n 7ugQFzdZi/PZSBQcE3kosB42lcIWoq0aYUQpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R8ehMQA3aZ2WdICjGHVcCOqAgA2ik+jnnsFLgs5W5Yc=; b=TakcwFEhcYdf16a0KqlxiLT21i1xIrxsq8FBYlwA28RLA4rRmsxGAGdbtRJJtBBlOi ckv5Q7tvMnSt5VNfpg7ZYCsUZDojGPPt1HSvP0UObTsuvuwgNJLOPDeAWWj68ObkRcDx JyMiMVrfv9bvwV4yZvLFmQPy9kGZrCl55/+EnvOdFzVRQGCnRC2hYFJeAe+7Xmj4Ii/m PqdHNRbKN+YvcIVzrUKX3VRjWVFxe7u4vvhgUcYZwafInV7f23ZfQ+V9mVpNO1WgbSdl S2oXlvxeF3U2xO2QEuc98A8LuMyQLMnwPMQs/v0rDerAlwIO/5GwGqbU5AGMj7rD5WRf WRJg== X-Gm-Message-State: AOAM533hgqZ4NU7m9OfQn/nWM6inMAi5/rJfjwAYnOFTYLpVBU8dlG23 iEpb5JXWVQcKFaCDjA4XkvPphTFfErtOGosY X-Google-Smtp-Source: ABdhPJy1sLvB42CiMUwL+GVEmZtXftRqWugQaumaFdwnULKwpuyFytAuXS3C25bq9XqM/N0zMDI3nA== X-Received: by 2002:a05:6830:49:: with SMTP id d9mr9814373otp.84.1627851596291; Sun, 01 Aug 2021 13:59:56 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c2sm1372083ooo.28.2021.08.01.13.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 13:59:55 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tim Harvey , Scott Wood , Simon Glass , Tim Harvey Subject: [PATCH v3 3/3] binman: Show an error if __image_copy_start is missing Date: Sun, 1 Aug 2021 14:59:50 -0600 Message-Id: <20210801145948.v3.3.Id1246d1ff1cb5750f8c7ddde9665cf6f09615a7c@changeid> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog In-Reply-To: <20210801205951.2202789-1-sjg@chromium.org> References: <20210801205951.2202789-1-sjg@chromium.org> MIME-Version: 1.0 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 Binman needs this symbol to be able to figure out the start of the image. Detect if it is missing and report an error if any symbols are needed. Add more documentation about possible binman warnings. Signed-off-by: Simon Glass Reviewed-by: Tim Harvey --- (no changes since v1) tools/binman/binman.rst | 109 +++++++++++++++++++++++++++++++++++++++ tools/binman/elf.py | 6 ++- tools/binman/elf_test.py | 7 ++- 3 files changed, 118 insertions(+), 4 deletions(-) diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst index 09e7b571982..81e0a1364ff 100644 --- a/tools/binman/binman.rst +++ b/tools/binman/binman.rst @@ -1158,6 +1158,115 @@ development, since dealing with exceptions and problems in threads is more difficult. This avoids any use of ThreadPoolExecutor. +Dealing with warnings and errors +-------------------------------- + +__image_copy_start +~~~~~~~~~~~~~~~~~~ + +If you see:: + + Cannot process symbol 'xxx' since there is no __image_copy_start + +this means that your SPL image does not include an `__image_copy_start` symbol. +You can check this with:: + + nm spl/u-boot-spl |grep __image_copy_start + +If there is no output them you don't have that symbol. It is normally created +in a `u-boot-spl.lds` file, like this:: + + text : + { + __image_copy_start = .; + *(.vectors) + CPUDIR/start.o (.text*) + *(.text*) + *(.glue*) + } + +Check the appropriate file for your board, typically in the `arch/xxx/cpu` +or `arch/xxx/cpu/xxx` directory. + +Entry xx not found in list +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you see something like:: + + output: 'binman: Section '/binman/u-boot-spl-ddr': + Symbol '_binman_u_boot_any_prop_image_pos' + in entry '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-nodtb': + Entry 'u-boot-any' not found in list (u-boot-spl-nodtb,u-boot-spl-dtb, + u-boot-spl,blob-ext@1,blob-ext@2,blob-ext@3,blob-ext@4,main-section) + +this means that binman knows it should set the value of a symbol called +`_binman_u_boot_any_prop_image_pos` but does not know how. That symbol name is +generated by the `binman_symname` macro (see `binman_sym.h`):: + + #define binman_symname(_entry_name, _prop_name) \ + _binman_ ## _entry_name ## _prop_ ## _prop_name + +so binman decodes it into: + +_binman_ + prefix for all symbols +u_boot_any + entry to find +_prop_ + prefix for property +image_pos + image_pos property + +It therefore looks for u-boot-any, which means any U-Boot symbol. Supported ones +are: + +- u-boot +- u-boot-img +- u-boot-nodtb + +You can see a list of the symbols it tried, in brackets. None of these matches +the above list. The source definition in this example is:: + + &binman { + u-boot-spl-ddr { + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + align-size = <4>; + align = <4>; + + u-boot-spl { + align-end = <4>; + }; + + blob-ext-1 { + filename = "lpddr4_pmu_train_1d_imem.bin"; + size = <0x8000>; + }; + + blob-ext-2 { + filename = "lpddr4_pmu_train_1d_dmem.bin"; + size = <0x4000>; + }; + + blob-ext-3 { + filename = "lpddr4_pmu_train_2d_imem.bin"; + size = <0x8000>; + }; + + blob-ext-4 { + filename = "lpddr4_pmu_train_2d_dmem.bin"; + size = <0x4000>; + }; + }; + +and you can see that, while `u-boot-spl` is present, `u-boot` is not. Binman +must find the required symbol somewhere in the same image. + +In this case the problem is that CONFIG_SPL_RAW_IMAGE_SUPPORT is enabled, even +though U-Boot is actually stored in a FIT. This means that +spl_set_header_raw_uboot() is called and it looks for a symbol for U-Boot. +Disabling that option fixes the error. + History / Credits ----------------- diff --git a/tools/binman/elf.py b/tools/binman/elf.py index 03b49d7163c..f14d07da157 100644 --- a/tools/binman/elf.py +++ b/tools/binman/elf.py @@ -112,12 +112,14 @@ def LookupAndWriteSymbols(elf_fname, entry, section): if not syms: return base = syms.get('__image_copy_start') - if not base: - return for name, sym in syms.items(): if name.startswith('_binman'): msg = ("Section '%s': Symbol '%s'\n in entry '%s'" % (section.GetPath(), name, entry.GetPath())) + if not base: + raise ValueError("Cannot process symbol '%s' since there is no __image_copy_start" % + name) + offset = sym.address - base.address if offset < 0 or offset + sym.size > entry.contents_size: raise ValueError('%s has offset %x (size %x) but the contents ' diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py index 7a128018d9f..96630502b2f 100644 --- a/tools/binman/elf_test.py +++ b/tools/binman/elf_test.py @@ -134,8 +134,11 @@ class TestElf(unittest.TestCase): entry = FakeEntry(10) section = FakeSection() elf_fname = self.ElfTestFile('u_boot_binman_syms_bad') - self.assertEqual(elf.LookupAndWriteSymbols(elf_fname, entry, section), - None) + with self.assertRaises(ValueError) as e: + self.assertEqual(elf.LookupAndWriteSymbols(elf_fname, entry, section), + None) + self.assertIn("Cannot process symbol '_binman_u_boot_spl_any_prop_offset' since there is no __image_copy_start", + str(e.exception)) def testBadSymbolSize(self): """Test that an attempt to use an 8-bit symbol are detected