Added some doxygen documentation for parts of the kernel functions.
[planlOS.git] / build / makefloppy.sh
blob7054638579c64b2784cd527c74a34fc794c65f21
1 #!/bin/bash
3 dd if=/dev/zero of=build/floppy.img bs=1024 count=1440
4 # Create mtools config file
5 cat << EOF > build/mtools.conf
6 drive i:
7 file="build/floppy.img" cylinders=80 heads=2 sectors=18 filter
8 EOF
9 export MTOOLSRC=build/mtools.conf
10 # Format disk
11 mformat i:
12 # Copy menu.lst
13 mmd -D s i:/boot
14 mmd -D s i:/boot/grub
15 mcopy -D o build/menu.lst i:/boot/grub/menu.lst
16 # Copy grub
17 mcopy -D o /boot/grub/stage? i:/boot/grub/
18 # Install grub
19 grub --batch --no-floppy <<EOF
20 device (fd0) build/floppy.img
21 root (fd0)
22 setup (fd0)
23 EOF
25 # Copy files
26 mcopy -D o build/boot/* i:/boot/
27 mmd -D s i:/bin
28 mcopy -D o build/bin/* i:/bin/
29 mmd -D s i:/lib
30 mcopy -D o build/lib/* i:/lib/
32 rm -f build/mtools.conf
34 echo ""