summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorMartin Guy <martinwguy@gmail.com>2013-03-31 04:07:38 (GMT)
committerMartin Guy <martinwguy@gmail.com>2013-03-31 04:07:38 (GMT)
commite284b218a7c52b666082fc552a21fc03b13459c1 (patch)
treebd1566fb3aa7d3d4abbd50556ef99a1840ad42f2 /scripts/build
parentf60abd80ae398a2327875eb77d353fcfd918b316 (diff)
arch/avr32: Fix download of header files
This patch fixes the download of the avr32 headers in crosstool-ng by fetching them directly from Atmel's web site instead of the now-broken URL given by the original author of the avr32-header-fetching modification, who fetched them from a copy on his own, now-defunct server. It also adds the necessary logic to extract from a zip file, as that is how the headers are packaged. To configure it for avr32 after launching ct-ng menuconfig in an empty directory: Paths and misc options -> Shell to use as CONFIG_SHELL = sh Target options -> Target Architecture = avr32 Toolchain options -> Tuple's alias = avr32 Binary utilities -> binutils version = 2.18a C compiler gcc version = 4.2.2 C-library newlib version = 1.17.0 Enable IOs on long long = yes Enable IOs on floats and doubles = yes Disable the syscalls supplied with newlib = yes CONFIG_SHELL is necessary to get round the "fragment: command not found" bug when binutils-2.18 is configured using bash. Prepared against crosstool-ng mercurial trunk on 31 March 2012. Signed-off-by: Martin Guy <martinwguy@gmail.com> [yann.morin.1998@free.fr: update bundles sample accordingly] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <CAL4-wQrg_NQ7jm-NCADqeyQr9twyhtx42OUGNThP6gWeqZc=kw@mail.gmail.com> Patchwork-Id: 232612
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/libc/newlib.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index fe15fe5..068187b 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -6,11 +6,10 @@
#
do_libc_get() {
- local libc_src
- local avr32headers_src
-
- libc_src="ftp://sourceware.org/pub/newlib"
- avr32headers_src="http://dev.doredevelopment.dk/avr32-toolchain/sources"
+ local libc_src="ftp://sourceware.org/pub/newlib"
+ local avr32headers_src="http://www.atmel.com/Images"
+ avr32headers_base="avr-headers-3.2.3.970" # used below
+ local avr32headers_ext=".zip"
if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" ]; then
CT_GetCustom "newlib" "${CT_LIBC_VERSION}" \
@@ -20,7 +19,7 @@ do_libc_get() {
fi # ! custom location
if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
- CT_GetFile "avr32headers" ${avr32headers_src}
+ CT_GetFile ${avr32headers_base} ${avr32headers_ext} ${avr32headers_src}
fi
}
@@ -35,7 +34,9 @@ do_libc_extract() {
CT_Patch "newlib" "${CT_LIBC_VERSION}"
if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
- CT_Extract "avr32headers"
+ # The avr32header zip file extracts to avr32/*.h
+ # Put that in its directory, the same as normal tarballs
+ CT_Extract ${avr32headers_base} -d ${CT_SRC_DIR}/${avr32headers_base}
fi
}
@@ -49,8 +50,8 @@ do_libc_start_files() {
CT_DoLog EXTRA "Installing Atmel's AVR32 headers"
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/${CT_TARGET}/include"
- CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/avr32headers" \
- "${CT_PREFIX_DIR}/${CT_TARGET}/include/avr32"
+ CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/${avr32headers_base}/avr32" \
+ "${CT_PREFIX_DIR}/${CT_TARGET}/include/"
CT_EndStep
fi