I'd like to write an OS targeting the ARMv8 (64-bit), but I haven't found any sort of Bare Bones like there is for the
ARMv6. QEMU contains a
qemu-system-aarch64 which should be able to run one, but compiling the Raspberry Pi Tutorial for aarch64 didn't seem to work (QEMU exits w/o anything, which from past experience usually signifies something went wrong).
Here are the commands I used for compiling the
boot.S and
kernel.c files from the tutorial.
Code: Select all
arm-none-eabi-gcc -march=armv8-a -fpic -ffreestanding -c boot.S
arm-none-eabi-gcc -march=armv8-a -fpic -ffreestanding -std=gnu99 -O2 -Wall -Wextra -c kernel.c
arm-none-eabi-gcc -T link.ld -o os.elf -ffreestanding -O2 -nostdlib boot.o kernel.o
arm-none-eabi-objcopy os.elf -O binary os.bin
This gave me a bin which I called qemu with:
Code: Select all
qemu-system-aarch64 -kernel os.bin
And bam, nothing happened! I know that the GPIO offset is probably wrong (as it changed from ARMv6 to ARMv7), but I couldn't find the address for ARMv8 anywhere.