[Wiki] Contributing to Manjaro-ARM

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

Requirements

  • 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-arm-tools

Installing package

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:

/etc/manjaro-arm-tools/manjaro-arm-tools.conf

that contains build directories and output directories. By default, this does not need to be altered.

Getting Profiles

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

/usr/share/manjaro-arm-tools/profiles

Usage

$ 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

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

Example

To build an kde image for the Odroid-n2:

$ sudo buildarmoem -d on2 -e kde -v myfirstbuild -n

Result

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:

Manjaro-ARM-kde-on2-myfirstbuild.img.xz

You can find this image at

/var/cache/manjaro-arm-tools/img/

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

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

Example

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.

Result

Like the buildoem tool above, all the same processes are performed as it would be for a minimal image. the result will be named:

Manjaro-ARM-lxqt-19.03-first_emmc_build.img.xz

located in the same directory:

/var/cache/manjaro-arm-tools/img/

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

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

Example

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

Result

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

/var/cache/manjaro-arm-tools/pkg/

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.

Example

$ sudo buildrootfs

Result

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:

/var/cache/manjaro-arm-tools/img/

Other Information

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.

Links

Manjaro-arm-tools
Manjaro-arm-oem-installer
Manjaro-arm-emmc-flasher
Manjaro-arm git
ARM profiles

6 Likes

Hi,

Nice post, practice for everyone.

I follow the procedure, then I tried to build an oem image for a c2, in the end something go wrong, the strit's signature is invalid...
I tried with manjaro tools base and manjaro tools git, the issue is the same

[nls@nl-pc ~]$ su
Mot de passe : 
[nl-pc nls]# sudo pacman -S manjaro-arm-tools manjaro-tools-base  
résolution des dépendances…
recherche des conflits entre paquets…

Paquets (5) arch-install-scripts-22-1  manjaro-arm-qemu-static-1.0.0-3  zip-3.0-8  manjaro-arm-tools-2.6.0-1
            manjaro-tools-base-0.15.9-6

Taille totale du téléchargement :  1,75 MiB
Taille totale installée :        7,25 MiB

:: Procéder à l’installation ? [O/n] o
:: Récupération des paquets…
 arch-install-scripts-22-1-any                 14,1 KiB   128K/s 00:00 [#######################################] 100%
 zip-3.0-8-x86_64                             160,0 KiB   366K/s 00:00 [#######################################] 100%
 manjaro-arm-tools-2.6.0-1-any               1578,3 KiB   550K/s 00:03 [#######################################] 100%
 manjaro-tools-base-0.15.9-6-x86_64            32,5 KiB  2,44M/s 00:00 [#######################################] 100%
 manjaro-arm-qemu-static-1.0.0-3-any            2,6 KiB  0,00B/s 00:00 [#######################################] 100%
(5/5) vérification des clés dans le trousseau                          [#######################################] 100%
(5/5) vérification de l’intégrité des paquets                          [#######################################] 100%
(5/5) chargement des fichiers des paquets                              [#######################################] 100%
(5/5) analyse des conflits entre fichiers                              [#######################################] 100%
(5/5) vérification de l’espace disque disponible                       [#######################################] 100%
:: Traitement des changements du paquet…
(1/5) installation de arch-install-scripts                             [#######################################] 100%
(2/5) installation de manjaro-arm-qemu-static                          [#######################################] 100%
(3/5) installation de zip                                              [#######################################] 100%
(4/5) installation de manjaro-arm-tools                                [#######################################] 100%
(5/5) installation de manjaro-tools-base                               [#######################################] 100%
Dépendances optionnelles pour manjaro-tools-base
    manjaro-tools-pkg: Manjaro Linux package tools
    manjaro-tools-iso: Manjaro Linux iso tools
    manjaro-tools-yaml: Manjaro Linux yaml tools
:: Exécution des crochets de post-transaction…
(1/2) Registering binary formats...
(2/2) Arming ConditionNeedsUpdate...
[nl-pc nls]# sudo nano /etc/pacman.conf
[nl-pc nls]# sudo nano /etc/pacman.conf
[nl-pc nls]# sudo pacman -Syy manjaro-arm-tools-git
:: Synchronisation des bases de données de paquets…
 core                                         152,5 KiB   397K/s 00:00 [#######################################] 100%
 extra                                       1851,9 KiB  1283K/s 00:01 [#######################################] 100%
 community                                      5,2 MiB  1065K/s 00:05 [#######################################] 100%
 multilib                                     184,2 KiB   305K/s 00:01 [#######################################] 100%
 manjaro-strit                                 28,3 KiB   659K/s 00:00 [#######################################] 100%
résolution des dépendances…
recherche des conflits entre paquets…
:: manjaro-arm-tools-git et manjaro-arm-tools sont en conflit. Supprimer manjaro-arm-tools ? [o/N] o

Paquets (2) manjaro-arm-tools-2.6.0-1 [suppression]  manjaro-arm-tools-git-2.6.1-1

Taille totale du téléchargement :  1,54 MiB
Taille totale installée :        6,50 MiB
Taille de mise à jour nette :    0,00 MiB

:: Procéder à l’installation ? [O/n] o
:: Récupération des paquets…
 manjaro-arm-tools-git-2.6.1-1-any           1578,6 KiB  1309K/s 00:01 [#######################################] 100%
(1/1) vérification des clés dans le trousseau                          [#######################################] 100%
(1/1) vérification de l’intégrité des paquets                          [#######################################] 100%
(1/1) chargement des fichiers des paquets                              [#######################################] 100%
(1/1) analyse des conflits entre fichiers                              [#######################################] 100%
(2/2) vérification de l’espace disque disponible                       [#######################################] 100%
:: Traitement des changements du paquet…
(1/1) désinstallation de manjaro-arm-tools                             [#######################################] 100%
(1/1) installation de manjaro-arm-tools-git                            [#######################################] 100%
:: Exécution des crochets de post-transaction…
(1/1) Arming ConditionNeedsUpdate...
[nl-pc nls]# sudo buildarmoem -d oc2 -e kde -v 20.06 -n        
date: opérande supplémentaire « %y.%m »
Saisissez « date --help » pour plus d'informations.
date: opérande supplémentaire « %y.%m »
Saisissez « date --help » pour plus d'informations.
Clonage dans 'arm-profiles'...
remote: Enumerating objects: 190, done.
remote: Counting objects: 100% (190/190), done.
remote: Compressing objects: 100% (136/136), done.
remote: Total 13573 (delta 50), reused 177 (delta 39)
Réception d'objets: 100% (13573/13573), 24.46 MiB | 1.23 MiB/s, fait.
Résolution des deltas: 100% (1259/1259), fait.
==> Creating OEM image of kde for oc2...
  -> Downloading latest aarch64 rootfs...
Manjaro-ARM-aarch64-latest.ta 100%[==============================================>] 182,52M   781KB/s    ds 5m 9s   
  -> Extracting aarch64 rootfs...
  -> Setting up keyrings...
==> Installing packages for kde edition on oc2...
:: Synchronizing package databases...
 core                                         206.6 KiB   337K/s 00:01 [#######################################] 100%
 extra                                          2.4 MiB  1087K/s 00:02 [#######################################] 100%
 community                                      5.0 MiB  1251K/s 00:04 [#######################################] 100%
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Package (2)               Old Version  New Version  Net Change  Download Size

core/manjaro-arm-keyring  20180523-2   20190619-1     0.00 MiB       0.01 MiB
core/manjaro-keyring      20190512-1   20190608-1     0.00 MiB       0.12 MiB

Total Download Size:   0.14 MiB
Total Installed Size:  0.21 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 manjaro-keyring-20190608-1-any               127.6 KiB  1160K/s 00:00 [#######################################] 100%
 manjaro-arm-keyring-20190619-1-any            15.3 KiB  2.13M/s 00:00 [#######################################] 100%
(2/2) checking keys in keyring                                         [#######################################] 100%
(2/2) checking package integrity                                       [#######################################] 100%
error: manjaro-arm-keyring: signature from "Dan Johansen (Manjaro) <strit@manjaro.org>" is invalid
:: File /var/cache/pacman/pkg/manjaro-arm-keyring-20190619-1-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

The build of an oem image for a c2, in the end of the install something go wrong, see below the end of the install, signature from "Dan Johansen (Manjaro) strit@manjaro.org" is invalid

[nl-pc nls]# sudo buildarmoem -d oc2 -e kde -v 20.06 -n        
date: opérande supplémentaire « %y.%m »
Saisissez « date --help » pour plus d'informations.
date: opérande supplémentaire « %y.%m »
Saisissez « date --help » pour plus d'informations.
Clonage dans 'arm-profiles'...
remote: Enumerating objects: 190, done.
remote: Counting objects: 100% (190/190), done.
remote: Compressing objects: 100% (136/136), done.
remote: Total 13573 (delta 50), reused 177 (delta 39)
Réception d'objets: 100% (13573/13573), 24.46 MiB | 1.23 MiB/s, fait.
Résolution des deltas: 100% (1259/1259), fait.
==> Creating OEM image of kde for oc2...
  -> Downloading latest aarch64 rootfs...
Manjaro-ARM-aarch64-latest.ta 100%[==============================================>] 182,52M   781KB/s    ds 5m 9s   
  -> Extracting aarch64 rootfs...
  -> Setting up keyrings...
==> Installing packages for kde edition on oc2...
:: Synchronizing package databases...
 core                                         206.6 KiB   337K/s 00:01 [#######################################] 100%
 extra                                          2.4 MiB  1087K/s 00:02 [#######################################] 100%
 community                                      5.0 MiB  1251K/s 00:04 [#######################################] 100%
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Package (2)               Old Version  New Version  Net Change  Download Size

core/manjaro-arm-keyring  20180523-2   20190619-1     0.00 MiB       0.01 MiB
core/manjaro-keyring      20190512-1   20190608-1     0.00 MiB       0.12 MiB

Total Download Size:   0.14 MiB
Total Installed Size:  0.21 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 manjaro-keyring-20190608-1-any               127.6 KiB  1160K/s 00:00 [#######################################] 100%
 manjaro-arm-keyring-20190619-1-any            15.3 KiB  2.13M/s 00:00 [#######################################] 100%
(2/2) checking keys in keyring                                         [#######################################] 100%
(2/2) checking package integrity                                       [#######################################] 100%
error: manjaro-arm-keyring: signature from "Dan Johansen (Manjaro) <strit@manjaro.org>" is invalid
:: File /var/cache/pacman/pkg/manjaro-arm-keyring-20190619-1-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

the end install of the oem image for a c2

 manjaro-arm-oem-install-20190606-1-any         4.3 KiB  0.00B/s 00:00 [#######################################] 100%
(611/611) checking keys in keyring                                     [#######################################] 100%
(611/611) checking package integrity                                   [#######################################] 100%
error: manjaro-arm-keyring: signature from "Dan Johansen (Manjaro) <strit@manjaro.org>" is invalid
:: File /var/cache/pacman/pkg/manjaro-arm-keyring-20190619-1-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
  -> Enabling services...
  -> Applying overlay for kde edition...
  -> Setting up system settings...
Enabling autologin for OEM setup...
Correcting permissions from overlay...
chown: impossible d'accéder à '/var/lib/manjaro-arm-tools/img/rootfs_aarch64/etc/polkit-1/rules.d': Aucun fichier ou dossier de ce type
  -> Doing device specific setups for oc2...
  -> Cleaning rootfs for unwanted files...
==> oc2 kde rootfs complete
==> Finishing image for oc2 kde edition...
  -> Copying files to image...
  -> Compressing Manjaro-ARM-kde-oc2-20.06.img...
Manjaro-ARM-kde-oc2-20.06.img (1/1)
  100 %       120,7 MiB / 922,0 MiB = 0,131    12 MiB/s       1:14             
  -> Removing rootfs_aarch64
==> Time : 24.92 minutes...

My pacman.conf

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg      = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst    = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#TotalDownload
# We cannot check disk space from within a chroot environment
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

[manjaro-strit]
SigLevel = Never
Server = https://www.strits.dk/files/manjaro-strit/manjaro-strit-repo/$arch

Can you please give more details with the command ?

-i <package>       Install local package into image rootfs.

Thanks for reporting the keyring issue. I will look into it when I have some time, although I have no idea why it does that.

That option makes it possible to install a package into the rootfs, that is not in the repo, but built on your locale machine instead. It's useful when testing out new stuff that might not work, so should not be in the repo.

Please check if the key has an end date. Matti had a similar problem.

Does the file need to be in a certain place or use -i path/to/test-package. I have no clue how qemu enviorment works.

It needs to be in the same place that the command is run.
So if you run the command in your /home/user, the package should be placed there and the command should be: sudo buildarmoem -d rpi3 -e minimal -i package.pkg.tar.xz

Just fixed the keyring issue. Sorry about that.
manjaro-arm-keyring-20190621-3 is a fixed version.

1 Like

I built an oem rpi3 lxqt image today and it is not resizing the root file system. The only thing I am seeing in dmesg is this and do not know if it is related or not:

[ray@manjaro ~]$ dmesg | grep Failed
[   12.210757] systemd[1]: Failed to bump fs.file-max, ignoring: Invalid argument

I installed manjaro-arm-tools-git a few days ago so I uninstalled and reinstalled it then did a sudo getarmprofiles -f and it still is not resizing the root filesystem after going through the setup and rebooting.

that doesnt seem related to me. The resize should be done on first boot, before the OEM setup windows pops up.

Can you paste the entire dmesg if you have it? I doubt the information would be there but it may be hidden among others.

This can also happen if the device is prematurely rebooted during the first boot process. If that script doesn't finish or doesn't even start, there is a good chance that it might not finish again. This brings up an improvement we can make to check file system sizes and compare them to partition or device sizes in order to have the script run again.

EDIT: we found the problem. One of the system level utilities had a syntax change so we will need to alter the script. We will do this soon and push an update. Thanks for letting us know!

1 Like

That fixed it.

Thanks!

I guess I spoke too soon. The first image resized then I made another image and it did not resize.

The resize stuff now happens at the end of the OEM setup instead.
Remember to update your manjaro-arm-tools-git install. It's the only place that has the fix right now.

Hi,

Saturday, same issue as Darksky with the oem image I created for the c2 and n2.

Sunday the issue is solved, the root partition is ok, nice to create your own manjaro :slight_smile:

Enjoy!

I had no luck today again with the pi3 lxqt. I saw it saying resizing after the end of the setup but after reboot the changes never took place.

I installed all programs from scratch today.

Hm.

I made a new image for the Rock PI 4 today, and it worked fine.

We might have to see what we have to do to get proper partition probing.
Since that could be reason the rpi3 one fails. It has 2 partitions.

I was looking over a file I always provide with my images for people that I put on the desktop. I gave them 2 choices to resize. Gparted after burning or boot up the pi and go through the steps in the text file.

It seems that it is first using the drive as a whole and not partitions. (mmcblk0 not mmcblk0p2):

fdisk /dev/mmcblk0

After reboot it does use mmcblk0p2 for the resize:

resize2fs /dev/mmcblk0p2


Resizing SD card via command line on first boot

# Open up a terminal window:

su                 # Become root
password: root

fdisk /dev/mmcblk0

# Delete the second partition /dev/mmcblk0p2

Type d and press enter key           # Delete a partition
Type 2 and press enter key           # Choose partition 2 to delete

# Create a new primary partition and use default sizes prompted. This will then create a par$

Type n and press enter key           # Create a new partition
Type p and press enter key           # Choose primary for new partition type
Type 2 and press enter key           # Choose partition 2 for new partition
enter        # Accept First default sector
enter        # Accept Last default sector
Type n       # Do not remove the existing ext4 signature?

# Save and exit fdisk:

Type w and press enter key           # Writes/saves new configuration & exits fdisk
reboot                               # type reboot and hit the enter key

Once rebooted:

# DO NOT FORGET TO DO THIS:

# Open up a terminal window:

# Become root and finish resizing the root partition to fill out your sdcard

su               # Become root
password: root
resize2fs /dev/mmcblk0p2

That script requires user input.
The idea is to have it all done automatically.

Hi,

In order to create a future oem image is it possible to modify and add a kde software by adding it name into the list found here ?
/usr/share/manjaro-arm-tools/profiles/arm-profiles/editions/

KDE applications

dolphin
dolphin-plugins
kate
konsole
ark
okular
gwenview
spectacle
partitionmanager ?
krdc ?
...

Or add a media software here ?

Sound, Video and bluetooth

alsa-utils
smplayer
vlc ?
audacity ?
...

thanks for your help.

Yes you can and I use audacity a lot. Great program.

Make sure the program names are spelled correctly.