Over the past few years of Manjaro-ARM's existence, we have had several people offer to help or at least show interest to help. While we appreciate every offer, it seems one of the largest issues that comes about is a large disconnect between the people wanting to help and the procedures to actually get anything done. We have made it extremely simple to do basic functions for manjaro-arm to mitigate the whole "Dont know how to do" or the "Dont know what to do". This wiki post will hopefully solve this.
This post also serves as a service to allow standard users to create their own images or packages. Almost everything we do to get an image created for the devices supported can be done by a user with just a few commands.
It really is that simple
- Manjaro or Arch running on an x86_64 machine
- Manjaro-arm-tools (should probably get manjaro-tools as well as arch packages are going away from manjaro's repo)
Manjaro has been kind enough to include this package in the repo so it can be installed with pacman.
$ sudo pacman -S manjaro-arm-tools manjaro-tools-base
Installing git package
There is also a git version of the tools that has the most updated support for new boards and new options as we add them. This can be installed through Strit's repo
Add strit's repo to your pacman.conf
$ sudo nano /etc/pacman.conf
and add these lines to the bottom:
[manjaro-strit] SigLevel = Never Server = https://www.strits.dk/files/manjaro-strit/manjaro-strit-repo/$arch
Sync package lists and install the git package
$ sudo pacman -Syy manjaro-arm-tools-git
Layout of the tools and how it works
There are several main functions of the manjaro-arm-tools.
buildarmoem - Utility for building images that include the oem installer for configuration on first boot
buildarmpkg - this is for building single packages from a PKGBUILD
buildemmcinstaller - This builds new pinebook images (and other devices) that includes the emmc flasher
buildrootfs - Builds a rootfs for user for a variety of reasons
getarmprofiles - Retrieves the current arm profiles used for building images
All of these utilities are meant to be run on a standard x86_64 machine such as a desktop/laptop and make use of a virtualization tool called qemu.
We have created rootfs which is a bare skeleton of Manjaro-ARM that will be downloaded, 'started' using qemu and systemd-nspawn, and configured with the tools above. Once the tools package is installed, there is a configuration located at:
that contains build directories and output directories. By default, this does not need to be altered.
Profiles are mainly text files that contain lists of packages and settings that get installed and configured on images that are built for Manjaro-ARM. They allow us to set themes, start services, add taskbar applets, default settings and much more. They originate from Manjaro's own profiles and are altered a bit to work on ARM boards. They are installed at
$ sudo getarmprofiles -f
Editing profiles for customization
If you are wanting to begin work on a new profile for a desktop environment we don't yet support, this is the first step. Creating new profiles to be used in the builds is pretty easy and can be achieved by using one of the pre-existing examples already in place. Below is the directory tree of the profiles and how the are structured.
- Devices contains lists of packages that are required for each device in order to get them to work on any edition
- Edition contains the list of packages that required for the desktop editions that we support.
- Overlays are example configuration files that contain the manjaro-specific settings and options. They are structured exactly as they would be as installed on the device.
- Services is simply a list of systemd services that should be enabled by default. They are specific to the desktop edition being used.
└── arm-profiles ├── devices │ ├── nyan-big │ ├── oc1 │ ├── oc2 │ ├── on2 │ ├── pinebook │ ├── rock64 │ ├── rockpi4 │ ├── rockpro64 │ ├── rpi2 │ ├── rpi3 │ ├── sopine │ └── xu4 ├── editions │ ├── cubocore │ ├── gnome │ ├── i3 │ ├── kde │ ├── lxqt │ ├── mate │ ├── minimal │ └── server ├── overlays │ ├── cubocore │ │ ├── etc │ │ │ ├── environment │ │ │ ├── sddm.conf │ │ │ └── skel │ │ └── overlay.txt │ ├── gnome │ │ └── overlay.txt │ ├── i3 │ │ └── etc │ │ ├── fonts │ │ │ └── conf.d │ │ │ └── 70-no-bitmaps.conf -> /etc/fonts/conf.avail/70-no-bitmaps.conf │ │ ├── lightdm │ │ │ ├── lightdm.conf │ │ │ └── lightdm-gtk-greeter.conf │ │ ├── pamac.conf │ │ ├── polkit-1 │ │ │ └── rules.d │ │ │ └── 81-blueman.rules │ │ └── X11 │ │ └── xorg.conf.d │ │ └── 30-touchpad.conf │ ├── kde │ │ ├── etc │ │ │ ├── environment │ │ │ ├── pamac.conf │ │ │ ├── sddm.conf │ │ │ └── skel │ │ ├── overlay.txt │ │ └── usr │ │ └── share │ │ └── konsole │ │ └── Profile 1.profile │ ├── lxqt │ │ ├── etc │ │ │ ├── pamac.conf │ │ │ ├── sddm.conf │ │ │ └── skel │ │ └── overlay.txt │ ├── mate │ │ ├── etc │ │ │ ├── lightdm │ │ │ │ ├── lightdm.conf │ │ │ │ └── lightdm-gtk-greeter.conf │ │ │ ├── pamac.conf │ │ │ └── skel │ │ └── overlay.txt │ ├── minimal │ │ └── overlay.txt │ └── server │ └── overlay.txt └── services ├── cubocore ├── gnome ├── i3 ├── kde ├── lxqt ├── mate ├── minimal └── server
Note armv7 devices are no longer supported and will be removed soon
Building an OEM image
An OEM image is an image that contains the Manjaro-ARM OEM installer. It is the only images that will be made from this point forward. The OEM installer allows the user to setup up username, passwords, locale, and keyboard layout upon the first boot. This removes the need for the user to have to change the default settings. The OEM installer is installed as a package and automatically runs on first boot as root user (which is automatically logged in upon boot). Once the installer is finished and the system is configured to the user's specification, the installer is removed from the system.
Usage: buildarmoem [options] -d <device> Device the image is for. [Default = rpi3. Options = rpi3, oc2, on2, rock64, rockpro64, rockpi4, sopine and pinebook] -e <edition> Edition of the image. [Default = minimal. Options = minimal, lxqt, kde, cubocore, mate and server] -v <version> Define the version the resulting image should be named. [Default is current YY.MM] -i <package> Install local package into image rootfs. -n Force download of new rootfs. -x Don't compress the image. -h This help
To build an kde image for the Odroid-n2:
$ sudo buildarmoem -d on2 -e kde -v myfirstbuild -n
The above command will take a few minutes depending on internet connection and speed of computer but will result in an image inside of a compressed
xz container. You can use -x to output a full image if desired.
As this command is being executed, several processes take place. It first downloads a new aarch64 rootfs from one of the manjaro-arm mirrors and extracts it. Using qemu and systemd-nspawn, the script chroots into the rootfs and lets us use it as a working arm install. The utility then installs all the profile packages, sets all the overlay settings, and enables all services according to the profile.
After everything is installed, it creates and mounts a loop device on your system in order to create required partitions (root and/or boot) and copies everything into these partitions. It will then flash any boot specific binaries or files into the correct location on the loop device. Once everything is finished, it dumps the loop device (containing the partitions and correct boot binaries all properly located) into an image file. The final step compresses the image into the .xz format.
Once the xz is is created, everything is cleaned up and the loop device removed.
If everything worked as planned, you will be left with a flashable image named:
You can find this image at
Everything is done automatically and as such, is thoroughly tested. If problems do arise, we are generally quick to fix it.
Building an EMMC - installer image
The eMMC installer image is very similar to the oem image. It essentially creates a minimal image for a device but also downloads a released version of Manjaro-ARM from OSDN and stores it within the image. It is mainly used for the pinebook as it has an eMMC inside of the laptop that requires disassembly to access. Instead of an OEM installer being executed upon first boot, there is instead a flash utility with a few user prompts in order to flash to the internal eMMC. This image is basically useless for anything else.
Right now, it works on the pinebook however, should also work on other devices that have both an eMMC and SDCard and can boot from both.
Usage: buildemmcinstaller [options] -d <device> Device the image is for. [Default = rpi3. Options = rpi3, oc2, on2, rock64, rockpro64, rockpi4, sopine and pinebook] -e <edition> Edition of the image. [Default = minimal. Options = minimal, lxqt, kde, cubocore, mate and server] -v <version> Define the version of the release to download. [Default is current YY.MM] -f <flash version> Version of the eMMC flasher image it self. [Default is current YY.MM] -i <package> Install local package into image rootfs. -n Force download of new rootfs. -x Don't compress the image. -h This help
To build a emmc-installer image for the pinebook using Manjaro-ARM-lxqt-19.03:
$ sudo buildemmcinstaller -d pinebook -e lxqt -v 19.03 -f first_emmc_build -n
Note here the -v option is required in order to obtain the correct version of Manjaro-ARM.
Like the buildoem tool above, all the same processes are performed as it would be for a minimal image. the result will be named:
located in the same directory:
Building a Package
This tool allows us to build our arm packages on our x86_64 computers without having to have a working device. It uses systemd-nspawn and qemu to virtualize an ARM device much like the image building tools. This is useful for packages that take a long time to build and you dont want to tie up your device for simply building.
Even though our x86_64 machines are more powerful, qemu does not allow us to use this power to the full extent. Packages often take longer to build using this method vs building them on a powerful device such as the rockpro64.
Usage: buildarmpkg [options] -a <arch> Architecture. [Default = aarch64. Options = any or aarch64] -p <pkg> Package to build -k Keep the previous rootfs for this build -i <package> Install local package into image rootfs. -h This help
It will only build packages that have a proper PKGBUILD. This means that the PKGBUILD needs to have the correct architecture, depends, and makedepends before continuing. Please refer to information on PKGBUILDs and makepkg for proper usage. You can also look at the manjaro-arm gitlab in order to see the PKGBUILDs we use.
To build linux-aarch64
$ sudo buildarmpkg -p linux-aarch64
Note that linux-aarch64 is the name of the directory that contains the PKGBUILD. This needs to be executed in the directory above the linux-aarch64 directory
During this process, the rootfs is downloaded and extracted. Systemd-nspawn and qemu set it up as a basic virtualized environment. The entire directory containing the PKGBUILD will be copied into this environment and makepkg will be executed building your package. Standard outputs will be shown for troubleshooting purposes. If proper packages are defined in the PKGBUILD as makedepends, they will be installed as part of the build process.
If everything goes well, all pkg.tar.xz packages built from your PKGBUILD can be found at
Building a rootfs
This is more of an advanced tool. It simply builds a very minimal rootfs. The resulting rootfs only has pacman and dependencies so that it can be used to create images and packages. You would only want to use this if you know what you are doing and know how to manipulate the rootfs as you want.
$ sudo buildrootfs
You will have a rootfs that can be used to start working on unsupported devices, personal customizations, or whatever else you want.
You can find it at:
Hopefully with this information, nobody will be lost as to how to build things for their arm devices. If there is a package that you wish for us to support, a desktop edition you would like to see, or any other additions to Manjaro-ARM that you have been waiting for, helping build it is a huge first step.
Please let us know if you come across any errors or unexpected behaviors.