From patchwork Thu Aug 2 17:29:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 952928 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 41hHMq06CNz9s2g for ; Fri, 3 Aug 2018 03:33:43 +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="w3d7o9Ao"; 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 41hHMp5V17zF2DQ for ; Fri, 3 Aug 2018 03:33:42 +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="w3d7o9Ao"; 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="w3d7o9Ao"; 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 41hHHD2WGQzF27J for ; Fri, 3 Aug 2018 03:29:44 +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=eGtOunhAcbAccv6q64Gupkxhan/1oBkdsAU4c6p2dUU=; b=w3d7o9AoGBWTuRwxYcYQMdywm h2svfkvH3tHonFZ66EVHfYfkwnYxIa9KUJ2h2hGpAigdrqpAgz2tHIVJvnp1XThyUIxK72+CjQDPM SG4pO+fYt931unJ08L/M1zSuB4qVXxIESr71gVsj7YMDKVdjwMc66q9rmeyVCGv7opBRwMfefz2U9 UFtRieRuTVlUDRS+1Te35Ez35ekAlGQu+y0YX982vk0IWoFSSmUxGQFMWdWFStT5H+XUIb9Nfb0Ph johuqKl95kHbifWkjlKlrFKyBBjelORweznKqhi/7EWlZ853K+BwTi/NRtW9QIvzqsw16NWJX9JH3 xPnywVKJg==; Received: from geoff by merlin.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1flHPw-0007a9-Hh; Thu, 02 Aug 2018 17:29:40 +0000 Message-Id: In-Reply-To: References: From: Geoff Levand Patch-Date: Thu, 2 Aug 2018 10:19:54 -0700 Subject: [PATCH v2 28/30] configure: Add conditional platform builds To: Samuel Mendoza-Jonas Date: Thu, 02 Aug 2018 17:29:40 +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 290617b..38fe341 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 $@