v68: update instructions
authorAlan Cox <alan@linux.intel.com>
Thu, 20 Oct 2016 22:12:37 +0000 (23:12 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 20 Oct 2016 22:12:37 +0000 (23:12 +0100)
Kernel/platform-v68/README

index 8a1f053..ce2e1bf 100644 (file)
@@ -1,24 +1,91 @@
 Development subtree for the v68 virtual platform and general 68000
-bootstrap work. There is a lot to do before anything remotely useful will
-happen.
+bootstrap work.
 
 Current status:
 
-Early bootstrap works
-Basic interrupt handling works (although we need to make our supervisor stack
-                               bigger and sort out stack switching for an
-                               IRQ and timers)
-TTY emulation gets us to the point we can hit return
+Kernel boots, loads userspace and you can run commands. At the moment it
+uses a pure swap model and dumps userspace apps at 0x20000-0x2FFFF which is
+a quick getting started hack to debug all the user issues.
 
+TODO:
+- bourne shell crashes when you type a command (known to have 16bit-isms,
+  may be worth running the slightly bigger 'Heritage' /bin/sh with SYS5 type
+  features instead
+- date gives bogus results, probably some sizing issues
+- signal handling needs further testing
+- copy exception/trap frames onto user stack along with trap identifiers
+  so we can support stuff like CP/M68K emulators.
+- pre-emption needs more testing
+- support multiple IRQ sources and IRQ priority nesting when appropriate
+- enable IRQ during swap on context switch
+- optimize swap out/in. With bigger amounts of RAM we want to be smarter
+  where it doesn't matter on 8bit.
+
+Once that is done it should be worth trying both to target some of the old
+68K SBCs and the N8VEM ECB 68000 (which can support both a swap based model
+and with the 4MB paged expansion board actual 'real' memory models without
+copying hacks)
+
+Also on the list is looking at a vfork() style function for faster fork/exec
+when we support multiple process in memory models, and whether we can do
+resident/shared code type stuff. The Amiga style re-entrant code might be a
+good model.
+
+
+The build environment is gcc 6.2.0 configured with
+
+../gcc-6.2.0/configure --target=m68k-uclinux --prefix=/opt/gcc-fuzix/ \
+--enable-multilib --disable-libssp --disable-shared --disable-threads \
+--disable-libmudflap --disable-libgomp --with-system-zlib \
+--enable-languages=c --with-cpu=68000 --with-arch=m68k
+
+and the gcc needs to be patched with the following tiny change to stop it
+creating a broken libgcc for 68000.
+
+--- ./libgcc/config/m68k/lb1sf68.S~    2016-01-04 14:30:50.000000000 +0000
++++ ./libgcc/config/m68k/lb1sf68.S     2016-10-20 20:27:33.232784120 +0100
+@@ -102,7 +102,7 @@
+       /* Non PIC (absolute/relocatable) versions */
+       .macro PICCALL addr
+-      jbsr    \addr
++      jsr     \addr
+       .endm
+       .macro PICJUMP addr
+
+
+
+
+The v68 scripts are set up for a 20MB IDE disk with the partitions as
+follows
+
+Disk hd0: 20 MiB, 20971520 bytes, 40960 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disklabel type: dos
+Disk identifier: 0xa874a478
+
+Device Boot Start   End Sectors Size Id Type
+hd0p1        2048 10239    8192   4M 83 Linux
+hd0p2       10240 40959   30720  15M 83 Linux
+
+
+Do ./makedisk 3 disk.img
+
+That will produce a disk with a 1K emulator header on it
+
+fdisk the disk (offset 1K in)
+set up the partitions
+w
+q
+
+To make the disk image use the filesystem tool in standalone and build it
+with 30720 blocks.
+
+Then run makeboot, install-fuzix and install-fs to create the image, boot
+and hit b, then on kernel load 2 for the root fs
 
 
-Next bits to tackle:
 
-o      Debugging sleep/wakeup sequences so we can get beyond the tty wakeup
-       of the idle process
-o      Untangling the stack handling so that we can do stack switching and
-       pre-emption correctly
-o      Fill in the rest of the IDE driver and user copying so we can mount
-       the root fs.
-o      Begin debugging of the various memory models we can support
-       (swap only, flat with copying to handle fork, simple mmu)