summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-09-04 11:13:43 +0200
committerMichal Idziorek <m.i@gmx.at>2014-09-04 11:13:43 +0200
commit706d8edc5abf15960ff8bebf9a2a6dc76b23eeac (patch)
tree9211bd0d4c336f5cee954d3f43df3853d2b310dc /Makefile
parent5a1d77e158bee2f81623a8ebce7a154a9d8eed99 (diff)
using raimage instead of floppy
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 6 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 9afd77a..928a9fb 100644
--- a/Makefile
+++ b/Makefile
@@ -13,18 +13,15 @@
############ some constants ############
-USB_STICK=/dev/sdf #take care!
+USB_STICK=/dev/sdg #take care!
MP_IMG_START=26112 #code for the other processors intialllly at 0x6600
FONT_DATA_START=26624 #fool font initially at 0x6800
-DATA_START=32768 #0x8000 here we put some "files" later a fs.
-
#here our kernel will be loaded by the bootloader.
KERNEL_START=0x10000
-
############ flags ############
CFLAGS=-ffreestanding -std=gnu99 -m32 -fno-asynchronous-unwind-tables -O0
@@ -64,7 +61,7 @@ FILLUP=./data/fill.bin
############ final image (default target) ############
-all: FoolOS.img
+all: FoolOS.img FoolData.img
############ nasm assembling rules ############
@@ -93,27 +90,24 @@ binfont.bin: data/binfont.src
# master boot record, kernel binary and fool-font
-FoolOS.img: $(MBR) kernel.bin $(MP_BIN) binfont.img $(FILLUP) data.img
+FoolOS.img: $(MBR) kernel.bin $(MP_BIN) binfont.img $(FILLUP)
cp $(FILLUP) $@
dd if=$(MBR) of=$@ bs=1 seek=0 conv=notrunc
dd if=kernel.bin of=$@ bs=1 seek=512 conv=notrunc
dd if=$(MP_BIN) of=$@ bs=1 seek=$(MP_IMG_START) conv=notrunc
dd if=binfont.img of=$@ bs=1 seek=$(FONT_DATA_START) conv=notrunc
- dd if=data.img of=$@ bs=1 seek=$(DATA_START) conv=notrunc
-
-data.img: data/testdata
- cp $^ $@
-
binfont.img: binfont.bin
cat $^ > $@
+FoolData.img: data/testdata
+ cp $^ $@
############ vm stuff ############
# run in our local bochs (we need cirrus support for our vesa mode)
-run: FoolOS.img
+run: all
~/opt/bochs-2.6.6/bochs -q -rc bochsdebug
@@ -127,12 +121,3 @@ stick: FoolOS.img
cat FoolOS.img > $(USB_STICK) && sync
xxd $(USB_STICK) | head -n 50
-
-
-##### floppy operations #######
-floppy_losetup_on:
- sudo losetup /dev/loop0 data/floppy.img
-floppy_losetup_off:
- sudo losetup -d /dev/loop0
-floppy_init:
- sudo dd if=/dev/zero of=data/floppy.img count=2880 bs=512