diff --git a/patches/aout407.patch b/patches/core/aout407.patch similarity index 100% rename from patches/aout407.patch rename to patches/core/aout407.patch diff --git a/patches/ecore.patch b/patches/core/ecore.patch similarity index 100% rename from patches/ecore.patch rename to patches/core/ecore.patch diff --git a/patches/fastout.patch b/patches/core/fastout.patch similarity index 100% rename from patches/fastout.patch rename to patches/core/fastout.patch diff --git a/patches/initorig.patch b/patches/core/initorig.patch similarity index 100% rename from patches/initorig.patch rename to patches/core/initorig.patch diff --git a/patches/upcase.patch b/patches/core/upcase.patch similarity index 100% rename from patches/upcase.patch rename to patches/core/upcase.patch diff --git a/patches/v2_as.patch b/patches/core/v2_as.patch similarity index 80% rename from patches/v2_as.patch rename to patches/core/v2_as.patch index 47dff6d..66f6005 100644 --- a/patches/v2_as.patch +++ b/patches/core/v2_as.patch @@ -1,6 +1,16 @@ ---- u0.s Wed May 7 01:20:13 2008 -+++ ../a/u0.s Wed May 7 01:19:38 2008 -@@ -126,7 +126,7 @@ +--- rebuilt/u0.s Wed May 7 12:38:04 2008 ++++ build/u0.s Wed May 7 12:41:17 2008 +@@ -30,6 +30,9 @@ + tpb = 177566 / punch buffer asr-33 + ps = 177776 / processor status + ++fpsym = 0 / define fpsym even though we cannot use it ++.. = 0 . / ensure a.out starts at location 0, not 040000 ++ + halt = 0 + wait = 1 + rti = 2 +@@ -126,7 +129,7 @@ / format given in mov $systm,sb0+6 / memory map mov $-512.,sb1+4 @@ -9,8 +19,8 @@ mov $user,swp+6 / set devices to interrupt ---- u1.s Wed May 7 01:20:13 2008 -+++ ../a/u1.s Wed May 7 01:21:56 2008 +--- rebuilt/u1.s Wed May 7 12:38:04 2008 ++++ build/u1.s Wed May 7 12:41:04 2008 @@ -474,7 +474,7 @@ br sysret2 @@ -38,8 +48,8 @@ jsr r0,arg; u.off / put first arg in u.off mov *u.r0,r1 / put file descriptor in r1 jsr r0,getf / get the i-number of the file ---- u5.s Wed May 7 01:20:13 2008 -+++ ../a/u5.s Wed May 7 01:19:38 2008 +--- rebuilt/u5.s Wed May 7 12:38:04 2008 ++++ build/u5.s Wed May 7 12:41:04 2008 @@ -85,7 +85,7 @@ mov $systm,r2 / start of inode and free storage map for drum tst cdev @@ -67,8 +77,8 @@ / of its super block 1: add (r2)+,(sp) / get byte address of allocation bit ---- ux.s Wed May 7 01:20:13 2008 -+++ ../a/ux.s Wed May 7 01:19:38 2008 +--- rebuilt/ux.s Wed May 7 12:38:04 2008 ++++ build/ux.s Wed May 7 12:41:04 2008 @@ -21,7 +21,7 @@ i.ctim: .=.+4 i.mtim: .=.+4 diff --git a/patches/vec0407.patch b/patches/core/vec0407.patch similarity index 100% rename from patches/vec0407.patch rename to patches/core/vec0407.patch diff --git a/tools/assemv2 b/tools/assemv2 index 0a1805e..c2997fc 100755 --- a/tools/assemv2 +++ b/tools/assemv2 @@ -25,18 +25,14 @@ export APOUT_ROOT # build sources from pages and generate patched sources in "build" # if "cold" is passed in, the "cold" option will be patched on. -tools/rebuild v2_as "$@" +tools/rebuild "$@" # assemble the kernel from patched sources and generate symbols # and build a simh loadable file. cd build -# create sys1.s -echo 'fpsym = 0 / define fpsym even though we cannot use it' > sys1.s -echo '.. = 0 . / ensure a.out starts at location 0, not 040000' >> sys1.s - # assemble it all -$APOUT $APOUT_ROOT/bin/as sys1.s u?.s +$APOUT $APOUT_ROOT/bin/as u?.s $APOUT $APOUT_ROOT/bin/nm a.out |sort > a.out.syms ../tools/ml diff --git a/tools/rebuild b/tools/rebuild index 4bd085c..f07cff9 100755 --- a/tools/rebuild +++ b/tools/rebuild @@ -21,6 +21,13 @@ rebuild() { r init e12 } +corep() { + for x in ../patches/core/*.patch ; do + y=`basename $x .patch` + echo ' ' $y; patch -s -p1 < $x + done +} + p() { echo ' ' $1; patch -s -p1 <../patches/$1.patch; } patches() { @@ -29,9 +36,7 @@ patches() { echo patching... cp rebuilt/* build cd build - p vec0407 - # p fixV7div - p initorig + corep for x in "$@" ; do p $x done