mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-08 20:10:04 -04:00
Cleanup make files
This commit is contained in:
parent
3664d4f6a0
commit
68c26a741b
15
Makefile
15
Makefile
@ -1,20 +1,17 @@
|
||||
.PHONY: default clean force_look qemu bochs debug sectors
|
||||
.PHONY: default clean force_look qemu bochs debug
|
||||
|
||||
default: thor.flp
|
||||
|
||||
kernel/kernel.bin: force_look
|
||||
cd kernel; $(MAKE)
|
||||
|
||||
filler.bin: kernel/kernel.bin
|
||||
bash fill.bash
|
||||
bootloader/stage1.bin: force_look
|
||||
cd bootloader; $(MAKE) stage1.bin
|
||||
|
||||
sectors: force_look filler.bin
|
||||
cd bootloader; $(MAKE) sectors
|
||||
bootloader/stage2.bin: force_look
|
||||
cd bootloader; $(MAKE) stage2.bin
|
||||
|
||||
bootloader/bootloader.bin: force_look sectors
|
||||
cd bootloader; $(MAKE)
|
||||
|
||||
thor.flp: bootloader/bootloader.bin
|
||||
thor.flp: bootloader/stage1.bin bootloader/stage2.bin kernel/kernel.bin
|
||||
dd if=bootloader/stage1.bin of=hdd.img conv=notrunc
|
||||
dd if=bootloader/stage2.bin of=hdd.img seek=1 conv=notrunc
|
||||
sudo /sbin/losetup -o1048576 /dev/loop0 hdd.img
|
||||
|
@ -1,23 +1,14 @@
|
||||
default: bootloader.bin
|
||||
default: all
|
||||
|
||||
.PHONY: sectors clean
|
||||
|
||||
sectors:
|
||||
bash compute_sectors.bash
|
||||
.PHONY: all clean
|
||||
|
||||
stage1.bin: stage1.asm
|
||||
nasm -w+all -f bin -o stage1.bin stage1.asm
|
||||
|
||||
stage2.bin: stage2.asm sectors.asm
|
||||
stage2.bin: stage2.asm
|
||||
nasm -w+all -f bin -o stage2.bin stage2.asm
|
||||
|
||||
#padding.bin:
|
||||
# dd if=/dev/zero of=padding.bin bs=512 count=34
|
||||
|
||||
bootloader.bin: stage1.bin stage2.bin
|
||||
cat stage1.bin > bootloader.bin
|
||||
cat stage2.bin >> bootloader.bin
|
||||
# cat padding.bin >> bootloader.bin
|
||||
all: stage1.bin stage2.bin
|
||||
|
||||
clean:
|
||||
rm -f stage1.bin
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
size_1=`stat -c%s ../kernel/kernel.bin`
|
||||
size_2=`stat -c%s ../filler.bin`
|
||||
|
||||
total_size=$(( $size_1 + $size_2 ))
|
||||
sectors=$(( $total_size / 512 ))
|
||||
|
||||
echo "sectors equ $sectors" > sectors.asm
|
Loading…
x
Reference in New Issue
Block a user