diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2011-05-30 23:56:56 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2011-06-12 21:49:24 +0200 |
commit | 32a0dcea5c77719b79b04000af0125afde2ba5aa (patch) | |
tree | 01749a6be81973cb40c79b435f1da68a11c1f918 /toolchain/toolchain-external/ext-tool.mk | |
parent | 47d8534c1208e81ec45196599ea15a087432f52b (diff) |
blackfin: support external toolchains provided by blackfin.uclibc.org
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/toolchain-external/ext-tool.mk')
-rw-r--r-- | toolchain/toolchain-external/ext-tool.mk | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk index 9171e85b4..ef71ce04d 100644 --- a/toolchain/toolchain-external/ext-tool.mk +++ b/toolchain/toolchain-external/ext-tool.mk @@ -189,6 +189,11 @@ TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-g else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009),y) TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/superh/portal/package7783/public/sh-linux-gnu/ TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y) +TOOLCHAIN_EXTERNAL_SITE_1 = http://blackfin.uclinux.org/gf/download/frsrelease/501/8378/ +TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2010R1-RC4.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_SITE_2 = http://blackfin.uclinux.org/gf/download/frsrelease/501/8386/ +TOOLCHAIN_EXTERNAL_SOURCE_2 = blackfin-toolchain-uclibc-full-2010R1-RC4.i386.tar.bz2 else # A value must be set (even if unused), otherwise the # $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) rule would override the main @@ -196,6 +201,37 @@ else TOOLCHAIN_EXTERNAL_SOURCE=none endif +# Special handling for Blackfin toolchain, because of the split in two +# tarballs, and the organization of tarball contents. The tarballs +# contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories, +# which themselves contain the toolchain. This is why we strip more +# components than usual. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y) +$(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1): + $(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE_1),$(TOOLCHAIN_EXTERNAL_SOURCE_1)) + +$(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2): + $(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE_2),$(TOOLCHAIN_EXTERNAL_SOURCE_2)) + +$(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2) + mkdir -p $(@D) + $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE_1))) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - + $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE_2))) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - +ifeq ($(TOOLCHAIN_EXTERNAL_PREFIX),bfin-uclinux) + rm -rf $(TOOLCHAIN_EXTERNAL_DIR)/bfin-linux-uclibc + mv $(TOOLCHAIN_EXTERNAL_DIR)/bfin-uclinux $(TOOLCHAIN_EXTERNAL_DIR)/tmp + mv $(TOOLCHAIN_EXTERNAL_DIR)/tmp/* $(TOOLCHAIN_EXTERNAL_DIR)/ + rmdir $(TOOLCHAIN_EXTERNAL_DIR)/tmp +else + rm -rf $(TOOLCHAIN_EXTERNAL_DIR)/bfin-uclinux + mv $(TOOLCHAIN_EXTERNAL_DIR)/bfin-linux-uclibc $(TOOLCHAIN_EXTERNAL_DIR)/tmp + mv $(TOOLCHAIN_EXTERNAL_DIR)/tmp/* $(TOOLCHAIN_EXTERNAL_DIR)/ + rmdir $(TOOLCHAIN_EXTERNAL_DIR)/tmp +endif + $(Q)touch $@ +else # Download and extraction of a toolchain $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE): $(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE),$(TOOLCHAIN_EXTERNAL_SOURCE)) @@ -204,6 +240,7 @@ $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) mkdir -p $(@D) $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - $(Q)touch $@ +endif # Checks for an already installed toolchain: check the toolchain # location, check that it supports sysroot, and then verify that it |