From patchwork Sun Jun 14 02:57:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1308855 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ICxlXtBg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49kzvb1CBNz9sQx for ; Sun, 14 Jun 2020 13:09:15 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D28E881DBE; Sun, 14 Jun 2020 05:01:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ICxlXtBg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 81D1181D72; Sun, 14 Jun 2020 04:58:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (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 BE7AB81E12 for ; Sun, 14 Jun 2020 04:58:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id m81so14320525ioa.1 for ; Sat, 13 Jun 2020 19:58:09 -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=idx0t2Mbl1mojbem/9v6YjUfqBxHB1vhhTwx3ii0+i8=; b=ICxlXtBghwBL7spP67BK9p38wfX458UcbPIGZ04HS7SAQ2V36fmmttgc3UsswshpDr NzypQlLKN4tCkeEJ1ZANYoXQ/GXs1Fwv0G+k5+XxD9XwWJ8XCHC4Q6oiD4YXUKl7qyJi zpPzDn1tWJW8/021wNgNJKC6MV4COkAWDDWCg= 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=idx0t2Mbl1mojbem/9v6YjUfqBxHB1vhhTwx3ii0+i8=; b=tniEKIIc3TG0cD5jKg9s4ksvYajP35cBzP4vQgL+PVgZlvao+BwcyQIciJjzX1Hd1o GII2mtQFyrnS8hR11t9c0ltl65hzwD7U8hjnOI6FmNWrX0lH/uiQym4Aq3g0b7GBs7Dz hFPSEm2+72Xf9V5Uj3qfIiwfTFkFC8axb0Qe1fmqLnP/V8SvoHDWOYg8JMGF43V6UFDF maF71cPte1tDp/47mfmfELdTKBmaBroqxLSRcL6D4TmChEOow8V0CrXW2fAIrES76NMy f1mbjG3+bP9bOnjYCMP9GqlahpMOoIXXaSCj/q3vuHJZthxhZ3NxBuKB8Pv8Y93/lfll Hq/g== X-Gm-Message-State: AOAM530eKjsEa7tFae1prAhde29vyLHn90YuCcEzdY8eEWrbii/E9VVX WCGq/RPjlJ30Pogkeb0wEFU+iv5iA8abhA== X-Google-Smtp-Source: ABdhPJzJsnz4CrhZxh/87k4+THMRQ76rYFSUoZpJWJuIEuWLgXcszk306+uNOHguAnCjTxOEpPEGOQ== X-Received: by 2002:a05:6638:d89:: with SMTP id l9mr14978259jaj.139.1592103488089; Sat, 13 Jun 2020 19:58:08 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id l26sm5802034ild.59.2020.06.13.19.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 19:58:07 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Bin Meng , Jagan Teki Subject: [PATCH v2 34/49] x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM Date: Sat, 13 Jun 2020 20:57:13 -0600 Message-Id: <20200613205717.v2.34.Ice44cd6072fa2ca8287975a4d30c5932e4527787@changeid> X-Mailer: git-send-email 2.27.0.290.gba653c62da-goog In-Reply-To: <20200614025728.41065-1-sjg@chromium.org> References: <20200614025728.41065-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean This Kconfig is not needed anymore since U-Boot will build the ROM if the required binary blobs exist. The BUILD_ROM environment variable used to request that the ROM be built. Now this always happens if the required binary blobs are available. Update it to mean that U-Boot should fail if the ROM cannot be built. This behaviour should be compatible with how it used to work. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) Kconfig | 7 +++++-- Makefile | 3 ++- configs/qemu-x86_64_defconfig | 1 - configs/qemu-x86_defconfig | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Kconfig b/Kconfig index 876c5db911..352b2d4584 100644 --- a/Kconfig +++ b/Kconfig @@ -252,8 +252,11 @@ config ROM_NEEDS_BLOBS depends on HAS_ROM help Enable this if building the u-boot.rom target needs binary blobs, and - so cannot be done normally. In this case, pass BUILD_ROM=1 to make - to tell U-Boot to build the ROM. + so cannot be done normally. In this case, U-Boot will only build the + ROM if the required blobs exist. If not, you will see an warning like: + + Image 'main-section' is missing external blobs and is non-functional: + intel-descriptor intel-me intel-refcode intel-vga intel-mrc config BUILD_ROM bool "Build U-Boot as BIOS replacement" diff --git a/Makefile b/Makefile index 9c15dced7d..e4fed83cb2 100644 --- a/Makefile +++ b/Makefile @@ -1307,7 +1307,8 @@ quiet_cmd_binman = BINMAN $@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ --toolpath $(objtree)/tools \ $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \ - build -u -d u-boot.dtb -O . -m --allow-missing \ + build -u -d u-boot.dtb -O . \ + $(if $(BUILD_ROM),,-m --allow-missing) \ -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ $(BINMAN_$(@F)) diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index 90d287b7b0..1a03a96223 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -16,7 +16,6 @@ CONFIG_GENERATE_MP_TABLE=y CONFIG_GENERATE_ACPI_TABLE=y CONFIG_X86_OFFSET_U_BOOT=0xfff00000 CONFIG_DISTRO_DEFAULTS=y -CONFIG_BUILD_ROM=y CONFIG_FIT=y CONFIG_SPL_LOAD_FIT=y CONFIG_BOOTSTAGE=y diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 4309c2352d..f0e8e7d967 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -8,7 +8,6 @@ CONFIG_GENERATE_PIRQ_TABLE=y CONFIG_GENERATE_MP_TABLE=y CONFIG_GENERATE_ACPI_TABLE=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_BUILD_ROM=y CONFIG_FIT=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y