From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 23 21:06:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE2B816A4DE for ; Sun, 23 Jul 2006 21:06:35 +0000 (UTC) (envelope-from tyler@bleepsoft.com) Received: from zeus.lunarpages.com (zeus.lunarpages.com [216.193.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5421043D4C for ; Sun, 23 Jul 2006 21:06:35 +0000 (GMT) (envelope-from tyler@bleepsoft.com) Received: from 24-240-211-104.dhcp.sprn.tx.charter.com ([24.240.211.104] helo=[192.168.250.100]) by zeus.lunarpages.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52) id 1G4lAo-00075U-Ah for freebsd-hackers@freebsd.org; Sun, 23 Jul 2006 14:07:38 -0700 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <20060723.105549.2106235963.imp@bsdimp.com> References: <7ADD22A7-42DE-49D8-B411-DBA4CB2FA0CD@bleepsoft.com> <20060723100223.GB24435@gothmog.pc> <3320CEAC-8A5C-407D-9867-C2A22820A599@bleepsoft.com> <20060723.105549.2106235963.imp@bsdimp.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <00DBA5C9-C270-4E3A-AAD0-DD294B6A2E1C@bleepsoft.com> Content-Transfer-Encoding: 7bit From: "R. Tyler Ballance" Date: Sun, 23 Jul 2006 16:06:31 -0500 To: FreeBSD Hackers X-Pgp-Agent: GPGMail 1.1.2 (Tiger) X-Mailer: Apple Mail (2.752.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - zeus.lunarpages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - bleepsoft.com X-Source: X-Source-Args: X-Source-Dir: Subject: Platform dependent locations (was Re: Building a sandboxed kernel) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2006 21:06:35 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Doesn't matter. > > I often do the following: > > setenv TARGET arm # this may be iguana for you > setenv TARGET_ARCH arm > setenv MAKEOBJDIRPREFIX /home/imp/obj > cd p4/imp_arm > make buildworld > make buildenv # from here on out is in a subshell > cd ../arm/src/sys/arm/conf > config KB920X > cd ../compile/KB920X > make depend && make > > You'll notice that I built in a tree that had all the arm patches > applied, and got a 'buildenv' there, but then build the kernel out of > a different tree. This is a -current p4 tree for both imp_arm and > arm, but I do this on a RELENG_6 system. I've done it in the recent > past on a 5.3 system too. > > TARGET is MACHINE and TARGET_ARCH is MACHINE_ARCH. MACHINE is the > kernel architecture, while MACHINE_ARCH is the CPU architecture > (TARGET_CPU is the specific CPU that we're optimizing for). Chances > are excellent we'll have TARGET_ARCH armel and armeb shortly. Right > now we have a hack ARM_BIG_ENDIAN used to control big vs little > endian, but since MACHINE_ARCH gets encoded into packages, I think we > need to move it there so binary packages do the right thing. But > that's a WIP in my tree right now... Thanks a lot! Of course, this leads to more questions on my part. Firstly, is there an already outlined guide for porting to new platforms? (Which is essentially what i'm doing for this project: http://opensource.bleepsoft.com/index.php/Main/L4BSD ) Or is this something I'll get to stumble over through trial and error with 'make buildworld; ? I'm finding all sorts of extra places where the FreeBSD build system is expecting platform specific files for example: ===> sys/boot/iguana (cleandir) cd: can't cd to /usr/home/tyler/perforce/projects/l4bsd/src/sys/boot/ iguana *** Error code 2 The problem I'm having is that I just want to build the kernel specific to the "new platform" but will I necessarily have to provide the proper constructs for the build system to cope with the new "platform" in src/sys/ ? Cheers, - -R. Tyler Ballance -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFEw+TZqO6nEJfroRsRAsWnAJ9xQlqy/DuBmR7Mhyvt4CBKQike4gCfdqzu 7OkESbLqY3i8VkzdleQ5tiU= =8zez -----END PGP SIGNATURE-----