Compare commits

...

4 Commits

Author SHA1 Message Date
828428e73b removed debug files (they were moved earlier)
All checks were successful
Daily Build and trunk tester / debian_update (push) Successful in 1m19s
2025-08-24 10:47:54 -04:00
402bf9974d moved map file output to build
moved output of builds to build/output
updated gitea action
2025-08-24 10:47:18 -04:00
5dfc3533d9 ignore everything in build output manually track .keep_dir files 2025-08-24 10:19:10 -04:00
d9225718c2 moving some documentation around and a bit of build cleanup 2025-08-24 10:18:01 -04:00
13 changed files with 26 additions and 21 deletions

View File

@@ -33,6 +33,8 @@ jobs:
with: with:
name: stevia-${{ github.run_number }} name: stevia-${{ github.run_number }}
path: | path: |
build/** build/output/artifacts.tar.gz
build/output/disk.img.gz
build/output/part.img.gz
if-no-files-found: error if-no-files-found: error
retention-days: 30 # override server default if you like retention-days: 30 # override server default if you like

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
out/*
build/* build/*
build/output/*
*.img *.img
*.img.gz *.img.gz
*.img.gz *.img.gz

View File

@@ -32,8 +32,8 @@ GIT_VERSION := $(shell git describe --tags)
GIT_HASH := $(shell git rev-parse HEAD) GIT_HASH := $(shell git rev-parse HEAD)
GIT_NASM_DEFINES := -D __GIT_VER__='"$(GIT_VERSION)"' -D __GIT_HASH__='"$(GIT_HASH)"' GIT_NASM_DEFINES := -D __GIT_VER__='"$(GIT_VERSION)"' -D __GIT_HASH__='"$(GIT_HASH)"'
iso := '/tmp/disk.img' iso := 'build/disk.img'
isoz := 'disk.img.gz' isoz := 'build/output/disk.img.gz'
qemu_args := -L ./bin/ -bios bios.bin -cpu pentium3 -m 128 -S -s -monitor stdio -nic none qemu_args := -L ./bin/ -bios bios.bin -cpu pentium3 -m 128 -S -s -monitor stdio -nic none
.PHONY: all mbr vbr stage2 boottest clean run run_bochs iso isoz .PHONY: all mbr vbr stage2 boottest clean run run_bochs iso isoz
@@ -45,10 +45,11 @@ stage2: $(stage2_binary_files)
boottest: $(boottest_binary_files) boottest: $(boottest_binary_files)
clean: clean:
@rm -rvf *.map @rm -v $(build_dir)/*.bin
@rm -rvf $(build_dir)/* @rm -v $(build_dir)/*.map
@rm -rvf $(iso) @rm -v $(build_dir)/*.img
@rm -rvf $(isoz) @rm -v $(build_dir)/output/*.img.gz
@rm -v $(build_dir)/output/*.tar.gz
run: $(iso) run: $(iso)
@sudo qemu-system-i386 $(qemu_args) -hda $(iso) @sudo qemu-system-i386 $(qemu_args) -hda $(iso)
@@ -79,7 +80,6 @@ build/%.bin: src/miniboot32/%.nasm
@nasm -i$(include) -Wall -f bin $(GIT_NASM_DEFINES) $< -o $@ @nasm -i$(include) -Wall -f bin $(GIT_NASM_DEFINES) $< -o $@
$(iso): $(mbr_binary_files) $(vbr_binary_files) $(stage2_binary_files) $(boottest_binary_files) $(iso): $(mbr_binary_files) $(vbr_binary_files) $(stage2_binary_files) $(boottest_binary_files)
@echo root access needed to create disk image...
@scripts/create-disk.sh @scripts/create-disk.sh
$(isoz): $(iso) $(isoz): $(iso)

0
build/.keep_dir Normal file
View File

0
build/output/.keep_dir Normal file
View File

View File

@@ -23,9 +23,13 @@ stage2_file=build/stage2.bin
boottest_file=build/BOOTi686.bin boottest_file=build/BOOTi686.bin
# Disk creation options # Disk creation options
disk_img=/tmp/disk.img disk_img=build/disk.img
disk_img_final=build/disk.img.gz disk_img_final=build/output/disk.img.gz
part_img=/tmp/part.img
part_img=build/part.img
part_img_final=build/output/part.img.gz
artifacts_archive=build/output/artifacts.tar.gz
# $disk_sector_size * $disk_size = total bytes, default is 256MiB # $disk_sector_size * $disk_size = total bytes, default is 256MiB
disk_sectors=(524288 * 2) disk_sectors=(524288 * 2)
@@ -140,16 +144,15 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
dd if="$stage2_file" of="$disk_img" bs=$disk_sector_size seek=1 conv=notrunc dd if="$stage2_file" of="$disk_img" bs=$disk_sector_size seek=1 conv=notrunc
echo "[7/7] Assembling final disk image" echo "[7/7] Assembling final disk image"
# place partition at it's place in the disk image # place partition at it's place in the disk image
dd if="$part_img" of="$disk_img" bs=$disk_sector_size seek=$part_start conv=notrunc dd if="$part_img" of="$disk_img" bs=$disk_sector_size seek=$part_start conv=notrunc
gzip -9c "$disk_img" > "$disk_img_final"
# requires util-linux from homebrew echo " *** Outputing disk images will be in ./build/output/* *** "
elif [[ "$OSTYPE" == "darwin"* ]]; then gzip -9c "$disk_img" > "$disk_img_final"
echo "[WIP]" gzip -9c "$part_img" > "$part_img_final"
tar caf "$artifacts_archive" build/*.bin build/*.map
else else
# Unknown. # Unknown.
echo "Unknown OS type! Supported build hosts systems are GNU/Linux (WSL) and macOS." echo "Unknown OS type! Supported build hosts systems are GNU/Linux (& WSL)"
exit 1 exit 1
fi fi

View File

@@ -18,7 +18,7 @@
[CPU KATMAI] [CPU KATMAI]
[WARNING -reloc-abs-byte] [WARNING -reloc-abs-byte]
[WARNING -reloc-abs-word] ; Yes, we use absolute addresses. surpress these warnings. [WARNING -reloc-abs-word] ; Yes, we use absolute addresses. surpress these warnings.
[map all mbr.map] [map all build/mbr.map]
%define __STEVIA_MBR %define __STEVIA_MBR
jmp short (init - $$) jmp short (init - $$)
nop nop

View File

@@ -16,7 +16,7 @@
[BITS 16] [BITS 16]
[ORG 0x0500] ; IF YOU CHANGE ORG CHANGE THE SIGN OFFSET AT THE END [ORG 0x0500] ; IF YOU CHANGE ORG CHANGE THE SIGN OFFSET AT THE END
[CPU KATMAI] [CPU KATMAI]
[map all stage2.map] [map all build/stage2.map]
[WARNING -reloc-abs-byte] [WARNING -reloc-abs-byte]
[WARNING -reloc-abs-word] [WARNING -reloc-abs-word]
[WARNING -reloc-abs-dword] ; Yes, we use absolute addresses. surpress these warnings. [WARNING -reloc-abs-dword] ; Yes, we use absolute addresses. surpress these warnings.

View File

@@ -17,7 +17,7 @@
[CPU KATMAI] [CPU KATMAI]
[WARNING -reloc-abs-byte] [WARNING -reloc-abs-byte]
[WARNING -reloc-abs-word] [WARNING -reloc-abs-word]
[map all vbr.map] ; Yes, we use absolute addresses. surpress these warnings. [map all build/vbr.map] ; Yes, we use absolute addresses. surpress these warnings.
%define __STEVIA_VBR %define __STEVIA_VBR
section .text section .text
__ENTRY: __ENTRY: