(a seamless m68k dev environment on Linux with Qemu)
Created: 2020-11-06 Fri 11:34
apt install libaio-dev libbluetooth-dev libbrlapi-dev \
libcapstone-dev libcurl4-gnutls-dev libfdt-dev libgbm-dev \
libgfchangelog0 libibumad-dev libibverbs-dev libiscsi-dev \
libnfs-dev libnl-3-dev libnl-route-3-dev libnuma-dev \
librados-dev librbd-dev librdmacm-dev libsasl2-dev \
libspice-protocol-dev libspice-server-dev libssh-dev \
libusb-1.0-0-dev libusbredirparser-dev libvdeplug-dev \
libvte-2.91-dev libxen-dev xfslibs-dev git build-essential
mkdir -p ~/src cd ~/src git clone https://github.com/vivier/qemu-m68k cd qemu-m68k/ ./configure --target-list=m68k-linux-user --static --disable-glusterfs make
apt -y install qemu-user-static strip ./build/qemu-m68k cp -av build/qemu-m68k /usr/bin/qemu-m68k-static
/srv/chroot/qemu-m68kapt -y install debootstrap debian-ports-archive-keyring mkdir /srv/chroot cd /srv/chroot debootstrap --no-check-gpg --variant=buildd --foreign \ --arch=m68k unstable qemu-m68k http://ftp.ports.debian.org/debian-ports/
amd64 binary inside the m68k Linux
binfmt configuration of your (native) Linux kernel,
esp. the path to the qemu-m68k or qemu-m68k-static binary,
with cat /proc/sys/fs/binfmt_misc/qemu-m68k# cp -av /usr/bin/qemu-m68k-static qemu-m68k/usr/bin/ # cp -av /usr/bin/qemu-m68k-static qemu-m68k/usr/bin/qemu-m68k
chroot /srv/chroot/qemu-m68k/ uname -a # prints: Linux debian-m68k-dev 4.19.0-12-amd64 #1 SMP # Debian 4.19.152-1 (2020-10-18) m68k GNU/Linux ./debootstrap/debootstrap --second-stage
root account
systemd-nspawnsystemd (or any Init-System you prefer)apt install systemd passwd root exit
chrootmount -t proc proc /srv/chroot/qemu-m68k/proc/ mount -t sysfs sys /srv/chroot/qemu-m68k/sys/ mount -o bind /dev /srv/chroot/qemu-m68k/dev/ mount -o bind /dev/pts /srv/chroot/qemu-m68k/dev/pts chroot /srv/chroot/qemu-m68k
systemd-nspawnsystemd-nspawn -D /srv/chroot/qemu-m68k
systemd-nspawnsystemd-nspawn -bD /srv/chroot/qemu-m68k
@cstrotm@mastodon.social