From patchwork Tue Mar 26 09:33:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 231133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 88CE92C0079 for ; Tue, 26 Mar 2013 20:47:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 12512316B3; Tue, 26 Mar 2013 09:47:45 +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 RlQQ+gRhnH16; Tue, 26 Mar 2013 09:47:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0838B316E7; Tue, 26 Mar 2013 09:47:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1BC758F74B for ; Tue, 26 Mar 2013 09:47:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 77B488BCC8 for ; Tue, 26 Mar 2013 09:47:02 +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 T9OpaOF+iTCd for ; Tue, 26 Mar 2013 09:46:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe004.messaging.microsoft.com [216.32.180.187]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6C2588B67A for ; Tue, 26 Mar 2013 09:46:59 +0000 (UTC) Received: from mail206-co1-R.bigfish.com (10.243.78.246) by CO1EHSOBE032.bigfish.com (10.243.66.97) with Microsoft SMTP Server id 14.1.225.23; Tue, 26 Mar 2013 09:31:55 +0000 Received: from mail206-co1 (localhost [127.0.0.1]) by mail206-co1-R.bigfish.com (Postfix) with ESMTP id E47CC740124; Tue, 26 Mar 2013 09:31:55 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI X-SpamScore: 12 X-BigFish: VS12(zzd772hzz1f42h1ee6h1ce5h1202h1e76h1d1ah1cabh1d2ahzz8275bhz2ei87h2a8h668h839hd24he5bh1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h13eah1441h1504h1537h15a8h162dh1631h1758h17eeh1898h18e1h1946h19b5h1b0ahff4m1355m129fi1155h) Received-SPF: neutral (mail206-co1: 137.71.25.55 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.55; envelope-from=sonic.adi@gmail.com; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail206-co1 (localhost.localdomain [127.0.0.1]) by mail206-co1 (MessageSwitch) id 1364290314106342_7779; Tue, 26 Mar 2013 09:31:54 +0000 (UTC) Received: from CO1EHSMHS031.bigfish.com (unknown [10.243.78.244]) by mail206-co1.bigfish.com (Postfix) with ESMTP id 12C8C600068; Tue, 26 Mar 2013 09:31:54 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by CO1EHSMHS031.bigfish.com (10.243.66.41) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 26 Mar 2013 09:31:53 +0000 Received: from NWD2HUBCAS6.ad.analog.com (nwd2hubcas6.ad.analog.com [10.64.72.159]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id r2Q9Vq6a027528 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 26 Mar 2013 02:31:52 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS6.ad.analog.com (10.64.72.159) with Microsoft SMTP Server id 14.2.328.9; Tue, 26 Mar 2013 05:31:53 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id r2Q9Voiu015011; Tue, 26 Mar 2013 05:31:51 -0400 Received: from localhost.localdomain (unknown [10.99.22.72]) by linux.site (Postfix) with ESMTP id 5650942CE24E; Mon, 25 Mar 2013 19:04:16 -0700 (MST) From: Sonic Zhang To: Thomas Petazzoni , Arnout Vandecappelle , Thomas De Schampheleire Date: Tue, 26 Mar 2013 17:33:57 +0800 Message-ID: <1364290438-13987-6-git-send-email-sonic.adi@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1364290438-13987-1-git-send-email-sonic.adi@gmail.com> References: <1364290438-13987-1-git-send-email-sonic.adi@gmail.com> MIME-Version: 1.0 Cc: buildroot@busybox.net, Sonic Zhang , buildroot-devel@blackfin.uclinux.org Subject: [Buildroot] [PATCH 6/7] arch: Introduce blackfin-specific Makefile X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Sonic Zhang - Create arch makefile. - Create blackfin makefile. - Add FDPIC and FLAT library options and makefile targets to install libraries for different binary formats into the same rootfs image. - update the TARGET_EXCEPTIONS variable in support/scripts/graph-depends for new custom targets Signed-off-by: Sonic Zhang --- Makefile | 2 ++ arch/Config.in.bfin | 21 +++++++++++++++++++++ arch/Makefile.in | 5 +++++ arch/Makefile.in.bfin | 26 ++++++++++++++++++++++++++ support/scripts/graph-depends | 2 ++ 5 files changed, 56 insertions(+), 0 deletions(-) create mode 100644 arch/Makefile.in create mode 100644 arch/Makefile.in.bfin diff --git a/Makefile b/Makefile index 7f0822f..c2f43a4 100644 --- a/Makefile +++ b/Makefile @@ -329,6 +329,8 @@ ifneq ($(PACKAGE_OVERRIDE_FILE),) -include $(PACKAGE_OVERRIDE_FILE) endif +include arch/Makefile.in + include package/*/*.mk include boot/common.mk diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin index 021f5fe..f59c672 100644 --- a/arch/Config.in.bfin +++ b/arch/Config.in.bfin @@ -62,6 +62,27 @@ config BR2_bf561 bool "bf561" endchoice +config BR2_BFIN_INSTALL_FDPIC_SHARED + depends on BR2_bfin && !BR2_BINFMT_FDPIC + bool "Install FDPIC shared libraries" + default y + help + Blackfin Linux kernel supports running both FDPIC and FLAT applications + concurrently if the binary format specific libraries installed properly. + This option allow developer to install FDPIC libraries into a buildroot + rootfs image built with binary format macro other than BR2_BINFMT_FDPIC. + +config BR2_BFIN_INSTALL_FLAT_SHARED + depends on BR2_bfin && && !BR2_BINFMT_FLAT_SHARED + bool "Install FLAT shared libraries" + default y + help + Blackfin Linux kernel supports running both FDPIC and FLAT applications + concurrently if the binary format specific libraries installed properly. + This option allow developer to install FLAT libraries into a buildroot + rootfs image built with binary format macro other than + BR2_BINFMT_FLAT_SHARED. + config BR2_ARCH default "bfin" diff --git a/arch/Makefile.in b/arch/Makefile.in new file mode 100644 index 0000000..d791118 --- /dev/null +++ b/arch/Makefile.in @@ -0,0 +1,5 @@ +# The architecture specific Makefile.in.$ARCH should be included only +# when the arch macro is selected. +ifeq ($(BR2_bfin),y) +include arch/Makefile.in.bfin +endif diff --git a/arch/Makefile.in.bfin b/arch/Makefile.in.bfin new file mode 100644 index 0000000..3ad8d09 --- /dev/null +++ b/arch/Makefile.in.bfin @@ -0,0 +1,26 @@ +TARGETS_BFIN-$(BR2_BFIN_INSTALL_FDPIC_SHARED) += target-shared-libs-fdpic +TARGETS_BFIN-$(BR2_BFIN_INSTALL_FLAT_SHARED) += target-shared-libs-flat +TARGETS += $(TARGETS_BFIN-y) + +CROSS_COMPILE_SHARED_FDPIC ?= bfin-linux-uclibc- +target-shared-libs-fdpic: + set -e; \ + t=`$(CROSS_COMPILE_SHARED_FDPIC)gcc $(CPUFLAGS) -print-file-name=libc.a`; \ + t=`dirname $$t`/../..; \ + for i in $$t/lib/*so*; do \ + i=`readlink -f "$$i"`; \ + soname=`$(CROSS_COMPILE_SHARED_FDPIC)readelf -d "$$i" | sed -n '/(SONAME)/s:.*[[]\(.*\)[]].*:\1:p'`; \ + $(INSTALL) -D $$i $(TARGET_DIR)/lib/$$soname; \ + done + +CROSS_COMPILE_SHARED_FLAT ?= bfin-uclinux- +target-shared-libs-flat: + set -e; \ + t=`$(CROSS_COMPILE_SHARED_FLAT)gcc $(CPUFLAGS) -mid-shared-library -print-file-name=libc`; \ + if [ -f $$t -a ! -h $$t ] ; then \ + $(INSTALL) -D $$t $(TARGET_DIR)/lib/lib1.so; \ + fi + +ifneq ($(BR2_USE_MMU), y) +TARGET_CFLAGS += -D__uClinux__ +endif diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends index 1163d79..227d085 100755 --- a/support/scripts/graph-depends +++ b/support/scripts/graph-depends @@ -168,6 +168,8 @@ TARGET_EXCEPTIONS = [ "erase-fakeroots", "target-generic-hostname", "target-root-passwd", + "target-shared-libs-fdpic", + "target-shared-libs-flat", ] # In full mode, start with the result of get_targets() to get the main