blob: 2c9d11cec653b71a0d5f3c1686a62e9a31f7dd7b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
floppy: out bootloader files
mkfs.fat -C -f 1 -F 12 -n "PORTLAND OS" -R 4 -S 512 out/floppy.img 1440
mkdir out/floppy_mount
mount out/floppy.img out/floppy_mount
cp out/fs/* out/floppy_mount/
umount out/floppy_mount
dd if=obj/bootloader.bin of=out/floppy.img bs=1 seek=62 conv=notrunc
bootloader: obj
nasm src/bootloader.bin -o obj/bootloader.bin
kernel: obj out
gcc -c src/kernel/main.c -o obj/kmain.o -ffreestanding
gcc -c src/kernel/vga.c -o obj/kvga.o -ffreestanding
ld obj/kmain.o obj/kvga.o -o out/kernel.out -nostdlib --oformat=i386-aout
files: kernel
mkdir out/fs
cp out/kernel.out out/fs/kernel.sys
obj:
mkdir -p obj
out:
mkdir -p out
|