summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-09-03 18:26:07 +0200
committerMichal Idziorek <m.i@gmx.at>2014-09-03 18:26:07 +0200
commit4a46c2e07a9b79af01bbc984f20e01b12e98129f (patch)
tree2496e43aa046c74493f0a5a10e9594920a3e7488
parentadccdaa096506319be60879767a5a973d012e758 (diff)
Improved assembling FoolOs.img
-rw-r--r--Makefile22
-rw-r--r--data/fill.asm4
-rw-r--r--data/floppy.imgbin1474560 -> 0 bytes
3 files changed, 11 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 306ea65..3fdad89 100644
--- a/Makefile
+++ b/Makefile
@@ -13,18 +13,15 @@
############ some constants ############
-#lets use the size of a 1.44 floppy for a start for our boot img
-IMAGE_SIZE=1474560 #floppy
+USB_STICK=/dev/sdf
#ap bin :
-MP_IMG_START=26112 #multiboot is initially at 0x6600
+MP_IMG_START=26112 #code for the other processors intialllly at 0x6600
#font data starts here:
FONT_DATA_START=26624 #fool font initially at 0x6800
-
-USB_STICK=/dev/sdf
-
+#here our kernel will be loaded by the bootloader.
KERNEL_START=0x10000
@@ -96,14 +93,13 @@ binfont.bin: data/binfont.src
# master boot record, kernel binary and fool-font
-FoolOS.img: mbr_kernel_mp.img binfont.img $(FILLUP)
- cat $^ | head -c $(IMAGE_SIZE) > $@
-
-mbr_kernel_mp.img: mbr_kernel.img $(MP_BIN) $(FILLUP)
- cat $^ | head -c $(FONT_DATA_START) > $@
+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
-mbr_kernel.img: $(MBR) kernel.bin $(FILLUP)
- cat $^ | head -c $(MP_IMG_START) > $@
binfont.img: binfont.bin
cat $^ > $@
diff --git a/data/fill.asm b/data/fill.asm
index d731efc..49be4d3 100644
--- a/data/fill.asm
+++ b/data/fill.asm
@@ -3,8 +3,8 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;
-; just some data to fill empty space to get a full image
+; fill an empty floppy disk
;
;
-times 2000000 db 0x69
+times 1474560 db 0x00
diff --git a/data/floppy.img b/data/floppy.img
deleted file mode 100644
index 6b4dc22..0000000
--- a/data/floppy.img
+++ /dev/null
Binary files differ