View Single Post
Old 2016-02-06, 19:03   #24
Dec 2014

1001012 Posts

I managed to set up a s390x chroot! So I don't need to rely on QEMU image anymore (They are pretty hard to find and make). I can now build a "fresh" debian rootfs from scratch.

For curious people, this is how it is done (the following commands need root privilege):
# apt-get install binfmt-support qemu qemu-user-static
Then, manually download debootstrap and install it by
# dpkg -i debootstrap_1.0.73~bpo8+1_all.deb
Note we cannot install the latest version because it has a bug which prevents the two-stage bootstrap from working. (It takes me a looong time to figure this out, the error message isn't so obvious.)
qemu-debootstrap --arch=s390x --include=emacs-nox,less,build-essential,autogen --variant=buildd sid debian-s390x
and we are done! You can now chroot into the chroot. This should works for any architecture that is supported by QEMU user mode emulation. In particular, armel (used by your phone) is supported.
alexvong1995 is offline   Reply With Quote