From owner-freebsd-arm@freebsd.org Wed Sep 9 18:32:03 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7CA69CD365 for ; Wed, 9 Sep 2015 18:32:03 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 98EED1DA0 for ; Wed, 9 Sep 2015 18:32:03 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t89IW2qP089828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Sep 2015 11:32:02 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t89IW2Um089827; Wed, 9 Sep 2015 11:32:02 -0700 (PDT) (envelope-from jmg) Date: Wed, 9 Sep 2015 11:32:02 -0700 From: John-Mark Gurney To: Tim Kientzle Cc: freebsd-arm Subject: Re: bhyve/arm6/amd64 query Message-ID: <20150909183202.GO33167@funkthat.com> References: <20150907090541.GA54788@potato.growveg.org> <59F1B4A5-CD93-46D2-83D3-F0790CA2FA8E@gmail.com> <20150907150539.GA2959@potato.growveg.org> <023E3382-6F0A-4EDA-9D9A-E0F60AB58FA6@kientzle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <023E3382-6F0A-4EDA-9D9A-E0F60AB58FA6@kientzle.com> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 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 X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 09 Sep 2015 11:32:02 -0700 (PDT) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2015 18:32:03 -0000 Tim Kientzle wrote this message on Mon, Sep 07, 2015 at 11:15 -0700: > > On Sep 7, 2015, at 8:05 AM, John wrote: > > > > On Mon, Sep 07, 2015 at 03:33:24PM +0300, Jukka Ukkonen wrote: > >> AFAIK no. Bhyve is a plain hardware type of container, > >> not a hardware emulator like qemu, nor a jail type > >> container. > >> You should be looking for qemu or something similar. > >> Bhyve can be used for hosting other operating systems > >> on the same type of HW as the vanilla system. > > > > OK, thanks. You've saved me the work of trying then failing terribly :D > > > > It doesn't have to be hosted. The reason for me asking is, basically can I take > > the image and (as an image, not as an OS) can it be updated/recompiled on different, > > higher spec hardware, then returned to the Pi? > > > > Hopefully I'm describing this right. You know on say amd64, an arm6 system can be > > cross-compiled as an installable system. That system is running. I have updated it > > (while installed on RPI2 hardware) and installed my configs, it works great. > > Now I can unplug the microSD, dd it to a .img file, on another system, to archive it. > > What I'm asking is, can I take that image while it's on the other system, and > > interact with it to the extent that I can update/upgrade it? > > In theory, yes. If you could figure this out there are lots of people who might be interested in it. > > The basic idea: cross-compile a new FreeBSD system, mount the arm6 image and then cross-install onto it to update it. This is very similar to the process Crochet uses for building a new image, except that instead of starting with a new blank system image you would instead mount your existing image and install over it. > > Roughly speaking, the process should be something like the following (you'll need to do some research to fill in the many details): > > $ cd /usr/src > $ make TARGET_ARCH=arm6 buildworld > $ make TARGET_ARCH=arm6 KERNCONF=RPI2 buildkernel > $ # ... mount the img via md loopback > $ mergemaster > $ make TARGET_ARCH=arm6 KERNCONF=RPI2 DESTDIR= installkernel > $ make TARGET_ARCH=arm6 KERNCONF=RPI2 DESTDIR= installworld > $ # ... unmount the image I've done something different a few times, but on i386/amd64 vm's, but should work the same w/ a cross compiled arm6 world too: make buildworld make installworld -DNO_ROOT DESTDIR=/somewhereempty tar -czf worldimage.tar.gz @/somewhereempty/METALOG Then on the target system: chflags -R noschg / tar -xzf worldimage.tar.gz Kernels are easy enough to simply copy over, though similar steps can be don w/ buildkernel/installkernel... A nice thing about using -DNO_ROOT is that you can do all the building/installing as a normal user, so only when you go to extract the tar on the destination host do you need root perms... Hope this helps! -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."