Собираем стартовый файл arm-eabi-as -o boot.o boot.s
Собираем main.c arm-eabi-gcc -nostdlib -nostartfiles -ffreestanding -std=c99 -c kernel_main.c -o kernel_main.o
Линкуем всё в kernel arm-eabi-ld -T linker.ld -o kernel boot.o kernel_main.o
Запускаем qemu-system-arm -m 128 -kernel kernel -serial stdio