From patchwork Fri Mar 30 14:18:44 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: 893360 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="BT9xtJun"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40CP5w6K48z9sXB for ; Sat, 31 Mar 2018 01:25:08 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 8231EC21E96; Fri, 30 Mar 2018 14:22:18 +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_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 ECBFCC2226F; Fri, 30 Mar 2018 14:20:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DB3D8C2226E; Fri, 30 Mar 2018 14:19:09 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 3A17DC22220 for ; Fri, 30 Mar 2018 14:19:05 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id a20so2393679wmd.1 for ; Fri, 30 Mar 2018 07:19:05 -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=FEXxuRRjvn50FM9szallURquLyaI3hcOnAojN0lxomY=; b=BT9xtJun66WkONWf/xjnY3fbKIqMrLS+FThF3iB03BK9L6Apq91rw+yrG9VHU+Ks10 EWGIDARm/Eh7w/+T/M8WYWQ4QLajMhbmy9ri7jUvNlpIS8Q33/sAdqqqr6qYYaRvuB90 lLmb9Fme+RN59Y6DnO0JlmrSAPrE9S4w7Tvm0= 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=FEXxuRRjvn50FM9szallURquLyaI3hcOnAojN0lxomY=; b=FOVJXCxEGdrz/vc+xOL+hb+XLQ4y6rpB9P0+ZdXeRmlnVxvIraI15LNPBbqI+E9PiP yPMdt1RZ0Bk5OViZnODsk/+V/CblYZRhFV5SG5qegnVlIOZP/piLGjqxAaeDSLgmdS6c 7PlJs3xURxsfr8lDo8dE/LAyzCx1DBHVr+KgM/wIQuwCX/gWDbQyNWAMBqFxxvCcV+BY Nr/fNQ4WJ6X9HjS8HPndArZGPBdAkFb/WFDkB5qsDo6NdFy5ipJGxnZlS7UvJ6ZBf9y+ qi+xouEqZL/6HXAHRPxxaV98fznkHt2Vfm/ZEPpVWOPMyERDQiZKpw/3aoqnF4g+kCKe nbww== X-Gm-Message-State: AElRT7EHzIz+8Q91RMoCaGNFIaGRLNEOONNfUx5ofgd5rrcdRHM+16yl MuiSS0fIYz9cZPz2/+UgYWEQkiXCU/o= X-Google-Smtp-Source: AIpwx4917EJSSd10Djn6yymavr8XHUFhQwJKJZdG72kdDpc+Xo3lBaH/bm43Ld2IVUFAQE4FqT8urw== X-Received: by 10.80.177.234 with SMTP id n39mr3165429edd.108.1522419544739; Fri, 30 Mar 2018 07:19:04 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.19.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:19:04 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:44 +0100 Message-Id: <1522419526-29494-17-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 16/18] 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 712850e..adf25ac 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" \ "loadcmd=fatload\0" \ "loadbootscript=" \