Merge pull request #137 from andrewbird/ci-dos
CI add Watcom and optionally Turbo C 2.01 builds
This commit is contained in:
commit
ea951d8136
6
.github/workflows/ci-build.yml
vendored
6
.github/workflows/ci-build.yml
vendored
@ -3,7 +3,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- ready_for_review
|
||||
- reopened
|
||||
- synchronize
|
||||
@ -23,10 +22,7 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Package install
|
||||
run: |
|
||||
sudo add-apt-repository ppa:tkchia/build-ia16
|
||||
sudo apt update
|
||||
sudo apt install gcc-ia16-elf libi86-ia16-elf nasm upx qemu-system-x86 mtools util-linux bash
|
||||
run: ./ci_prereq.sh
|
||||
|
||||
- name: build
|
||||
run: ./ci_build.sh
|
||||
|
@ -118,6 +118,13 @@ cd ..\kernel
|
||||
%MAKE% production
|
||||
if errorlevel 1 goto abort-cd
|
||||
|
||||
echo.
|
||||
echo Process COUNTRY +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
echo.
|
||||
cd ..\country
|
||||
%MAKE% DIRSEP=\ CP=copy production
|
||||
if errorlevel 1 goto abort-cd
|
||||
|
||||
echo.
|
||||
echo Process SETVER +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
echo.
|
||||
|
78
ci_build.sh
78
ci_build.sh
@ -15,15 +15,20 @@ OWTAR=ow-snapshot.tar.xz
|
||||
|
||||
# GCC
|
||||
mkdir _output/gcc
|
||||
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
|
||||
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
|
||||
make -C country clean
|
||||
make all COMPILER=gcc
|
||||
mv -n bin/KGC*.map bin/KGC*.sys _output/gcc/.
|
||||
mv -n bin/country.sys _output/gcc/.
|
||||
# GCC share
|
||||
(cd share && make clobber && env COMPILER=gcc ./build.sh)
|
||||
mv -n share/share.com _output/gcc/.
|
||||
mv -n share/share.map _output/gcc/.
|
||||
(
|
||||
cd share
|
||||
git submodule update --init --recursive
|
||||
git clean -x -d -f
|
||||
env COMPILER=gcc ./build.sh
|
||||
)
|
||||
mv -n share/src/share.com _output/gcc/.
|
||||
mv -n share/src/share.map _output/gcc/.
|
||||
|
||||
# Watcom
|
||||
if [ ! -d _watcom ] ; then
|
||||
@ -37,10 +42,73 @@ export PATH=$BUILD_DIR/bin:$PATH:$BUILD_DIR/_watcom/binl64
|
||||
export WATCOM=$BUILD_DIR/_watcom
|
||||
|
||||
mkdir _output/wc
|
||||
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
|
||||
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
|
||||
make -C country clean
|
||||
make all COMPILER=owlinux
|
||||
mv -n bin/KWC*.map bin/KWC*.sys _output/wc/.
|
||||
mv -n bin/country.sys _output/wc/.
|
||||
|
||||
## DOS (GCC)
|
||||
#mkdir _output/gcc_dos
|
||||
#git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
|
||||
#{
|
||||
# echo set COMPILER=GCC
|
||||
# echo set MAKE=make
|
||||
# echo set XCPU=386
|
||||
# echo set XFAT=32
|
||||
# echo set XNASM='C:\\devel\\nasm\\nasm'
|
||||
# echo set OLDPATH=%PATH%
|
||||
# echo set PATH='C:\\devel\\i16gnu\\bin;C:\\bin;%OLDPATH%'
|
||||
#} | unix2dos > config.bat
|
||||
|
||||
#dosemu -td -q -K . -E "build.bat"
|
||||
|
||||
# DOS (Watcom)
|
||||
mkdir _output/wc_dos
|
||||
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
|
||||
{
|
||||
echo set COMPILER=WATCOM
|
||||
echo set WATCOM='C:\\devel\\watcomc'
|
||||
echo set MAKE=wmake /ms
|
||||
echo set XCPU=386
|
||||
echo set XFAT=32
|
||||
echo set XNASM='C:\\devel\\nasm\\nasm'
|
||||
echo set OLDPATH=%PATH%
|
||||
echo set PATH='C:\\devel\\watcomc\\binw;C:\\bin;%OLDPATH%'
|
||||
} | unix2dos > config.bat
|
||||
|
||||
dosemu -td -q -K . -E "build.bat"
|
||||
mv -n bin/KWC*.map bin/KWC*.sys _output/wc_dos/.
|
||||
mv -n bin/country.sys _output/wc_dos/.
|
||||
|
||||
|
||||
# DOS (Turbo C 2.01)
|
||||
if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
|
||||
mkdir _output/tc_dos
|
||||
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
|
||||
{
|
||||
echo set COMPILER=TC2
|
||||
echo set TC2_BASE='C:\\tc201'
|
||||
echo set MAKE=make
|
||||
echo set XCPU=386
|
||||
echo set XFAT=32
|
||||
echo set XNASM=nasm
|
||||
echo set OLDPATH=%PATH%
|
||||
echo set PATH='%TC2_BASE%;C:\\devel\\nasm;C:\\bin;%OLDPATH%'
|
||||
} | unix2dos > config.bat
|
||||
|
||||
dosemu -td -q -K . -E "build.bat lfn"
|
||||
mv -n bin/KTC*.map bin/KTC*.sys _output/tc_dos/.
|
||||
mv -n bin/country.sys _output/tc_dos/.
|
||||
# TC share
|
||||
(
|
||||
cd share
|
||||
git submodule update --init --recursive
|
||||
git clean -x -d -f
|
||||
env COMPILER=tcc2-emu ./build.sh
|
||||
)
|
||||
mv -n share/src/share.com _output/tc_dos/.
|
||||
mv -n share/src/share.map _output/tc_dos/.
|
||||
fi
|
||||
|
||||
echo done
|
||||
|
82
ci_prereq.sh
Executable file
82
ci_prereq.sh
Executable file
@ -0,0 +1,82 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
sudo add-apt-repository -y ppa:tkchia/build-ia16
|
||||
sudo add-apt-repository -y ppa:dosemu2/ppa
|
||||
sudo apt update
|
||||
|
||||
# for cross building
|
||||
sudo apt install gcc-ia16-elf libi86-ia16-elf nasm upx qemu-system-x86 mtools util-linux bash
|
||||
|
||||
# for building with DOS using an emulator
|
||||
sudo apt install dosemu2 dos2unix
|
||||
# Perhaps later we should build using Freecom from published package
|
||||
|
||||
mkdir -p _downloads
|
||||
cd _downloads
|
||||
|
||||
HERE=$(pwd)
|
||||
|
||||
#IBIBLIO_PATH='http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos'
|
||||
IBIBLIO_PATH='https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/1.3'
|
||||
|
||||
BASE=${IBIBLIO_PATH}/base
|
||||
|
||||
# get FreeDOS kernel
|
||||
[ -f kernel.zip ] || wget --no-verbose ${BASE}/kernel.zip
|
||||
|
||||
# get FreeCOM
|
||||
[ -f freecom.zip ] || wget --no-verbose ${BASE}/freecom.zip
|
||||
|
||||
DEVEL=${IBIBLIO_PATH}/devel
|
||||
|
||||
# get gnumake for DOS
|
||||
[ -f djgpp_mk.zip ] || wget --no-verbose ${DEVEL}/djgpp_mk.zip
|
||||
|
||||
# get nasm for DOS
|
||||
[ -f nasm.zip ] || wget --no-verbose ${DEVEL}/nasm.zip
|
||||
|
||||
# get upx for DOS
|
||||
[ -f upx.zip ] || wget --no-verbose ${DEVEL}/upx.zip
|
||||
|
||||
# grab ia16-gcc from ibiblio.org
|
||||
#[ -f i16gcc.zip ] || wget --no-verbose ${DEVEL}/i16gcc.zip
|
||||
#[ -f i16newli.zip ] || wget --no-verbose ${DEVEL}/i16newli.zip
|
||||
#[ -f i16butil.zip ] || wget --no-verbose ${DEVEL}/i16butil.zip
|
||||
#[ -f i16lbi86.zip ] || wget --no-verbose ${DEVEL}/i16lbi86.zip
|
||||
|
||||
# get watcom for DOS
|
||||
[ -f watcomc.zip ] || wget --no-verbose ${DEVEL}/watcomc.zip
|
||||
|
||||
mkdir -p ${HOME}/.dosemu/drive_c
|
||||
cd ${HOME}/.dosemu/drive_c && (
|
||||
|
||||
mkdir -p bin
|
||||
|
||||
# Boot files
|
||||
unzip -L -q ${HERE}/kernel.zip
|
||||
cp -p bin/kernl386.sys ./kernel.sys
|
||||
unzip -L -q ${HERE}/freecom.zip
|
||||
cp -p bin/command.com ./command.com
|
||||
cp -p /usr/share/dosemu/dosemu2-cmds-0.3/c/fdconfig.sys .
|
||||
|
||||
# Development files
|
||||
unzip -L -q ${HERE}/djgpp_mk.zip
|
||||
cp -p devel/djgpp/bin/make.exe bin/.
|
||||
unzip -L -q ${HERE}/upx.zip
|
||||
cp -p devel/upx/upx.exe bin/.
|
||||
echo PATH to make and upx binaries is 'c:/bin'
|
||||
|
||||
unzip -L -q ${HERE}/nasm.zip
|
||||
echo PATH to nasm binary is 'c:/devel/nasm'
|
||||
|
||||
# unzip -L -q ${HERE}/i16gcc.zip
|
||||
# unzip -L -q ${HERE}/i16newli.zip
|
||||
# unzip -L -q ${HERE}/i16butil.zip
|
||||
# unzip -L -q ${HERE}/i16lbi86.zip
|
||||
# echo PATH to ia16 binaries is 'c:/devel/i16gnu/bin'
|
||||
|
||||
unzip -L -q ${HERE}/watcomc.zip
|
||||
echo PATH to watcom binaries is 'c:/devel/watcomc/binw'
|
||||
)
|
24
ci_test.sh
24
ci_test.sh
@ -12,7 +12,17 @@ if [ ! -f _output/wc/KWC${KVER}.sys ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo GCC and Watcom kernels have all been built
|
||||
if [ ! -f _output/wc_dos/KWC38632.sys ] ; then
|
||||
echo Watcom DOS built kernel not present
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f _output/tc_dos/KTC38632.sys ] && [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
|
||||
echo Turbo C 2.01 built kernel not present
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Kernels have all been built
|
||||
find _output -ls
|
||||
|
||||
cd test
|
||||
@ -26,5 +36,17 @@ then
|
||||
echo OpenWatcom boot test failed
|
||||
exit 2
|
||||
fi
|
||||
if ! ./test.sh ../_output/wc_dos/KWC38632.sys diskwcd bootwcd 'boot wcd: '
|
||||
then
|
||||
echo 'OpenWatcom(DOS) boot test failed'
|
||||
exit 2
|
||||
fi
|
||||
if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
|
||||
if ! ./test.sh ../_output/tc_dos/KTC38632.sys disktcd boottcd 'boot tcd: '
|
||||
then
|
||||
echo 'Turbo C 2.01 boot test failed'
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
cd ..
|
||||
exit 0
|
||||
|
2
country
2
country
@ -1 +1 @@
|
||||
Subproject commit a170a5508430cd861754b9064d7e1a081d8b3101
|
||||
Subproject commit 13587a32d6fda6cf1a1ce9bd9c3da7d3ae5a8dd5
|
@ -27,7 +27,7 @@ OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7) $(OBJS8)
|
||||
|
||||
# *Explicit Rules*
|
||||
|
||||
production: ../bin/$(TARGET).sys ../bin/country.sys
|
||||
production: ../bin/$(TARGET).sys
|
||||
|
||||
../bin/$(TARGET).sys: kernel.sys
|
||||
$(CP) kernel.sys ..$(DIRSEP)bin
|
||||
@ -42,12 +42,6 @@ kernel.sys: kernel.exe ../utils/exeflat.exe ../utils/upxentry.bin ../utils/upxde
|
||||
kernel.exe: $(TARGET).lnk $(OBJS) $(LIBS)
|
||||
$(LINK) @$(TARGET).lnk;
|
||||
|
||||
../bin/country.sys:
|
||||
# warning, both cd and -C options required, cd for wmake, -C for gmake
|
||||
cd ..$(DIRSEP)country
|
||||
$(MAKE) -C ..$(DIRSEP)country all
|
||||
$(CP) ..$(DIRSEP)country$(DIRSEP)country.sys ..$(DIRSEP)bin$(DIRSEP)country.sys
|
||||
|
||||
clobber: clean
|
||||
-$(RM) kernel.exe kernel.sys status.me
|
||||
|
||||
|
7
makefile
7
makefile
@ -67,8 +67,12 @@ export
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
BUILDENV ?= windows
|
||||
DIRSEP=\
|
||||
CP=copy
|
||||
else
|
||||
BUILDENV ?= linux
|
||||
DIRSEP=/
|
||||
CP=cp
|
||||
endif
|
||||
|
||||
ifeq ($(BUILDENV),windows)
|
||||
@ -115,6 +119,7 @@ all:
|
||||
cd boot && $(MAKE) production
|
||||
cd sys && $(MAKE) production
|
||||
cd kernel && $(MAKE) production
|
||||
cd country && $(MAKE) DIRSEP=$(DIRSEP) CP=$(CP) production
|
||||
cd setver && $(MAKE) production
|
||||
$(MAKEREMOVE)
|
||||
|
||||
@ -126,6 +131,7 @@ clean:
|
||||
cd boot && $(MAKE) clean
|
||||
cd sys && $(MAKE) clean
|
||||
cd kernel && $(MAKE) clean
|
||||
cd country && $(MAKE) clean
|
||||
cd setver && $(MAKE) clean
|
||||
$(MAKEREMOVE)
|
||||
|
||||
@ -137,5 +143,6 @@ clobber:
|
||||
cd boot && $(MAKE) clobber
|
||||
cd sys && $(MAKE) clobber
|
||||
cd kernel && $(MAKE) clobber
|
||||
cd country && $(MAKE) clobber
|
||||
cd setver && $(MAKE) clobber
|
||||
$(MAKEREMOVE)
|
||||
|
2
share
2
share
@ -1 +1 @@
|
||||
Subproject commit f2efe19f234eb752de57c633c5147d7e060d9cfa
|
||||
Subproject commit 47f3d42527256fa46a00fe84cdb46d90f2e66f50
|
Loading…
Reference in New Issue
Block a user