From patchwork Wed Sep 25 14:56:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1167390 X-Patchwork-Delegate: bmeng.cn@gmail.com 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=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZAL+loqC"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46dhlB4zSZz9sPL for ; Thu, 26 Sep 2019 01:27:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 48F3EC2207F; Wed, 25 Sep 2019 15:19:20 +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_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 0EA58C22176; Wed, 25 Sep 2019 15:02:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D8CF3C2206C; Wed, 25 Sep 2019 15:02:41 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 15055C22073 for ; Wed, 25 Sep 2019 14:58:36 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id r26so14580847ioh.8 for ; Wed, 25 Sep 2019 07:58:36 -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=fb2v6dfqZ7KiwT90mPeRRxk5f/d63DARKwDDAay1W2g=; b=ZAL+loqCNRZRK2iBJU6Pxr1Lt3GZid6Q3mxSlFsfNs1Vy5xDzuKtAxjtS9O3Vy/MEg lP5gWjzHuyd7bl/iVQkVokBmXb0hNyuj1wEdiPoveQJF/88HpLKszXrWBEbKijUXEe+O Pv9lEw0KZGfy0y1WUbDqrnWuyrvOwe/+VfwwQ= 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=fb2v6dfqZ7KiwT90mPeRRxk5f/d63DARKwDDAay1W2g=; b=hJ64qcGd636MR9Z2kz4uv9rSPFLhXvwv0rySorbWWrVnjTtVeDmIGhEOyfLwkKzKjb J0X3maKABqdZjJ49Bj9yDJsQ9fwYYMRHYSIvdQtP6RkSOdRsr+M1OWYjBEzxpsL2FZFa kfOYKxiANo63y31ktaVzv0O33AtgSbuNXAmwHA1mFDt/3nFrESvtVH6At+Z5xj5W/4F9 7Kfsk+z1WKMaZhHG6xmzDBGI1BVQ/uGsrm9/EEHRXeYsuLgcAIvtbyb67b+NopZWmlBg xvP8YIVjBFPdzU3V4mC0YyfYHXcS1YvlJnnUaWukJv/bkpRPj1+t7yM+qToD5unHRSeh GLHg== X-Gm-Message-State: APjAAAXpaDwRVzcYIAE5ym5KKkgV/1jBx6rILTxYTIgDnf6Dvplr8I7c LTlum80Rc1HHQbn0M9So7nwnfG5Hzk4= X-Google-Smtp-Source: APXvYqzRtQhDnyHflBJvVLVPRQPRB0DP8+PYydTUgEX0jVPRsKch9V87atGVKjtng4VyH5NoGISqlQ== X-Received: by 2002:a6b:3705:: with SMTP id e5mr9110878ioa.213.1569423514890; Wed, 25 Sep 2019 07:58:34 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id d9sm4254964ioq.9.2019.09.25.07.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2019 07:58:34 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 25 Sep 2019 08:56:22 -0600 Message-Id: <20190925145750.200592-39-sjg@chromium.org> X-Mailer: git-send-email 2.23.0.444.g18eeb5a265-goog In-Reply-To: <20190925145750.200592-1-sjg@chromium.org> References: <20190925145750.200592-1-sjg@chromium.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 038/126] binman: Take account of skip-at-start with image-header 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The image-header currently sets it offset assuming that skip-at-start is zero. This does not work on x86 where offsets end at 4GB. Add in this value so that the offset is correct. Signed-off-by: Simon Glass Acked-by: Bin Meng --- tools/binman/etype/image_header.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/binman/etype/image_header.py b/tools/binman/etype/image_header.py index 4b69eda1a22..b9327dd799b 100644 --- a/tools/binman/etype/image_header.py +++ b/tools/binman/etype/image_header.py @@ -100,6 +100,7 @@ class Entry_image_header(Entry): offset = offset else: offset = image_size - IMAGE_HEADER_LEN + offset += self.section.GetStartOffset() return Entry.Pack(self, offset) def ProcessContents(self):