bhyve/arm6/amd64 query
John-Mark Gurney
jmg at funkthat.com
Wed Sep 9 18:32:03 UTC 2015
Tim Kientzle wrote this message on Mon, Sep 07, 2015 at 11:15 -0700:
> > On Sep 7, 2015, at 8:05 AM, John <freebsd-lists at potato.growveg.org> 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 <options to target the image instead of the local filesystem>
> $ make TARGET_ARCH=arm6 KERNCONF=RPI2 DESTDIR=<img> installkernel
> $ make TARGET_ARCH=arm6 KERNCONF=RPI2 DESTDIR=<img> 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."
More information about the freebsd-arm
mailing list