From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 00:17:53 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF0BF16A4CE for ; Sun, 13 Feb 2005 00:17:53 +0000 (GMT) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id B470F43D3F for ; Sun, 13 Feb 2005 00:17:53 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 22653 invoked from network); 13 Feb 2005 00:17:53 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 13 Feb 2005 00:17:53 -0000 Received: from hydrogen.funkthat.com (felopi@localhost.funkthat.com [127.0.0.1])j1D0HrGH072272 for ; Sat, 12 Feb 2005 16:17:53 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j1D0HqdI072271 for freebsd-arch@FreeBSD.org; Sat, 12 Feb 2005 16:17:52 -0800 (PST) Date: Sat, 12 Feb 2005 16:17:52 -0800 From: John-Mark Gurney To: freebsd-arch@FreeBSD.org Message-ID: <20050213001752.GA40468@funkthat.com> Mail-Followup-To: freebsd-arch@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Subject: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 00:17:54 -0000 Does anyone object to adding a buildenv target to our Makefile, so that when crossbuilding you can get the tools setup in a shell. Useful for doing crossbuild testing w/ a cross-built world eaiser. http://people.freebsd.org/~jmg/buildenv.patch so: bash-2.05b$ which config /usr/sbin/config bash-2.05b$ make buildenv TARGET_ARCH=arm Entering world for arm:arm bash-2.05b$ which config /usr/obj/arm/usr/home/jmg/arm/src/i386/legacy/usr/sbin/config -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 00:39:59 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49DEE16A4CE for ; Sun, 13 Feb 2005 00:39:59 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51E5643D39 for ; Sun, 13 Feb 2005 00:39:58 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id j1D0dvsB021204; Sun, 13 Feb 2005 01:39:57 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: John-Mark Gurney From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 12 Feb 2005 16:17:52 PST." <20050213001752.GA40468@funkthat.com> Date: Sun, 13 Feb 2005 01:39:57 +0100 Message-ID: <21203.1108255197@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: freebsd-arch@freebsd.org Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 00:39:59 -0000 In message <20050213001752.GA40468@funkthat.com>, John-Mark Gurney writes: >Does anyone object to adding a buildenv target to our Makefile, so that >when crossbuilding you can get the tools setup in a shell. Useful for >doing crossbuild testing w/ a cross-built world eaiser. > >http://people.freebsd.org/~jmg/buildenv.patch > >so: >bash-2.05b$ which config >/usr/sbin/config >bash-2.05b$ make buildenv TARGET_ARCH=arm >Entering world for arm:arm >bash-2.05b$ which config >/usr/obj/arm/usr/home/jmg/arm/src/i386/legacy/usr/sbin/config Sounds like a good addition. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 06:29:11 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90FED16A4CE for ; Sun, 13 Feb 2005 06:29:11 +0000 (GMT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CA4E43D3F for ; Sun, 13 Feb 2005 06:29:11 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.13.1/8.13.1) with ESMTP id j1D6TADt017887 for ; Sat, 12 Feb 2005 22:29:10 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.13.1/8.13.1/Submit) id j1D6TAGn017886 for freebsd-arch@FreeBSD.org; Sat, 12 Feb 2005 22:29:10 -0800 (PST) (envelope-from obrien) Date: Sat, 12 Feb 2005 22:29:10 -0800 From: "David O'Brien" To: freebsd-arch@FreeBSD.org Message-ID: <20050213062910.GC83950@dragon.nuxi.com> References: <20050213001752.GA40468@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050213001752.GA40468@funkthat.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 6.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 06:29:11 -0000 On Sat, Feb 12, 2005 at 04:17:52PM -0800, John-Mark Gurney wrote: > Does anyone object to adding a buildenv target to our Makefile, so that > when crossbuilding you can get the tools setup in a shell. Useful for > doing crossbuild testing w/ a cross-built world eaiser. .. > so: > bash-2.05b$ which config > /usr/sbin/config > bash-2.05b$ make buildenv TARGET_ARCH=arm > Entering world for arm:arm > bash-2.05b$ which config > /usr/obj/arm/usr/home/jmg/arm/src/i386/legacy/usr/sbin/config I don't quite follow what you're going to do with in it. The problem is the more we bend this to do what the random person wants to do we build a garantium thing that is hard to change w/o breaking some "established" behavior. Much like the huge mess we had in binutils to support cross assembling to non-FreeBSD platforms. -- -- David (obrien@FreeBSD.org) From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 08:05:11 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5DF516A4CF for ; Sun, 13 Feb 2005 08:05:10 +0000 (GMT) Received: from mail25.sea5.speakeasy.net (mail25.sea5.speakeasy.net [69.17.117.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46A8E43D2F for ; Sun, 13 Feb 2005 08:05:10 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 10501 invoked from network); 13 Feb 2005 08:05:09 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail25.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 13 Feb 2005 08:05:09 -0000 Received: from hydrogen.funkthat.com (forgfe@localhost.funkthat.com [127.0.0.1])j1D859GH082888; Sun, 13 Feb 2005 00:05:09 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j1D8582H082885; Sun, 13 Feb 2005 00:05:08 -0800 (PST) Date: Sun, 13 Feb 2005 00:05:08 -0800 From: John-Mark Gurney To: "David O'Brien" Message-ID: <20050213080508.GB40468@funkthat.com> Mail-Followup-To: David O'Brien , freebsd-arch@FreeBSD.org References: <20050213001752.GA40468@funkthat.com> <20050213062910.GC83950@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050213062910.GC83950@dragon.nuxi.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-arch@FreeBSD.org Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 08:05:11 -0000 David O'Brien wrote this message on Sat, Feb 12, 2005 at 22:29 -0800: > On Sat, Feb 12, 2005 at 04:17:52PM -0800, John-Mark Gurney wrote: > > Does anyone object to adding a buildenv target to our Makefile, so that > > when crossbuilding you can get the tools setup in a shell. Useful for > > doing crossbuild testing w/ a cross-built world eaiser. > .. > > so: > > bash-2.05b$ which config > > /usr/sbin/config > > bash-2.05b$ make buildenv TARGET_ARCH=arm > > Entering world for arm:arm > > bash-2.05b$ which config > > /usr/obj/arm/usr/home/jmg/arm/src/i386/legacy/usr/sbin/config > > I don't quite follow what you're going to do with in it. > The problem is the more we bend this to do what the random person wants > to do we build a garantium thing that is hard to change w/o breaking some > "established" behavior. Much like the huge mess we had in binutils to > support cross assembling to non-FreeBSD platforms. what you can do with it is: cd ~jmg/arm/src/sys/arm/conf config TS7200 cd ../../compile/TS7200 make depend && make -j 4 and now hack to your hearts content on an arm kernel on your i386 box with out having to do things like cognet suggests on his arm text file (from http://people.freebsd.org/~cognet/freebsd_arm.txt): make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross depend all make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install Then go in /usr/src/gnu/usr.bin/binutils, and do : make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross depend all make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install You should get what is needed to cross-compile a kernel. You need to set the following environment varibles for cross-compiling : export CC=/usr/cross/usr/bin/gcc export AS=/usr/cross/usr/bin/as export NM=/usr/cross/usr/bin/nm export RANLIB=/usr/cross/usr/bin/ranlib export LD=/usr/cross/usr/bin/ld export OBJCOPY=/usr/cross/usr/bin/objcopy export SIZE=/usr/cross/usr/bin/size export MACHINE=arm export MACHINE_ARCH=arm Then you can compile the kernel the usual way, ie : cd /sys/arm/conf config IQ31244 cd ../compile/IQ31244 && make depend all so, you now do: make buildworld TARGET_ARCH=arm make buildenv TARGET_ARCH=arm and build your kernel as you normally would... a bit easier, wouldn't you say? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 09:37:06 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB6AB16A4CE for ; Sun, 13 Feb 2005 09:37:06 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 200EA43D3F for ; Sun, 13 Feb 2005 09:37:06 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1D9b3JH089704; Sun, 13 Feb 2005 11:37:03 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 68087-09; Sun, 13 Feb 2005 11:37:02 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1D9b2EM089696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Feb 2005 11:37:02 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id j1D9b0gs088608; Sun, 13 Feb 2005 11:37:00 +0200 (EET) (envelope-from ru) Date: Sun, 13 Feb 2005 11:37:00 +0200 From: Ruslan Ermilov To: John-Mark Gurney Message-ID: <20050213093700.GF88292@ip.net.ua> References: <20050213001752.GA40468@funkthat.com> <21203.1108255197@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Il7n/DHsA0sMLmDu" Content-Disposition: inline In-Reply-To: <21203.1108255197@critter.freebsd.dk> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: freebsd-arch@freebsd.org Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 09:37:07 -0000 --Il7n/DHsA0sMLmDu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi John-Mark, On Sun, Feb 13, 2005 at 01:39:57AM +0100, Poul-Henning Kamp wrote: > In message <20050213001752.GA40468@funkthat.com>, John-Mark Gurney writes: > >Does anyone object to adding a buildenv target to our Makefile, so that > >when crossbuilding you can get the tools setup in a shell. Useful for > >doing crossbuild testing w/ a cross-built world eaiser. > > > >http://people.freebsd.org/~jmg/buildenv.patch > > > >so: > >bash-2.05b$ which config > >/usr/sbin/config > >bash-2.05b$ make buildenv TARGET_ARCH=3Darm > >Entering world for arm:arm > >bash-2.05b$ which config > >/usr/obj/arm/usr/home/jmg/arm/src/i386/legacy/usr/sbin/config >=20 > Sounds like a good addition. >=20 I missed the original post, so replying here. I very much like and support the idea. About the implementation, for the standard case of root doing this, the standard ~root/.cshrc unfortunately resets PATH, making this useless pretty useless. So I suggest to use "sh" here. Another minor buglet is that the output for pc98 will be mangled, "pc98:i386". Here's my version, simplified and fixed: %%% Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/Makefile.inc1,v retrieving revision 1.473 diff -u -p -r1.473 Makefile.inc1 --- Makefile.inc1 20 Jan 2005 10:49:02 -0000 1.473 +++ Makefile.inc1 13 Feb 2005 01:20:00 -0000 @@ -457,6 +457,10 @@ WMAKE_TGTS+=3D build32 buildworld: ${WMAKE_TGTS} .ORDER: ${WMAKE_TGTS} =20 +buildenv: + @echo Entering world for ${TARGET_ARCH}:${TARGET} + @${WMAKEENV} sh || true + TOOLCHAIN_TGTS=3D ${WMAKE_TGTS:N_depend:Neverything} toolchain: ${TOOLCHAIN_TGTS} kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} %%% Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --Il7n/DHsA0sMLmDu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCDx+8qRfpzJluFF4RAmMGAJsExWcD92eiCnNnDYb8/x2/p9VFZACbBNLp Mr/BoNDPj7o87b1CP7VkJME= =wm1p -----END PGP SIGNATURE----- --Il7n/DHsA0sMLmDu-- From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 23:11:07 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E30216A4CE for ; Sun, 13 Feb 2005 23:11:07 +0000 (GMT) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id D669B43D45 for ; Sun, 13 Feb 2005 23:11:06 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 10475 invoked from network); 13 Feb 2005 23:11:06 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 13 Feb 2005 23:11:06 -0000 Received: from hydrogen.funkthat.com (xeryjg@localhost.funkthat.com [127.0.0.1])j1DNB5GH005148; Sun, 13 Feb 2005 15:11:06 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j1DNB5vt005147; Sun, 13 Feb 2005 15:11:05 -0800 (PST) Date: Sun, 13 Feb 2005 15:11:05 -0800 From: John-Mark Gurney To: Ruslan Ermilov Message-ID: <20050213231105.GC40468@funkthat.com> Mail-Followup-To: Ruslan Ermilov , freebsd-arch@freebsd.org References: <20050213001752.GA40468@funkthat.com> <21203.1108255197@critter.freebsd.dk> <20050213093700.GF88292@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050213093700.GF88292@ip.net.ua> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-arch@freebsd.org Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 23:11:07 -0000 Ruslan Ermilov wrote this message on Sun, Feb 13, 2005 at 11:37 +0200: > Hi John-Mark, > > On Sun, Feb 13, 2005 at 01:39:57AM +0100, Poul-Henning Kamp wrote: > > Sounds like a good addition. > > I missed the original post, so replying here. I very much like > and support the idea. About the implementation, for the standard > case of root doing this, the standard ~root/.cshrc unfortunately > resets PATH, making this useless pretty useless. So I suggest > to use "sh" here. Another minor buglet is that the output for > pc98 will be mangled, "pc98:i386". Here's my version, simplified > and fixed: > > %%% > Index: Makefile.inc1 > =================================================================== > RCS file: /home/ncvs/src/Makefile.inc1,v > retrieving revision 1.473 > diff -u -p -r1.473 Makefile.inc1 > --- Makefile.inc1 20 Jan 2005 10:49:02 -0000 1.473 > +++ Makefile.inc1 13 Feb 2005 01:20:00 -0000 > @@ -457,6 +457,10 @@ WMAKE_TGTS+= build32 > buildworld: ${WMAKE_TGTS} > .ORDER: ${WMAKE_TGTS} > > +buildenv: > + @echo Entering world for ${TARGET_ARCH}:${TARGET} > + @${WMAKEENV} sh || true > + > TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything} > toolchain: ${TOOLCHAIN_TGTS} > kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} Hmmm.. wierd, I thought I tried this, but I kept getting i386, but I just tried it here, and works fine... Unless you object, I'll use /bin/sh and /usr/bin/true, just incase the path is a bit messed up.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 23:31:16 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6202516A4CE for ; Sun, 13 Feb 2005 23:31:16 +0000 (GMT) Received: from mailserv1.neuroflux.com (ns2.neuroflux.com [204.228.228.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFBDD43D2F for ; Sun, 13 Feb 2005 23:31:15 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: (qmail 73966 invoked by uid 89); 13 Feb 2005 23:28:50 -0000 Received: from unknown (HELO www2.neuroflux.com) (127.0.0.1) by localhost with SMTP; 13 Feb 2005 23:28:50 -0000 Received: from 24.107.98.253 (SquirrelMail authenticated user ryans@gamersimpact.com); by www2.neuroflux.com with HTTP; Sun, 13 Feb 2005 16:28:50 -0700 (MST) Message-ID: <2163.24.107.98.253.1108337330.squirrel@24.107.98.253> In-Reply-To: <20050213231105.GC40468@funkthat.com> References: <20050213001752.GA40468@funkthat.com> <21203.1108255197@critter.freebsd.dk> <20050213093700.GF88292@ip.net.ua> <20050213231105.GC40468@funkthat.com> Date: Sun, 13 Feb 2005 16:28:50 -0700 (MST) From: "Ryan Sommers" To: "John-Mark Gurney" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal cc: freebsd-arch@freebsd.org Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 23:31:16 -0000 John-Mark Gurney said: > I just tried it here, and works fine... Unless you object, I'll use > /bin/sh and /usr/bin/true, just incase the path is a bit messed up.. > Would there be any benefit to defining the shell and true by variables? SH?=/bin/sh TRUE?=/bin/true -- Ryan Sommers ryans@gamersimpact.com From owner-freebsd-arch@FreeBSD.ORG Sun Feb 13 23:51:23 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A69116A4CE for ; Sun, 13 Feb 2005 23:51:23 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFE5F43D41 for ; Sun, 13 Feb 2005 23:51:21 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1DNpKCN042658 for ; Mon, 14 Feb 2005 01:51:20 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 08127-07 for ; Mon, 14 Feb 2005 01:51:19 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1DNpInv042655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 14 Feb 2005 01:51:19 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id j1DNpM8Y016402 for freebsd-arch@freebsd.org; Mon, 14 Feb 2005 01:51:22 +0200 (EET) (envelope-from ru) Date: Mon, 14 Feb 2005 01:51:22 +0200 From: Ruslan Ermilov To: freebsd-arch@freebsd.org Message-ID: <20050213235122.GB15825@ip.net.ua> References: <20050213001752.GA40468@funkthat.com> <21203.1108255197@critter.freebsd.dk> <20050213093700.GF88292@ip.net.ua> <20050213231105.GC40468@funkthat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <20050213231105.GC40468@funkthat.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 23:51:23 -0000 --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 13, 2005 at 03:11:05PM -0800, John-Mark Gurney wrote: > Ruslan Ermilov wrote this message on Sun, Feb 13, 2005 at 11:37 +0200: > > Hi John-Mark, > >=20 > > On Sun, Feb 13, 2005 at 01:39:57AM +0100, Poul-Henning Kamp wrote: > > > Sounds like a good addition. > > > > I missed the original post, so replying here. I very much like > > and support the idea. About the implementation, for the standard > > case of root doing this, the standard ~root/.cshrc unfortunately > > resets PATH, making this useless pretty useless. So I suggest > > to use "sh" here. Another minor buglet is that the output for > > pc98 will be mangled, "pc98:i386". Here's my version, simplified > > and fixed: > >=20 > > %%% > > Index: Makefile.inc1 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: /home/ncvs/src/Makefile.inc1,v > > retrieving revision 1.473 > > diff -u -p -r1.473 Makefile.inc1 > > --- Makefile.inc1 20 Jan 2005 10:49:02 -0000 1.473 > > +++ Makefile.inc1 13 Feb 2005 01:20:00 -0000 > > @@ -457,6 +457,10 @@ WMAKE_TGTS+=3D build32 > > buildworld: ${WMAKE_TGTS} > > .ORDER: ${WMAKE_TGTS} > > =20 > > +buildenv: > > + @echo Entering world for ${TARGET_ARCH}:${TARGET} > > + @${WMAKEENV} sh || true > > + > > TOOLCHAIN_TGTS=3D ${WMAKE_TGTS:N_depend:Neverything} > > toolchain: ${TOOLCHAIN_TGTS} > > kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} >=20 > Hmmm.. wierd, I thought I tried this, but I kept getting i386, but > I just tried it here, and works fine... >=20 This is probably because you tried MACHINE_ARCH/MACHINE. > Unless you object, I'll use > /bin/sh and /usr/bin/true, just incase the path is a bit messed up.. >=20 No need to; src/Makefile already takes care of always setting up the correct PATH, try it with "make -n buildenv". Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCD+f6qRfpzJluFF4RAjEBAJ4ia8+GtQY79TLnK5Vzarzw3T5AawCfSJmR v95bYcc+dady42l6WncrO4o= =faVT -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ-- From owner-freebsd-arch@FreeBSD.ORG Mon Feb 14 06:16:16 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C450A16A4CE for ; Mon, 14 Feb 2005 06:16:16 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04DA843D41 for ; Mon, 14 Feb 2005 06:16:16 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1E6GF19066506; Mon, 14 Feb 2005 08:16:15 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 16304-05; Mon, 14 Feb 2005 08:16:14 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1E6GENL066503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Feb 2005 08:16:14 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id j1E6GIVv095240; Mon, 14 Feb 2005 08:16:18 +0200 (EET) (envelope-from ru) Date: Mon, 14 Feb 2005 08:16:18 +0200 From: Ruslan Ermilov To: Ryan Sommers Message-ID: <20050214061618.GB87326@ip.net.ua> References: <20050213001752.GA40468@funkthat.com> <21203.1108255197@critter.freebsd.dk> <20050213093700.GF88292@ip.net.ua> <20050213231105.GC40468@funkthat.com> <2163.24.107.98.253.1108337330.squirrel@24.107.98.253> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu" Content-Disposition: inline In-Reply-To: <2163.24.107.98.253.1108337330.squirrel@24.107.98.253> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: John-Mark Gurney cc: freebsd-arch@FreeBSD.org Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2005 06:16:16 -0000 --TRYliJ5NKNqkz5bu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 13, 2005 at 04:28:50PM -0700, Ryan Sommers wrote: > John-Mark Gurney said: > > I just tried it here, and works fine... Unless you object, I'll use > > /bin/sh and /usr/bin/true, just incase the path is a bit messed up.. > > >=20 > Would there be any benefit to defining the shell and true by variables? >=20 > SH?=3D/bin/sh > TRUE?=3D/bin/true >=20 And then the names of these variables by another pair of variables. ;) Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --TRYliJ5NKNqkz5bu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCEEIyqRfpzJluFF4RAhGXAJ9+oDFYDZHM+Noogo4ziuAG6j5MOQCeIxUR 4z5itSwsNzSh8pVVEyacYbw= =0Ctw -----END PGP SIGNATURE----- --TRYliJ5NKNqkz5bu-- From owner-freebsd-arch@FreeBSD.ORG Mon Feb 14 22:01:12 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93E5016A4EA for ; Mon, 14 Feb 2005 22:01:10 +0000 (GMT) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8926443D1F for ; Mon, 14 Feb 2005 22:01:09 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 4237 invoked from network); 14 Feb 2005 22:01:09 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 14 Feb 2005 22:01:08 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j1EM0w7S046745; Mon, 14 Feb 2005 17:01:03 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-arch@FreeBSD.org, John-Mark Gurney Date: Mon, 14 Feb 2005 15:11:33 -0500 User-Agent: KMail/1.6.2 References: <20050213001752.GA40468@funkthat.com> <20050213062910.GC83950@dragon.nuxi.com> <20050213080508.GB40468@funkthat.com> In-Reply-To: <20050213080508.GB40468@funkthat.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200502141511.34400.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: David O'Brien Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2005 22:01:12 -0000 On Sunday 13 February 2005 03:05 am, John-Mark Gurney wrote: > David O'Brien wrote this message on Sat, Feb 12, 2005 at 22:29 -0800: > > On Sat, Feb 12, 2005 at 04:17:52PM -0800, John-Mark Gurney wrote: > > > Does anyone object to adding a buildenv target to our Makefile, so that > > > when crossbuilding you can get the tools setup in a shell. Useful for > > > doing crossbuild testing w/ a cross-built world eaiser. > > > > .. > > > > > so: > > > bash-2.05b$ which config > > > /usr/sbin/config > > > bash-2.05b$ make buildenv TARGET_ARCH=arm > > > Entering world for arm:arm > > > bash-2.05b$ which config > > > /usr/obj/arm/usr/home/jmg/arm/src/i386/legacy/usr/sbin/config > > > > I don't quite follow what you're going to do with in it. > > The problem is the more we bend this to do what the random person wants > > to do we build a garantium thing that is hard to change w/o breaking some > > "established" behavior. Much like the huge mess we had in binutils to > > support cross assembling to non-FreeBSD platforms. > > what you can do with it is: > cd ~jmg/arm/src/sys/arm/conf > config TS7200 > cd ../../compile/TS7200 > make depend && make -j 4 > > and now hack to your hearts content on an arm kernel on your i386 box > with out having to do things like cognet suggests on his arm text file > (from http://people.freebsd.org/~cognet/freebsd_arm.txt): > make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross depend all > make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install > Then go in /usr/src/gnu/usr.bin/binutils, and do : > make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross depend all > make TARGET_ARCH=arm TOOLS_PREFIX=/usr/cross DESTDIR=/usr/cross install > You should get what is needed to cross-compile a kernel. > You need to set the following environment varibles for cross-compiling : > export CC=/usr/cross/usr/bin/gcc > export AS=/usr/cross/usr/bin/as > export NM=/usr/cross/usr/bin/nm > export RANLIB=/usr/cross/usr/bin/ranlib > export LD=/usr/cross/usr/bin/ld > export OBJCOPY=/usr/cross/usr/bin/objcopy > export SIZE=/usr/cross/usr/bin/size > export MACHINE=arm > export MACHINE_ARCH=arm > Then you can compile the kernel the usual way, ie : > cd /sys/arm/conf > config IQ31244 > cd ../compile/IQ31244 && make depend all > > so, you now do: > make buildworld TARGET_ARCH=arm > make buildenv TARGET_ARCH=arm > and build your kernel as you normally would... a bit easier, wouldn't > you say? Did you know that you can just do: make kernel-toolchain TARGET_ARCH=arm make buildkernel TARGeT_ARCH=arm KERNCONF=TS7200 That's rather easy. You can even cross-build against a different kernel tree (I use this a lot for my p4 trees). For example: make TARGET_ARCH=amd64 KERNCONF=LINT KERNSRCDIR=/home/john/work/p4/proc \ buildkernel NO_MODULES=yes With repeated builds (e.g. when fixing compile errors) adding NO_KERNELCLEAN=yes NO_KERNELDEPEND=yes is good as well. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-arch@FreeBSD.ORG Mon Feb 14 22:37:25 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CC1016A4D0 for ; Mon, 14 Feb 2005 22:37:25 +0000 (GMT) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7678643D48 for ; Mon, 14 Feb 2005 22:37:24 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 14710 invoked from network); 14 Feb 2005 22:37:24 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail26.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 14 Feb 2005 22:37:24 -0000 Received: from hydrogen.funkthat.com (wvmzsx@localhost.funkthat.com [127.0.0.1])j1EMbOGH041504; Mon, 14 Feb 2005 14:37:24 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j1EMbNxp041503; Mon, 14 Feb 2005 14:37:23 -0800 (PST) Date: Mon, 14 Feb 2005 14:37:23 -0800 From: John-Mark Gurney To: John Baldwin Message-ID: <20050214223723.GG40468@funkthat.com> Mail-Followup-To: John Baldwin , freebsd-arch@FreeBSD.org, David O'Brien References: <20050213001752.GA40468@funkthat.com> <20050213062910.GC83950@dragon.nuxi.com> <20050213080508.GB40468@funkthat.com> <200502141511.34400.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502141511.34400.jhb@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: David O'Brien cc: freebsd-arch@FreeBSD.org Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2005 22:37:25 -0000 John Baldwin wrote this message on Mon, Feb 14, 2005 at 15:11 -0500: > Did you know that you can just do: > > make kernel-toolchain TARGET_ARCH=arm > make buildkernel TARGeT_ARCH=arm KERNCONF=TS7200 yes, I did, and the problem is that this is extreamly slow if you've only modified one line of one file for testing... Do you build all of your kernels this way?? > That's rather easy. You can even cross-build against a different kernel tree > (I use this a lot for my p4 trees). For example: > > make TARGET_ARCH=amd64 KERNCONF=LINT KERNSRCDIR=/home/john/work/p4/proc \ > buildkernel NO_MODULES=yes > > With repeated builds (e.g. when fixing compile errors) adding > NO_KERNELCLEAN=yes NO_KERNELDEPEND=yes is good as well. I really hate having to remeber and type those everytime that I build a kernel... You're also forgetting NO_KERNELCONFIG=yes to that... since if it's just a typo, you usually don't need a config for a typo... yes, there are other complex solutions, but I'd like a simplier solution, and one that is a lot more friendly to my fingers... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arch@FreeBSD.ORG Tue Feb 15 01:36:14 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41FA616A4CE for ; Tue, 15 Feb 2005 01:36:14 +0000 (GMT) Received: from outbound0.sv.meer.net (outbound0.sv.meer.net [205.217.152.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id E867743D1F for ; Tue, 15 Feb 2005 01:36:13 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [209.157.152.14]) by outbound0.sv.meer.net (8.12.10/8.12.6) with ESMTP id j1F1aDV1056955 for ; Mon, 14 Feb 2005 17:36:13 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (nat-61.8.193.18.singapore.corp.yahoo.com [61.8.193.18]) by mail.meer.net (8.12.10/8.12.10/meer) with ESMTP id j1F1aBQM015628 for ; Mon, 14 Feb 2005 17:36:11 -0800 (PST) (envelope-from gnn@neville-neil.com) Date: Tue, 15 Feb 2005 09:36:10 +0800 Message-ID: From: gnn@FreeBSD.org To: freebsd-arch@FreeBSD.org In-Reply-To: <20050214223723.GG40468@funkthat.com> References: <20050213001752.GA40468@funkthat.com> <20050213062910.GC83950@dragon.nuxi.com> <20050213080508.GB40468@funkthat.com> <200502141511.34400.jhb@FreeBSD.org> <20050214223723.GG40468@funkthat.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3.50 (powerpc-apple-darwin7.7.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 01:36:14 -0000 Slight OT for all this, but can someone integrate all this information into a FAQ so that embedded systems folks who often cross compile can find/use this stuff? This would be great fodder for "Bulding Embedded Systems with FreeBSD" IMNSHO and if I could find all this in a FAQ I could write that white paper a lot faster ;-) Later, George From owner-freebsd-arch@FreeBSD.ORG Tue Feb 15 10:58:52 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7E5E16A4CE; Tue, 15 Feb 2005 10:58:51 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E35EF43D5D; Tue, 15 Feb 2005 10:58:50 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1FAwnAb085053; Tue, 15 Feb 2005 12:58:49 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 14159-13; Tue, 15 Feb 2005 12:58:48 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j1FAwm15085048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Feb 2005 12:58:48 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id j1FAwqLB015043; Tue, 15 Feb 2005 12:58:52 +0200 (EET) (envelope-from ru) Date: Tue, 15 Feb 2005 12:58:52 +0200 From: Ruslan Ermilov To: John Baldwin , freebsd-arch@FreeBSD.org Message-ID: <20050215105852.GC14903@ip.net.ua> References: <20050213001752.GA40468@funkthat.com> <20050213062910.GC83950@dragon.nuxi.com> <20050213080508.GB40468@funkthat.com> <200502141511.34400.jhb@FreeBSD.org> <20050214223723.GG40468@funkthat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+xNpyl7Qekk2NvDX" Content-Disposition: inline In-Reply-To: <20050214223723.GG40468@funkthat.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua Subject: Re: buildenv target X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 10:58:52 -0000 --+xNpyl7Qekk2NvDX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 14, 2005 at 02:37:23PM -0800, John-Mark Gurney wrote: > John Baldwin wrote this message on Mon, Feb 14, 2005 at 15:11 -0500: > > Did you know that you can just do: > >=20 > > make kernel-toolchain TARGET_ARCH=3Darm > > make buildkernel TARGeT_ARCH=3Darm KERNCONF=3DTS7200 >=20 > yes, I did, and the problem is that this is extreamly slow if you've > only modified one line of one file for testing... Do you build all of > your kernels this way?? >=20 You're not right. If you say to NOT config, clean, depend, and build modules, the repeated build will resume from the same point where it stopped. For example, hammer# /usr/bin/time -h make -s -DNO_KERNELCLEAN -DNO_KERNELCONFIG -DNO_KE= RNELDEPEND -DNO_MODULES buildkernel -------------------------------------------------------------- >>> Kernel build for HAMMER started on Tue Feb 15 12:56:32 EET 2005 -------------------------------------------------------------- =3D=3D=3D> HAMMER -------------------------------------------------------------- >>> stage 2.2: rebuilding the object tree -------------------------------------------------------------- -------------------------------------------------------------- >>> stage 2.3: build tools -------------------------------------------------------------- -------------------------------------------------------------- >>> stage 3.2: building everything -------------------------------------------------------------- -------------------------------------------------------------- >>> Kernel build for HAMMER completed on Tue Feb 15 12:56:33 EET 2005 -------------------------------------------------------------- 1,15s real 0,40s user 0,68s sys > > That's rather easy. You can even cross-build against a different kerne= l tree > > (I use this a lot for my p4 trees). For example: > >=20 > > make TARGET_ARCH=3Damd64 KERNCONF=3DLINT KERNSRCDIR=3D/home/john/work/p= 4/proc \ > > buildkernel NO_MODULES=3Dyes > >=20 > > With repeated builds (e.g. when fixing compile errors) adding > > NO_KERNELCLEAN=3Dyes NO_KERNELDEPEND=3Dyes is good as well. >=20 > I really hate having to remeber and type those everytime that I build a > kernel... You're also forgetting NO_KERNELCONFIG=3Dyes to that... since > if it's just a typo, you usually don't need a config for a typo... >=20 How about saving these in a script then, so you don't have to remember them all the time? > yes, there are other complex solutions, but I'd like a simplier solution, > and one that is a lot more friendly to my fingers... >=20 I'd still like to see your buildenv target committed. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --+xNpyl7Qekk2NvDX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCEdXsqRfpzJluFF4RAsREAJ4kADwaaDw1N7jfDnU/yteYjpxmgwCfdw2Y qCL3SjtuXeV2EDgXAq1T3QM= =vAI3 -----END PGP SIGNATURE----- --+xNpyl7Qekk2NvDX-- From owner-freebsd-arch@FreeBSD.ORG Tue Feb 15 18:48:56 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1672616A4CE; Tue, 15 Feb 2005 18:48:56 +0000 (GMT) Received: from arthur.nitro.dk (port324.ds1-khk.adsl.cybercity.dk [212.242.113.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5C8843D2F; Tue, 15 Feb 2005 18:48:55 +0000 (GMT) (envelope-from simon@arthur.nitro.dk) Received: by arthur.nitro.dk (Postfix, from userid 3000) id E93DA11986; Tue, 15 Feb 2005 19:48:54 +0100 (CET) Date: Tue, 15 Feb 2005 19:48:54 +0100 From: "Simon L. Nielsen" To: gnn@FreeBSD.org Message-ID: <20050215184854.GE718@arthur.nitro.dk> References: <20050213001752.GA40468@funkthat.com> <20050213062910.GC83950@dragon.nuxi.com> <20050213080508.GB40468@funkthat.com> <200502141511.34400.jhb@FreeBSD.org> <20050214223723.GG40468@funkthat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AH+kv8CCoFf6qPuz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: freebsd-arch@FreeBSD.org Subject: Re: crossbuilding docs for developers (was: buildenv target) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 18:48:56 -0000 --AH+kv8CCoFf6qPuz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2005.02.15 09:36:10 +0800, gnn@FreeBSD.org wrote: > Slight OT for all this, but can someone integrate all this information > into a FAQ so that embedded systems folks who often cross compile can > find/use this stuff? This would be great fodder for "Bulding Embedded > Systems with FreeBSD" IMNSHO and if I could find all this in a FAQ I > could write that white paper a lot faster ;-) Whoops... I actually have a patch laying around from remko based on text by ru with some basic information about cross building for developers. I couldn't really find a good place for it in the developers handbook, so I kind of forgot about it... I will try to look at it again soon and incorporate additional suggestions from this thread. BTW. if any doc people have time to do this work this week, feel free to poke me to get my WIP patch, otherwise I will try to look at it this weekend. --=20 Simon L. Nielsen --AH+kv8CCoFf6qPuz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCEkQWh9pcDSc1mlERArR2AKC/1VnC0GRLvtJTGAaZpHq8SQNXdwCeOP+k KiKZ9HseEngkqsx907XVDeo= =OVxD -----END PGP SIGNATURE----- --AH+kv8CCoFf6qPuz-- From owner-freebsd-arch@FreeBSD.ORG Thu Feb 17 14:18:05 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8709216A4CE; Thu, 17 Feb 2005 14:18:05 +0000 (GMT) Received: from outbound0.sv.meer.net (outbound0.sv.meer.net [205.217.152.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2E0E43D5D; Thu, 17 Feb 2005 14:18:04 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [209.157.152.14]) j1HEI3V1078948; Thu, 17 Feb 2005 06:18:03 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (LL-218-32-203-81.LL.sparqnet.net [218.32.203.81]) by mail.meer.net (8.12.10/8.12.10/meer) with ESMTP id j1HEI0s3032994; Thu, 17 Feb 2005 06:18:00 -0800 (PST) (envelope-from gnn@neville-neil.com) Date: Thu, 17 Feb 2005 22:17:58 +0800 Message-ID: From: gnn@freebsd.org To: "Simon L. Nielsen" In-Reply-To: <20050215184854.GE718@arthur.nitro.dk> References: <20050213001752.GA40468@funkthat.com> <20050213062910.GC83950@dragon.nuxi.com> <20050213080508.GB40468@funkthat.com> <200502141511.34400.jhb@FreeBSD.org> <20050214223723.GG40468@funkthat.com> <20050215184854.GE718@arthur.nitro.dk> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3.50 (powerpc-apple-darwin7.7.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII cc: gnn@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: crossbuilding docs for developers (was: buildenv target) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2005 14:18:05 -0000 At Tue, 15 Feb 2005 19:48:54 +0100, Simon L. Nielsen wrote: > > [1 ] > On 2005.02.15 09:36:10 +0800, gnn@FreeBSD.org wrote: > > Slight OT for all this, but can someone integrate all this information > > into a FAQ so that embedded systems folks who often cross compile can > > find/use this stuff? This would be great fodder for "Bulding Embedded > > Systems with FreeBSD" IMNSHO and if I could find all this in a FAQ I > > could write that white paper a lot faster ;-) > > Whoops... I actually have a patch laying around from remko based on > text by ru with some basic information about cross building for > developers. I couldn't really find a good place for it in the > developers handbook, so I kind of forgot about it... I will try to > look at it again soon and incorporate additional suggestions from this > thread. Very cool. I look forward to it. Later, George