From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D481C07E96 for ; Fri, 9 Jul 2021 00:37:45 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62C7C6142E for ; Fri, 9 Jul 2021 00:37:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62C7C6142E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C54338318E; Fri, 9 Jul 2021 02:37:42 +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="cVP1MAee"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DC3EA8318E; Fri, 9 Jul 2021 02:37:40 +0200 (CEST) Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 E91B583187 for ; Fri, 9 Jul 2021 02:37:37 +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=judge.packham@gmail.com Received: by mail-il1-x131.google.com with SMTP id y6so7419998ilj.13 for ; Thu, 08 Jul 2021 17:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ZHCv8OILXdFjyMrPRMnoau2nEqD4JvvOIUDSOnncZ5E=; b=cVP1MAeeusGOF7fLx0dh4F9cA9JYgJs7qrd2mO+7lOalW9Xx02/s5vxmxevTP9vLFr bgCbomW2P7ty5rnecFENY4MrJp/KvcEZhrhIHbTviVap+xHIFpLEtKc2Bb5X3E3BqUjw kZoJtG2ggPSwOlPZAA4ctN5uWT5vtx3k0Oavy0BB4zsLUfyOWXkooLxCBxZJmc17p4be mMxqr/mVamB52ujSh4FPSG18im2/kZVekuOvSinH03eKXgTtuKTY2e6FOZPeHVhxI+hm AM4LZH5NiMDbsn7z6kc2kR5uWOKyXuVGFUh5GLLQY+6L6UVRU6F7zQk77EygJtCCKnLR bSkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZHCv8OILXdFjyMrPRMnoau2nEqD4JvvOIUDSOnncZ5E=; b=V910sosItmAcR96ouZ+CUOB/Pko8r2h+RXr17hvbOCEiB2HBcUE9CJEXiEaMYl1h6U oPJQ9tmxohhxLBHhQjppyD96lqGyytyirfBNup533tbj4R35pDkyJhSacNKXLF+xMmAN qRGYMWd6AQH32Ujq2RCsgazHBQtfti0oFZs7vqiZS6ubBLut8TU/hjPWEcy9SlohWLla s8BpuDBKxrbcP/XZKYhq5x06k44JLNf+xFmC3tilteVtDe53jYyMQ0fUclTfM2sVnHgj r98h9RAUmiI6ui74lUlMY1A/WDMga86x59tktTTU04pneKcTrqltOO3XzqvZRyhJ9P5y XhRQ== X-Gm-Message-State: AOAM531UwT+HUdtBRN0jxiX5N7lkH6g5lsMVWk6/W1PAdyoDxlmK63HZ S5QbT9fx4TEKEmDdrAz6nGUUiyF4GjgfhpJkdzc= X-Google-Smtp-Source: ABdhPJwyp/PPhplxzEojjVVNDV5rpGGI5pa/ybrr+UWVaMcv8z0FGIII7RsaCmwD6rOQ3Wx7WTrq6dFEaueV0RpGzwA= X-Received: by 2002:a92:b00b:: with SMTP id x11mr24561113ilh.130.1625791056664; Thu, 08 Jul 2021 17:37:36 -0700 (PDT) MIME-Version: 1.0 References: <20210708173032.27999-1-marek.behun@nic.cz> <20210708173032.27999-26-marek.behun@nic.cz> In-Reply-To: <20210708173032.27999-26-marek.behun@nic.cz> From: Chris Packham Date: Fri, 9 Jul 2021 12:37:25 +1200 Message-ID: Subject: Re: [PATCH u-boot-mvebu 25/31] tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes To: =?UTF-8?B?TWFyZWsgQmVow7pu?= Cc: u-boot , Stefan Roese , Baruch Siach , Dirk Eibach , Chris Packham , Dennis Gilmore , Mario Six , Jon Nettleton , =?UTF-8?Q?Pali_Roh=C3=A1r?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 I'll take a proper look at the rest of the series this weekend. Just noticed a couple of typos in the commit message of this patch. On Fri, Jul 9, 2021 at 5:30 AM Marek Beh=C3=BAn wrote: > > From: Pali Roh=C3=A1r > > This padding depends on board config file and therere it makes the s/therere/therefore/ > mkimage binary tool board specific, which is not correct. One cannot use > mkimage tool built as a result for board A to generate images for board > B, even if both A and B are on the same platform. > > This CONFIG_SYS_U_BOOT_OFFS padding was needed when v1 kwbimage contained > SPL code which loaded main U-Boot binary itself, insted of letting s/insted/instead/ > BootROM do it. > > Now that SPL code does not load main U-Boot itself and leaves this job to > BootROM, there is no need for this padding anymore. BootROM correctly > locates the second part (main U-Boot binary) in v1 kwbimage, loads it at > correct address as specified in v1 kwbimage header and also jumps to > correct execution address. > > Therefore this CONFIG_SYS_U_BOOT_OFFS padding is not needed anymore. > > By removing it we also reduce the size of SPL code and therefore also > decrease the final size of v1 kwbimage. This means there is more space > for main U-Boot binary. > > Signed-off-by: Pali Roh=C3=A1r > Reviewed-by: Marek Beh=C3=BAn > --- > tools/kwbimage.c | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/tools/kwbimage.c b/tools/kwbimage.c > index acd57267f4..656f3f9ae9 100644 > --- a/tools/kwbimage.c > +++ b/tools/kwbimage.c > @@ -998,19 +998,6 @@ static size_t image_headersz_v1(int *hasext) > } > #endif > > -#if defined(CONFIG_SYS_U_BOOT_OFFS) > - if (headersz > CONFIG_SYS_U_BOOT_OFFS) { > - fprintf(stderr, > - "Error: Image header (incl. SPL image) too big!\n= "); > - fprintf(stderr, "header=3D0x%x CONFIG_SYS_U_BOOT_OFFS=3D0= x%x!\n", > - (int)headersz, CONFIG_SYS_U_BOOT_OFFS); > - fprintf(stderr, "Increase CONFIG_SYS_U_BOOT_OFFS!\n"); > - return 0; > - } > - > - headersz =3D CONFIG_SYS_U_BOOT_OFFS; > -#endif > - > /* > * The payload should be aligned on some reasonable > * boundary > -- > 2.31.1 >