[Wiki] How to contribute to Manjaro ARM

Ok, so I think the ZFS issue is related to bind mounts, but I got around that by building in tmpfs, which also doesn’t work.

But the reason it doesn’t work is /var/cache/manjaro-arm-tools/ is assumed to exist. Which is the root of both $PKGDIR and $IMGDIR. I moved those to /tmp, and it breaks the build because they don’t exist in /tmp.

So, I added this, after the conf file is loaded in functions.sh, and I can now build in tmpfs:

#import conf file
source /etc/manjaro-arm-tools/manjaro-arm-tools.conf

# PKGDIR & IMGDIR may not exist if they were changed by configuration, make sure they do.
mkdir -p ${PKGDIR}
mkdir -p ${IMGDIR}

I would like to submit a patch for this. Whats the process? I have an account on the manjaro gitlab but it doesn’t seem possible to make PR’s (at least for me).

There is one outstanding issue I notice though, and that is the bind mount is not cleaned up at the end of the build.

> tmpfs on /tmp/build/var/lib/manjaro-arm-tools/img/rootfs_aarch64/var/cache/pacman/pkg type tmpfs (rw,nosuid,nodev,relatime,size=50331648k,nr_inodes=2097152,inode64)

is left behind which is evident in the build when it goes:

 -> Removing rootfs_aarch64
+ rm -rf /tmp/build/var/lib/manjaro-arm-tools/img/rootfs_aarch64
rm: cannot remove '/tmp/build/var/lib/manjaro-arm-tools/img/rootfs_aarch64/var/cache/pacman/pkg': Device or resource busy

So I would fix that before making the PR.

As the Manjaro gitlab is reserved for Manjaro developers, the best you can do, is open an issue on the project in question and supply a .patch file that can be git apply'd.

4 posts were split to a new topic: How to change kernel config with buildarmpkg

Just want to say my thanks to the maintainers for developing these tools. As a pretty clueless beginner I was able to configure and build the kernel and flash the new image to my Pinephone to get midi working.

Could someone give a pointer though on how I would do this same thing using a release version of Manjaro ARM? It seems to me like the process I followed (building a new kernel from source, creating a new image with buildarmimg) builds a ‘bleeding edge’ image. I think I’d like to use a release image, but just reconfigure the kernel if that makes sense.

The “release” image is just snapshots of what is in the Stable repo at the time.

So as long as you didn’t define a branch when using the tools, you will have what would essentially be an up-to-date release image, when building the image with buildarmimg.

1 Like

4 posts were split to a new topic: [Request] Add support for ClockworkPi A06

Hey, I quickly and easily was able to build an OEM image for the jetson nano. That worked great. Thanks for the tool. :+1:

The image doesn’t boot though.

Or at least it hasn’t in the 15 or so minutes it’s been trying. I got the nvidia splash screen, and that’s it.

I am trying to learn patience, and the jetson is powered on as I type this.

I think for jetpack 4.5 nvidia changed something with it’s bootloader, I am wondering if that has something to do with it.

Suggestions welcome.

Thanks!

Jetson Nano is not working yet, no.

That’s why it’s not listed inthe documentation yet.

2 Likes

Sorry, I just saw your reply. I haven’t looked further into it after a certain point because a system without stable telephony wouldn’t be much use to me and since ofono seems to be not so reliable and is being left behind, I didn’t want to put a lot of resources in this. I may revisit this at some point.

4 posts were split to a new topic: Add support for NanoPi 4M

Is there a proper way to compile a package without involving a virtual machine? Because compiling with buildarmpkg takes a lot of time. My 8 core ryzen builds the linux package in 2 hours.

This needs to be split into a new topic.

If you are just building an aarch64 kernel you can use your 8 core Ryzen and the aarch64-linux-gnu-gcc cross compiler. You could run into issues though if you try to install install any 3rd party dkms kernel modules.

#Install from manjaro repo the cross compiler:
sudo pacman -S aarch64-linux-gnu-gcc

#Clone the kernel repo you want to use and cd to it's directory (here for the rpi4):
git clone https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-rpi4
cd linux-rpi4

#Create and save 2 files (makepkg-arm.conf & makepkg-arm)

#makepkg-arm-config:

source /etc/makepkg.conf
CARCH="aarch64"
CHOST="aarch64-linux-gnu"
export ARCH='arm64'
export CROSS_COMPILE='aarch64-linux-gnu-'
MAKEFLAGS="-j8"

#makepkg-arm script:

#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
time makepkg -s --config "$DIR/makepkg-arm.conf" "$@"

#Make makepkg-arm script executable:
chmod +x makepkg-arm

#Start the kernel package build
./makepkg-arm

If you are building other packages that require aarch64 libs then I use distcc such as here if I was compiling locally instead of using manjaro-arm’s build server. I have my vim3 as the master and my rock64 and x86 desktop set up as slaves. The x86 uses this package from AUR:

https://aur.archlinux.org/packages/distccd-alarm-armv8

3 Likes

Hi,

I am offering my help for testing Manjaro ARM on my Raspberry Pi 5 8GB.
Have it running with RaspberryOS and Ubuntu 23.10 but I would really like to have Manjaro on it.
On my RPI4 I have Manjaro Sway running, but this is of course not booting on the RPI5.

I know this is not much and not specific, but I thought - as the availability of RPI5 devices is rather limited - I could contribute by testing, managed by a developer/maintainer.

But in case that wouldn’t help, no problem.

1 Like

Did you use the latest DEV image from here?

https://github.com/manjaro-arm/rpi4-images/releases

I have not received my pi5 yet but your existing rpi4 install should be made to boot the pi5 and pi4 with some config.txt changes and the creation of a required new file for X11 to use. I do not remember anyone posting yet they were using sway yet though. It is recommended to be on the unstable branch (which the DEV images are built from) to have the latest as soon as possible as they are constantly fixing things daily.

Have flashed the Manjaro-ARM-sway-rpi4-20231120.img to my SD-card, inserted into to RPI5, start button pressed and guess what:
Manjaro boots properly on the Raspberry Pi 5, at once and without any amendments in config.txt or others!!

Great!

But: starts with the login screen and without having the opportunity to create a user account, I am stuck here, haha

could work around by ctrl+alt+F2. Started sway as root, but then after starting terminal (foot) it brings up ‘error: ‘C’ is not a UTF-8 locale, and failed to find a fallback’, and this is end of the story. No reactions any more

I will test with a different DE as Sway might be too exotic…

3 Likes

I do not use sway and the guy who initially created the image is no longer here any more to diagnose. Seems like there was a special environment that had to be set up for the Calamares setup window to appear for sway.

Try this booted up on your pi4 sway install on your pi4.

Update everything and install the pi5 kernel files:

sudo pacman -Syu 
sudo pacman -S linux-rpi5 linux-rpi5-headers

Become root:

su

Create a needed file. Copy all of the text below and paste into a terminal and hit the enter key:

cat << EOF > /etc/X11/xorg.conf.d/99-v3d.conf
Section "OutputClass"
  Identifier "vc4"
  MatchDriver "vc4"
  Driver "modesetting"
  Option "PrimaryGPU" "true"
EndSection
EOF

Shut down and reboot the image on your pi5. If it boots up I would suggest switching to the unstable branch and upgrade there and stay there for a while to get the latest pi5 fixes as they are done. This image should boot now on your pi4 and pi5.

Sorry, sorry: was my fault!

After rethinking, I did a fresh install of the Manjaro-ARM-sway-rpi4-20231120.img to my SD-card, because I discovered that I was simply too quick the first time without waiting for the installer process…

This time Manjaro started on the RPI5, ran into the normal installer so I could set user+pw and root pw etc, started Sway correctly and everything is working (except locales) fine now!

  • the file & contents of /etc/X11/xorg.conf.d/99-v3d.conf did already exist
  • also linux-rpi5 linux-rpi5-headers are already present.

I switched to unstable branch and will stay there

Thanks a lot for your help!

If anything obscure is coming up, I will post it here :wink:

2 Likes

The first boot has a ton of prep work going on.

Yep I had added all of that in the new images.

Please do as you are the only one running sway on the pi5 right now. You might also want to try the PiOS patched mesa I built as the one in the repo does not have pi5 support right now. It falls back to software llvmpipe renderer. Install the same mesa packages you currently have installed out of all of these packages.

mesa_23.2.1-2~bpo12+rpt2

After you install my mesa files would you post the output of glxinfo -B so I can see what type of report you get with sway.

checked with pacman -Q : the only mesa package seemed to be mesa-23-1.8-1, so I installed your mesa-23-2.1 and rebooted

here is the output ot glxinfo:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Broadcom (0x14e4)
    Device: V3D 7.1 (0xffffffff)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 8048MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.1
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Broadcom
OpenGL renderer string: V3D 7.1
OpenGL core profile version string: 3.1 Mesa 23.2.1~bpo12+rpt2.2
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)

OpenGL version string: 3.1 Mesa 23.2.1~bpo12+rpt2.2
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.2.1~bpo12+rpt2.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

what does that tell you??

Looks OK. Thanks.