From owner-freebsd-embedded@FreeBSD.ORG Thu Oct 14 22:30:02 2010 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A40E106564A for ; Thu, 14 Oct 2010 22:30:02 +0000 (UTC) (envelope-from gonzo@launchpad.bluezbox.com) Received: from launchpad.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 8DCF58FC13 for ; Thu, 14 Oct 2010 22:30:01 +0000 (UTC) Received: from [140.242.16.2] (helo=[172.23.2.112]) by launchpad.bluezbox.com with esmtpsa (SSLv3:DES-CBC3-SHA:168) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1P6Vem-000A6U-1A; Thu, 14 Oct 2010 14:48:13 -0700 Message-ID: <4CB77A98.8010604@bluezbox.com> Date: Thu, 14 Oct 2010 14:48:08 -0700 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: Matthew Schnall References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@launchpad.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: 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 :) [...] Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.2 AWL AWL: From: address is in the auto white-list Cc: freebsd-embedded@freebsd.org Subject: Re: Creating New Cross-Compiled Build Target X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2010 22:30:02 -0000 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.