Page 1 of 1

Arch Linux on Lindroid

Posted: Thu Oct 01, 2026 7:55 pm
by ungeskriptet
Enable aarch64-linux emulation using static QEMU binaries:

Code: Select all

boot.binfmt = {
  emulatedSystems = [ "aarch64-linux" ];
  preferStaticEmulators = true;
};
Initialize bootstrap chroot:

Code: Select all

nix-shell -p arch-install-scripts libarchive
mkdir -p bootstrap
curl -LO http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
sudo bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C bootstrap
sudo arch-chroot bootstrap
Inside the bootstrap chroot run the following:

Code: Select all

sed -i '/CheckSpace/d' /etc/pacman.conf 
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Sy --disable-sandbox arch-install-scripts
pacstrap -cK /mnt base base-devel
exit
On your host system run these commands:

Code: Select all

sudo cp -rlP bootstrap/mnt rootfs
sudo arch-chroot rootfs
For building inside the rootfs:

Code: Select all

pacman -Sy --disable-sandbox fakeroot base-devel
su -l alarm # makepkg disallows building with root
makepkg -si
Miscellaneous notes:

Mount disk image with partitions

Code: Select all

sudo kpartx -a <imgfile>
ls -l /dev/mapper