On 9/19/2013 5:41 AM, garyamort wrote:
> While digging through Robert Nelson's omap image builder, I noticed that
> he's using Qemu at some point to emulate the Beagle Bone from the PC and
> download/install packages.
>
> Digging through his code left me confused... I understand he is using the
> qemu-arm-static executable in order to execute a sequence of commands, but
> he also seems to be pulling some code from linuxCnC for the emulator image,
> leaving me confused.
>
<snip>
Robert's image builder isn't actually pulling in anything from LinuxCNC,
those are hooks for my MachineKit image:
http://bb-lcnc.blogspot.com/p/machinekit_16.html
...which is built with Robert's scripts and a slightly different
configuration. Robert has pulled my changes to his scripts and left the
MachineKit configuration files as an example of how to build a custom
image. If you don't create a custom config file (based on
config.in or
config.machinekit), you'll get Robert's default build of various Debian
and Ubuntu images.
As for the qemu directions, it's super simple:
Setup a root filesystem for an ARM device. You can use debootstrap to
make one from scratch (the way Robert's scripts do), or use one of the
various pre-made root filesystems.
Copy the qemu-arm-static binary into ${arm-root-fs}/usr/bin/
arm-root-fs=/path/to/arm/root/filesystem/
sudo cp $(which qemu-arm-static) ${arm-root-fs}/usr/bin/
Then all you do is:
sudo chroot ${arm-root-fs} /bin/sh
...and you're running a shell in your arm rootfs. Type uname -a and
notice you are no longer on an x86 CPU! :)
--
Charles Steinkuehler
cha...@steinkuehler.net