diff options
author | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2007-07-31 14:59:58 +0000 |
---|---|---|
committer | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2007-07-31 14:59:58 +0000 |
commit | 840325e17001c82cbe1538e8dcacf1467c5ac683 (patch) | |
tree | e4762c1bff9898aca5097c082796645c01ece60d | |
parent | 87111a1935be1c06879bb3accc9d3f28def4df20 (diff) |
Add support for prepatched toolchains
-rw-r--r-- | Config.in | 38 | ||||
-rw-r--r-- | target/device/Atmel/Mirrors.in | 27 | ||||
-rw-r--r-- | target/device/Mirrors.in | 17 | ||||
-rw-r--r-- | target/device/Toolchain.in | 51 | ||||
-rw-r--r-- | toolchain/Config.in | 7 | ||||
-rw-r--r-- | toolchain/Makefile.in | 16 | ||||
-rw-r--r-- | toolchain/binutils/binutils.mk | 20 | ||||
-rw-r--r-- | toolchain/gcc/Config.in | 2 | ||||
-rw-r--r-- | toolchain/gcc/gcc-uclibc-3.x.mk | 36 | ||||
-rw-r--r-- | toolchain/gcc/gcc-uclibc-4.x.mk | 34 | ||||
-rw-r--r-- | toolchain/gdb/gdb.mk | 21 | ||||
-rw-r--r-- | toolchain/uClibc/uclibc.mk | 24 |
12 files changed, 217 insertions, 76 deletions
@@ -564,43 +564,7 @@ config BR2_DL_DIR help Directory to store all the source files that we need to fetch. -config BR2_SOURCEFORGE_MIRROR - string "Sourceforge mirror site" - default "easynews" - help - Sourceforge has a system of mirror sites. Some sites may be closer - to your location, and sometimes mirror sites go down and are no longer - available. This option allows you to select your preferred Sourceforge - mirror site. - - The list of mirrors is available here: - http://prdownloads.sourceforge.net/index-sf.html?download - -config BR2_ATMEL_MIRROR - depends BR2_TARGET_ATMEL && (BR2_avr32 || BR2_arm) - string "Atmel AVR32/AT91 download site" - default "ftp://at91dist:distrib@81.80.104.162/AT91_Third_Party_Design_Flow/Linux_Host/" - help - Unofficial site for AVR32/AT91 Buildroot patches, or your local mirror. - Atmel does not currently support buildroot, but this site makes - available neccessary patches and prepatched packages useful - to extend a buildroot for AVR32 or AT91 ARM based boards. - Issues with contents of this server needs to be highlighted - on the buildroot mailing list and - should not be addressed directly to Atmel - Atmel provides support for their AVR32 chips on - http://avr32linux.org/ or http://www.avrfreaks.net/ - Atmel provides support for AT91 chips on www.at91.com. - Commercial AT91 Linux support is through www.timesys.com - Community AT91 Linux support is through http://maxim.org.za/AT91_26.html - -config BR2_AT91_PATCH_MIRROR - depends BR2_TARGET_ATMEL && BR2_arm - string "Atmel AT91 Linux Patch download site" - default "http://maxim.org.za/AT91RM9200/2.6/" - help - Patches for the AT91 generated by the Linux community - usually ends up here, courtesy of Andrew Victor +source "target/device/Mirrors.in" config BR2_STAGING_DIR string "Toolchain and header file location?" diff --git a/target/device/Atmel/Mirrors.in b/target/device/Atmel/Mirrors.in new file mode 100644 index 000000000..64eb5316f --- /dev/null +++ b/target/device/Atmel/Mirrors.in @@ -0,0 +1,27 @@ +menu "Atmel Mirrors" + +config BR2_ATMEL_MIRROR + string "Atmel AVR32/AT91 download site" + default "ftp://at91dist:distrib@81.80.104.162/AT91_Third_Party_Design_Flow/Linux_Host/" + help + Unofficial site for AVR32/AT91 Buildroot patches, or your local mirror. + Atmel does not currently support buildroot, but this site makes + available neccessary patches and prepatched packages useful + to extend a buildroot for AVR32 or AT91 ARM based boards. + Issues with contents of this server needs to be highlighted + on the buildroot mailing list and + should not be addressed directly to Atmel + Atmel provides support for their AVR32 chips on + http://avr32linux.org/ or http://www.avrfreaks.net/ + Atmel provides support for AT91 chips on www.at91.com. + Commercial AT91 Linux support is through www.timesys.com + Community AT91 Linux support is through http://maxim.org.za/AT91_26.html + +config BR2_AT91_PATCH_MIRROR + string "Atmel AT91 Linux Patch download site" + default "http://maxim.org.za/AT91RM9200/2.6/" + help + Patches for the AT91 generated by the Linux community + usually ends up here, courtesy of Andrew Victor + +endmenu diff --git a/target/device/Mirrors.in b/target/device/Mirrors.in new file mode 100644 index 000000000..477429fff --- /dev/null +++ b/target/device/Mirrors.in @@ -0,0 +1,17 @@ +menu "Mirrors and Download locations" + +config BR2_SOURCEFORGE_MIRROR + string "Sourceforge mirror site" + default "easynews" + help + Sourceforge has a system of mirror sites. Some sites may be closer + to your location, and sometimes mirror sites go down and are no longer + available. This option allows you to select your preferred Sourceforge + mirror site. + + The list of mirrors is available here: + http://prdownloads.sourceforge.net/index-sf.html?download + +source "target/device/Atmel/Mirrors.in" + +endmenu diff --git a/target/device/Toolchain.in b/target/device/Toolchain.in new file mode 100644 index 000000000..617cca325 --- /dev/null +++ b/target/device/Toolchain.in @@ -0,0 +1,51 @@ +choice + prompt "Source location:" + default BR2_TOOLCHAIN_NORMAL if !BR2_avr32 + default BR2_TOOLCHAIN_ATMEL_AVR32 if BR2_avr32 + depends on BR2_TOOLCHAIN_BUILDROOT + help + Select whether to use the toolchain built by the buildroot + system or an external pre-built toolchain. + +config BR2_TOOLCHAIN_NORMAL + bool + prompt "Use default sources for toolchain" + +config BR2_TOOLCHAIN_ATMEL_AVR32 + bool + prompt "Use prepatched source for AVR32 toolchain" + depends on BR2_avr32 + depends on BR2_GCC_VERSION_4_1_2 + depends on BR2_GDB_VERSION_6_4 || !BR2_PACKAGE_GDB + depends on BR2_BINUTILS_VERSION_2_17 + depends on BR2_UCLIBC_VERSION_0_9_28_3 + +endchoice + +config BR2_VENDOR_SITE + string + default $(BR2_ATMEL_MIRROR) if BR2_TOOLCHAIN_ATMEL_AVR32 + +config BR2_VENDOR_SUFFIX + string + default "-avr32" if BR2_TOOLCHAIN_ATMEL_AVR32 + +config BR2_VENDOR_BINUTILS_RELEASE + string + default "-2.0" if BR2_TOOLCHAIN_ATMEL_AVR32 + +config BR2_VENDOR_GCC_RELEASE + string + default "-2.0" if BR2_TOOLCHAIN_ATMEL_AVR32 + +config BR2_VENDOR_UCLIBC_RELEASE + string + default "-2.0" if BR2_TOOLCHAIN_ATMEL_AVR32 + +config BR2_VENDOR_GDB_RELEASE + string + default "-2.0" if BR2_TOOLCHAIN_ATMEL_AVR32 + +config BR2_VENDOR_PATCH_DIR + string + default "target/device/Atmel/toolchain/avr32" if BR2_TOOLCHAIN_ATMEL_AVR32 diff --git a/toolchain/Config.in b/toolchain/Config.in index 9e16bb846..a4b1af32f 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -1,5 +1,4 @@ -# - +menu "Toolchain type" choice prompt "Toolchain type" default BR2_TOOLCHAIN_BUILDROOT @@ -16,5 +15,9 @@ config BR2_TOOLCHAIN_EXTERNAL prompt "External toolchain" endchoice +source "target/device/Toolchain.in" + +endmenu + source "toolchain/Config.in.2" source "toolchain/external-toolchain/Config.in" diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in index a3dff49d4..e313df3c2 100644 --- a/toolchain/Makefile.in +++ b/toolchain/Makefile.in @@ -45,5 +45,21 @@ CFLAGS_WHOLE_PROGRAM = $(call cc-option,-fwhole-program,) # gcc-3.4 would need -combine, I only support 4.2, which correctly uses '--' CFLAGS_COMBINE = $(call cc-option,--combine,) +# define values for prepatched source trees for toolchains +VENDOR_SITE:=$(strip $(subst ",,$(BR2_VENDOR_SITE))) +#")) +VENDOR_SUFFIX:=$(strip $(subst ",,$(BR2_VENDOR_SUFFIX))) +#")) +VENDOR_BINUTILS_RELEASE:=$(strip $(subst ",,$(BR2_VENDOR_BINUTILS_RELEASE))) +#")) +VENDOR_GCC_RELEASE:=$(strip $(subst ",,$(BR2_VENDOR_GCC_RELEASE))) +#")) +VENDOR_UCLIBC_RELEASE:=$(strip $(subst ",,$(BR2_VENDOR_UCLIBC_RELEASE))) +#")) +VENDOR_GDB_RELEASE:=$(strip $(subst ",,$(BR2_VENDOR_GDB_RELEASE))) +#")) +VENDOR_PATCH_DIR:=$(strip $(subst ",,$(BR2_VENDOR_PATCH_DIR))) +#")) + # gcc has a bunch of needed stuff.... include toolchain/gcc/Makefile.in diff --git a/toolchain/binutils/binutils.mk b/toolchain/binutils/binutils.mk index 193236072..32b23727f 100644 --- a/toolchain/binutils/binutils.mk +++ b/toolchain/binutils/binutils.mk @@ -62,8 +62,20 @@ BINUTILS_TARGET_CONFIG_OPTIONS=--with-gmp="$(GMP_TARGET_DIR)" BINUTILS_TARGET_CONFIG_OPTIONS+=--with-mpfr="$(MPFR_TARGET_DIR)" endif -BINUTILS_SOURCE:=binutils-$(BINUTILS_VERSION).tar.bz2 -BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION) +ifeq ($(BR2_TOOLCHAIN_NORMAL),) +BINUTILS_SITE:=$(VENDOR_SITE) +endif + +BINUTILS_OFFICIAL_VERSION:=$(BINUTILS_VERSION)$(VENDOR_SUFFIX)$(VENDOR_BINUTILS_RELEASE) + +ifeq ($(BR2_TOOLCHAIN_NORMAL),y) +BINUTILS_PATCH_DIR:=toolchain/binutils/$(BINUTILS_VERSION) +else +BINUTILS_PATCH_DIR:=$(VENDOR_PATCH_DIR)/binutils-$(BINUTILS_OFFICIAL_VERSION) +endif + +BINUTILS_SOURCE:=binutils-$(BINUTILS_OFFICIAL_VERSION).tar.bz2 +BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_OFFICIAL_VERSION) BINUTILS_CAT:=$(BZCAT) BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION)-build @@ -72,7 +84,7 @@ $(DL_DIR)/$(BINUTILS_SOURCE): mkdir -p $(DL_DIR) $(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE) -binutils-unpacked: $(BINUTILS_DIR)/.unpacked +binutils-unpacked: $(BINUTILS_DIR)/.patched $(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE) mkdir -p $(TOOL_BUILD_DIR) rm -rf $(BINUTILS_DIR) @@ -82,7 +94,7 @@ $(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE) $(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked # Apply appropriate binutils patches. - toolchain/patch-kernel.sh $(BINUTILS_DIR) toolchain/binutils/$(BINUTILS_VERSION) \*.patch + toolchain/patch-kernel.sh $(BINUTILS_DIR) $(BINUTILS_PATCH_DIR) \*.patch touch $@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index c7b258095..51934d9d9 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -119,7 +119,7 @@ config BR2_GCC_VERSION config BR2_TOOLCHAIN_SYSROOT bool "Enable toolchain with --sysroot support" - depends on !BR2_GCC_VERSION_3_3_5 && !BR2_GCC_VERSION_3_3_6 && !BR2_GCC_VERSION_3_4_2 && !BR2_GCC_VERSION_3_4_3 && !BR2_GCC_VERSION_3_4_4 && !BR2_GCC_VERSION_3_4_5 && !BR2_GCC_VERSION_3_4_6 + depends on !BR2_GCC_VERSION_3_3_5 && !BR2_GCC_VERSION_3_3_6 && !BR2_GCC_VERSION_3_4_2 && !BR2_GCC_VERSION_3_4_3 && !BR2_GCC_VERSION_3_4_4 && !BR2_GCC_VERSION_3_4_5 && !BR2_GCC_VERSION_3_4_6 && !BR2_GCC_VERSION_4_1_2 default y help Enables --sysroot=dir for binutils and gcc. diff --git a/toolchain/gcc/gcc-uclibc-3.x.mk b/toolchain/gcc/gcc-uclibc-3.x.mk index cd736371f..798ba25b9 100644 --- a/toolchain/gcc/gcc-uclibc-3.x.mk +++ b/toolchain/gcc/gcc-uclibc-3.x.mk @@ -31,8 +31,31 @@ GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE) GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_OFFICIAL_VER) endif + +# redefine if using an external prepatched gcc source +ifeq ($(BR2_TOOLCHAIN_NORMAL),) +GCC_SITE:=$(VENDOR_SITE) +GCC_OFFICIAL_VER:=$(GCC_VERSION)$(VENDOR_SUFFIX)$(VENDOR_GCC_RELEASE) +endif + GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VER).tar.bz2 GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VER) + +ifeq ($(BR2_TOOLCHAIN_NORMAL),y) +ifeq ($(GCC_SNAP_DATE),) +GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) +else +ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),) +GCC_PATCH_DIR:=toolchain/gcc/$(GCC_OFFICIAL_VER) +else +GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) +endif +endif +else +GCC_PATCH_DIR:=$(VENDOR_PATCH_DIR)/gcc-$(GCC_OFFICIAL_VER) +endif + + GCC_CAT:=$(BZCAT) GCC_STRIP_HOST_BINARIES:=true @@ -109,7 +132,7 @@ $(DL_DIR)/$(GCC_SOURCE): mkdir -p $(DL_DIR) $(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE) -gcc-unpacked: $(GCC_DIR)/.unpacked +gcc-unpacked: $(GCC_DIR)/.patched $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) mkdir -p $(TOOL_BUILD_DIR) $(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - @@ -119,16 +142,7 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) gcc-patched: $(GCC_DIR)/.patched $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked # Apply any files named gcc-*.patch from the source directory to gcc -ifeq ($(GCC_SNAP_DATE),) - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch -else -ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),) - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_OFFICIAL_VER) \*.patch -else - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch -endif -endif - + toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch # Note: The soft float situation has improved considerably with gcc 3.4.x. # We can dispense with the custom spec files, as well as libfloat for the arm case. # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index 2274811b3..fb8cb6908 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -29,6 +29,28 @@ GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE) GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_OFFICIAL_VER) endif +# redefine if using an external prepatched gcc source +ifeq ($(BR2_TOOLCHAIN_NORMAL),) +GCC_SITE:=$(VENDOR_SITE) +GCC_OFFICIAL_VER:=$(GCC_VERSION)$(VENDOR_SUFFIX)$(VENDOR_GCC_RELEASE) +endif + +# define patch location +ifeq ($(BR2_TOOLCHAIN_NORMAL),y) # Normal toolchain +ifeq ($(GCC_SNAP_DATE),) # Not a snapshot +GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) +else # Is a snapshot +ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),) # Snapshot patch? +GCC_PATCH_DIR:=toolchain/gcc/$(GCC_OFFICIAL_VER) +else # Normal patch to snapshot +# Use the normal location, if the dedicated location does not exist +GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) +endif # Snapshot patch +endif # Not a snapshot +else # Prepatched toolchain +GCC_PATCH_DIR:=$(VENDOR_PATCH_DIR)/gcc-$(GCC_OFFICIAL_VER) +endif # Normal toolchain + GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VER).tar.bz2 GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VER) GCC_CAT:=$(BZCAT) @@ -97,7 +119,7 @@ $(DL_DIR)/$(GCC_SOURCE): mkdir -p $(DL_DIR) $(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE) -gcc-unpacked: $(GCC_DIR)/.unpacked +gcc-unpacked: $(GCC_DIR)/.patched $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) mkdir -p $(TOOL_BUILD_DIR) rm -rf $(GCC_DIR) @@ -108,15 +130,7 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) gcc-patched: $(GCC_DIR)/.patched $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked # Apply any files named gcc-*.patch from the source directory to gcc -ifeq ($(GCC_SNAP_DATE),) - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch -else -ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),) - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_OFFICIAL_VER) \*.patch -else - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch -endif -endif + toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch # Note: The soft float situation has improved considerably with gcc 3.4.x. # We can dispense with the custom spec files, as well as libfloat for the arm case. diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk index 80d66f24c..847a7ec06 100644 --- a/toolchain/gdb/gdb.mk +++ b/toolchain/gdb/gdb.mk @@ -18,11 +18,25 @@ GDB_SOURCE:=gdb.tar.bz2 GDB_CAT:=$(BZCAT) GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_VERSION) else + +ifeq ($(BR2_TOOLCHAIN_NORMAL),y) GDB_SITE:=http://ftp.gnu.org/gnu/gdb -GDB_SOURCE:=gdb-$(GDB_VERSION).tar.bz2 +else +GDB_SITE:=$(VENDOR_SITE) +endif + +GDB_OFFICIAL_VERSION:=$(GDB_VERSION)$(VENDOR_SUFFIX)$(VENDOR_GDB_RELEASE) + +GDB_SOURCE:=gdb-$(GDB_OFFICIAL_VERSION).tar.bz2 GDB_CAT:=$(BZCAT) -GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_VERSION) +ifeq ($(BR2_TOOLCHAIN_NORMAL),y) +GDB_PATCH_DIR:=toolchain/gdb/$(GDB_OFFICIAL_VERSION) +else +GDB_PATCH_DIR:=$(VENDOR_PATCH_DIR)/gdb-$(GDB_OFFICIAL_VERSION) +endif + +GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_OFFICIAL_VERSION) # NOTE: This option should not be used with gdb versions 6.4 and above. ifeq ($(GDB_VERSION),6.2.1) @@ -39,13 +53,14 @@ $(DL_DIR)/$(GDB_SOURCE): gdb-unpacked: $(GDB_DIR)/.unpacked $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) + mkdir -p $(TOOL_BUILD_DIR) $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - ifeq ($(GDB_VERSION),snapshot) GDB_REAL_DIR=$(shell \ tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR) endif - toolchain/patch-kernel.sh $(GDB_DIR) toolchain/gdb/$(GDB_VERSION) \*.patch + toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch $(CONFIG_UPDATE) $(GDB_DIR) touch $@ diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk index af13bf280..f860d5017 100644 --- a/toolchain/uClibc/uclibc.mk +++ b/toolchain/uClibc/uclibc.mk @@ -33,13 +33,21 @@ UCLIBC_VER:=0.9.28 endif UCLIBC_SITE:=http://www.uclibc.org/downloads -ifeq ($(BR2_avr32),y) -VENDOR_SUFFIX:=-avr32 -UCLIBC_SITE:=$(BR2_ATMEL_MIRROR)/Source +ifeq ($(BR2_TOOLCHAIN_NORMAL),) +UCLIBC_SITE:=$(VENDOR_SITE) endif -UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER)$(VENDOR_SUFFIX) -UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER)$(VENDOR_SUFFIX).tar.bz2 +UCLIBC_OFFICIAL_VERSION:=$(UCLIBC_VER)$(VENDOR_SUFFIX)$(VENDOR_UCLIBC_RELEASE) + + +ifeq ($(BR2_TOOLCHAIN_NORMAL),y) +UCLIBC_PATCH_DIR:=toolchain/uClibc/ +else +UCLIBC_PATCH_DIR:=$(VENDOR_PATCH_DIR)/uClibc-$(UCLIBC_OFFICIAL_VERSION) +endif + +UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_OFFICIAL_VERSION) +UCLIBC_SOURCE:=uClibc-$(UCLIBC_OFFICIAL_VERSION).tar.bz2 endif UCLIBC_CAT:=$(BZCAT) @@ -93,13 +101,13 @@ endif uclibc-unpacked: $(UCLIBC_DIR)/.unpacked $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) $(UCLIBC_LOCALE_DATA) - [ -d $(TOOL_BUILD_DIR) ] || $(INSTALL) -d $(TOOL_BUILD_DIR) + mkdir -p $(TOOL_BUILD_DIR) rm -rf $(UCLIBC_DIR) $(UCLIBC_CAT) $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - ifneq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) - toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ uClibc-$(UCLIBC_VER)$(VENDOR_SUFFIX)-\*.patch + toolchain/patch-kernel.sh $(UCLIBC_DIR) $(UCLIBC_PATCH_DIR) uClibc-$(UCLIBC_OFFICIAL_VERSION)-\*.patch else - toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ uClibc.\*.patch + toolchain/patch-kernel.sh $(UCLIBC_DIR) $(UCLIBC_PATCH_DIR) uClibc.\*.patch endif ifneq ($(BR2_ENABLE_LOCALE),) cp -dpf $(DL_DIR)/$(UCLIBC_SOURCE_LOCALE) $(UCLIBC_DIR)/extra/locale/ |