• Cross compiler

    From Helge Deller@21:1/5 to Mike Hosken on Thu Apr 22 12:10:01 2021
    On 4/22/21 11:28 AM, Mike Hosken wrote:
    I’m wanting to set up a chroot amd64 to hppa cross compiler. I’ve
    tried following the guides but break it. Has anyone else been using a
    cross compiler that can help either setup for me or guide me step by
    step. I can give access to the machine in question.

    I'm using a real amd64/hppa cross compiler to build the Linux kernel manually only.

    For all other things I use a chroot installed with hppa binaries, and qemu-user as the emulation layer.
    It's not as fast as a real cross compiler, but doesn't lack the issues when cross-compiling either.

    Set up the chroot, e.g.:
    debootstrap --arch=hppa --no-check-gpg unstable /srv/test http://ftp.debian-ports.org/debian/

    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"

    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.

    Helge

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Hosken@21:1/5 to All on Thu Apr 22 11:40:02 2021
    Hi everyone,

    I’m wanting to set up a chroot amd64 to hppa cross compiler. I’ve tried following the guides but break it. Has anyone else been using a cross compiler that can help either setup for me or guide me step by step. I can give access to the machine in
    question.

    Bullseye hppa is almost done and is aimed at running servers who need a stable release with updates. I run some servers using ispconfig as a control panel and the updates will be based around this.

    I’m offering up a rp3440 as a builder for ports and can use this machine to build updates if cross compiler isn’t an option.

    Any help would be appreciated

    Mike Hosken
    Sent via my iPhone

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Helge Deller on Thu Apr 22 15:30:02 2021
    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

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Helge Deller on Thu Apr 22 16:10:01 2021
    On 4/22/21 3:55 PM, Helge Deller wrote:
    On 4/22/21 3:27 PM, John Paul Adrian Glaubitz wrote:
    On 4/22/21 12:07 PM, Helge Deller wrote:
    Set up the chroot, e.g.:
    debootstrap --arch=hppa  --no-check-gpg unstable  /srv/testhttp://ftp.debian-ports.org/debian/

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

    Good point.
    It didn't failed for me, but using qemu-debootstrap is probably better.

    It didn't fail because you have qemu-user-static installed and binfmt-misc activated which proves you don't need to copy the qemu binary into the
    chroot anymore :-).

    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.

    As far as I know, some of my latest hppa-related patches aren't yet in debian's unstable/testing qemu package.
    Even worse, on Debian AMD64 buster you get qemu 3.1 packages which lack much of the hppa support.

    Well, Buster is going to be replaced by Bullseye soonish ;-).

    This is why I (for now) suggested to use my binary.
    But in general everyone should prefer to the debian  rebuilt qemu packages.

    At least for m68k, the QEMU version in unstable is mature enough now.

    sh4 currently needs one workaround for one bug which is why I'm still using
    a custom binary.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)