使用manjaro-arm-tools定制Manjaro ARM镜像
安装
1 |
|
下载配置文件
1 |
|
创建配置文件
1 |
|
随便复制一个然后修改就可以了。我创建的r3300m内容如下:
1 |
|
基本上就是vim2的精简,然后用主线内核替换了aml内核。自己的配置文件注意备份,每次执行 sudo getarmprofiles -f
都会从服务器重新同步配置并清除本地修改内容,切记切记。
生成镜像
1 |
|
生成镜像花费了48分钟,其中足足36分钟用在了压缩镜像上。受内存限制,xz只利用了一个处理器线程,拖慢了压缩速度。有条件还是用PC操作为宜。
镜像位于 /var/cache/manjaro-arm-tools/img/
:
1 |
|
镜像总共包含软件包205个,十分精简,这几天我抽空测试下能否正常启动。
manjaro-arm-tools使用方式作为附录全文转载,供参考:
Manjaro ARM Tools
Contains scripts and files needed to build and manage manjaro-arm packages and images.
This software is available in the Manjaro repository.
These tools only work on Manjaro based distributions!
Known issues
Check the Issues page.
Dependencies
These scripts rely on certain packages, other than what’s in the base
package group, to be able to function. These packages are:
- parted (arch repo)
- libarchive (arch repo)
- git (arch repo)
- qemu-user-static-binfmt (arch repo)
- dosfstools (arch repo)
- pacman (arch repo)
- polkit (arch repo)
- gnugpg (arch repo)
- wget (arch repo)
- zstd (arch repo) - unzstd used for early package verification and zstd image compression
- systemd-nspawn with support for
--resolv-conf=copy-host
(arch repo)
Optional Dependencies
- gzip (arch repo) (for
builddockerimg
) - docker (arch repo) (for
builddockkerimg
) - mktorrent (arch repo) (for torrent support in
deployarmimg
) - rsync (arch repo) (for
deployarmimg
) - bmap-tools (AUR or manjaro repo) (for BMAP support in
buildarmimg
) - btrfs-progs (arch repo) (for btrfs support in
buildarmimg
) - grub-efi-arm64 (AUR) (for generic-efi image support in
buildarmimg
)
Installation (Manjaro based distributions only)
From Manjaro repositories (both x64 and aarch64)
Simply run sudo pacman -S manjaro-arm-tools
.
From gitlab (tagged or GIT version)
- Download the
.zip
or.tar.gz
file from https://gitlab.manjaro.org/manjaro-arm/applications/manjaro-arm-tools. - Extract it.
- Copy the contents of
lib/
to/usr/share/manjaro-arm-tools/lib/
. - Copy the contents of
bin/
to/usr/bin/
. Remember to make them executable. - Create
/var/lib/manjaro-arm-tools/pkg
folder. - Create
/var/lib/manjaro-arm-tools/img
folder. - Create
/var/lib/manjaro-arm-tools/tmp
folder. - Create
/var/cache/manjaro-arm-tools/img
folder. - Create
/var/cache/manjaro-arm-tools/pkg
folder. - Install
binfmt-qemu-static
package and make suresystemd-binfmt
is running
Usage
buildarmpkg
This script is used to create packages for ARM architectures.
It assumes you have filled out the PACKAGER section of your /etc/makepkg.conf
.
Options inside [
]
are optional. Use -h
to see what the defaults are.
Syntax
1 |
|
To use one or more local packages, put them all in the desired directory, named packages
in the example below, before running the utility:
1 |
|
To build an aarch64 package against arm-unstable branch use the following command:
1 |
|
You can also build any
packages, which will use the aarch64 architecture to build from.
1 |
|
The built packages will be copied to $PKGDIR
as specified in /usr/share/manjaro-arm-tools/lib/manjaro-arm-tools.conf
and placed in a subdirectory for the respective architecture.
Default package destination is /var/cache/manjaro-arm-tools/pkg/
.
signarmpkgs
This script uses the GPG identity you have setup in your /etc/makepkg.conf to sign the packages in the current folder.
1 |
|
buildarmimg
For a list of supported devices and editions, please look at the Profiles repository linked below.
This script will compress the image file and place it in /var/cache/manjaro-arm-tools/img/
Profiles that gets used are from this Gitlab repository.
Syntax
1 |
|
To build a minimal image version 18.07 for the raspberry pi 3 on arm-unstable branch with bmap support:
1 |
|
To build a minimal version 18.08 RC1 for the odroid-c2 with a new rootfs downloaded:
1 |
|
To build an lxqt version with one or more local packages installed for the rock64:
1 |
|
To build an xfce version with one or more local packages installed for the rock64, put them all in the desired directory, named packages
in the example below, before running the utility:
1 |
|
To build a kde-plasma edition for the Pinebook Pro with btrfs filesystem:
1 |
|
To build a factory image for the Pinebook Pro, with BSP uboot:
1 |
|
A log is located at /var/log/manjaro-arm-tools/buildarmimg-$(date +%Y-%m-%d-%H:%M).log
buildemmcinstaller (depricated)
This script does almost the same as the buildarmimg
script.
Except that it always creates a minimal image, with an already existing image inside it, only to be used for internal storage (eMMC) deployments.
Syntax
1 |
|
So to build an eMMC installer image for KDE Plasma 19.04 on Pinebook:
1 |
|
Be aware that the device, edition and version, most already exist on the OSDN download page, else it won’t work.
buildrootfs
This script does exactly what it says it does. It builds a very small rootfs, to be used by the Manjaro ARM Installer and buildarmimg
. Right now only supports aarch64
.
Syntax
1 |
|
To build an aarch64 rootfs:
1 |
|
A log is located at /var/log/manjaro-arm-tools/buildrootfs-$(date +%Y-%m-%d-%H:%M).log
builddockerimg
This script is similar to buildrootfs
, except that it builds a rootfs ready for package building and turns it into a docker image, that can be uploaded to DockerHub.
Syntax
1 |
|
This uploads the docker file directly to the Manjaro ARM acccount on DockerHub.
A log is located at /var/log/manjaro-arm-tools/builddockerimg-$(date +%Y-%m-%d-%H:%M).log
deployarmimg (depricated)
This script will create checksums for and upload the newly generated image. It assumes you have upload access to our OSDN server.
If you don’t, you can’t use this.
Syntax
1 |
|
To upload an image to the raspberry pi minimal 18.07 folder use with torrent:
1 |
|
getarmprofiles
This script will just clone or update the current profile list in /usr/share/manjaro-arm-tools/profiles/
.
So nothing fancy.
This would enable users to clone the profiles repository, make any changes they would like to their images and then build them locally.
So if you made changes to the profiles yourself, don’t run getarmprofiles
and you will still have your edits.
But if you messed up your profiles somehow, you can start with the repo ones with:
1 |
|