Date: Thu, 14 Oct 2010 14:48:08 -0700 From: Oleksandr Tymoshenko <gonzo@bluezbox.com> To: Matthew Schnall <matt.schnall@gmail.com> Cc: freebsd-embedded@freebsd.org Subject: Re: Creating New Cross-Compiled Build Target Message-ID: <4CB77A98.8010604@bluezbox.com> In-Reply-To: <AANLkTimG2NzDvZZc71%2BF2J6SS9uBQSV8U0izvnr5A1rv@mail.gmail.com> References: <AANLkTimG2NzDvZZc71%2BF2J6SS9uBQSV8U0izvnr5A1rv@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/14/2010 1:23 PM, Matthew Schnall wrote: > I am a student at CMU taking a OS project course > (www.cs.cmu.edu/~412). My project is creating a port of freeBSD to the > new Tilera chips. The chip has a mips like architecture. There is a > gcc cross compiler from x86 to the tilera assembly. I was curious if > someone could help guide me through the steps to create a new > cross-compiled target within the freeBSD build infrastructure. It's relatively easy :) Rough plan: - Getting toolchain - Add architecture name to the KNOWN_ARCHES in Makefile.inc1 - Add architecture entries to share/mk/bsd.cpu.mk and share/mk/bsd.endian.mk - Look for "mips" in bsd.sys.mk and sys.mk and check if those exceptions are related to you arch - In sys/conf add Makefile.$arch, files.$arch, ldscript.$arch, options.$arch files (use *.mips as examples) - Add sys/$arch subdirectory with layout simmilar to sys/mips or sys/arm - Start hacking Getting toolchain might be a tricky part since version of gcc in base is 4.2 and binutils are quite outdated. So if you have toolchain as a set of patches to later versions backporting them would be a major headache. Easy way would be to build gcc/binutils with your patches applied from sources and hack proper gcc/binutils binaries' names to makefile. Warner did some work on out-of-base toolchains support but I'm not sure at what stage this project is.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CB77A98.8010604>