building qemu-arm statically from GIT
Clone the latest qemu from git
http://git.qemu.org/qemu.git, then configure and make it
cd ~/GIT/qemu/arm-linux-user
git clone http://git.qemu.org/qemu.git
cd qemu
./configure --target-list="arm-linux-user" --disable-kvm --disable-strip --disable-xen --disable-spice --disable-werror --prefix=/usr/local --disable-bsd-user --static
make; make install
Check if we NEED to register the type with binfmt_misc...
dev binfmt_misc #
cat /proc/sys/fs/binfmt_misc/qemu-arm
Code:
enabled
interpreter /usr/bin/qemu-arm-static
flags: OC
offset 0
magic 7f454c4601010100000000000000000002002800
mask ffffffffffffff00fffffffffffffffffeffffff
If this WASN'T populated... echo to register
(
Only if the above is NOT already registered)
Code:
echo ":qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:" > /proc/sys/fs/binfmt_misc/register
(note that this stipulates /usr/local/bin/qemu-arm make that w/e you want)
since I already HAVE the debian version on my system move that binary it out the way and use that binfmt_misc registration for ourselves...
mv /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static-debian
cp /home/me/GIT/qemu/arm-linux-user/qemu-arm /usr/bin/qemu-arm-static
mount something we want to chroot into
sudo mount -t ext /home/me/IMAGES-FOR-DEBIAN/jessie.ext3 /mnt/jessie/
check what we built is kosher.
me@dev ~/GIT/qemu/arm-linux-user $
readelf -d ./qemu-arm
Quote:
There is no dynamic section in this file.
|
me@dev ~/GIT/qemu/arm-linux-user $
./qemu-arm -version
Quote:
qemu-arm version 1.6.50, Copyright (c) 2003-2008 Fabrice Bellard
|
(as opposed to 1.0.50 in the repos)
me@dev ~/GIT/qemu/arm-linux-user $
./qemu-arm --help
copy it into our debian victim
cp /usr/bin/qemu-arm-static /home/me/IMAGES-FOR-DEBIAN/usr/bin/qemu-arm-static
chroot in
sudo chroot /mnt/debian /bin/bash
Quote:
root@dev:/#cat /etc/debian_version
jessie/sid
|
For reference...
Debian build log
https://buildd.debian.org/status/fet...amp=1322591568
What those build warnings mean to end users.
https://lists.gnu.org/archive/html/q.../msg04789.html
seems to work okay.