init
This commit is contained in:
commit
2190a5c04d
18 changed files with 745 additions and 0 deletions
24
justfile
Normal file
24
justfile
Normal file
|
@ -0,0 +1,24 @@
|
|||
all:
|
||||
mkdir temp
|
||||
nasm -f elf64 src/multiboot_header.asm -o temp/multiboot_header.asm.o
|
||||
nasm -f elf64 src/long_mode_init.asm -o temp/long_mode_init.asm.o
|
||||
nasm -f elf64 src/boot.asm -o temp/boot.asm.o
|
||||
cargo update --verbose
|
||||
cargo build
|
||||
ld -n -o temp/kernel.bin --gc-sections -T linker.ld temp/multiboot_header.asm.o temp/long_mode_init.asm.o temp/boot.asm.o target/x86_64-rustboot/debug/librustboot.a
|
||||
mkdir isofiles
|
||||
mkdir isofiles/boot
|
||||
mkdir isofiles/boot/grub
|
||||
cp temp/kernel.bin isofiles/boot/kernel.bin
|
||||
cp src/grub.cfg isofiles/boot/grub/grub.cfg
|
||||
rm -rf temp
|
||||
grub-mkrescue -o build/os.iso isofiles 2> /dev/null
|
||||
rm -rf isofiles
|
||||
|
||||
clean:
|
||||
rm -rf temp
|
||||
rm -rf isofiles
|
||||
rm -rf target
|
||||
|
||||
run:
|
||||
qemu-system-x86_64 -cdrom build/os.iso
|
Loading…
Add table
Add a link
Reference in a new issue