Manjaro bootsrap script failing when trying to build arm64 base

I have filed a Issue on the issue tracker for that, but I thought I should do it here too.

Actual issue is here: https://gitlab.manjaro.org/tools/maintenance-tools/manjaro-bootstrap/issues/3

./manjaro-bootstrap.sh -a arm64 manjaro:

--- destination directory: manjaro
--- core repository: http://mirror.archlinuxarm.org/arm64/core
--- temporary directory: /tmp/tmp.NMcc4livcb
--- fetch packages list: http://mirror.archlinuxarm.org/arm64/core/
--- pacman package and dependencies: acl archlinux-keyring attr bzip2 curl expat glibc gpgme libarchive libassuan libgpg-error libnghttp2 libssh2 lzo openssl pacman pacman-mirrors xz zlib krb5 e2fsprogs keyutils libidn gcc-libs lz4 libpsl icu filesystem
--- Error: cannot find package: acl

Same with aarch64:

./manjaro-bootstrap.sh -a aarch64 manjaro
--- destination directory: manjaro
--- core repository: http://repo.manjaro.org.uk/unstable/core/aarch64
--- temporary directory: /tmp/tmp.zGrZTWbIVn
--- fetch packages list: http://repo.manjaro.org.uk/unstable/core/aarch64/
--- pacman package and dependencies: acl archlinux-keyring attr bzip2 curl expat glibc gpgme libarchive libassuan libgpg-error libnghttp2 libssh2 lzo openssl pacman pacman-mirrors xz zlib krb5 e2fsprogs keyutils libidn gcc-libs lz4 libpsl icu filesystem
--- Error: cannot find package: acl

The bootstrap scripts does not support these architectures...

Even arm arch fails, which is supposed to be supported.

Eeh, no. The only architecture that is suppose to be supported, is those from mirror.archlinux.org. Which is only x86_64.

Usage: manjaro-bootstrap.sh [-q] [-a i686|x86_64|arm] [-r REPO_URL] [-d DOWNLOAD_DIR] DESTDIR

Not according to that. :frowning:

Hm. The script hasn't been updated in a couple of years, so the ARM setup might have changed since.

What if you try aarch64 as architecture?

Please check my original post, already did try.

Seems that this part is very out of date:

get_default_repo() {
  local ARCH=$1
  if [[ "$ARCH" == arm* ]]; then
    echo $DEFAULT_ARM_REPO_URL
  else
    echo $DEFAULT_REPO_URL
  fi
}

get_core_repo_url() {
  local REPO_URL=$1 ARCH=$2
  if [[ "$ARCH" == arm* ]]; then
    echo "${REPO_URL%/}/$ARCH/core"
  else
    echo "${REPO_URL%/}/${DEFAULT_BRANCH}/core/$ARCH"
  fi
}

It should have worked with `arm``though....

I mean it kinda works with arm, but:

--- download package: http://mirror.archlinuxarm.org/arm/core/gpgme-1.13.1-3-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  368k  100  368k    0     0   400k      0 --:--:-- --:--:-- --:--:-- 1552k
--- uncompress package: /tmp/tmp.chlIcxa8VO/gpgme-1.13.1-3-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/libarchive-3.4.0-3-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  428k  100  428k    0     0   415k      0  0:00:01  0:00:01 --:--:-- 2232k
--- uncompress package: /tmp/tmp.chlIcxa8VO/libarchive-3.4.0-3-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/libassuan-2.5.3-2-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 81012  100 81012    0     0   100k      0 --:--:-- --:--:-- --:--:--  100k
--- uncompress package: /tmp/tmp.chlIcxa8VO/libassuan-2.5.3-2-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/libgpg-error-1.36-3-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  181k  100  181k    0     0   220k      0 --:--:-- --:--:-- --:--:--  220k
--- uncompress package: /tmp/tmp.chlIcxa8VO/libgpg-error-1.36-3-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/libnghttp2-1.39.2-2-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 77672  100 77672    0     0  82366      0 --:--:-- --:--:-- --:--:-- 82366
--- uncompress package: /tmp/tmp.chlIcxa8VO/libnghttp2-1.39.2-2-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/libssh2-1.9.0-2-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  188k  100  188k    0     0   227k      0 --:--:-- --:--:-- --:--:--  227k
--- uncompress package: /tmp/tmp.chlIcxa8VO/libssh2-1.9.0-2-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/lzo-2.10-3-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 74200  100 74200    0     0  93450      0 --:--:-- --:--:-- --:--:-- 2224k
--- uncompress package: /tmp/tmp.chlIcxa8VO/lzo-2.10-3-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/openssl-1.1.1.d-2-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 3184k  100 3184k    0     0  2690k      0  0:00:01  0:00:01 --:--:-- 2690k
--- uncompress package: /tmp/tmp.chlIcxa8VO/openssl-1.1.1.d-2-arm.pkg.tar.xz
--- download package: http://mirror.archlinuxarm.org/arm/core/pacman-5.2.1-1-arm.pkg.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  722k  100  722k    0     0   628k      0  0:00:01  0:00:01 --:--:--  628k
--- uncompress package: /tmp/tmp.chlIcxa8VO/pacman-5.2.1-1-arm.pkg.tar.xz
--- Error: cannot find package: pacman-mirrors

Yeah. Pacman-mirrors is a manjaro specific package, so it woulnd't be able to find it on the Arch Linux ARM server. :slight_smile:

Conclusion:
The script is very out of date.

Have you tried with the buildrootfs script from the manjaro-arm-tools package?

No, I haven't tried it, but I can try that one as Arch Linux at least has a base docker image I can use.

All it does is really creating a base Manjaro ARM rootfs and compresses it into a .zip file.

You can just comment out the last line of the script, if you don't want it compressed.

I found your builddockerimage script, which seems like the right one to use, commenting out specifc things, but still. :slight_smile:

be aware, that it creates a docker image usable on amd64 hardware. Not aarch64.

This image does boot on aarch64. https://hub.docker.com/r/manjaroarm/manjaro-aarch64-base

sudo docker run -it manjaroarm/manjaro-aarch64-base bash
[root@a6c048025f75 /]# uname -a
Linux a6c048025f75 5.4.1-1-ARCH #1 SMP Sat Nov 30 18:54:05 UTC 2019 aarch64 GNU/Linux

You ran this command on your rpi3?

Yes, I did, but reason why it boots is probably the qemu binary in the image.

Nah, the qemu binary on the image is only used if an x86_64 host tries to run something in it. :slight_smile:

But glad it also works on aarch64. :slight_smile:

I see:

[root@091ec716d0b5 bin]# ./qemu-aarch64-static 
bash: ./qemu-aarch64-static: cannot execute binary file: Exec format error
[root@091ec716d0b5 bin]# ldd qemu-aarch64-static 
        not a dynamic executable
[root@091ec716d0b5 bin]# file qemu-aarch64-static 
qemu-aarch64-static: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=8fac31c05676a08d2ee327b688b64b2679eaa4c6, stripped

When ran on a RPi3, but the actual topic is now resolved, I'll go to the actual Docker container topic to discuss this further as I have things which need to be fixed.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by