Build a minimal romdisk image

This commit is contained in:
Ry 2023-03-04 23:35:04 -08:00
parent f99c3d63c1
commit 31b19537c8
2 changed files with 19 additions and 1 deletions

2
.gitignore vendored
View File

@ -8,4 +8,6 @@
**/icons.inc
**/fox32os.img
**/fox32os.img.tmp
**/romdisk.img
**/romdisk.img.tmp
**/startup.cfg

View File

@ -3,9 +3,10 @@ FOX32ASM := ../fox32asm/target/release/fox32asm
GFX2INC := ../tools/gfx2inc/target/release/gfx2inc
IMAGE_SIZE := 16777216
ROM_IMAGE_SIZE := 65536
BOOTLOADER := bootloader/bootloader.bin
all: fox32os.img
all: fox32os.img romdisk.img
base_image:
mkdir -p base_image
@ -62,7 +63,22 @@ FILES = \
base_image/bg.raw \
base_image/launcher.fxf
ROM_FILES = \
base_image/startup.cfg \
base_image/kernel.fxf \
base_image/sh.fxf \
base_image/barclock.fxf \
base_image/terminal.fxf \
base_image/serial.fxf \
base_image/bg.fxf \
base_image/launcher.fxf
fox32os.img: $(BOOTLOADER) $(FILES)
$(RYFS) -s $(IMAGE_SIZE) -l fox32os -b $(BOOTLOADER) create $@.tmp
for file in $(FILES); do $(RYFS) add $@.tmp $$file; done
mv $@.tmp $@
romdisk.img: $(BOOTLOADER) $(ROM_FILES)
$(RYFS) -s $(ROM_IMAGE_SIZE) -l romdisk -b $(BOOTLOADER) create $@.tmp
for file in $(ROM_FILES); do $(RYFS) add $@.tmp $$file; done
mv $@.tmp $@