Skip to contentSkip to conversation

toolchain/external: use generic extract commands (branch yem/extract-cmds)

PATCH New Yann E. MORIN 5 participants 18 messages Oct 24, 2015 – Nov 3, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover toolchain/external: use generic extract commands (branch yem/extract-cmds)

Hello All!

This series is an attempt at simplifying the way external toolchains are extracted.

Currently, external toolchains use custom extract commands, because they want to exclude a bunch of files during extraction, so as to save a bit of space (locales in some toolchains can account for up to 80% of the size of the toolchain as a whole).

And it turns out, gcc also wants to exclude a bunch of files (java and go, testsuites).

Using custom extract commands means that those packages (and critical ones, at that) can not benefit from the enhancements and fixes made to the generic commands, like the automatic striping of components.

In this series:

- we first introduce the support for the exclusion list;
- we drop the hard-link dereference option to tar, it's useless when

    extracting;
  - we make gcc use the exclusion list;
  - we then make the external toolchains use it (in two passes: one for
    the non-Blackfin case, one for it, as it is 'seecial');

- we allow users to specify an exlcusion list for custom toolchains;
- finaly, we introduce the Codescape MTI and IMG toolchains from Vincent.

Changes RFC -> v2:
- allow user to exclude files for custom toolchain (Romain)
- don't force --hard-dereference, it's useless; instead, drop it
- add the IMG toolchain
- use appropriate toolchain on x86 and x86_64
- rebase on top of master

Regards,
Yann E. MORIN.

The following changes since commit b4660601cdcf9b66b167a08ec2a19e8e4564c7d6:

linux: bump default version to 4.2.4 (2015-10-23 09:27:04 +0200)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/extract-cmds

for you to fetch changes up to d81c191c32f761351ec9a907feedbd47968cd1ee:

toolchain/external: Codescape toolchains also exist for x86_64 (2015-10-24 14:44:42 +0200)

----------------------------------------------------------------
Vicente Olivert Riera (2):
toolchain/external: add MIPS Codescape MTI GNU Linux toolchain toolchain/external: add MIPS Codescape IMG GNU Linux toolchain

Yann E. MORIN (7):
core/pkg-generic: allow packages to exclude files when extracting toolchain-external/blacfin: always force keeping hardlinks from archives package/gcc: use generic extract commands toolchain/external: use generic extract commands (!blackfin case) toolchain/external: use generic extract commands (blackfin case) toolchain/external: allow user to exclude files from custom toolchains toolchain/external: Codescape toolchains also exist for x86_64

 docs/manual/adding-packages-generic.txt            |   4 +
 package/gcc/gcc-final/gcc-final.mk                 |   3 +-
 package/gcc/gcc-initial/gcc-initial.mk             |   3 +-
 package/gcc/gcc.mk                                 |  15 +--
 package/pkg-generic.mk                             |   5 +-
 toolchain/helpers.mk                               |  12 ++-
 toolchain/toolchain-external/Config.in             | 102 +++++++++++++++++++++
 .../toolchain-external/toolchain-external.hash     |   7 ++
 toolchain/toolchain-external/toolchain-external.mk |  73 ++++++++++-----
 9 files changed, 186 insertions(+), 38 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/9 core/pkg-generic: allow packages to exclude files when extracting

Currently, packages that need to exclude parts of the archives when extracting (e.g. to gain space), like gcc or toolchain-external, have to provide custom extract commands, just for the sake of adding a bunch of --exclude directives when calling tar.

Add a new variable that packages may set, to provide a space-separated list of patterns to exclude.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
---
 docs/manual/adding-packages-generic.txt | 4 ++++
 package/pkg-generic.mk                  | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
docs/manual/adding-packages-generic.txt +4 -0
index 9d6401f..a7143e4 100644
@@ -314,6 +314,10 @@ information is (assuming the package name is +libfoo+) :
   that have more than one leading component to strip, set this
   variable with the value to be passed to tar. Default: 1.
 
+* +LIBFOO_EXCLUDES+ is a space-separated list of patterns to exclude
+  when extracting the archive. Each item from that list is passed as
+  a tar's +--exclude+ option. By default, empty.
+
 * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package
   name) that are required for the current target package to
   compile. These dependencies are guaranteed to be compiled and
package/pkg-generic.mk +4 -1
index ffef4d3..8b189fe 100644
@@ -508,7 +508,10 @@ $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 # default extract command
 $(2)_EXTRACT_CMDS ?= \
 	$$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \
-	$$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
+	$$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) \
+		-C $$($(2)_DIR) \
+		$$(foreach x,$$($(2)_EXCLUDES),--exclude='$$(x)' ) \
+		$$(TAR_OPTIONS) -)
 
 # pre/post-steps hooks
 $(2)_PRE_DOWNLOAD_HOOKS         ?=
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/9 core/pkg-generic: allow packages to exclude files when extracting

Dear Yann E. MORIN,

Quoted 5 lines · Yann E. MORIN

Currently, packages that need to exclude parts of the archives when extracting (e.g. to gain space), like gcc or toolchain-external, have to provide custom extract commands, just for the sake of adding a bunch of --exclude directives when calling tar.

Quoted 7 lines

Add a new variable that packages may set, to provide a space-separated list of patterns to exclude.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>

Regards,

Vincent.

#3 lore raw

PATCH v2 1/9 core/pkg-generic: allow packages to exclude files when extracting

In reply to Yann E. MORIN

Yann, All,

How about also applying the same excludes list to the rsync in the .stamp_rsynced rule?

Thanks

Martin

Quoted 55 lines · Yann E. MORIN

Currently, packages that need to exclude parts of the archives when extracting (e.g. to gain space), like gcc or toolchain-external, have to provide custom extract commands, just for the sake of adding a bunch of --exclude directives when calling tar.

Add a new variable that packages may set, to provide a space-separated list of patterns to exclude.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
---
 docs/manual/adding-packages-generic.txt | 4 ++++
 package/pkg-generic.mk                  | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
docs/manual/adding-packages-generic.txt +4 -0
index 9d6401f..a7143e4 100644
@@ -314,6 +314,10 @@ information is (assuming the package name is +libfoo+) :
   that have more than one leading component to strip, set this
   variable with the value to be passed to tar. Default: 1.
 
+* +LIBFOO_EXCLUDES+ is a space-separated list of patterns to exclude
+  when extracting the archive. Each item from that list is passed as
+  a tar's +--exclude+ option. By default, empty.
+
 * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package
   name) that are required for the current target package to
   compile. These dependencies are guaranteed to be compiled and
package/pkg-generic.mk +4 -2
index ffef4d3..8b189fe 100644
@@ -508,7 +508,10 @@ $(2)_TARGET_DIRCLEAN =             $$($(2)_DIR)/.stamp_dircleaned
 # default extract command
 $(2)_EXTRACT_CMDS ?= \
        $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \
-       $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
+       $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) \
+               -C $$($(2)_DIR) \
+               $$(foreach x,$$($(2)_EXCLUDES),--exclude='$$(x)' ) \
+               $$(TAR_OPTIONS) -)
 
 # pre/post-steps hooks
 $(2)_PRE_DOWNLOAD_HOOKS         ?=
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH v2 2/9 toolchain-external/blacfin: always force keeping hardlinks from archives

In reply to Yann E. MORIN

Currently, for the blackfin external toolchains, we tell tar to extract files by dereferencing hard-links.

However, --hard-dereference has no impact when extracting archives in which there are hard-links.

Drop this option.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
---
 toolchain/toolchain-external/toolchain-external.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
toolchain/toolchain-external/toolchain-external.mk +2 -2
index 4e12a1c..704ce2b 100644
@@ -453,9 +453,9 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_
 define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS
 	mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
 	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \
-		$(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
+		$(TAR) --strip-components=3 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
 	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \
-		$(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
+		$(TAR) --strip-components=3 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
 endef
 else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),)
 # Normal handling of toolchain tarball extraction.
Signature · 1 line
1.9.1
#5 lore raw

PATCH v2 2/9 toolchain-external/blacfin: always force keeping hardlinks from archives

Quoted 5 lines · Yann E. MORIN

Currently, for the blackfin external toolchains, we tell tar to extract files by dereferencing hard-links.

However, --hard-dereference has no impact when extracting archives in which there are hard-links.

Took me a while to understand what you meant. How about:

However, --hard-dereference is only meaningful when creating an archive, not when extracting it.

With that:

Regards,
Arnout

Quoted 27 lines

Drop this option.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
---
 toolchain/toolchain-external/toolchain-external.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
toolchain/toolchain-external/toolchain-external.mk +2 -2
index 4e12a1c..704ce2b 100644
@@ -453,9 +453,9 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_
 define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS
 	mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
 	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \
-		$(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
+		$(TAR) --strip-components=3 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
 	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \
-		$(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
+		$(TAR) --strip-components=3 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
 endef
 else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),)
 # Normal handling of toolchain tarball extraction.
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#6 lore raw

PATCH v2 3/9 package/gcc: use generic extract commands

In reply to Yann E. MORIN
Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
---
 package/gcc/gcc-final/gcc-final.mk     |  3 ++-
 package/gcc/gcc-initial/gcc-initial.mk |  3 ++-
 package/gcc/gcc.mk                     | 15 ++++-----------
 3 files changed, 8 insertions(+), 13 deletions(-)
package/gcc/gcc-final/gcc-final.mk +2 -1
index 5a0f5b5..8ac2968 100644
@@ -12,7 +12,8 @@ HOST_GCC_FINAL_DEPENDENCIES = \
 	$(HOST_GCC_COMMON_DEPENDENCIES) \
 	$(BR_LIBC)
 
-HOST_GCC_FINAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS)
+HOST_GCC_FINAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES)
+HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE
 
 ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
 HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
package/gcc/gcc-initial/gcc-initial.mk +2 -1
index c0b5eaf..3ab47b9 100644
@@ -10,7 +10,8 @@ GCC_INITIAL_SOURCE = $(GCC_SOURCE)
 
 HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES)
 
-HOST_GCC_INITIAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS)
+HOST_GCC_INITIAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES)
+HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE
 
 ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
 HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
package/gcc/gcc.mk +4 -11
index d6213cc..28eb75e 100644
@@ -48,18 +48,11 @@ define HOST_GCC_APPLY_PATCHES
 	$(HOST_GCC_APPLY_POWERPC_PATCH)
 endef
 
-#
-# Custom extract command to save disk space
-#
+HOST_GCC_TAR_EXCLUDES = \
+	libjava/* libgo/* \
+	gcc/testsuite/* libstdc++-v3/testsuite/*
 
-define HOST_GCC_EXTRACT_CMDS
-	$(call suitable-extractor,$(GCC_SOURCE)) $(DL_DIR)/$(GCC_SOURCE) | \
-		$(TAR) --strip-components=1 -C $(@D) \
-		--exclude='libjava/*' \
-		--exclude='libgo/*' \
-		--exclude='gcc/testsuite/*' \
-		--exclude='libstdc++-v3/testsuite/*' \
-		$(TAR_OPTIONS) -
+define HOST_GCC_FAKE_TESTSUITE
 	mkdir -p $(@D)/libstdc++-v3/testsuite/
 	echo "all:" > $(@D)/libstdc++-v3/testsuite/Makefile.in
 	echo "install:" >> $(@D)/libstdc++-v3/testsuite/Makefile.in
Signature · 1 line
1.9.1
#7 lore raw

PATCH v2 3/9 package/gcc: use generic extract commands

Dear Yann E. MORIN,

Quoted 4 lines · Yann E. MORIN
Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>

Buildroot internal toolchain built for MIPS architecture after applying this patch (and the previous ones). Then the target rootfs was built successfully using that toolchain.

Regards,

Vincent.

#8 lore raw

PATCH v2 4/9 toolchain/external: use generic extract commands (!blackfin case)

In reply to Yann E. MORIN

Now that packages can provide a list of files to be excluded when extracting their archive, downloaded external toolchains are no longer special in this respect.

Still, those toolchains are currently extracted directly into their final location, $(HOST_DIR)/opt/ext-toolchain/ which means we still need a custom extract command.

Except, we don't really need it: we can just move the toolchain, after it's been extracted by the generic extract command, with a post-extract hook.

This means that:

- we now extract the toolchain with the generic extract command,

- the toolchain is thus extracted into $(@D) ,

- fixup commands are run against $(@D), as a post-extract hook,

    instead of against $(HOST_DIR)/opt/ext-toolchain ,

- once this is done, we move $(@D)/* into the final location with a new post-extract hook.

Note: the blackfin case is special, and will be handled in a follow-up patch.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
---
 toolchain/toolchain-external/toolchain-external.mk | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
toolchain/toolchain-external/toolchain-external.mk +10 -8
index 704ce2b..6de3690 100644
@@ -300,16 +300,16 @@ TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arag
 TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
 TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
 define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-	mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv7a/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/
-	rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/
+	mv $(@D)/arago-2011.09/armv7a/* $(@D)/
+	rm -rf $(@D)/arago-2011.09/
 endef
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109),y)
 TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports
 TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
 TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
 define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-	mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv5te/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/
-	rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/
+	mv $(@D)/arago-2011.09/armv5te/* $(@D)/
+	rm -rf $(@D)/arago-2011.09/
 endef
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y)
 TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries
@@ -459,12 +459,14 @@ define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS
 endef
 else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),)
 # Normal handling of toolchain tarball extraction.
-define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS
+TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
+define TOOLCHAIN_EXTERNAL_MOVE
 	mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
-	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \
-		$(TAR) --strip-components=1 --exclude='usr/lib/locale/*' -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
-	$(TOOLCHAIN_EXTERNAL_FIXUP_CMDS)
+	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/
 endef
+TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
+	TOOLCHAIN_EXTERNAL_FIXUP_CMDS \
+	TOOLCHAIN_EXTERNAL_MOVE
 endif
 
 # Returns the location of the libc.a file for the given compiler + flags
Signature · 1 line
1.9.1
#9 lore raw

PATCH v2 4/9 toolchain/external: use generic extract commands (!blackfin case)

Dear Yann E. MORIN,

Quoted 24 lines · Yann E. MORIN

Now that packages can provide a list of files to be excluded when extracting their archive, downloaded external toolchains are no longer special in this respect.

Still, those toolchains are currently extracted directly into their final location, $(HOST_DIR)/opt/ext-toolchain/ which means we still need a custom extract command.

Except, we don't really need it: we can just move the toolchain, after it's been extracted by the generic extract command, with a post-extract hook.

This means that:

- we now extract the toolchain with the generic extract command,

- the toolchain is thus extracted into $(@D) ,

- fixup commands are run against $(@D), as a post-extract hook,

    instead of against $(HOST_DIR)/opt/ext-toolchain ,

- once this is done, we move $(@D)/* into the final location with a new post-extract hook.

Quoted 7 lines

Note: the blackfin case is special, and will be handled in a follow-up patch.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>

After applying this patch (and the previous ones) I have built a rootfs for MIPS architecture using the latest Codesourcery external toolchain.

Regards,

Vincent.

#10 lore raw

PATCH v2 5/9 toolchain/external: use generic extract commands (blackfin case)

In reply to Yann E. MORIN

The backfin toolchains come in two archives.

We extract the first (main) archive using the generic extract commands, while the second is extracted as a post-extract hook.

Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
---
 toolchain/toolchain-external/toolchain-external.mk | 31 +++++++++++-----------
 1 file changed, 16 insertions(+), 15 deletions(-)
toolchain/toolchain-external/toolchain-external.mk +16 -15
index 6de3690..90faf3b 100644
@@ -286,6 +286,16 @@ define TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505_LIB_NAMES_FIX
 		$(STAGING_DIR)/usr/include/gnu/
 endef
 
+# 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.
+define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT
+	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \
+		$(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
+endef
+
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi
 TOOLCHAIN_EXTERNAL_SOURCE = arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
@@ -370,10 +380,14 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1),y)
 TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2013R1/2013R1-RC1/i386
 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2013R1-RC1.i386.tar.bz2
 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2013R1-RC1.i386.tar.bz2
+TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3
+TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y)
 TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2014R1/2014R1-RC2/i386
 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2014R1-RC2.i386.tar.bz2
 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
+TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3
+TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64),y)
 TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries
 TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz
@@ -444,21 +458,8 @@ TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
 
 TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
 
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y)
-# 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.
-define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS
-	mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
-	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \
-		$(TAR) --strip-components=3 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
-	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \
-		$(TAR) --strip-components=3 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) -
-endef
-else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),)
-# Normal handling of toolchain tarball extraction.
+# Normal handling of downloaded toolchain tarball extraction.
+ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),)
 TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
 define TOOLCHAIN_EXTERNAL_MOVE
 	mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
Signature · 1 line
1.9.1
#11 lore raw

PATCH v2 6/9 toolchain/external: allow user to exclude files from custom toolchains

In reply to Yann E. MORIN

Similarly as what we do for the toolchain's own locales (i.e. the locales of the tools in the toolchain, not the locales for the target), and an option so that users using a custom toolchain may pass a list of globs to exclude when extracting the toolchain (to save some space).

Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
---
 toolchain/toolchain-external/Config.in             | 8 ++++++++
 toolchain/toolchain-external/toolchain-external.mk | 4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)
toolchain/toolchain-external/Config.in +8 -0
index 4291394..2609e41 100644
@@ -913,6 +913,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
 	depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 	default "$(ARCH)-linux"
 
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_EXCLUDES
+	string "Files not to extract"
+	depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM && BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
+	help
+	  If you want to omit some files when extracting your custom
+	  toolchain, you may enter here a list of globs to be passed
+	  to tar's --exclude option.
+
 config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string
 	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_2014_12 && BR2_arcle
toolchain/toolchain-external/toolchain-external.mk +3 -1
index 90faf3b..0ba2fd2 100644
@@ -460,7 +460,9 @@ TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
 
 # Normal handling of downloaded toolchain tarball extraction.
 ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),)
-TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
+TOOLCHAIN_EXTERNAL_EXCLUDES = \
+	usr/lib/locale/* \
+	$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_EXCLUDES))
 define TOOLCHAIN_EXTERNAL_MOVE
 	mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
 	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/
Signature · 1 line
1.9.1
#12 lore raw

PATCH v2 6/9 toolchain/external: allow user to exclude files from custom toolchains

Dear Yann E. MORIN,

Quoted 9 lines · Yann E. MORIN

Similarly as what we do for the toolchain's own locales (i.e. the locales of the tools in the toolchain, not the locales for the target), and an option so that users using a custom toolchain may pass a list of globs to exclude when extracting the toolchain (to save some space).

Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

Regards,

Vincent.

#13 lore raw

PATCH v2 7/9 toolchain/external: add MIPS Codescape MTI GNU Linux toolchain

In reply to Yann E. MORIN

From: Vicente Olivert Riera <[email protected]>

- Add support for MIPS Codescape MTI GNU Linux toolchain
- Add a hash value
- Add logic to 'toolchain/helpers.mk' to allow the SYSROOT_DIR and ARCH_SYSROOT_DIR sit side by side instead of nested.
- Add logic for creating the side-by-side symlink as a post install hook.

[yann.morin.1998 at free.fr: no need to specify TOOLCHAIN_EXTERNAL_BIN
now that we use the generic extract commands; tweak commit log title]

Cc Thomas Petazzoni <[email protected]>
---
 toolchain/helpers.mk                               | 12 ++++-
 toolchain/toolchain-external/Config.in             | 52 ++++++++++++++++++++++
 .../toolchain-external/toolchain-external.hash     |  4 ++
 toolchain/toolchain-external/toolchain-external.mk | 17 +++++++
 4 files changed, 84 insertions(+), 1 deletion(-)
toolchain/helpers.mk +11 -1
index 1452ec6..af3654f 100644
@@ -114,6 +114,13 @@ copy_toolchain_lib_root = \
 #    non-default architecture variant is used. Without this, the
 #    compiler fails to find libraries and headers.
 #
+#  * Note: this guesses that the ARCH_SYSROOT_DIR is nested into
+#    the SYSROOT_DIR, but that's not true for all toolchains (i.e.
+#    Codescape toolchains), so a post-install-staging hook will be
+#    needed to create the symlink when the sysroot dirs are not nested
+#    because there is not enough information here to determine whether
+#    the sysroot layout is nested or side-by-side.
+#
 # Some toolchains (i.e Linaro binary toolchains) store support
 # libraries (libstdc++, libgcc_s) outside of the sysroot, so we simply
 # copy all the libraries from the "support lib directory" into our
@@ -142,7 +149,10 @@ copy_toolchain_sysroot = \
 				$${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \
 		fi ; \
 	done ; \
-	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
+	SYSROOT_DIR_CANON=`readlink -f $${SYSROOT_DIR}` ; \
+	ARCH_SYSROOT_DIR_CANON=`readlink -f $${ARCH_SYSROOT_DIR}` ; \
+	if [ $${SYSROOT_DIR_CANON} != $${ARCH_SYSROOT_DIR_CANON} \
+		-a $${ARCH_SYSROOT_DIR_CANON:0:$${\#SYSROOT_DIR_CANON}} == $${SYSROOT_DIR_CANON} ] ; then \
 		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
 			cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \
 		fi ; \
toolchain/toolchain-external/Config.in +52 -0

64 lines not on this page · raw message

toolchain/toolchain-external/toolchain-external.hash +4 -0
index 8424dca..40bc1e1 100644
@@ -53,6 +53,10 @@ sha256 0cffac0caea0eb3c8bdddfa14be011ce366680f40aeddbefc7cf23cb6d4f1891  gcc-lin
 sha256 4bc9d86390f8fa67a693ba4768ba5b12faaf7dd37c706c05ccd9321e765226e4  gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.tar.xz
 sha256 3954f496ab01de67241109e82abfaa9b7625fdab4f05e79e7902e9814a07b832  gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz
 
+# Codescape toolchains from Imagination Technologies
+# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05/
+sha256 f2d12dde626b750987d37ba6c73c6e11839850add94b0d4e4cf77917c1b0944f  Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
+
 # Synopsys DesignWare ARC toolchains
 sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3  arc_gnu_2014.12_prebuilt_uclibc_le_arc700_linux_install.tar.gz
 sha256 1080f07fcae2bfc176a3ea8d30b9ed8eaecab70fb786639d6ec70cae8322df10  arc_gnu_2014.12_prebuilt_uclibc_be_arc700_linux_install.tar.gz
toolchain/toolchain-external/toolchain-external.mk +17 -0
index 0ba2fd2..4ad726d 100644
@@ -296,6 +296,18 @@ define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT
 		$(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
 endef
 
+# The Codescape toolchain uses a sysroot layout that places them
+# side-by-side instead of nested like multilibs. A symlink is needed
+# much like for the nested sysroots which are handled in
+# copy_toolchain_sysroot but there is not enough information in there
+# to determine whether the sysroot layout was nested or side-by-side.
+# Add the symlink here for now.
+define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
+	$(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))"; \
+	ARCH_SUBDIR=`basename $${ARCH_SYSROOT_DIR}`; \
+	ln -snf . $(STAGING_DIR)/$${ARCH_SUBDIR}
+endef
+
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi
 TOOLCHAIN_EXTERNAL_SOURCE = arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
@@ -329,6 +341,11 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y)
 TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries
 TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.tar.xz
 TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMEBHF_SYMLINK
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506),y)
+TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05
+TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
+TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
+TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.05-27-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
1.9.1
#14 lore raw

PATCH v2 8/9 toolchain/external: add MIPS Codescape IMG GNU Linux toolchain

In reply to Yann E. MORIN

From: Vicente Olivert Riera <[email protected]>

Re-use SYSROOT_DIR vs. ARCH_SYSROOT_DIR handling just introduced for the Codescape MTI toolchain (in the previous patch).

[yann.morin.1998 at free.fr: tweak commit log]
---
 toolchain/toolchain-external/Config.in             | 44 ++++++++++++++++++++++
 .../toolchain-external/toolchain-external.hash     |  1 +
 toolchain/toolchain-external/toolchain-external.mk |  5 +++
 3 files changed, 50 insertions(+)
toolchain/toolchain-external/Config.in +44 -0
index 481b77c..fadd4a0 100644
@@ -241,6 +241,49 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506
 	      Select 'mips 64r2' Target Architecture Variant
 	      Select 'n64' Target ABI
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS201506
+	bool "Codescape IMG GNU Linux Toolchain 2015.06"
+	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_MIPS_SOFT_FLOAT
+	depends on BR2_mips_32r6 || BR2_mips_64r6
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	help
+	  Codescape IMG GNU Linux Toolchain 2015.06 for the MIPS
+	  architecture, from Imagination Technologies. It uses gcc
+	  4.9.2, binutils 2.24.90, glibc 2.20, gdb 7.9.1 and kernel
+	  headers 4.0. It has support for the following variants:
+	    - MIPS32r6 - Big-Endian, o32
+	      Select 'MIPS (big endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	    - MIPS32r6 - Little-Endian, o32
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	    - MIPS32r6 - Little-Endian, o32, microMIPS
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
+	    - MIPS64r6 - Big-Endian, n32
+	      Select 'MIPS64 (big endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n32' Target ABI
+	    - MIPS64r6 - Little-Endian, n32
+	      Select 'MIPS64 (little endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n32' Target ABI
+	    - MIPS64r6 - Big-Endian, n64
+	      Select 'MIPS64 (big endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n64' Target ABI
+	    - MIPS64r6 - Little-Endian, n64
+	      Select 'MIPS64 (little endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n64' Target ABI
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505
 	bool "Sourcery CodeBench MIPS 2015.05"
 	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
@@ -986,6 +1029,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
 	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	default "mips-mti-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506
+	default "mips-img-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS201506
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505
toolchain/toolchain-external/toolchain-external.hash +1 -0
index 40bc1e1..19f57c3 100644
@@ -56,6 +56,7 @@ sha256 3954f496ab01de67241109e82abfaa9b7625fdab4f05e79e7902e9814a07b832  gcc-lin
 # Codescape toolchains from Imagination Technologies
 # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05/
 sha256 f2d12dde626b750987d37ba6c73c6e11839850add94b0d4e4cf77917c1b0944f  Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
+sha256 545923cf40101b5de6b1e0fdf124aceba7ab27daf6c755aecf01d2c886715409  Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
 
 # Synopsys DesignWare ARC toolchains
 sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3  arc_gnu_2014.12_prebuilt_uclibc_le_arc700_linux_install.tar.gz
toolchain/toolchain-external/toolchain-external.mk +5 -0
index 4ad726d..44a5b34 100644
@@ -346,6 +346,11 @@ TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolch
 TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
 TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
 TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS201506),y)
+TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05
+TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
+TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
+TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.05-27-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
1.9.1
#15 lore raw

PATCH v2 9/9 toolchain/external: Codescape toolchains also exist for x86_64

In reply to Yann E. MORIN

Since their prefix exactly matches our $(HOSTARCH), just use that.

Cc Vicente Olivert Riera <[email protected]>
---
 toolchain/toolchain-external/Config.in               | 2 --
 toolchain/toolchain-external/toolchain-external.hash | 2 ++
 toolchain/toolchain-external/toolchain-external.mk   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
toolchain/toolchain-external/Config.in +0 -2
index fadd4a0..cc9c13f 100644
@@ -198,7 +198,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506
 	depends on BR2_mips_32r2 || BR2_mips_64r2
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
@@ -249,7 +248,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS201506
 	depends on BR2_mips_32r6 || BR2_mips_64r6
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
toolchain/toolchain-external/toolchain-external.hash +2 -0
index 19f57c3..518b3d2 100644
@@ -56,7 +56,9 @@ sha256 3954f496ab01de67241109e82abfaa9b7625fdab4f05e79e7902e9814a07b832  gcc-lin
 # Codescape toolchains from Imagination Technologies
 # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05/
 sha256 f2d12dde626b750987d37ba6c73c6e11839850add94b0d4e4cf77917c1b0944f  Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
+sha256 645d0dcac30632901dce5dc0eca69c436711f70f393e72e52f3fb78b76b581ff  Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86_64.tar.gz
 sha256 545923cf40101b5de6b1e0fdf124aceba7ab27daf6c755aecf01d2c886715409  Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
+sha256 46bb29610b6105b95734cdd573a258371dd3722ffba0e7b264ae7679406a60b3  Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.IMG.Linux.CentOS-5.x86_64.tar.gz
 
 # Synopsys DesignWare ARC toolchains
 sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3  arc_gnu_2014.12_prebuilt_uclibc_le_arc700_linux_install.tar.gz
toolchain/toolchain-external/toolchain-external.mk +2 -2
index 44a5b34..e962b9c 100644
@@ -343,12 +343,12 @@ TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.t
 TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMEBHF_SYMLINK
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506),y)
 TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05
-TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
+TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.$(HOSTARCH).tar.gz
 TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
 TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS201506),y)
 TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-05
-TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
+TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.IMG.Linux.CentOS-5.$(HOSTARCH).tar.gz
 TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
 TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405),y)
Signature · 1 line
1.9.1
#16 lore raw

PATCH v2 9/9 toolchain/external: Codescape toolchains also exist for x86_64

Dear Yann E. MORIN,

Quoted 4 lines · Yann E. MORIN

Since their prefix exactly matches our $(HOSTARCH), just use that.

Cc Vicente Olivert Riera <[email protected]>

Built rootfs's using the four possible combinations, MTI toolchain for x86 and x86_64, and IMG toolchain for x86 and x86_64.

Regards,

Vincent.

#17 lore raw

v2 cover toolchain/external: use generic extract commands (branch yem/extract-cmds)

In reply to Yann E. MORIN

Yann, Vicente,

Quoted 2 lines · Yann E. MORIN

Yann E. MORIN (7):
core/pkg-generic: allow packages to exclude files when extracting

Applied.

Quoted 1 line

toolchain-external/blacfin: always force keeping hardlinks from archives

Applied after fixing the commit title/log.

Quoted 1 line

package/gcc: use generic extract commands

Applied.

Quoted 1 line

toolchain/external: use generic extract commands (!blackfin case)

Applied, after adjusting how the Arago specific hook is registered and adding a comment.

Quoted 1 line

toolchain/external: use generic extract commands (blackfin case)

Applied.

Quoted 1 line

toolchain/external: allow user to exclude files from custom toolchains

Rejected, because I believe it's really not adding a lot of value.

I haven't applied yet the MIPS toolchains, because I'm not super happy with the hacks needed to get them working. I've looked at the problem, and indeed it isn't trivial, so I wanted to give it some thought.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com