Add makefile changes
This commit is contained in:
@@ -18,12 +18,16 @@ rust_loader.o: rust_loader.s
|
|||||||
#rust_kernel.o: rust_kernel.rs
|
#rust_kernel.o: rust_kernel.rs
|
||||||
# rustc --target ./arm-none-eabihf.json --emit=obj -Cpanic=abort -C lto rust_kernel.rs
|
# rustc --target ./arm-none-eabihf.json --emit=obj -Cpanic=abort -C lto rust_kernel.rs
|
||||||
|
|
||||||
xargo_step: src/lib.rs
|
rust_kernel.o: src/lib.rs
|
||||||
~/.cargo/bin/xargo build
|
~/.cargo/bin/xargo build
|
||||||
|
|
||||||
kernel.elf: rust_kernel.o rust_loader.o
|
kernel.elf: rust_kernel.o rust_loader.o
|
||||||
arm-none-eabi-gcc -T rust_linker_script.ld -o kernel.elf -ffreestanding -nostdlib rust_loader.o target/arm-none-eabihf/debug/libraspi_xargo.rlib
|
arm-none-eabi-gcc -T rust_linker_script.ld -o rust_kernel.elf -ffreestanding -nostdlib rust_loader.o target/arm-none-eabihf/debug/libraspi_xargo.rlib
|
||||||
|
|
||||||
|
kernel: kernel.elf
|
||||||
|
arm-none-eabi-objcopy rust_kernel.elf -O binary kernel.img
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
rm -f *.elf
|
rm -f *.elf
|
||||||
|
|||||||
Reference in New Issue
Block a user