add experimental package for qemu-user emulation for arm

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
Justin Cormack
2015-12-31 00:25:25 +00:00
parent ffc70fab8d
commit e78fe99dca
6 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1 @@
qemu-arm-static

View File

@@ -0,0 +1,3 @@
FROM debian:jessie
RUN apt-get update && apt-get -y install qemu-user-static

View File

@@ -0,0 +1,10 @@
all: qemu-arm-static
qemu-arm-static :
docker build -t qemu-user-static:build .
docker run qemu-user-static:build cat /usr/bin/qemu-arm-static > qemu-arm-static
chmod 755 qemu-arm-static
docker run qemu-user-static:build cat /var/lib/binfmts/qemu-arm > binfmt-arm
clean:
rm -f qemu-arm-static binfmt-arm

View File

@@ -0,0 +1,9 @@
qemu-user-static
magic
0
\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/bin/qemu-arm-static
yes

View File

@@ -0,0 +1,15 @@
#!/sbin/openrc-run
description="Configure binfmt misc emulation"
start()
{
ebegin "Configuring binfmt misc"
mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
echo ":qemu-arm:M:0:\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/bin/qemu-arm-static:OC" > /proc/sys/fs/binfmt_misc/register
}
stop()
{
umount /proc/sys/fs/binfmt_misc
}