-
Notifications
You must be signed in to change notification settings - Fork 3
qemu
Marat Radchenko edited this page Jan 11, 2014
·
8 revisions
If you have powerfull desktop/server box, you can run n8x0 stage on it. Main reasons to do so are CPU speed (and quantity) and RAM amount (several packages cannot be built on N8x0 due to insufficient RAM). We'll use QEMU user emulation + binfmt_misc. Due to the need to pass additional args to QEMU (cpu model), we'll create wrapper script that'll call QEMU with it.
You can also emerge qemu, but make sure you have USE=static. If you emerge qemu system-wide, skip directly to step 5.
- Download and unpack stage to
/usr/armv6j-unknown-linux-gnueabi/ - Download latest qemu release
- Unpack and cd into it
- Compile QEMU:
./configure --target-list=arm-linux-user --static && make - Copy compiled
arm-linux-user/qemu-armto/usr/armv6j-unknown-linux-gnueabi/ - Download qemu-wrapper.c and compile it with
gcc -static qemu-wrapper.c -o qemu-wrapper - Copy compiled
qemu-wrapperto/usr/armv6j-unknown-linux-gnueabi/ - Download chroot prepare script. Run it (its effect doesn't persist across reboot).
- With everything set up, chroot into arm system with
chroot /usr/armv6j-unknown-linux-gnueabi
Same approach can be used for any QEMU-supported machine. For binfmt ELF magic see qemu-binfmt-conf.sh from QEMU tarball.