arch: arm64: parse cmdline from chosen node

The kernel command line is passed via the FDT's chosen node. Use that,
rather than hard-coding it into the kernel.

Fixes: #20
This commit is contained in:
Matthew Leach
2025-12-06 21:37:38 +00:00
committed by Matthew Leach
parent abd5ef39c2
commit 511a0db41e
3 changed files with 13 additions and 6 deletions

View File

@@ -8,4 +8,4 @@ bin="${elf%.elf}.bin"
# Convert to binary format
aarch64-none-elf-objcopy -O binary "$elf" "$bin"
qemu-system-aarch64 -M virt,gic-version=3 -initrd moss.img -cpu cortex-a72 -m 2G -smp 4 -nographic -s -kernel "$bin"
qemu-system-aarch64 -M virt,gic-version=3 -initrd moss.img -cpu cortex-a72 -m 2G -smp 4 -nographic -s -kernel "$bin" -append "--init=/bin/bash --rootfs=fat32fs --automount=/dev,devfs"