Re: Cross compiler

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.hppa
Message-ID <[email protected]>
On 4/22/21 12:07 PM, Helge Deller wrote:
> Set up the chroot, e.g.:
> debootstrap --arch=hppa  --no-check-gpg unstable  /srv/test http://ftp.debian-ports.org/debian/

You will need to use qemu-debootstrap as otherwise the command will fail
without the "--foreign" flag.

> You need to install the debian qemu-user-static package.
> I suggest to use my pre-built qemu-hppa-static binary from:
> http://dellerweb.de/qemu/qemu-hppa-static
> which you should copy to /usr/bin/qemu-hppa-static  and inside the chroot in the /usr/bin directory.
> Important: Restart the binfmt-support so that the new binary will be used.
> run: "service binfmt-support restart"

Installing the qemu-user-static package on Debian testing or newer
is already sufficient. It is not necessary to copy the qemu binary
into the chroot and also not recommended as the proper binary is
already correctly invoked through binfmt-support.

Since Debian's qemu-user package also contains a tweak to fix the argv
thrashing issue in QEMU, I would actually advise against using your
custom qemu-user binary unless it is really necessary. But I assume
Debian testing/unstable should have a QEMU version recent enough for
proper hppa supprt.

> mount the directories, replace $i by your chroot directory:
> mount -t proc proc /srv/$i/proc/
> mount -t sysfs sysfs /srv/$i/sys/
> mount -t tmpfs tmpfs /srv/$i/dev/shm/
> mount -t devpts devpts /srv/$i/dev/pts
> 
> and finally chroot into your chroot-directory.
This can also be avoided when setting up schroot which always mounts
the necessary paths automatically.

Adrian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.