From owner-freebsd-questions@FreeBSD.ORG Sat Oct 26 20:45:56 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 990939E4 for ; Sat, 26 Oct 2013 20:45:56 +0000 (UTC) (envelope-from illoai@gmail.com) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 749512307 for ; Sat, 26 Oct 2013 20:45:56 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id kl14so7003768pab.11 for ; Sat, 26 Oct 2013 13:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DWqU1silXlq2DLOzCNzNmt9lbitwxAnhWSMl8ndGFXE=; b=Dgd6DiWSs5MHczz9p9YHowTwRFiiePCdPBKgLzYlTJr5jKQDUNQ4gcYDfzgwEyFf5I jR2A4EdNxvRw0xYjRKXkXr634zrM6X+Z5HB0Xz1hH/WpQujfcl3vxw0ZfhTucrtwLbL4 iUNUEjHnryltjs6zzfGHAxraATRuTL2MGyrH/JDUxVDju8ESGjNSfjg9aq6KAF66f0hp rRxupklegCl0AJTYHnN1EyLBSbBUgL1EsvLiRmtoV88Kd93vhPhCQwRMLousiz7lkXLh 4PmGC0oIBpjOQ3HKzLWIw62EQCo3LzM/Ab2VkvNiNcYaaDsQqsKpoJ+gLFGiSi+1TCfg ueng== MIME-Version: 1.0 X-Received: by 10.66.27.50 with SMTP id q18mr16929286pag.97.1382820356131; Sat, 26 Oct 2013 13:45:56 -0700 (PDT) Received: by 10.68.218.136 with HTTP; Sat, 26 Oct 2013 13:45:56 -0700 (PDT) In-Reply-To: References: Date: Sat, 26 Oct 2013 16:45:56 -0400 Message-ID: Subject: Re: Kernel/World/Ports compilation within jails; targeting many platforms. From: "illoai@gmail.com" To: Jason Birch Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 20:45:56 -0000 On 26 October 2013 06:53, Jason Birch wrote: > Is it considered 'good form' to do compilation for other machines, > architectures, and FreeBSD versions within jails? > > As a concrete example, my 'main' system is a FreeBSD 9.1-RELEASE amd64 > system, and I would like to compile FreeBSD 11-CURRENT for my BeagleBone > Black (ARMv7). Does it make more sense to create a jail environment on my > 9.1-RELEASE machine to do all compilation and 'staging' for the BeagleBlack? > > Originally I had just compiled gcc targeting arm and checked out sources > into a location that wasn't /usr/src/. This is simple enough for one > different target, but I'm wondering if I'll be a little bit more sane if > I've got a jail for each individual target I'm compiling for. Each jail can > then be set up with one, consistent compiler and source tree in the same > location -- even if the compiler (GCC/Clang) and source (X-RELEASE vs > Y-STABLE vs CURRENT) differ between targets? > > Are this a sane thing to be doing? For those of you that have several > FreeBSD targets but do most of your set up on a single machine, how do you > logically separate your 'worlds'? Your system sounds a bit involved. FreeBSD is designed to be cross compiled fairly easily. For building wine on amd64, I just created an i386 chroot. A jail is targeted at running services within a chroot-like environment, I suppose it could be used to cross compile. You can cross build with: # make buildworld TARGET=arm (you may need to specify TARGET_ARCH= as well with ARM, I don't know) You might have to specify CC= CXX= & CPP= In the case of TARGET=i386 it places the object files under /usr/obj/i386.i386/, I'd assume something similar for ARM. You'll also have to build a kernel. You'll have to do other stuff, too. There's stuff here: https://wiki.freebsd.org/A_Brief_Guide_To_Cross_Compiling_FreeBSD -- --