Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Use MakeStdDistro instead of DoDistro and clean up a bunch
Browse files Browse the repository at this point in the history
  • Loading branch information
minexew committed Nov 11, 2020
1 parent e1a3bbe commit 4b873b8
Show file tree
Hide file tree
Showing 8 changed files with 486 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ mkdir Shrine.out
# workaround fs bug in HolyCRT (fails to create necessary directories)
mkdir -p Shrine.out/Compiler Shrine.out/Kernel

env STARTOS=BuildShrine ./$BIN --drive=C,..,Shrine.out
env STARTOS=Build/BuildShrine ./$BIN --drive=C,..,Shrine.out

ISO_FILE=Shrine.out/Tmp/ShrineDist.ISO.C
ISO_FILE=Shrine.out/Shrine.ISO
ISO_SIZE=$(wc -c <$ISO_FILE)
MIN_SIZE=100000
if [ $ISO_SIZE -le $MIN_SIZE ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: ShrineDist.ISO
path: .build/Shrine.out/Tmp/ShrineDist.ISO.C
path: .build/Shrine.out/Shrine.ISO
Binary file removed Adam/AutoComplete/ACDefs.DATA
Binary file not shown.
21 changes: 18 additions & 3 deletions BuildShrine.HC → Build/BuildShrine.HC
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,23 @@ WinVert(2,10);
if (DrvIsWritable)
DirMk("/Tmp"); //Good to have a Tmp

DirMk("/Home");
DirMk("/Home"); // needed why?

DirMk("/0000Boot");
DirMk("/0000Boot"); // needed why?
#include "/Adam/Opt/Boot/MakeBoot"
#include "/Misc/DoDistro"
#include "/Adam/Opt/Utils/MakeUtils"

Cd(__DIR__);;

#include "ShrineCfg"
#include "ShrineDistro"

// Make 128MB RAMdisk B: (Distro tree + ISO are built here)
CBlkDev* res;
res=BlkDevNextFreeSlot('B',BDT_RAM);
res->unit = 0;
res->max_blk = 0x40000-1;
BlkDevAdd(res,,TRUE,TRUE);

MakeStdDistro;
CopySingle("B:/Shrine.ISO.C", "C:/Shrine.ISO");
61 changes: 61 additions & 0 deletions Build/ShrineCfg.HC
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#help_index "Misc/TOS/Cfg"

#define SLOP BLK_SIZE

U0 TOSDbgDistro1()
{
CBinFile *bfh=mem_boot_base-sizeof(CBinFile);
bfh(I64)+=bfh->file_size-1;
DefinePrint("TOS_DBG_DISTRO","0x%X",
CeilI64(SYS_KERNEL_END+SLOP,BLK_SIZE));
DefinePrint("TOS_DBG_DISTRO_END", "0x%X",FloorI64(
(BOOT_RAM_LIMIT-(BOOT_STK_SIZE+DVD_BOOT_LOADER_SIZE))>>4<<4-
(bfh(I64)-SYS_KERNEL_END)-SLOP,BLK_SIZE));
DefinePrint("CFG_DBG_DISTRO_FILE","\"/Tmp/DbgDistro.BIN.Z\"");
} TOSDbgDistro1;

U0 TOSDbgDistro2()
{
DefinePrint("CFG_DBG_DISTRO","\"a0x%X\n0x%X\n\"",TOS_DBG_DISTRO,
(TOS_DBG_DISTRO_END-TOS_DBG_DISTRO)/BLK_SIZE);
DefinePrint("CFG_DBG_DISTRO_START","\"0x%X\"",TOS_DBG_DISTRO);
} TOSDbgDistro2;

U0 TOSInit()
{
switch (0) {
case 1: //TAD Native Machine
DefinePrint("CFG_RAM_DRVS",
"\"B\nScale2Mem(2048,0x100000,4*1024*1024*1024)\n\"");
DefinePrint("CFG_HARD_DRVS","\"C\ns0xFE00\n0xFE10\n0\"");
DefinePrint("CFG_DVD_DRVS","\"Ts0x1F0\n1\"");
DefinePrint("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
DefinePrint("TOS_HDS","\"CD\"");
DefinePrint("TOS_MASTER_BOOT_DRVS","\"C\"");
break;
default:
DefinePrint("CFG_RAM_DRVS",
"\"B\nScale2Mem(2048,0x100000,4*1024*1024*1024)\n\"");
DefinePrint("CFG_HARD_DRVS","\"\"");
DefinePrint("CFG_DVD_DRVS","\"\"");
DefinePrint("CFG_DSK_CACHE","\"Scale2Mem(0x80000,0x8000000)\n\"");
DefinePrint("TOS_HDS","\"CD\"");
DefinePrint("TOS_MASTER_BOOT_DRVS","\"C\"");
}
} TOSInit;

#define TOS_ISO_NAME "B:/Shrine.ISO.C"
#define TOS_DISTRO_DIR "B:/Distro"
#define CFG_OPTS "StaffMode\nMountIDEAuto\nCT\n"
#define CFG_DBG_OPTS "StaffMode\nMountIDEAuto\nCT"\
"HeapInit\n130\nMemInit\n131\nVarInit\n132\n\n"
#define CFG_DBGZ_OPTS "StaffMode\nMountIDEAuto\nCT"\
"HeapInit\n0\nMemInit\n0\nVarInit\n0\n\n"
#define TOS_CFG "\n" CFG_RAM_DRVS CFG_DVD_DRVS CFG_HARD_DRVS "\n"\
CFG_DSK_CACHE CFG_OPTS
#define TOS_DVD_CFG "TB\n0x20000\nT \n\n\nStaffMode\nMountIDEAuto\nCT\n"
#define TOS_DVD_DBG_CFG "A" CFG_DBG_DISTRO\
"B\nScale2Mem(2048,0x40000)\n\n\n"\
"NoMP\nTextMode\nDontProbe\nDbgDistro\n"\
"C:" CFG_DBG_DISTRO_FILE "\n"\
CFG_DBG_DISTRO_START "\n\n"
Loading

0 comments on commit 4b873b8

Please sign in to comment.