Skip to content

Latest commit

 

History

History
86 lines (67 loc) · 3 KB

BUILDING-ARM.md

File metadata and controls

86 lines (67 loc) · 3 KB

The following file is severely outdated and not officially supported as of now. Follow the project updates to be the first one to know when it gets implemeneted.

(Advanced) Configure a local repository / build the packages

The following instructions assume that you're building ARM packages on a x86_64 host.

You might want to take a look at building x86_64 packgages on x86_64, and building i686 packgages on x86_64.

Add the package repository to /etc/pacman.conf:

You can add my repository, or you could specify your own local repo that you will create in the next step. Read more on the wiki. You have to trust my GPG key on the host system prior to building the chroot if you decide to go with my server.

[lomiri]
SigLevel = Required
Server = https://lomiri.mynameisivan.ru/$repo/os/$arch

or

[lomiri]
SigLevel = Required
Server = file:///your/path/$repo/os/$arch

Assemble the build enviroment:

Don't forget to configure PACKAGER in /etc/makepkg.conf

_The following commands use aarch64 as an architecture. If you want to build packages for armv7, just replace aarch64 with armv7h, and use /usr/bin/qemu-arm-static as a QEMU interpreter.

_Install qemu-user-static from AUR. Follow the same steps as you would for i686, but use the values from the ArchLinuxArm project.. You will also need to edit /usr/bin/makechrootpkg to pass -s to every arch-nspawn call. Hack-ish, but it does the trick.

sudo pacman -S devtools
mkdir chroot-aarch64
sudo mkdir -p /var/cache/pacman-aarch64/pkg/
sudo mkarchroot -f /usr/bin/qemu-aarch64-static -C /etc/pacman.conf.aarch64 -M /etc/makepkg.conf.aarch64 -c /var/cache/pacman-aarch64/pkg/ ./chroot-aarch64/root base base-devel git
mkdir -p lomiri sources logs PKGBUILDs

Your Arch repository will settle in the lomiri folder.

Clone this repo's PKGBUILDs:

cd PKGBUILDs
git clone https://github.com/vanyasem/Lomiri-Arch.git ./
git submodule init
git submodule update
cd ..

Sync the databases:

sudo arch-chroot chroot-aarch64/root
pacman -Syyu
pacman -S python python2 python-setuptools python2-setuptools # Those are needed // TODO IVAN MAYBE MAKE METAPACKAGE WITH CI DEPS?
exit

Build Arch repository manager (guzuta):

Latest released guzuta is missing ARM support, so you will need to manually compile it from upstream git repository.

git clone https://github.com/eagletmt/guzuta.git
cd guzuta
cargo build
cargo install --force

Configure guzuta:

cat > .guzuta.yml
name: lomiri
package_key: YOUR_GPG_KEY
repo_key: YOUR_GPG_KEY
srcdest: sources
logdest: logs
pkgbuild: PKGBUILDs
builds:
  aarch64:
    chroot: ./chroot-aarch64

Build the packages:

Run rebuild-repo.sh from the PKGBUILDs directory. Make sure to configure sudo timeout for your build user, as it defaults to 5 minutes.