From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 8 05:48:54 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFF756EA for ; Mon, 8 Dec 2014 05:48:54 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 9DAB19B4 for ; Mon, 8 Dec 2014 05:48:54 +0000 (UTC) Received: from [10.0.1.20] (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 63133341F850; Sun, 7 Dec 2014 21:48:54 -0800 (PST) Subject: Re: cross installing freebsd? Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Alfred Perlstein In-Reply-To: Date: Sun, 7 Dec 2014 21:48:53 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <613884DA-F978-4D9F-9E37-D39581EFEA61@freebsd.org> References: <5483AE21.8090306@freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1283) Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2014 05:48:54 -0000 On Dec 7, 2014, at 8:35 PM, Garrett Cooper wrote: > On Dec 6, 2014, at 17:32, Alfred Perlstein wrote: >=20 >> Hey folks, >>=20 >> In order to make installation of a new world/kernel on my i386 = soekris a LOT faster/easier I've taken to doing builds on an amd64 host = and then "cross-installing" >>=20 >> Steps are as follows: >>=20 >> On amd64 host: >> /usr/trees/freebsd.git % env TARGET=3Di386 make -j8 buildworld && env = TARGET=3Di386 make -j8 buildkernel >>=20 >> On i386 host: >> mount spigot:/usr/trees /usr/trees >> mount spigot:/usr/obj /usr/obj >> cd /usr/trees/freebsd.git >> # install kernel: >> env MAKEOBJDIRPREFIX=3D/usr/obj/i386.i386 CC=3D/usr/bin/cc \ >> INSTALL=3D/usr/bin/install \ >> make installkernel >> # install world: >> env MAKEOBJDIRPREFIX=3D/usr/obj/i386.i386 CC=3D/usr/bin/cc \ >> INSTALL=3D/usr/bin/install STRIPBIN=3D/usr/bin/strip \ >> MAKEWHATIS=3D/usr/bin/makewhatis \ >> make installworld >>=20 >> Seems to work nicely. >>=20 >> Any objections if I add something like this target as = "cross-installworld" and "cross-installkernel" to top level Makefile? >=20 > Hi Alfred, > Reading your examples... > 1. I=92m wondering if we should formalize CROSS_BUILD_TESTING in = Makefile.inc1: >=20 > 188 .if ${MACHINE} =3D=3D ${TARGET} && ${MACHINE_ARCH} =3D=3D = ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING) > 189 OBJTREE=3D ${MAKEOBJDIRPREFIX} > 190 .else > 191 OBJTREE=3D ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} > 192 .endif >=20 > 2. MAKEWHATIS seems like it should be added to ITOOLS. Do you = agree? > 3. Seems like strip should be added to ITOOLS if = CROSS_BUILD_TESTING is defined (or at the very least LOCAL_ITOOLS). > 4. Why did you need to explicitly define the path to INSTALL? > Thanks! To be honest I have a gist as to what you're saying but I think the = build is suffering from shibboleth-itis. Meaning it's not serviceable = unless you're intimately familiar with it=85 I *guess* that ITOOLS or maybe LOCAL_ITOOLS means programs needed to = installworld/installkernel? If so, then yes, makewhatis needs to be added to that. As far as everything else written: no idea what "CROSS_BUILD_TESTING" means, it's not documented anywhere I = can see in the makefile. I can't decode if there will be a target that "just works" for doing a = cross-install, will there be? What will it be named and how will people = invoke it? Can we have cross-installworld and cross-installkernel targets please? -Alfred=