From patchwork Tue Jul 24 22:15:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 948898 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Zt7h2gnCz9s2g for ; Wed, 25 Jul 2018 08:19:28 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="1ItMnoqN"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41Zt7h0zpjzDrM8 for ; Wed, 25 Jul 2018 08:19:28 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="1ItMnoqN"; dkim-atps=neutral X-Original-To: Petitboot@lists.ozlabs.org Delivered-To: Petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=geoff@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="1ItMnoqN"; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41Zt3T0tskzDrH0 for ; Wed, 25 Jul 2018 08:15:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Date:Cc:To:Subject:From:References: In-Reply-To:Message-Id:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CIE4GK850qohE5jwarjpXsV1+nSJ+ow4+ZVjktH3zHw=; b=1ItMnoqNh1mDvW/ksFlmuGFgC TfKbr/NHpHObsgRfGHELYH/AU/nHVE+xs3t5TWLlqKP88GHLc7rhZDf/Kl2UsfqlMBDgjUwWko0Oa ypJP90Pr4QlEId5Jz6wNVFT1zElT+BFutGcm+zvWCf3PiCLxdJ5cZijUdaiug9nT/niFrBf3byN5h JRX3M6tZjicazkSpvnA/Gzv/7kYa7daV36K5VcUUMRbR9Vd8L5IV4ax6BxXQgSnxF7c/kinBq6s2e VJiCsndtlK6+Hbt9d6je05Lx2ahydvz+756V9lJSMC0/uGJ1+AAQh8M5Ifi3/T68ojZfXtye501w9 ggQHeSOWw==; Received: from geoff by merlin.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fi5ar-0004mY-BW; Tue, 24 Jul 2018 22:15:45 +0000 Message-Id: In-Reply-To: References: From: Geoff Levand Patch-Date: Tue, 24 Jul 2018 15:03:16 -0700 Subject: [PATCH v1 27/30] configure: Add conditional platform builds To: Samuel Mendoza-Jonas Date: Tue, 24 Jul 2018 22:15:45 +0000 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ge Song , Petitboot@lists.ozlabs.org MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" Add configure --enable-platform-XXX options to allow specifying which platform support to build. --enable-platform-auto, the default, will use the host triplet to guess which platforms to build. --enable-platform-all will build all platforms. Signed-off-by: Geoff Levand --- configure.ac | 38 ++++++++++++++++++++++++++++++++++++++ discover/Makefile.am | 11 +++++++---- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 408a569..5b7c7b5 100644 --- a/configure.ac +++ b/configure.ac @@ -303,6 +303,44 @@ AS_IF( ] ) +# platform choice +AC_ARG_ENABLE( + [platform-all], + [AS_HELP_STRING( + [--enable-platform-all], + [build support for all platforms [default=no]] + )] +) +AS_IF( + [test "x$enable_platform_all" = "xyes"], + [enable_platform_powerpc="yes"; enable_platform_ps3="yes"] +) + +AC_ARG_ENABLE( + [platform-auto], + [AS_HELP_STRING( + [--enable-platform-auto], + [auto detect platform support to build [default=yes]] + )], + [], + [enable_platform_auto="yes"] +) +AS_IF( + [test "x$enable_platform_auto" = "xyes"], + [AS_CASE([$host], + [powerpc*-*-*], [enable_platform_powerpc="yes"], + )] +) + +AC_ARG_ENABLE( + [platform-powerpc], + [AS_HELP_STRING( + [--enable-platform-powerpc], + [build support for powerpc platforms [default=no]] + )] +) +AM_CONDITIONAL([PLATFORM_POWERPC], [test "x$enable_platform_powerpc" = "xyes"]) + AC_ARG_ENABLE( [platform-ps3], [AS_HELP_STRING( diff --git a/discover/Makefile.am b/discover/Makefile.am index f9625ec..2b7c794 100644 --- a/discover/Makefile.am +++ b/discover/Makefile.am @@ -80,11 +80,11 @@ discover_platform_ro_SOURCES = \ discover/ipmi.h \ discover/dt.c \ discover/dt.h \ - discover/hostboot.h \ - discover/platform-powerpc.c + discover/hostboot.h -discover_platform_ro_CPPFLAGS = \ - $(AM_CPPFLAGS) +if PLATFORM_POWERPC +discover_platform_ro_SOURCES += discover/platform-powerpc.c +endif # Build dummy last to put it at the end of the platforms section. discover_platform_ro_SOURCES += discover/platform-dummy.c @@ -99,5 +99,8 @@ discover_platform_ro_LDFLAGS = \ endif +discover_platform_ro_CPPFLAGS = \ + $(AM_CPPFLAGS) + discover_platform_ro_LINK = \ $(LD) -r -o $@