From patchwork Fri Jun 10 10:58:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alper Nebi Yasak X-Patchwork-Id: 1641899 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=CfuK7aG+; dkim-atps=neutral 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=) 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKHyL474jz9s09 for ; Fri, 10 Jun 2022 20:58:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C7B5E84406; Fri, 10 Jun 2022 12:58:45 +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="CfuK7aG+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D287F843EE; Fri, 10 Jun 2022 12:58:42 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 EA31B843FF for ; Fri, 10 Jun 2022 12:58:38 +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=alpernebiyasak@gmail.com Received: by mail-ed1-x536.google.com with SMTP id b8so18085793edj.11 for ; Fri, 10 Jun 2022 03:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/HhipniJDmM/aSiyXZTuCsLrYnsbUfJtyzoYrnFFugQ=; b=CfuK7aG+ipuK2+V3pu6KSIHsV9Tiv0JDaMi2C9yim4qyb/IXXnkK8bNdtrtp1l8WFO tJPG6y+o4F7MhSEvDNst2OOK73b2i4hwrc7D0I3rKZKK/QBlPd1fUfipXlUq/+dsSk5E GEInMlaPqhTgRZlBaOAdE8YdUl9M8P4CNhbS3/Y19GeJIA33DG9LfsGc7KU8ygBi9ykC qH30OQL8cZXFYJyom9b3H5EshX6ZraGmCE7t8mwuVVdL1WggpGR5rdSaJ17O9mIJXMwR ok/Ft0Da5z7yrreBK/lx8BXfkzSO+on4/QStkZxtApFbQhGw0L+PBfdyD52L8JcUG27t 0Gsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/HhipniJDmM/aSiyXZTuCsLrYnsbUfJtyzoYrnFFugQ=; b=SCadHWYFFgvtsvWjMS++7K9g9yVqfT70EpWMskoQgabElu4GsUZ9oTM2bI8P4wtDD6 sYhkF6XhmaYZK6HkutKsE5bph3PUTZa65HYI2qcu01deVOf8qSgrdli/ldP+jYH+ny4h 57X8w6OEHbGrOe3ny/eP6UD0Lp9hIcZt2Ww+KJavaQ7G1/DhMwP7MhIsidH7r/l6PP6u Xr3TuA5dpMS+j5yVYKhxm49III+1XmkKh4NrWIXhPt6pGbAoA4E6t8FDFRfxCLc2XyBG IVONtxDDXUvGpHY729we+fUj9nMua4ASXu0Nds8OLo5fsfsJSYZE8pP+CQtRsGl+BPcC Y01Q== X-Gm-Message-State: AOAM533+kNgYjrv9NH0C2KIjE32Tna4hxuCvmmTEOD/Y6GkIw5hr6IgD +nd5dtKWM9sgNKhEbRKTm9N5dGCeNew= X-Google-Smtp-Source: ABdhPJxlz0nmxoKUGSS4AXB1gMQzmfDiR7waKK284zST6dsCh4EtgC6l7UOj8xCvpR/H361uqvQaPA== X-Received: by 2002:a05:6402:322a:b0:42e:1778:1f1f with SMTP id g42-20020a056402322a00b0042e17781f1fmr48094811eda.115.1654858718199; Fri, 10 Jun 2022 03:58:38 -0700 (PDT) Received: from localhost.localdomain ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id i23-20020a1709061e5700b00708a2ae7620sm11673390ejj.67.2022.06.10.03.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 03:58:37 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: Stefan Roese , =?utf-8?q?Pali_Roh=C3=A1r?= , Simon Glass , Michael Walle , Peng Fan , Oleksandr Suvorov , Patrick Delaunay , Philippe Reynes , Ricardo Salveti , Wolfgang Denk , Andre Przywara , Tom Rini , Heinrich Schuchardt , Marek Vasut , =?utf-8?q?Marek_Beh=C3=BAn?= , Ovidiu Panait , Heiko Thiery , Alexandru Gagniuc , Alper Nebi Yasak Subject: [PATCH 1/5] spl: binman: Fix use of undeclared u_boot_any symbols Date: Fri, 10 Jun 2022 13:58:01 +0300 Message-Id: <20220610105806.27177-2-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610105806.27177-1-alpernebiyasak@gmail.com> References: <20220610105806.27177-1-alpernebiyasak@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean Some SPL functions directly use the binman 'u_boot_any' symbols to get U-Boot's binman image position. These symbols are declared by the SPL/TPL_BINMAN_SYMBOLS configs, but they are accessed by macros defined by just CONFIG_BINMAN. So when BINMAN is enabled and BINMAN_SYMBOLS is disabled, the code tries to use undeclared symbols and we get an error. Therefore, any use of 'u_boot_any' symbols in the code is an implicit dependency on SPL/TPL_BINMAN_SYMBOLS. However, in the current uses they are meant to be the next phase's values, where that happens to be U-Boot. In the meantime, helper funcions spl_get_image_pos/size() were introduced to get these values. Convert all uses of u_boot_any symbols to these functions, so we only access these symbols at one place. Make sure they will not use these symbols when the BINMAN_SYMBOLS configs are disabled, by returning early in those cases. Signed-off-by: Alper Nebi Yasak --- common/spl/spl.c | 10 +++++++--- common/spl/spl_ram.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 2a69a7c9324d..5630dcdb5c1e 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -149,9 +149,11 @@ void spl_fixup_fdt(void *fdt_blob) #endif } -#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) ulong spl_get_image_pos(void) { + if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS)) + return BINMAN_SYM_MISSING; + #ifdef CONFIG_VPL if (spl_next_phase() == PHASE_VPL) return binman_sym(ulong, u_boot_vpl, image_pos); @@ -163,6 +165,9 @@ ulong spl_get_image_pos(void) ulong spl_get_image_size(void) { + if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS)) + return BINMAN_SYM_MISSING; + #ifdef CONFIG_VPL if (spl_next_phase() == PHASE_VPL) return binman_sym(ulong, u_boot_vpl, size); @@ -171,7 +176,6 @@ ulong spl_get_image_size(void) binman_sym(ulong, u_boot_spl, size) : binman_sym(ulong, u_boot_any, size); } -#endif /* BINMAN_SYMBOLS */ ulong spl_get_image_text_base(void) { @@ -222,7 +226,7 @@ __weak struct image_header *spl_get_load_buffer(ssize_t offset, size_t size) void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { - ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); + ulong u_boot_pos = spl_get_image_pos(); spl_image->size = CONFIG_SYS_MONITOR_LEN; diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 829645925718..d64710878cf2 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -70,7 +70,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, load.read = spl_ram_load_read; spl_load_simple_fit(spl_image, &load, 0, header); } else { - ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); + ulong u_boot_pos = spl_get_image_pos(); debug("Legacy image\n"); /* From patchwork Fri Jun 10 10:58:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alper Nebi Yasak X-Patchwork-Id: 1641900 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=jKx1Ctnv; dkim-atps=neutral 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=) 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKHyY3ZxZz9s09 for ; Fri, 10 Jun 2022 20:59:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE6ED843FA; Fri, 10 Jun 2022 12:58:50 +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="jKx1Ctnv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A72CB843FF; Fri, 10 Jun 2022 12:58:48 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 78DDF84403 for ; Fri, 10 Jun 2022 12:58:45 +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=alpernebiyasak@gmail.com Received: by mail-ed1-x530.google.com with SMTP id w27so34701546edl.7 for ; Fri, 10 Jun 2022 03:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uvLjrgj7k3y2Ea9zMLEkOCAuDRXw+QawMCX0tIH8yUo=; b=jKx1CtnvIRa411FsP6xuecqA+qkwMeuM/pjFgyuuI794VrXQPWnVJ6pYrGXQlemFB1 PDNX4NTP5jUdeAQZSv+tUQA0j9mBXDQXEjupqI4ldeftN3irwYsZM5xG4WcuZ23oYb4i TeQNlzB5WAT+M3vWrzvVgXSD8z/ZqfcHmtdarB5nuECCjc13c/lVvHXYC1n9VneGZ3Ga W6kiVZxyIUCZuH9qEZYhyeIz04levW5KZG+VeZ/FkjubkXnvD8bVsKr2RHAjf6ktmj5i 8dLcZQ6vujnldWkMFunbYoBo5qESlyM0sYE54uDbJed9KM75AC+4zv758Wp9aVPMY1o3 SAqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uvLjrgj7k3y2Ea9zMLEkOCAuDRXw+QawMCX0tIH8yUo=; b=vDQ0K90QeJCFCSXXg5PPhrCytSs9PSNfrBOfgcz11bX4NcJ73K720sVZAfDnaJMY/W 17SWLqX9UHat3VXHGm0LVYRtJhomth8gqcPWE0axiGlbmDvA55YwLNOZH2E3s+SVzuD6 /mMBNiRk6KcSG/bmPs9wWUh7Pk6wUgGGIUzYm0u3TJK00tPIPZPk1zM90ckjZBAcsP0M YrHvblgV6Oy/uAW2fov0mehwN9OQtjifmKYlDryGxvxlKBzekSRfW3J4L09ujnB97xz3 rO/276VF3qRA23ANqHKTyDWX4h//rz6SIi0+pJmp0k3su/EPjem/imFbV5H/OIyvL9n7 2Arg== X-Gm-Message-State: AOAM533TI0WGxihBuQRCxUZHNrAc8rJPzTXL6ju6cMqzeJgdRQ6Ckbbx dy8bpZg/SV3aMZgeXdtzR0IlNCO74A4= X-Google-Smtp-Source: ABdhPJyRniCgejy4OiPSnZhCp63URiEYwuI+bjlhbc55qUjYpHKe7+HfqHDITfkG5+zRpxDvc7x87A== X-Received: by 2002:a50:d7c6:0:b0:42d:5065:568d with SMTP id m6-20020a50d7c6000000b0042d5065568dmr50074000edj.116.1654858724996; Fri, 10 Jun 2022 03:58:44 -0700 (PDT) Received: from localhost.localdomain ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id i23-20020a1709061e5700b00708a2ae7620sm11673390ejj.67.2022.06.10.03.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 03:58:44 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: Stefan Roese , =?utf-8?q?Pali_Roh=C3=A1r?= , Simon Glass , Michael Walle , Peng Fan , Oleksandr Suvorov , Patrick Delaunay , Philippe Reynes , Ricardo Salveti , Wolfgang Denk , Andre Przywara , Tom Rini , Heinrich Schuchardt , Marek Vasut , =?utf-8?q?Marek_Beh=C3=BAn?= , Ovidiu Panait , Heiko Thiery , Alexandru Gagniuc , Alper Nebi Yasak Subject: [PATCH 2/5] spl: binman: Make TPL_BINMAN_SYMBOLS depend on TPL_FRAMEWORK Date: Fri, 10 Jun 2022 13:58:02 +0300 Message-Id: <20220610105806.27177-3-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610105806.27177-1-alpernebiyasak@gmail.com> References: <20220610105806.27177-1-alpernebiyasak@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean TPL_BINMAN_SYMBOLS depends on SPL_FRAMEWORK. The code this enables is compiled by checking CONFIG_$(SPL_TPL_)FRAMEWORK, so it should depend on TPL_FRAMEWORK instead (which in turn depends on SPL_FRAMEWORK). This was most likely a typo due to copy-pasting the config's SPL version, fix it. Signed-off-by: Alper Nebi Yasak --- common/spl/Kconfig.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/Kconfig.tpl b/common/spl/Kconfig.tpl index 9a0e719cf949..834cb6b6dd82 100644 --- a/common/spl/Kconfig.tpl +++ b/common/spl/Kconfig.tpl @@ -10,7 +10,7 @@ config TPL_SIZE_LIMIT config TPL_BINMAN_SYMBOLS bool "Declare binman symbols in TPL" - depends on SPL_FRAMEWORK && BINMAN + depends on TPL_FRAMEWORK && BINMAN default y help This enables use of symbols in TPL which refer to U-Boot, enabling TPL From patchwork Fri Jun 10 10:58:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alper Nebi Yasak X-Patchwork-Id: 1641901 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ZRGpnJON; dkim-atps=neutral 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=) 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKHyn6qZHz9s09 for ; Fri, 10 Jun 2022 20:59:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B98C84415; Fri, 10 Jun 2022 12:58:57 +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="ZRGpnJON"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF78984414; Fri, 10 Jun 2022 12:58:54 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 51B108440B for ; Fri, 10 Jun 2022 12:58:52 +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=alpernebiyasak@gmail.com Received: by mail-ej1-x62f.google.com with SMTP id gl15so38880586ejb.4 for ; Fri, 10 Jun 2022 03:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N6nvezbm8XOtYDbyLt+66YKP3L9AtYA0UmwP6yqjiiM=; b=ZRGpnJONZFqsdlsD42/tTm8kmQXL94QdM+164/RQReHb3GnZwQvw2lWORzeonesp+G P5zuwI0Fy17RH3K3RBcxkHI2k8Aez/up74EOaRIgYp+Nw5vdeQx9ff8q/HYs1WzcccUw 4W65xThVPCUa4liNOTEOzBFn4I/1jKuIDoU450tgTvVWA0jddKgvDn0spnJWLYL0FlhM Yn4THvxgQMJ2zYwr00CIIGQb1qr5M7EninCdHJjRGh+wwHyXVWG5QbIVdwIpNYMzj3yC KSsV8CimQLQ1LVGYioOSSWj/L6c/NHeY9FMCB+iaAaXN17TRZOQd+9k/Y84MBpv8FyNp tZhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N6nvezbm8XOtYDbyLt+66YKP3L9AtYA0UmwP6yqjiiM=; b=iMqIfwnjE6hZTQ+Ae+FxgklMMcGlwVI+68CZXrleKmNDpPGfkyrE2pvJFoTRhwaIfH RXxN7jRhLTINKMp7ybJ9dPEAdo8TzCfDH0lOHhPHGFlYHz7Xk26tlO1q77F9wvh70l1s Whb2dJmEadqXDQ50ioll3++PL4hoM8SBbiJmgt1SO9HDuNpsgoYAwirqhXayWTlAMcbx bLfONdcLoWmUp6kIGHEd3A+SHrhg4yaAHjKilYMBy5YJsK8ap4XBhS+Wi3jLMlvjWQE1 OGmSrcIemsfHfq8KU0NzoH6bSBGYorykFnsr9KTJrW8/Fy5TFF6HcKY3GGKDLLhHDC7g 3gIw== X-Gm-Message-State: AOAM532xHUZUUUDi+H9yFx9rHHJEpmG64Upl1KvlLgKxe+gE+UCyPtcb 6dS6gdJ/hhYnKGuMM0IcnQRdO7yDxH0= X-Google-Smtp-Source: ABdhPJyKScQNN6Gc7nudYhsIq4tTzX1LSQvR50M4j+hyDop15TL91BlrStQeYg67PeGTgwVpOQdRaw== X-Received: by 2002:a17:907:16a2:b0:711:d048:7d41 with SMTP id hc34-20020a17090716a200b00711d0487d41mr22645578ejc.126.1654858731563; Fri, 10 Jun 2022 03:58:51 -0700 (PDT) Received: from localhost.localdomain ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id i23-20020a1709061e5700b00708a2ae7620sm11673390ejj.67.2022.06.10.03.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 03:58:51 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: Stefan Roese , =?utf-8?q?Pali_Roh=C3=A1r?= , Simon Glass , Michael Walle , Peng Fan , Oleksandr Suvorov , Patrick Delaunay , Philippe Reynes , Ricardo Salveti , Wolfgang Denk , Andre Przywara , Tom Rini , Heinrich Schuchardt , Marek Vasut , =?utf-8?q?Marek_Beh=C3=BAn?= , Ovidiu Panait , Heiko Thiery , Alexandru Gagniuc , Alper Nebi Yasak Subject: [PATCH 3/5] spl: binman: Declare extern symbols for VPL as well Date: Fri, 10 Jun 2022 13:58:03 +0300 Message-Id: <20220610105806.27177-4-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610105806.27177-1-alpernebiyasak@gmail.com> References: <20220610105806.27177-1-alpernebiyasak@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean The binman extern symbol declarations in spl.h are missing the VPL symbols recently added to spl.c, add them like the others. Signed-off-by: Alper Nebi Yasak --- include/spl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/spl.h b/include/spl.h index 83ac583e0b49..1778e0f53686 100644 --- a/include/spl.h +++ b/include/spl.h @@ -288,6 +288,8 @@ binman_sym_extern(ulong, u_boot_any, image_pos); binman_sym_extern(ulong, u_boot_any, size); binman_sym_extern(ulong, u_boot_spl, image_pos); binman_sym_extern(ulong, u_boot_spl, size); +binman_sym_extern(ulong, u_boot_vpl, image_pos); +binman_sym_extern(ulong, u_boot_vpl, size); /** * spl_get_image_pos() - get the image position of the next phase From patchwork Fri Jun 10 10:58:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alper Nebi Yasak X-Patchwork-Id: 1641902 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=pZbL6jkE; dkim-atps=neutral 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=) 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKHz14Srfz9s09 for ; Fri, 10 Jun 2022 20:59:25 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 139128441C; Fri, 10 Jun 2022 12:59:06 +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="pZbL6jkE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BE36A84401; Fri, 10 Jun 2022 12:59:02 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 DE23884404 for ; Fri, 10 Jun 2022 12:58:58 +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=alpernebiyasak@gmail.com Received: by mail-ed1-x52c.google.com with SMTP id x5so29673954edi.2 for ; Fri, 10 Jun 2022 03:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JB7OrE+y/xGEhkwW4qJFFAUbgDnHgHCVxN272cxmMLk=; b=pZbL6jkE5pmOX9RY3U0N5fqaCx+VRJRMwqsgImHNv76tnqitJEczs7f2DH6BY0KTIM w8MFglKSux2NXH5etuOlVEiQVIiNze04TIBfXXHpcFD/gx1nktQXz8IonqqaAYPWk0bn ve2SjILfUiLJ/diKpT0yrtdN5L3N61fTT2vLtcs73nVlIG2BfuQpBOAFvXNi5UNxJUOM nIVWuSf0ralX3urvtco4c0G/SMWnZcUb5YLRdjXWo2hmbmt/kpiragHB+UnOZSSTK2RW oT0UDPzyHwRjoRwiDaG02FapPWoaKS0M8YwHHQb22RWiB9xER8dNXxxvdUz4KR26x2Ag mfBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JB7OrE+y/xGEhkwW4qJFFAUbgDnHgHCVxN272cxmMLk=; b=G9nWn5CPIZt21Fo/IrMPexlvTL6zaDS6aWZaUuRh/nLle3hMW4i9TWCFVmwwJ1B3g/ et+6sQy14NYFoULUhnCfYtp1XlLB9BkPLPCKQV5xtLgY+FhasFWXiJmkUKVKMCF57ZCj lL8Exjhf6NzYC6pk3qnSJs2EZThpyKrSvb6n+BRnKXrAUO2FgKMNxZdSC4tOgjqgr2vI BxBV1chZ/HKPQlIpz9ljEYHyP6nqykRK9q4XjXHpOMKFqCU9ihi4BzUjFi95M50Cvi+t 4dgBghGfGAZlFbwGDlM2Xn8lyqJScFufLuUWaZyGctOOW/THl0Yk4ONvbkQ92M75Qgvl Qu9g== X-Gm-Message-State: AOAM531dg+3NKVcr2WQXBKgWEo1Ct8dGAIK3RM32miFwMxmzuLk69fBj mFVVdZYgBfeQLfzd81zCJ6C/poNvB8w= X-Google-Smtp-Source: ABdhPJz9uLhAIouoepDF9lYekIrL36dIz1fp4o0MDCCaNkokRh8+jQ8PHotGeG3szvk8+O65yg758g== X-Received: by 2002:a05:6402:84c:b0:430:aae2:6dd8 with SMTP id b12-20020a056402084c00b00430aae26dd8mr37300151edz.31.1654858738231; Fri, 10 Jun 2022 03:58:58 -0700 (PDT) Received: from localhost.localdomain ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id i23-20020a1709061e5700b00708a2ae7620sm11673390ejj.67.2022.06.10.03.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 03:58:57 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: Stefan Roese , =?utf-8?q?Pali_Roh=C3=A1r?= , Simon Glass , Michael Walle , Peng Fan , Oleksandr Suvorov , Patrick Delaunay , Philippe Reynes , Ricardo Salveti , Wolfgang Denk , Andre Przywara , Tom Rini , Heinrich Schuchardt , Marek Vasut , =?utf-8?q?Marek_Beh=C3=BAn?= , Ovidiu Panait , Heiko Thiery , Alexandru Gagniuc , Alper Nebi Yasak Subject: [PATCH 4/5] spl: binman: Let u-boot-spl/vpl symbol declarations be disabled Date: Fri, 10 Jun 2022 13:58:04 +0300 Message-Id: <20220610105806.27177-5-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610105806.27177-1-alpernebiyasak@gmail.com> References: <20220610105806.27177-1-alpernebiyasak@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean The SPL/TPL_BINMAN_SYMBOLS config only disables the u_boot_any symbol. Extend its #if directive to cover declarations for all phases. Update the Kconfig prompt and help message to make it clearer about this. Signed-off-by: Alper Nebi Yasak --- common/spl/Kconfig | 12 ++++++------ common/spl/Kconfig.tpl | 12 ++++++------ common/spl/spl.c | 3 ++- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2ad2351c6eb3..f32548b8c9a7 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -186,16 +186,16 @@ config SPL_SHOW_ERRORS This adds a small amount to SPL code size, perhaps 100 bytes. config SPL_BINMAN_SYMBOLS - bool "Declare binman symbols in SPL" + bool "Declare binman symbols for U-Boot phases in SPL" depends on SPL_FRAMEWORK && BINMAN default y help - This enables use of symbols in SPL which refer to U-Boot, enabling SPL - to obtain the location of U-Boot simply by calling spl_get_image_pos() - and spl_get_image_size(). + This enables use of symbols in SPL which refer to U-Boot phases, + enabling SPL to obtain the location and size of its next phase simply + by calling spl_get_image_pos() and spl_get_image_size(). - For this to work, you must have a U-Boot image in the binman image, so - binman can update SPL with the location of it. + For this to work, you must have all U-Boot phases in the same binman + image, so binman can update SPL with the locations of everything. source "common/spl/Kconfig.nxp" diff --git a/common/spl/Kconfig.tpl b/common/spl/Kconfig.tpl index 834cb6b6dd82..3a97487c9983 100644 --- a/common/spl/Kconfig.tpl +++ b/common/spl/Kconfig.tpl @@ -9,16 +9,16 @@ config TPL_SIZE_LIMIT If this value is zero, it is ignored. config TPL_BINMAN_SYMBOLS - bool "Declare binman symbols in TPL" + bool "Declare binman symbols for U-Boot phases in TPL" depends on TPL_FRAMEWORK && BINMAN default y help - This enables use of symbols in TPL which refer to U-Boot, enabling TPL - to obtain the location of U-Boot simply by calling spl_get_image_pos() - and spl_get_image_size(). + This enables use of symbols in TPL which refer to U-Boot phases, + enabling TPL to obtain the location and size of its next phase simply + by calling spl_get_image_pos() and spl_get_image_size(). - For this to work, you must have a U-Boot image in the binman image, so - binman can update TPL with the location of it. + For this to work, you must have all U-Boot phases in the same binman + image, so binman can update TPL with the locations of everything. config TPL_FRAMEWORK bool "Support TPL based upon the common SPL framework" diff --git a/common/spl/spl.c b/common/spl/spl.c index 5630dcdb5c1e..4579289f9d83 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -55,7 +55,6 @@ u32 *boot_params_ptr = NULL; /* See spl.h for information about this */ binman_sym_declare(ulong, u_boot_any, image_pos); binman_sym_declare(ulong, u_boot_any, size); -#endif #ifdef CONFIG_TPL binman_sym_declare(ulong, u_boot_spl, image_pos); @@ -67,6 +66,8 @@ binman_sym_declare(ulong, u_boot_vpl, image_pos); binman_sym_declare(ulong, u_boot_vpl, size); #endif +#endif /* BINMAN_SYMBOLS */ + /* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); From patchwork Fri Jun 10 10:58:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alper Nebi Yasak X-Patchwork-Id: 1641903 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ovgXeL1C; dkim-atps=neutral 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=) 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKHzF4JWvz9s09 for ; Fri, 10 Jun 2022 20:59:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 67DC0843E7; Fri, 10 Jun 2022 12:59:15 +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="ovgXeL1C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7AA7C84420; Fri, 10 Jun 2022 12:59: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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 1284584408 for ; Fri, 10 Jun 2022 12:59:05 +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=alpernebiyasak@gmail.com Received: by mail-ej1-x62a.google.com with SMTP id bg6so32951022ejb.0 for ; Fri, 10 Jun 2022 03:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4bwBhsPSeXrpwk/bNYtdMsgc+7KNugXqT04REFZc8Ug=; b=ovgXeL1C7PrKiQT8a1yZN2E08CYLyAtW4W+p2U96OIk4ygfHVXXEVo5rgyr+DyyEZk KLRNcGZkl7VbhqRacThnZHaNMpyBxp3OQ25w2vIv3RJiqA0OIhbxuEhFacq0y2wC7GXA xfBWbb07MoM+ctznKQUN4xqWlIJBIsuO0sGeSVhbSinkVPrUJU7csOn0imTLUtuMNKUl 7D6ArMuC4IEqwvv63BL8UJNqNIvMf45oaZiGDVVJi+GprotdvkGkP3bdiYz5880ozJ1s 4CGPJMb8BFY1++31x2PXxdmMWbZjsyJwA6El5+ghIN5HRB6bxDZrZaVv1Bm1VXZXltZZ pOGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4bwBhsPSeXrpwk/bNYtdMsgc+7KNugXqT04REFZc8Ug=; b=x39azxcyv/pxHDrYtU/4Q0NKvRXS2vl4RGrPZgKbpYDzIM5rTBKh0f6Wd9MSYZzx+Y soUNgXL6AQZ7NNVFltsnqy1F/bFI8iZaoNVv/d0D/G5XZ3a4rqqBvNTntn5+J+swQlOk OOlT+tXOLVrMp2kvOhKQkiXbzGA3bq4qkbQsZI02bDMUDZuK5kUOx9B3BREUyNkcN3c+ Qq48eP/fuX6Lhc1xBOP5Uawz0KEt0j1fusJRlGrqEObleja4JQfI/SfwPkoz3dMOr9mE HCuIAbqnyQbLXV8HROSZh6+uv9ItkouxMF3iOJAHEBGCc52zpu9EyGDL4dk8UVH36i7Y TQaQ== X-Gm-Message-State: AOAM532wmB9V2vum4B+FtqMV5HMNuGJjimeCMezZevjC2CkKEL+NTF53 b5+Pl1QHs/5wgqbwfCjO8ETf0q0Yfb4= X-Google-Smtp-Source: ABdhPJwEc6u+5BmOqcJ09x81vXKLXly2EZnFBtICLzZGLSe4maKYmdXAzXH8GZxzwxOjtQ/d8bkU9Q== X-Received: by 2002:a17:907:a424:b0:702:f94a:a897 with SMTP id sg36-20020a170907a42400b00702f94aa897mr39055385ejc.255.1654858744268; Fri, 10 Jun 2022 03:59:04 -0700 (PDT) Received: from localhost.localdomain ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id i23-20020a1709061e5700b00708a2ae7620sm11673390ejj.67.2022.06.10.03.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 03:59:03 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: Stefan Roese , =?utf-8?q?Pali_Roh=C3=A1r?= , Simon Glass , Michael Walle , Peng Fan , Oleksandr Suvorov , Patrick Delaunay , Philippe Reynes , Ricardo Salveti , Wolfgang Denk , Andre Przywara , Tom Rini , Heinrich Schuchardt , Marek Vasut , =?utf-8?q?Marek_Beh=C3=BAn?= , Ovidiu Panait , Heiko Thiery , Alexandru Gagniuc , Alper Nebi Yasak Subject: [PATCH 5/5] spl: binman: Add a config option for binman symbols in VPL Date: Fri, 10 Jun 2022 13:58:05 +0300 Message-Id: <20220610105806.27177-6-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610105806.27177-1-alpernebiyasak@gmail.com> References: <20220610105806.27177-1-alpernebiyasak@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean The SPL code declares binman symbols for U-Boot phases depending on CONFIG_IS_ENABLED(BINMAN_SYMBOLS). This config exists for SPL and TPL, also add a version for VPL. Signed-off-by: Alper Nebi Yasak --- common/spl/Kconfig.vpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/spl/Kconfig.vpl b/common/spl/Kconfig.vpl index ba1ea6075b94..29fa1cf400ba 100644 --- a/common/spl/Kconfig.vpl +++ b/common/spl/Kconfig.vpl @@ -198,4 +198,16 @@ config VPL_TEXT_BASE help The address in memory that VPL will be running from. +config VPL_BINMAN_SYMBOLS + bool "Declare binman symbols for U-Boot phases in VPL" + depends on VPL_FRAMEWORK && BINMAN + default y + help + This enables use of symbols in VPL which refer to U-Boot phases, + enabling VPL to obtain the location and size of its next phase simply + by calling spl_get_image_pos() and spl_get_image_size(). + + For this to work, you must have all U-Boot phases in the same binman + image, so binman can update VPL with the locations of everything. + endmenu