osdev4/build.sh

14 lines
334 B
Bash
Executable File

#!/bin/sh
if [ -z "${MACH}" ]; then
MACH=rpi3b
fi
LLVM_DIR=$(llvm-config --bindir)
ARCH=aarch64-unknown-none-${MACH}
set -e
cd kernel && cargo build --target ../etc/aarch64-unknown-none-$MACH.json --features=mach_$MACH,fdt-rs
cd ..
${LLVM_DIR}/llvm-objcopy -O binary target/${ARCH}/debug/kernel target/${ARCH}/debug/kernel.bin