summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--samples/avr32-unknown-none/crosstool.config4
-rw-r--r--scripts/build/libc/newlib.sh19
-rw-r--r--scripts/functions4
3 files changed, 16 insertions, 11 deletions
diff --git a/samples/avr32-unknown-none/crosstool.config b/samples/avr32-unknown-none/crosstool.config
index 508dbd0..aed5349 100644
--- a/samples/avr32-unknown-none/crosstool.config
+++ b/samples/avr32-unknown-none/crosstool.config
@@ -1,4 +1,3 @@
-CT_EXPERIMENTAL=y
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
CT_SAVE_TARBALLS=y
CT_CONFIG_SHELL_SH=y
@@ -7,3 +6,6 @@ CT_ARCH_avr32=y
CT_BINUTILS_V_2_18a=y
CT_CC_V_4_2_2=y
CT_LIBC_NEWLIB_V_1_17_0=y
+CT_LIBC_NEWLIB_IO_LL=y
+CT_LIBC_NEWLIB_IO_FLOAT=y
+CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y
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
diff --git a/scripts/functions b/scripts/functions
index a411820..e6defa8 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -523,6 +523,7 @@ CT_DoListTarballExt() {
printf ".tar.bz2\n"
printf ".tar.gz\n.tgz\n"
printf ".tar\n"
+ printf ".zip\n"
}
# Get the file name extension of a component
@@ -861,7 +862,7 @@ CT_GetGit() {
# by the caller, that did a 'cd' into the correct path before calling us
# and sets nochdir to 'nochdir'.
# Note also that this function handles the git trees!
-# Usage: CT_Extract <basename> [nochdir] [options]
+# Usage: CT_Extract [nochdir] <basename> [options]
# where 'options' are dependent on the source (eg. git branch/tag...)
CT_Extract() {
local nochdir="$1"
@@ -926,6 +927,7 @@ CT_Extract() {
.tar.bz2) bzip2 -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
.tar.gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
.tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;
+ .zip) CT_DoExecLog FILE unzip "${@}" "${full_file}";;
/.git) CT_ExtractGit "${basename}" "${@}";;
*) CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension"
return 1