# Arch Linux ARM for Odroid C4 This repository contains instructions and scripts for building a full Arch Linux ARM image for the Odroid C4 single board computer. ## Prerequisites On your Arch Linux host system, install the required QEMU packages: ```bash sudo pacman -S qemu-base qemu-user-static qemu-user-static-binfmt ``` ## Building the Kernel 1. Clone the Armbian build repository: ```bash git clone https://github.com/armbian/build cd build ``` 2. Run the kernel build: ```bash ./compile.sh \ BOARD=odroidc4 \ BRANCH=current \ KERNEL_ONLY=yes \ KERNEL_CONFIGURE=no \ RELEASE=jammy # Doesn't matter for kernel-only ``` ## Extracting Kernel from Built Image After the build completes, extract the kernel and related files: ```bash # Your built image IMAGE="output/images/Armbian_*.img" # Mount the image locally using loop device sudo losetup -P /dev/loop0 $IMAGE sudo mkdir -p /mnt/armbian sudo mount /dev/loop0p1 /mnt/armbian # Backup kernel and boot files to current directory sudo tar czf armbian-kernel.tar.gz -C /mnt/armbian \ boot/ \ lib/modules/ \ lib/firmware/ # Unmount sudo umount /mnt/armbian sudo losetup -d /dev/loop0 ``` ## Notes - The kernel build uses Armbian's build system to generate a compatible kernel for the Odroid C4 - The RELEASE parameter doesn't affect kernel-only builds - QEMU user-static emulation is required for cross-compilation on x86_64 hosts