From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=HXGG2SIT; spf=pass (domain: linaro.org, ip: 209.85.128.67, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by groups.io with SMTP; Thu, 12 Sep 2019 07:54:02 -0700 Received: by mail-wm1-f67.google.com with SMTP id q12so377084wmj.4 for ; Thu, 12 Sep 2019 07:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zQzlNIiaWW/J/BfuwGscURISYEyemDmivug3g3rPMUw=; b=HXGG2SIT7ryPCrcXQmDEmRkgZL04Boj+XJDPoW4lWV8TmFYXuTr4i6gz7pm0VclBxA 5pPrPe7QyFuCTJ7fkqW+Q8LhySoT1v9o+QyZfjVtbskt/vXKbeeZuljIklOfRqaI8Q/X +pFIVAsBnAu7GvU3fWAHJ33iYxAJ7KyNYSprQuPIbPpidM9vfgiuvW9h6TujgO5mhQfY v75AiClO7Z2NUwwSP6kw6Nq7MHKowbN0kOx989KVZhcOZx8ZwLVB7RTtPi95jp2cR1Nt RmatI5shuIWGUD3UCyr4WC8qr0K9SNBy+Z3wc+wR0KueKtCXQUXrnHzRP7ba2isFR0Qv 1r1g== 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; bh=zQzlNIiaWW/J/BfuwGscURISYEyemDmivug3g3rPMUw=; b=ZcTHfCq8ApVkp3e9mcx4kSfRcYxFLjPhlpZFcW+SZjfs84S9t3doI9oJURSS/eQhM2 WcbrbW+vv/HkaJiZX7kBlaXSpudGPFZx5hwWeQJ9l7Zh0bc4nsFiAlpIZ3MumRHZQ2nD 2qaXknLB870j3DKRu4xGYNbQG8+OEMbW5Y86yJmpgM270iqp6TuNk4xZQCN92XkjpDa+ KCVrkudDE6b6++T2h3sZ54MtHPOi399D15am+HlGvfXUeO/ZGCDkJECenu5r7dS+zyFX tkC3SOfOuKRW51OIwnBVFoTZ2BEe8VxotSYt8v37NrQyzFttMftyP3XuVw+GrXbox7MO 8kMw== X-Gm-Message-State: APjAAAXPsLvY28H53NZhbM3dJ+pxCJBYHn0/BpS1EfeTZSlHeRP5I+2Q K8PnAuAwjtlrezG7X8mI7fSnTqRzB169e1d6azKbpA== X-Google-Smtp-Source: APXvYqzudh6kr9rq5j3U3/ZAO3eIAy8Ls5YOzOYLCR+ES2U+2bqZwATz1VkWd5Giet6a7fFpvqdawi9SJP3Zbkf8Psc= X-Received: by 2002:a7b:c451:: with SMTP id l17mr303523wmi.61.1568300040599; Thu, 12 Sep 2019 07:54:00 -0700 (PDT) MIME-Version: 1.0 References: <20190911162354.22107-1-ard.biesheuvel@linaro.org> <4be96d3b-10bf-58d4-150f-03047d9a9e70@redhat.com> In-Reply-To: <4be96d3b-10bf-58d4-150f-03047d9a9e70@redhat.com> From: "Ard Biesheuvel" Date: Thu, 12 Sep 2019 15:53:39 +0100 Message-ID: Subject: Re: [PATCH v2] ArmVirtPkg: increase FD/FV size for NOOPT builds To: Laszlo Ersek Cc: edk2-devel-groups-io , Leif Lindholm , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Content-Type: text/plain; charset="UTF-8" On Thu, 12 Sep 2019 at 15:46, Laszlo Ersek wrote: > > On 09/11/19 18:23, Ard Biesheuvel wrote: > > After upgrading the CI system we use for building the ArmVirtPkg > > targets, we started seeing failures due to the NOOPT build running > > out of space when using the CLANG38 toolchain definition combined > > with clang 7. > > > > We really don't want to increase the FD/FV sizes in general to > > accommodate this, so parameterize the relevant quantities and > > increase them by 50% for NOOPT builds. > > > > Signed-off-by: Ard Biesheuvel > > --- > > v2: implement suggestions by Laszlo on 1) how to parameterize this further, > > and b) to avoid adding another .inc file > > update kernel header field, as pointed out by Philippe > > > > ArmVirtPkg/ArmVirt.dsc.inc | 28 ++++++++++++++++++++ > > ArmVirtPkg/ArmVirtQemu.fdf | 14 +++++++--- > > ArmVirtPkg/ArmVirtQemuKernel.fdf | 19 ++++++++++--- > > ArmVirtPkg/ArmVirtXen.fdf | 14 +++++++--- > > 4 files changed, 66 insertions(+), 9 deletions(-) > > > > diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc > > index a4ae25d982a2..d6b58e5c018b 100644 > > --- a/ArmVirtPkg/ArmVirt.dsc.inc > > +++ b/ArmVirtPkg/ArmVirt.dsc.inc > > @@ -10,6 +10,34 @@ > > [Defines] > > DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x8000004F > > > > + # > > + # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to > > + # one of the supported values, in place of any of the convenience macros, is > > + # permitted. > > + # > > +!if $(TARGET) == NOOPT > > + DEFINE FD_SIZE_3MB = TRUE > > +!endif > > Sorry, I must have been unclear -- I meant the macros FD_SIZE_2MB / > FD_SIZE_3MB / FD_SIZE_IN_KB as a replacement for the $(TARGET) based > logic, not as an addition to it. > > Is it important to select the 3MB build by default, in case "-b NOOPT" > is given on the build command line? > Yes. > My thinking was that, in your CI env, you could pass -D FD_SIZE_3MB > specifically, whenever you build for -b NOOPT. Other users building for > -b NOOPT would see no change. > > My suggestion would be: > > (1) s/for NOOPT builds/with -D FD_SIZE_3MB/ in the commit message > > (2) drop the above three lines (the TARGET-based conditional) > > With those: > > Reviewed-by: Laszlo Ersek > > and you could go ahead and push the patch (no repost needed). > > OTOH, if you'd really like to set 3MB for NOOPT automatically, then I > think we'll need a way for letting users override that new default, back > to 2MB. > > ... Or is such an override possible with this patch already, perhaps? > Yes. If you set -b NOOPT -D FD_SIZE_2MB (in any order), you will get a 2 MB image.