From patchwork Mon Dec 5 23:07:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erico Nunes X-Patchwork-Id: 702943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tXgQV37Z0z9s5g for ; Tue, 6 Dec 2016 10:07:46 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gI9tE6Ai"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8D57F83DC5; Mon, 5 Dec 2016 23:07:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kXe-v6U9EaaQ; Mon, 5 Dec 2016 23:07:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 5E40F83075; Mon, 5 Dec 2016 23:07:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7EDA11C02DA for ; Mon, 5 Dec 2016 23:07:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 79B4C230CE for ; Mon, 5 Dec 2016 23:07:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9LnaFhuzc3XA for ; Mon, 5 Dec 2016 23:07:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by silver.osuosl.org (Postfix) with ESMTPS id 30377230CA for ; Mon, 5 Dec 2016 23:07:28 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id a20so18586108wme.2 for ; Mon, 05 Dec 2016 15:07:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r8uZLz9myuMj2JwEfpvV5FQ18r3wQ6fiml8gIyDEEgQ=; b=gI9tE6Ai4pYImGGU/NypdZTaHJnbfWTSnKDuuyTn5KNee5hvDkhUDMspu+dNs6KLXo Xuckt2cqmBlwr5tboRKH+5KX5ha1UdDK0OnOfI1yCLEL9EMXIz9jFozKOGfdE1Vim3bl QJVkfJYZxJ9guG2TtIu3/Ubo+iSKD5gRr+jfJg7QelbfjWIXwM27fIhQ1fr9aum4qVwz ajpuWcjMLMyH0Jd4gTziTQUke/Hcx8sKkz4WDY0GEUbgHxFNWN/PBLBA2AFykEhkHiHF NqKzr2OmEO1f+KgRhpUiCTPcHmVy6u6XRuhUYOml6WjgzjwYzGG4NArOXznPk7ts3t/+ IsMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r8uZLz9myuMj2JwEfpvV5FQ18r3wQ6fiml8gIyDEEgQ=; b=ZdV0Fi1uUqE8gv5xjZEEThK27nQ7qqynRRy3hFx8JNyeeq7eTzFjcLP4UporzRr0W5 Q7ZrnBrkPBwn3nnTqrQf60Vupwz+chBDOTp1UZXdtFMvEvPnpnh2V5nwn8OruNUjJ4mr Vx6hM0UBqv0tTkNQqo/4wDS2kbSvpVOiccw5j/ccx+dvGNF3bzgaEMxIO2BBehqBGYtV sRuCt1Wa4MCsKnoEJQVljYITGwU/R/JWUX2Q/hWlLzRogYOI14ypz1m/CvNOTKDab+Pv ZOHfMjZ0RPZO9io4rrB+dtwlym6/YQaQtY6bySGr+AP9B/xf7Siue0vXOz5rN5GWu6hS e5wA== X-Gm-Message-State: AKaTC033L7V3ksowz3zuf4wyC9lZAPEUaq3fs/aKCcHdrReVeXxvZJP2tM9fxqKZHdQhqg== X-Received: by 10.28.87.84 with SMTP id l81mr24111wmb.48.1480979246482; Mon, 05 Dec 2016 15:07:26 -0800 (PST) Received: from localhost.localdomain (ip-62-245-98-183.net.upcbroadband.cz. [62.245.98.183]) by smtp.gmail.com with ESMTPSA id w79sm947950wmw.0.2016.12.05.15.07.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 15:07:25 -0800 (PST) From: Erico Nunes To: buildroot@buildroot.org Date: Tue, 6 Dec 2016 00:07:17 +0100 Message-Id: <1480979238-18273-3-git-send-email-nunes.erico@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480979238-18273-1-git-send-email-nunes.erico@gmail.com> References: <1480979238-18273-1-git-send-email-nunes.erico@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 2/3] efivar: introduce BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" efivar only makes sense on platforms that support UEFI. UEFI is only supported by some architectures at the moment, being mostly employed on platforms such as x86, x86_64 and aarch64. Some other platforms such as MIPS and PowerPC may have some unofficial UEFI support. UEFI is also limited to little endian architectures. efivar was being supported in Buildroot without architecture restrictions so far, however this has led to the creation of a number of hacks in the recipes, mostly for architectures that are not supported by UEFI. In order to avoid spending more time to debug these failures and maintaining more hacks for unsupported architectures, efivar can be restricted to that platforms where it makes sense and where it is more likely to receive some testing and actual usage. The existing hacks for the now unsupported architectures are removed, and the dependency is propagated to efibootmgr as it depends on efivar. Signed-off-by: Erico Nunes Cc: Thomas Petazzoni --- package/efibootmgr/Config.in | 8 ++++---- package/efivar/Config.in | 14 ++++++++++---- package/efivar/efivar.mk | 6 ------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package/efibootmgr/Config.in b/package/efibootmgr/Config.in index cd4bda1..a4011d6 100644 --- a/package/efibootmgr/Config.in +++ b/package/efibootmgr/Config.in @@ -1,11 +1,11 @@ config BR2_PACKAGE_EFIBOOTMGR bool "efibootmgr" + depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS # efivar depends on !BR2_STATIC_LIBS # efivar depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # efivar depends on !BR2_TOOLCHAIN_USES_MUSL # efivar depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # efivar - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \ - !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII # efivar + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT select BR2_PACKAGE_EFIVAR help @@ -17,9 +17,9 @@ config BR2_PACKAGE_EFIBOOTMGR https://github.com/rhinstaller/efibootmgr comment "efibootmgr needs a glibc or uClibc toolchain w/ dynamic library, headers >= 3.12, gcc >= 4.9" + depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS depends on BR2_STATIC_LIBS || \ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \ BR2_TOOLCHAIN_USES_MUSL || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \ - !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS diff --git a/package/efivar/Config.in b/package/efivar/Config.in index a97c766..0ec8360 100644 --- a/package/efivar/Config.in +++ b/package/efivar/Config.in @@ -1,5 +1,12 @@ +config BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS + bool + depends on BR2_arm || BR2_aarch64 || BR2_i386 || BR2_x86_64 \ + || BR2_powerpc64le || BR2_mipsel || BR2_mips64el + default y + config BR2_PACKAGE_EFIVAR bool "efivar" + depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS depends on !BR2_STATIC_LIBS # dlfcn.h depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # linux/nvme.h # linux/nvme.h has been renamed to linux/nvme_ioctl.h since 4.4, @@ -8,8 +15,7 @@ config BR2_PACKAGE_EFIVAR # don't have that header file renamed, and that is causing build # failures. So, prevent this package to be built using those # toolchains. - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \ - !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS # doesn't build with musl due to lack of __bswap_constant_16 depends on !BR2_TOOLCHAIN_USES_MUSL depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 @@ -20,9 +26,9 @@ config BR2_PACKAGE_EFIVAR https://github.com/rhinstaller/efivar comment "efivar needs a glibc or uClibc toolchain w/ dynamic library, headers >= 3.12, gcc >= 4.9" + depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS depends on BR2_STATIC_LIBS || \ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \ BR2_TOOLCHAIN_USES_MUSL || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \ - !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS diff --git a/package/efivar/efivar.mk b/package/efivar/efivar.mk index 84735b8..c31d87b 100644 --- a/package/efivar/efivar.mk +++ b/package/efivar/efivar.mk @@ -21,12 +21,6 @@ EFIVAR_MAKE_OPTS = \ BINTARGETS=efivar \ LDFLAGS="$(TARGET_LDFLAGS) -fPIC" -# Explicitly linking with shared libgcc is required on MicroBlaze and -# Nios II, otherwise it fails due to FDE encoding in static libgcc. -ifeq ($(BR2_microblaze)$(BR2_nios2),y) -EFIVAR_MAKE_OPTS += SOFLAGS="-shared -shared-libgcc" -endif - define EFIVAR_BUILD_CMDS # makeguids is an internal host tool and must be built separately with # $(HOST_CC), otherwise it gets cross-built.