mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
add experimental package for qemu-user emulation for arm
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
parent
fa4beb5277
commit
c70b432b6f
@ -33,6 +33,8 @@ COPY packages/diagnostics/etc /etc/
|
||||
COPY packages/automount/etc /etc/
|
||||
COPY packages/9pinit/etc /etc/
|
||||
COPY packages/ntp15m/etc /etc/
|
||||
COPY packages/qemu-user-static/qemu-* /usr/bin/
|
||||
COPY packages/qemu-user-static/etc /etc/
|
||||
|
||||
RUN \
|
||||
rc-update add swap boot && \
|
||||
@ -63,6 +65,7 @@ RUN \
|
||||
rc-update add mdnstool default && \
|
||||
rc-update add automount boot && \
|
||||
rc-update add diagnostics default && \
|
||||
rc-update add qemu-user-static sysinit && \
|
||||
ln -s /bin/busybox /init
|
||||
|
||||
CMD ["/bin/sh"]
|
||||
|
1
alpine/packages/qemu-user-static/.gitignore
vendored
Normal file
1
alpine/packages/qemu-user-static/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
qemu-arm-static
|
3
alpine/packages/qemu-user-static/Dockerfile
Normal file
3
alpine/packages/qemu-user-static/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM debian:jessie
|
||||
|
||||
RUN apt-get update && apt-get -y install qemu-user-static
|
10
alpine/packages/qemu-user-static/Makefile
Normal file
10
alpine/packages/qemu-user-static/Makefile
Normal 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
|
9
alpine/packages/qemu-user-static/binfmt-arm
Normal file
9
alpine/packages/qemu-user-static/binfmt-arm
Normal 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
|
||||
|
15
alpine/packages/qemu-user-static/etc/init.d/qemu-user-static
Executable file
15
alpine/packages/qemu-user-static/etc/init.d/qemu-user-static
Executable 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user