Skip to content

Commit

Permalink
add SvarDOS package, show git revision and version on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
boeckmann committed Jul 30, 2024
1 parent d98e259 commit f37baa5
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 38 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ jobs:
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- name: Build dual-file binaries
- name: Make build tools
run: |
cd ltools/unix
make
cd ../..
wmake -h
- name: Build dual-file binaries
run: |
./build.sh
- name: Generate dual-file floppy image
run: |
cd image
Expand All @@ -32,8 +34,7 @@ jobs:
image/edrdos.img
- name: Build single-file binaries
run: |
wmake -h clean
wmake -h SINGLEFILE=1
./build.sh singlefile
- name: Generate single-file floppy image
run: |
cd image
Expand All @@ -51,4 +52,15 @@ jobs:
name: EDR-DOS 1.44M image (KERNEL.SYS flavor)
path: |
image/edrdos.img
- name: Generate SvarDOS package
run: |
./mkpkg.sh
- name: Upload SvarDOS package
uses: actions/upload-artifact@v4
with:
name: SvarDOS package
path: |
kernel.svp
42 changes: 39 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ all: bin/kernel.sys $(FILES) .SYMBOLIC
all: bin/drbio.sys bin/drdos.sys $(FILES) .SYMBOLIC
!endif

WMAKE_FLAGS += VERSION=$(VERSION) GIT_REV=$(GIT_REV)

image: all .SYMBOLIC
cd image
sh mkimage.sh
sh mkimage.sh singlefile
cd ..

bin/kernel.sys: drbio/bin/drbio.bin drdos/bin/drdos.bin
Expand All @@ -55,7 +56,7 @@ bin/license/license.htm: bin/license license.htm

drbio/bin/drbio.sys: .ALWAYS .RECHECK
cd drbio
$(WMAKE) $(WMAKE_FLAGS)
$(WMAKE) $(WMAKE_FLAGS) $(BIO_FLAGS)
cd ..

drdos/bin/drdos.sys: .ALWAYS .RECHECK
Expand All @@ -70,7 +71,7 @@ drdos/bin/country.sys: .ALWAYS .RECHECK

drbio/bin/drbio.bin: .ALWAYS .RECHECK
cd drbio
$(WMAKE) $(WMAKE_FLAGS) bin/drbio.bin
$(WMAKE) $(WMAKE_FLAGS) $(BIO_FLAGS) bin/drbio.bin
cd ..

drdos/bin/drdos.bin: .ALWAYS .RECHECK
Expand All @@ -83,6 +84,40 @@ command/bin/command.com: .ALWAYS .RECHECK
$(WMAKE)
cd ..

# SvarDOS .svp package
kernel.svp: pkg/kernel.sys pkg/bin/country.sys pkg/doc/license.html pkg/appinfo/kernledr.lsm
cd pkg
zip -rX9 ..$(SEP)$@ *
cd ..

pkg/kernel.sys: pkg bin/kernel.sys
$(CP) $]@ $@

pkg:
mkdir $@

pkg/bin: pkg
mkdir $@

pkg/bin/country.sys: pkg/bin bin/country.sys
$(CP) $]@ $@

pkg/appinfo: pkg
mkdir $@

pkg/appinfo/kernledr.lsm: pkg/appinfo .ALWAYS
%create $@ version: $(VERSION)
%append $@ description: Enhanced DR-DOS kernel
%append $@ warn: EDR kernel installed. Please reboot to activate it.

pkg/doc:
mkdir $@

pkg/doc/license.html: pkg/doc license.htm
$(CP) $]@ $@



clean: .SYMBOLIC
@cd drbio
@$(WMAKE) clean
Expand All @@ -105,4 +140,5 @@ clean: .SYMBOLIC
@rm -f bin/COMMAND.COM
@rm -f bin/license/license.htm
@rm -f image/edrdos.img
@rm -f kernel.svp

7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

if [ $1 = "singlefile" ]; then
FLAGS="SINGLEFILE=1"
fi

wmake -h clean all $FLAGS GIT_REV=$(git rev-parse --short HEAD)
2 changes: 2 additions & 0 deletions command/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
CFLAGS = -q -os -s -dFINAL -dPASSWORD -dWATCOMC -i=.
WASM_FLAGS = -q -c -Zm -Zg -DWATCOMC -DPASCAL -DFINAL -I./

WASM_FLAGS += -DGIT_REV=$(GIT_REV) -DVERSION=$(VERSION)

asm_objs = bin/message.obj bin/cstart.obj bin/csup.obj bin/dosif.obj
asm_objs += bin/crit.obj bin/resident.obj bin/txhelp.obj bin/helpstub.obj

Expand Down
4 changes: 3 additions & 1 deletion command/message.asm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include version.inc

NUL equ 0
BS equ 8
TAB equ 9
Expand All @@ -18,7 +20,7 @@ _msg_ver111 db NUL , NUL
public msg_version
msg_version label byte
_msg_version db LF
include version.inc
db longsysname
db LF, NUL
public _msg_lbl
public msg_lbl
Expand Down
2 changes: 1 addition & 1 deletion drbio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WASM_FLAGS += -DCOMPRESSED=0
WASM_FLAGS += -DCOMPRESSED=1
!endif

WASM_FLAGS += -DSVARDOS
WASM_FLAGS += -DGIT_REV=$(GIT_REV) -DVERSION=$(VERSION)

objs = bin/initmsgs.obj bin/biosmsgs.obj bin/init.obj bin/clock.obj
objs += bin/console.obj bin/disk.obj bin/serpar.obj bin/biosgrps.obj
Expand Down
31 changes: 10 additions & 21 deletions drbio/biosmsgs.asm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include version.inc

NUL equ 0
BS equ 8
TAB equ 9
Expand All @@ -23,30 +25,17 @@ _disk_msgB db ": and", CR, LF, " strike any key when ready", CR, LF, LF, NUL
public div_by_zero_msg
div_by_zero_msg label byte
_div_by_zero_msg db CR, LF, "Divide Error", CR, LF, NUL
public _drdosprojects_msg
public drdosprojects_msg

drdosprojects_msg label byte
ifdef LDOS
_drdosprojects_msg db CR, LF
db "lDOS Enhanced DR-DOS kernel fork https://hg.pushbx.org/ecm/edrdos"
db CR, LF, NUL
;lDOS Enhanced DR-DOS kernel fork https://hg.pushbx.org/ecm/edrdos
;Enhanced DR-DOS continuation https://github.com/svardos/edrdos
;The DR-DOS/OpenDOS Enhancement Project http://www.drdosprojects.de
;12345678901234567890123456789012345678901234567890123456789012345678901234567890
elseifdef SVARDOS
_drdosprojects_msg db CR, LF, "Enhanced DR-DOS continuation https://github.com/svardos/edrdos", CR, LF, NUL
else
_drdosprojects_msg db CR, LF, "The DR-DOS/OpenDOS Enhancement Project http://www.drdosprojects.de", CR, LF, NUL
endif

public kernel_msg
kernel_msg label byte
db KERNELMSG
db COPYRIGHT
db NUL

public _starting_dos_msg
public starting_dos_msg
starting_dos_msg label byte
_starting_dos_msg db CR, LF, "Starting "
shortversion equ 1
include version.inc
db CR, LF, NUL
_starting_dos_msg db CR, LF, "Starting ", sysname, "...", CR, LF, NUL
public _lba_supp_msg
public lba_supp_msg
lba_supp_msg label byte
Expand Down
3 changes: 1 addition & 2 deletions drbio/biosmsgs.def
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
extrn disk_msgB : byte
extrn _div_by_zero_msg : byte
extrn div_by_zero_msg : byte
extrn _drdosprojects_msg : byte
extrn drdosprojects_msg : byte
extrn kernel_msg : byte
extrn _starting_dos_msg : byte
extrn starting_dos_msg : byte
extrn _lba_supp_msg : byte
Expand Down
2 changes: 1 addition & 1 deletion drbio/init.asm
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ debugger_detected:

Assume DS:CGROUP, ES:CGROUP

mov si,offset drdosprojects_msg
mov si,offset kernel_msg
call output_msg
mov si,offset starting_dos_msg
call output_msg
Expand Down
2 changes: 2 additions & 0 deletions drdos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ COMPBDOS_FLAGS=

WASM_FLAGS += -DDELWATCH -DJOIN -DKANJI -DPASSWORD -DUNDELETE

WASM_FLAGS += -DGIT_REV=$(GIT_REV) -DVERSION=$(VERSION)

objs = bin/buffers.obj bin/dirs.obj bin/fdos.obj bin/fcbs.obj bin/bdevio.obj
objs += bin/cdevio.obj bin/fioctl.obj bin/redir.obj bin/header.obj
objs += bin/pcmif.obj bin/cio.obj bin/disk.obj bin/ioctl.obj bin/misc.obj
Expand Down
3 changes: 2 additions & 1 deletion drdos/fdos.asm
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ ASSUME DS:PCMDATA
include driver.equ
include f52data.def ; DRDOS Structures
include bdos.equ
include version.inc
.list

FD_EXPAND equ 55h
Expand Down Expand Up @@ -441,7 +442,7 @@ include utils.fdo

BDOS_DATA segment public word 'DATA'
shortversion equ 1
include version.inc
db longsysname
db ' Patches to original OpenDOS source code '
db 'Copyright (c) 2002-2011 Udo Kuhnt'
db 0
Expand Down
3 changes: 2 additions & 1 deletion drdos/misc.asm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ VALID_SIG equ 0EDC1h
include doshndl.def
include redir.equ
include fdos.equ
include version.inc
.list

NLSFUNC equ TRUE
Expand Down Expand Up @@ -445,7 +446,7 @@ func33:
cmp al, 0FFh ; is it function 33FFh ?
jne f33_XX ; no, jump -->
call f33_FF ; yes
include version.inc
db longsysname
db 0

f33_FF: pop reg_AX[bp] ; dx:ax - hidden DOS string
Expand Down
4 changes: 4 additions & 0 deletions mkpkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!#/bin/sh

wmake -h clean kernel.svp SINGLEFILE=1 VERSION=$(date +%Y%m%d) GIT_REV=$(git rev-parse --short HEAD)

23 changes: 20 additions & 3 deletions version.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
ifidn VERSION, <>
VERSION textequ <?>
endif

SYSNAME textequ <"SvarDOS">
LONGSYSNAME textequ <"SvarDOS Enhanced DR-DOS based on Caldera OpenDOS 7.01">

BUILDDATE catstr <">, @date, < >, @time , <">

db 'Enhanced DR-DOS 7.01.09 (2024-07-20)'
ifdef shortversion
ifidn GIT_REV, <>
COMMIT textequ <"?">
else
db ' based on Caldera OpenDOS 7.01'
COMMIT catstr <">, GIT_REV, <">
endif

VERSIONSTR catstr <">, VERSION, <">

KERNELNAME textequ <"SvarDOS Enhanced DR-DOS Kernel">
KERNELMSG textequ <13, 10, 13, 10, KERNELNAME, " https://github.com/SvarDOS/edrdos", 13, 10, \
"ver ", VERSIONSTR, " / rev ", COMMIT, " / built ", BUILDDATE , 13, 10>

COPYRIGHT textequ <"based on Caldera OpenDOS 7.01 sources, patches (c)opyright 2002-2011 Udo Kuhnt", 13, 10, \
"distributed and used under license agreement by DRDOS, Inc. on 2022-07-07", 13, 10>

0 comments on commit f37baa5

Please sign in to comment.