From: Jan Kiszka <jan.kiszka@web.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
otus-devel@lists.madwifi-project.org,
linux-wireless@vger.kernel.org
Subject: [PATCH 1/2] ar9170-fw: Boostrap our own toolchain
Date: Sat, 06 Jun 2009 19:13:25 +0200 [thread overview]
Message-ID: <4A2AA3B5.5020202@web.de> (raw)
[-- 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 --]
reply other threads:[~2009-06-06 17:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A2AA3B5.5020202@web.de \
--to=jan.kiszka@web.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.com \
--cc=otus-devel@lists.madwifi-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.