Basically I want to package LeJOS NXJ, which requires building a arm-elf toolchain, which produces an identical firmware image to the one produced by upstream. I want to make this useful to other users as well, which means it should be packaged independently of LeJOS NXJ. I would like to do this as properly as possible, so I think building my own "bare metal" toolchain is probably a last resort. To compile binutils, should I create a new section in the rules file for the arm-elf toolchain, like the other architecture specific targets? If this is the case are there any instructions for doing this correctly, or should I just copy and adjust the existing code? Then compile it with this command? TARGET=i386 fakeroot debian/rules binary-cross Thanks, Chris On Sun, 2010-09-26 at 22:58 +0100, Hector Oron wrote: > Hello, > > 2010/9/24 Chris Baines <cbaines8@gmail.com>: > > GCC_TARGET=arm-elf DEB_CROSS=yes fakeroot debian/rules control > > GCC_TARGET should be an official Debian Architecture Name, otherwise > it should fail. > > > debian/tmp/usr/lib/gcc/i486-linux-gnu/4.3.5/cc1 . Also an unrelated > > problem, the control file has the binutils dependency as binutils- not > > binutils-arm-elf. > > `binutils' is the same as above. > > > However this at the moment will not produce a toolchain capable of > > compiling the LeJOS firmware. The src/gcc/config/arm/t-arm-elf file can > > be used to enable support for the following options: > > marm/mthumb (arm or thumb code generation) > > mlittle-endian/mbig-endian (little or big endian architectures) > > mhard-float/msoft-float (hardware or software fpu instructions) > > mno-thumb-interwork/mthumb-interwork (arm-thumb modes interworking) > > mcpu=arm7 (arm7 targets without hardware multiply) > > LeJOS needs the mno-thumb-interwork/mthumb-interwork bit enabling. This > > requires the uncommenting/amending two lines in the t-arm-elf file, how > > should this be done? I notice that there are specific targets in the > > rules and rules2 files, should I create a target for the arm-elf > > architecture? > > What you are attempting to create is just a bare metal toolchain > (without linking to libc, just newlib), but a linked libc cross > toolchain is as well capable to build firmware and much more things. > You just need to tell the right configuration to the toolchain to spit > the code you wish. > > If you are still not satisfied and still want to build your own bare > metal toolchain defaulting to whatever you want, have a look to Uwe > unofficial instructions to do so [1]. > > Best regards, > -H > > [1] http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source > >
Attachment:
signature.asc
Description: This is a digitally signed message part