This page describes basic steps needed to:
The instructions have been tested with Stellaris EKK-LM3S811 evaluation kit.
yum install openocd
openocd -f interface/luminary-lm3s811.cfg -f board/ek-lm3s811.cfg
telnet localhost 4444
reset halt
flash write_image erase /home/pawsa/dev/stellaris/./stellarisware/boards/ek-lm3s811/blinky/sourcerygxx/blinky.bin
reset
diff --git a/avr-binutils.spec b/avr-binutils.spec
--- a/avr-binutils.spec
+++ b/avr-binutils.spec
@@ -1,4 +1,4 @@
-%define target avr
+%define target arm-unknown-elf
Name: %{target}-binutils
Version: 2.21
diff --git a/avr-gcc.spec b/avr-gcc.spec
--- a/avr-gcc.spec
+++ b/avr-gcc.spec
@@ -1,4 +1,4 @@
-%define target avr
+%define target arm-unknown-elf
Name: %{target}-gcc
Version: 4.5.1
@@ -12,6 +12,7 @@ Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-g++-%{version}.tar.
Source2: README.fedora
Patch0: avr-gcc-4.5.0-new_devices.patch
Patch1: avr-gcc-4.5.1-register-fix.patch
+Patch2: arm-gcc-4.5.1-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildRequires: %{target}-binutils >= 2.13, zlib-devel gawk gmp-devel mpfr-devel libmpc-devel
@@ -39,6 +40,11 @@ platform.
pushd gcc-%{version}
%patch0 -p0
%patch1 -p1
+%patch2 -p2 -b .arm
+
+find . -name configure.ac | xargs perl -pi -e 's,\(2.64\),(2.66),g'
+find . -name override.m4 | xargs perl -pi -e 's,2.64,2.66,g;'
+autoreconf
contrib/gcc_update --touch
popd
@@ -71,8 +77,9 @@ pushd gcc-%{target}
CC="%{__cc} ${RPM_OPT_FLAGS}" \
../gcc-%{version}/configure --prefix=%{_prefix} --mandir=%{_mandir} \
--infodir=%{_infodir} --target=%{target} --enable-languages=c,c++ \
- --disable-nls --disable-libssp --with-system-zlib \
+ --disable-nls --disable-libssp --disable-zlib \
--enable-version-specific-runtime-libs \
+ --without-headers \
--with-pkgversion="Fedora %{version}-%{release}" \
--with-bugurl="https://bugzilla.redhat.com/"
# In general, building GCC is not smp-safe
We add an additional patch, and assure that gcc's configure.ac scripts do not panic when encountering more recent autoconf version. We disable also gcc features that require libc.
--- arm-unknown-elf-gcc-4.5.1/gcc-4.5.1/configure.ac.arm 2010-06-24 23:06:37.000000000 +0200
+++ arm-unknown-elf-gcc-4.5.1/gcc-4.5.1/configure.ac 2011-01-22 19:53:57.838808864 +0100
@@ -30,7 +30,7 @@
m4_include([lt~obsolete.m4])
AC_INIT(move-if-change)
-AC_PREREQ(2.64)
+AC_PREREQ(2.66)
AC_DISABLE_OPTION_CHECKING
progname=$0
@@ -589,7 +589,7 @@
libgloss_dir=arm
;;
arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads target-libiberty target-libstdc++-v3 ${libgcj}"
libgloss_dir=arm
;;
arm*-*-linux-gnueabi)
The purpose of the patch is to block building target-libiberty. We probably want to block it only for arm-unknown-*, not for all ARM architecture types.
You should be ready to go!
Go back to Pawel Salek's home page.