From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 7 03:26:18 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 BCFF2429; Sun, 7 Dec 2014 03:26:18 +0000 (UTC) Received: from mail-la0-x235.google.com (mail-la0-x235.google.com [IPv6:2a00:1450:4010:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E2967FD; Sun, 7 Dec 2014 03:26:18 +0000 (UTC) Received: by mail-la0-f53.google.com with SMTP id gm9so2413621lab.40 for ; Sat, 06 Dec 2014 19:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=NGRMTsGp6fVuhxTDIfL9m5tIJVTPGYz0iRwcti1YVjM=; b=aCDSyd3FxEl2ftluD1DWe+EpGyVkskF8+UKR8Wa1CH0DgeSIsEThbAmNwfvuRurd/Y l9CWmI5OMUk0AczdKRz4LjVsoRN7c29XH4jceOwh5Di3SjdA30dgGNenzh5YBG+27K/q cxZT9ueFEhHio3d3WULYexBEl9CO8Lhx+3tlYtMnvmhBKzbFH5re/cH7gItWXrsvr+Zw 88tAk6vlu6DxIX0ZZkNQnlqXAYMW+kFMe946MvuYPX46diqaLzp8PqJMtMfflplf7R/6 t8IiEXV6I06lBPMftFd8KbU7eXPivG21dSJrgrh4XF8Ctw8mZkCr5g3xcaAo+dBMZwmd sXEg== MIME-Version: 1.0 X-Received: by 10.152.87.100 with SMTP id w4mr9944308laz.71.1417922776241; Sat, 06 Dec 2014 19:26:16 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.114.174.169 with HTTP; Sat, 6 Dec 2014 19:26:16 -0800 (PST) In-Reply-To: <5483AE21.8090306@freebsd.org> References: <5483AE21.8090306@freebsd.org> Date: Sun, 7 Dec 2014 14:26:16 +1100 X-Google-Sender-Auth: 854xnX2H2NKZ0Pyd2LIxa3cKVNY Message-ID: Subject: Re: cross installing freebsd? From: Luigi Rizzo To: Alfred Perlstein Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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: Sun, 07 Dec 2014 03:26:18 -0000 On Sunday, December 7, 2014, Alfred Perlstein wrote: > Hey folks, > > 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" > > Steps are as follows: > > On amd64 host: > /usr/trees/freebsd.git % env TARGET=i386 make -j8 buildworld && env > TARGET=i386 make -j8 buildkernel > > On i386 host: > mount spigot:/usr/trees /usr/trees > mount spigot:/usr/obj /usr/obj > cd /usr/trees/freebsd.git > # install kernel: > env MAKEOBJDIRPREFIX=/usr/obj/i386.i386 CC=/usr/bin/cc \ > INSTALL=/usr/bin/install \ > make installkernel > # install world: > env MAKEOBJDIRPREFIX=/usr/obj/i386.i386 CC=/usr/bin/cc \ > INSTALL=/usr/bin/install STRIPBIN=/usr/bin/strip \ > MAKEWHATIS=/usr/bin/makewhatis \ > make installworld > > Seems to work nicely. > > Any objections if I add something like this target as "cross-installworld" > and "cross-installkernel" to top level Makefile? > > If you do so please put the extra targets into an additional make file that is included by the main one so people can easily exclude or modify it. Or perhaps put something in tools/tools . The master makefule is way too complex for humans, and i suspect very fragile too. I also have my own makefile that I use for custom cross builds and wouldn't mind seeing some better example than what I could come up with. As an example from time to time I read good advice from people to cross build kernel modules or individual binaries which I always forget. They would fit well in this extra make file. Cheers Luigi -Alfred > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------