From patchwork Fri Apr 13 15:31:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 897999 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="F52KfFxn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40N29r286jz9s16 for ; Sat, 14 Apr 2018 01:43:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F22F5C21E07; Fri, 13 Apr 2018 15:34:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EE427C21E45; Fri, 13 Apr 2018 15:32:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 45E7BC21DB5; Fri, 13 Apr 2018 15:31:45 +0000 (UTC) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by lists.denx.de (Postfix) with ESMTPS id AE386C21DD4 for ; Fri, 13 Apr 2018 15:31:40 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id d19so9178371wre.1 for ; Fri, 13 Apr 2018 08:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=guTPV85x+THIISQjael5JIJYgZEJI5AyKYRcOCLdmuI=; b=F52KfFxngGezVNBMdEFSIa9dfVEbZRbv0lSKTd0P7R6RWRXRMUaFcNQCpA16h0ZpNX to8ZZAPvpMO0bpYSDMvLQSEpdwrxi0UdItFKZlOZwivDWJXQE2yeuUgg8ice+iuliFFT ENbQsgyeV8AjArslIT9DU7rMBC81Ls5RALtg0= 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; bh=guTPV85x+THIISQjael5JIJYgZEJI5AyKYRcOCLdmuI=; b=BBUgdIW/1xbhi1mh9hN2GVM6Q2c8z3gHmGLTk2UAEghLficUSlAPh11QKhgW+weN2/ TfLOKr/wdBb6/fe8T3JRpLUA5Gqfm3Xpm9dRNKmFPyVbeYKbVvtjJ6XK1lNY7Z5qAu9Z 4uMXn0NDK4kx1SgQql8YcgvH7nmeadxvPCjqCsqG3+InGWVaf8Cs/nDmbQADG0zAtSbT tG3nzcCCFBYtR6vYH9yNQHslVHmf160k7RdhYIrnOCWYv40iG7qho5PlTRn9r2+V/ugC /6jRBNoezM9rvRT1qQ8+BO6z7XnND74wZQvpdtg4aO0gTh/sWoijtNBsTNlnUdQLYn6h oSPg== X-Gm-Message-State: ALQs6tDqxjLmgyxTCxUVhySgHGdXDxUvrFgP8yBHfflnPk3c7XJOmCa7 DuTxZ0v6tVlceFbu5f/hyAN44JIwrVI= X-Google-Smtp-Source: AIpwx4+oDu20ooN65nJcvxIBRLvyhPPpXUQJVdPQOHbqxjfgd9wTQnXgE9whf0DUw5MrAx4Kw60L/Q== X-Received: by 10.80.136.197 with SMTP id d63mr20193556edd.122.1523633500179; Fri, 13 Apr 2018 08:31:40 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x35sm3516008edx.86.2018.04.13.08.31.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 08:31:39 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Fri, 13 Apr 2018 16:31:19 +0100 Message-Id: <1523633481-20914-16-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> References: <1523633481-20914-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v3 15/17] warp7: hab: Set environment variable indicating IVT offset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch introduces the environment variable ivt_offset. When we define a load address for Linux or DTB or any file the IVT associated with that file is prepended. We extract the actual load addresses from u-boot.cfg and feed these values into the code-signing process - hence we want u-boot to have the real load addresses exported in uboot.cfg. ivt_offset represents the addition or subtraction from the load address that must happen to find an IVT header. Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 454bc1c..fe9b7d5 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -10,6 +10,7 @@ #define __WARP7_CONFIG_H #include "mx7_common.h" +#include #define PHYS_SDRAM_SIZE SZ_512M @@ -50,6 +51,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \