* [PATCH 1/2] ar9170-fw: Boostrap our own toolchain
@ 2009-06-06 17:13 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2009-06-06 17:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: Luis R. Rodriguez, otus-devel, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 2202 bytes --]
To avoid semi-open binary toolchains: This patch adds a toolchain subdir
and Makefile to download, build and install our own gnu sh2 toolchain
into that directory.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
toolchain/Makefile | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 54 insertions(+), 0 deletions(-)
create mode 100644 toolchain/Makefile
diff --git a/.gitignore b/.gitignore
index 6dd924f..d2fa705 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,6 @@
fw.map
*~
*.dis
+toolchain/src
+toolchain/build
+toolchain/inst
diff --git a/toolchain/Makefile b/toolchain/Makefile
new file mode 100644
index 0000000..d5468eb
--- /dev/null
+++ b/toolchain/Makefile
@@ -0,0 +1,54 @@
+BINUTILS_VER=2.19.1
+BINUTILS_URL=http://mirrors.kernel.org/gnu/binutils/binutils-$(BINUTILS_VER).tar.bz2
+BINUTILS_TAR=binutils-$(BINUTILS_VER).tar.bz2
+
+NEWLIB_VER=1.17.0
+NEWLIB_URL=ftp://sources.redhat.com/pub/newlib/newlib-$(NEWLIB_VER).tar.gz
+NEWLIB_TAR=newlib-$(NEWLIB_VER).tar.gz
+
+GCC_VER=4.3.3
+GCC_URL=http://mirrors.kernel.org/gnu/gcc/gcc-$(GCC_VER)/gcc-core-$(GCC_VER).tar.bz2
+GCC_TAR=gcc-core-$(GCC_VER).tar.bz2
+
+BASEDIR=$(shell pwd)
+
+all: gcc
+
+src/$(BINUTILS_TAR):
+ wget -P src $(BINUTILS_URL)
+
+src/$(NEWLIB_TAR):
+ wget -P src $(NEWLIB_URL)
+
+src/$(GCC_TAR):
+ wget -P src $(GCC_URL)
+
+src/binutils-$(BINUTILS_VER): src/$(BINUTILS_TAR)
+ tar -C src -xjf $<
+
+src/newlib-$(NEWLIB_VER): src/$(NEWLIB_TAR)
+ tar -C src -xzf $<
+
+src/gcc-$(GCC_VER): src/$(GCC_TAR) src/newlib-$(NEWLIB_VER)
+ tar -C src -xjf $<
+ ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/{newlib,libgloss} $@
+
+binutils: src/binutils-$(BINUTILS_VER)
+ mkdir -p build/binutils
+ cd build/binutils; \
+ $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst; \
+ $(MAKE); \
+ $(MAKE) install
+
+gcc: src/gcc-$(GCC_VER) binutils
+ mkdir -p build/gcc
+ cd build/gcc; \
+ $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst -enable-languages=c --without-pkgversion --with-newlib; \
+ $(MAKE); \
+ $(MAKE) install
+
+clean:
+ rm -rf build inst
+
+distclean: clean
+ rm -rf src
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-06 17:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-06 17:13 [PATCH 1/2] ar9170-fw: Boostrap our own toolchain Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.