Arch Linux on Lindroid
Posted: Thu Oct 01, 2026 7:55 pm
Enable aarch64-linux emulation using static QEMU binaries:
Initialize bootstrap chroot:
Inside the bootstrap chroot run the following:
On your host system run these commands:
For building inside the rootfs:
Miscellaneous notes:
Mount disk image with partitions
Code: Select all
boot.binfmt = {
emulatedSystems = [ "aarch64-linux" ];
preferStaticEmulators = true;
};
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
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
Code: Select all
sudo cp -rlP bootstrap/mnt rootfs
sudo arch-chroot rootfs
Code: Select all
pacman -Sy --disable-sandbox fakeroot base-devel
su -l alarm # makepkg disallows building with root
makepkg -si
Mount disk image with partitions
Code: Select all
sudo kpartx -a <imgfile>
ls -l /dev/mapper