NeXT Computers Forum Index NeXT Computers
www.NeXTComputers.org
 
Log in to check your private messagesLog in to check your private messages

Log inLog in  RegisterRegister


Profile  Search  Memberlist  FAQ  Usergroups
Taking the NeXT step (mach kernel upgrades)
Goto page Previous  1, 2, 3, 4, 5 ... 12, 13, 14  Next
 
Post new topic   Reply to topic    NeXT Computers Forum Index -> Porting New Software
View previous topic :: View next topic  
Author Message
t-rexky



Joined: 09 Jan 2011
Posts: 263
Location: Snowy Canada

PostPosted: Fri Mar 24, 2017 3:15 pm    Post subject: Reply with quote

I think you can get all of those old releases here:

https://winworldpc.com/product/mac-os-x
Back to top
View user's profile Send private message
t-rexky



Joined: 09 Jan 2011
Posts: 263
Location: Snowy Canada

PostPosted: Mon Apr 03, 2017 9:25 am    Post subject: Reply with quote

I am curious if you were able to dedicate any more time to this and if you had any progress?

I spent a little bit of time over the weekend sailing the murky waters of Apple OS strategy changes in the early days of Darwin, since I was very confused about the kernel source code in Darwin 0.1. This is probably not news to you, but to my surprise I was able to piece together the fact that Darwin 0.1 is effectively Mac OS X Server 1.0, which is Rhapsody 5.3. This explains why the kernel source looks very much like the original mach source rather than the xnu kernel style sources.

Moral of the story is that, if our little community ever embarks on hacking the NEXTSTEP kernel, this would be the best place to start.

And of course you are already doing that Very Happy
Back to top
View user's profile Send private message
NCommander



Joined: 11 Mar 2017
Posts: 53
Location: New York, NY

PostPosted: Thu Apr 13, 2017 11:03 am    Post subject: Reply with quote

I've been tied up on work and hence haven't had any new progress on i.t
Back to top
View user's profile Send private message
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Wed Apr 19, 2017 9:42 pm    Post subject: Reply with quote

whoa I just happend to see this thread, and I'm amazed that so much progress has been made!

Awesome job for getting it built!!!!!

Apple was shifting filesystems ever so slightly post 3.3 so it really doesn't surprise me. I recall that Rhapsody couldn't read OS X 1.0 stuff, and neither could OS X 10.0 read OS X 1.0 stuff either when it came to UFS.

You may have to built a newfs, and build a new filesystem on a target disk ....?
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Thu Apr 20, 2017 10:29 am    Post subject: Diffs will be soon! Reply with quote

I got reproducable results!!!!


Darwin 0.1 kernel booting


Panic on my Rhapsody DR2 filesystem.... I know the APM probably isn't correct as machdep/i386/kernBootStruct.h is missing, and I copied the PowerPC version, and took some liberties googline stuff.....




And Booting off an OPENSTEP 4.2 user CD, and I get the CPU misidentification too!!!

I know it's errors, but reproducability is GREAT!!!!!
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Thu Apr 20, 2017 11:02 am    Post subject: Reply with quote

Oh yeah fixed up the CPU detection and I can run commands off the OPENSTEP 4.2 CD-ROM

get_cpuid // machine_configure in ../../machdep/i386/i386_init.c



I can boot to the Rhapsody disk OK, but the fun drivers won't load.



But with enough time it will drop to a console login prompt, and boom I'm IN.......

VERY exciting!
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
cuby



Joined: 12 Jan 2006
Posts: 160
Location: Coburg, Germany

PostPosted: Thu Apr 20, 2017 11:39 am    Post subject: Reply with quote

neozeed wrote:
Oh yeah fixed up the CPU detection and I can run commands off the OPENSTEP 4.2 CD-ROM
...
VERY exciting!


Definitely great to see! Just wondering, are the fixed-up sources for the Darwin 0.1 kernel already available somewhere?

-- Michael
Back to top
View user's profile Send private message Visit poster's website
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Thu Apr 20, 2017 11:46 am    Post subject: Reply with quote

cuby wrote:
neozeed wrote:
Oh yeah fixed up the CPU detection and I can run commands off the OPENSTEP 4.2 CD-ROM
...
VERY exciting!


Definitely great to see! Just wondering, are the fixed-up sources for the Darwin 0.1 kernel already available somewhere?

-- Michael


This is by not means comprehensive....!!!!!

pass1.diff

Although on reflection this patch may make more sense....

pass2.diff

I need to setup the includes more correctly, but this is essentially what I changed... I think.

You will get the 404 page, the username/password are on the page, click the link, and you can use those credendials and you shoudl be set.

Tomorrow I'll see about making a 100% reproducable build from Rhapsody DR-2.

My source tree is here:

kern_build.tar.gz

I'll upload a kernel binary, although it is kind of useless.....

mach_new.gz
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
t-rexky



Joined: 09 Jan 2011
Posts: 263
Location: Snowy Canada

PostPosted: Thu Apr 20, 2017 12:21 pm    Post subject: Reply with quote

Very, very cool!

As a somewhat related side project, a few weeks ago I compiled a summary of NS / OS / Rhap / OS X kernel version evolution. I will post it in this thread in the next few days. Just for reference...

Edit - here it is: https://www.flickr.com/photos/t-rexky/shares/3a52Z4
Back to top
View user's profile Send private message
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Thu Apr 20, 2017 9:52 pm    Post subject: Reply with quote

Here is my rough notes, I've just re-built the kernel on a fresh Rhapsody DR2 disk image, and the best part is that I had no missing symbols!

Also the build process needs a clean destination to install stuff to. In this example I'm using /mnt/hdb which is a mount to a 2nd disk. An empty directory will suffice as well.

Quote:

=== get to the source code
I'm using NFS, maybe you have it on CD-ROM?
mkdir -p /mnt/data
/sbin/mount_nfs -a 1 -D 1 -R 1 -r 512 -t 1 -w 512 192.168.1.3:/volume1/Data /mnt/data

=== prepare links:
ln -s /usr/src/kernel/kern /usr/include/kern
ln -s /usr/src/kernel/machdep /usr/include/machdep
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib


=== bootstrap_cmds
tar -zxvf /mnt/data/darwin/bootstrap_cmds-1.tar.gz
cd bootstrap_cmds/
patch -p1 < /mnt/data/darwin/bootstrap_cmds.diff
make
make install
make DSTROOT=/mnt/hdb install

=== kernel
cd /usr/src
tar -zxvf /mnt/data/darwin/kernel-1.tar.gz
ln -s /usr/src/kernel/BUILD/RELEASE_I386/features.h /usr/include/machdep/i386/features.h
ln -s /usr/src/kernel/machdep/i386/mach_param.h /usr/include/machine/mach_param.h
ln -s /usr/src/kernel/bsd /usr/include/bsd
cd kernel
patch -p1 < /mnt/data/darwin/kernel.diff
setenv DSTROOT=/mnt/hdb
make (it will fail)
setenv DSTROOT=

=== objc
cd /usr/src
tar -zxvf /mnt/data/darwin/objc-1.tar.gz
cd /usr/src/objc
make
make install
make DSTROOT=/mnt/hdb install

=== add in missing headder from NeXTSTEP
mkdir /usr/include/machkit
cp /mnt/data/darwin/NXLock.h /usr/include/machkit


=== driverkit
cd /usr/src
tar -zxvf /mnt/data/darwin/driverkit-139.1-1.tar.gz
cp /mnt/data/darwin/kernBootStruct.h /usr/include/machdep/i386/
cd driverkit-1
patch -p1 < /mnt/data/darwin/driverkit-1.diff
ln -s /usr/src/kernel/driverkit /usr/include/driverkit
ln -s /usr/src/driverkit-1/libDriver/Kernel /usr/include/audio
touch /usr/include/driverkit/i386/PCIKernBus.h
make
make DSTROOT=/mnt/hdb install


=== kernel
cd /usr/src/kernel/BUILD/RELEASE_I386/
rm /usr/include/driverkit
ln -s /usr/src/driverkit-1/driverkit /usr/include
mkdir -p /System/Library/Frameworks/System.framework/PrivateHeaders/driverkit
cp /usr/src/driverkit-1/libDriver/i386Release/driverServer.defs /System/Library/Frameworks/System.framework/PrivateHeaders/driverkit
mkdir -p /usr/local/lib/
cp /usr/src/driverkit-1/libDriver/syms/libDriver_kern.o /usr/local/lib/
make
cp mach_kernel /mach_new
sync
reboot

=== testing
hd(0,0)mach_new










# cat bootstrap_cmds.diff
Code:
diff -ruN original/bootstrap_cmds/migcom_untypd.tproj/Makefile.preamble bootstrap_cmds/migcom_untypd.tproj/Makefile.preamble
--- original/bootstrap_cmds/migcom_untypd.tproj/Makefile.preamble       Wed Mar 17 00:10:34 1999
+++ bootstrap_cmds/migcom_untypd.tproj/Makefile.preamble        Fri Apr 21 11:47:24 2017
@@ -67,7 +67,7 @@
 BUILD_OFILES_LIST_ONLY =

 # Additional relocatables to be linked into this project
-VERS_OFILE=migcom_untyped_vers.o
+VERS_OFILE=#migcom_untyped_vers.o
 OTHER_OFILES = $(VERS_OFILE)

 # Additional libraries to link against
diff -ruN original/bootstrap_cmds/migcom_untypd.tproj/utils.c bootstrap_cmds/migcom_untypd.tproj/utils.c
--- original/bootstrap_cmds/migcom_untypd.tproj/utils.c Wed Mar 17 00:10:39 1999
+++ bootstrap_cmds/migcom_untypd.tproj/utils.c  Fri Apr 21 11:47:24 2017
@@ -134,6 +134,8 @@

 extern char *MessFreeRoutine;

+char migcom_untypd_VERS_STRING[11] ="Darwin 0.1";
+
 void
 WriteIdentificationString(file)
     FILE *file;




cat driverkit-1.diff
Code:
diff -ruN original/driverkit-1/driverkit/Makefile driverkit-1/driverkit/Makefile
--- original/driverkit-1/driverkit/Makefile     Fri May  7 08:15:54 1999
+++ driverkit-1/driverkit/Makefile      Fri Apr 21 12:04:13 2017
@@ -14,7 +14,8 @@
 PUBLIC_DSTDIR=$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/Versions/B/Headers/driverkit
 LOCAL_DSTDIR=$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/Versions/B/PrivateHeaders/driverkit
 INSTFLAGS=-c -m 644
-MACHINE_SUBDIRS=ppc i386 machine
+#MACHINE_SUBDIRS=ppc i386 machine
+MACHINE_SUBDIRS=i386 machine

 PUBLIC_HFILES=return.h interruptMsg.h driverTypes.h \
              IOConfigTable.h IODisk.h IOLogicalDisk.h IODiskPartition.h \
diff -ruN original/driverkit-1/libDriver/Makefile driverkit-1/libDriver/Makefile
--- original/driverkit-1/libDriver/Makefile     Fri May  7 08:15:59 1999
+++ driverkit-1/libDriver/Makefile      Fri Apr 21 12:24:32 2017
@@ -43,7 +43,8 @@
 #
 # Directories containing 'mode-dependent' source.
 #
-SOURCE_DIRS= User Kernel ppc i386 eisa pci pcmcia
+#SOURCE_DIRS= User Kernel ppc i386 eisa pci pcmcia
+SOURCE_DIRS= User Kernel i386 eisa pci

 AR= ar
 LD= ld
@@ -51,8 +52,10 @@
 MIG= /usr/bin/mig

 MACHINE=i386
-MACHINE_LIST=ppc i386
-BUS_LIST=eisa pci pcmcia
+#MACHINE_LIST=ppc i386
+MACHINE_LIST=i386
+#BUS_LIST=eisa pci pcmcia
+BUS_LIST=eisa pci

 ARFLAGS= rucv
 ARCHFULL_RC_CFLAGS = $(foreach X, $(RC_ARCHS),$(addprefix -arch , $(X)))
@@ -130,8 +133,8 @@
 pci_BUS_MFILES=                IOPCIDirectDevice.m IOPCIDeviceDescription.m
 pci_BUS_CFILES=

-pcmcia_BUS_MFILES=     IOPCMCIADirectDevice.m IOPCMCIADeviceDescription.m \
-                       IOPCMCIATuple.m
+pcmcia_BUS_MFILES=     #IOPCMCIADirectDevice.m IOPCMCIADeviceDescription.m \
+                       #IOPCMCIATuple.m
 pcmcia_BUS_CFILES=


diff -ruN original/driverkit-1/libDriver/pci/IOPCIDirectDevice.m driverkit-1/libDriver/pci/IOPCIDirectDevice.m
--- original/driverkit-1/libDriver/pci/IOPCIDirectDevice.m      Fri May  7 08:16:08 1999
+++ driverkit-1/libDriver/pci/IOPCIDirectDevice.m       Fri Apr 21 12:23:22 2017
@@ -45,7 +45,10 @@
 static inline id
 getThePCIBus(void)
 {
-    return [KernBus lookupBusInstanceWithName:"PCI" busId:0];
+// JASON
+// [KernBus is missing...................
+//    return [KernBus lookupBusInstanceWithName:"PCI" busId:0];
+return 0;
 }

 @implementation IODirectDevice(IOPCIDirectDevice)




#cat kernel.diff
Code:
diff -ruN original/kernel/driverkit/i386/EISAKernBus.h kernel/driverkit/i386/EISAKernBus.h
--- original/kernel/driverkit/i386/EISAKernBus.h        Thu Jan  1 07:30:00 1970
+++ kernel/driverkit/i386/EISAKernBus.h Fri Apr 21 12:15:10 2017
@@ -0,0 +1,17 @@
+
+
+// from here
+// http://unix.superglobalmegacorp.com/darwin01/newsrc/driverkit/KernDeviceDescription.m.html
+
+#define IRQ_LEVELS_KEY         "IRQ Levels"    // XXX
+#define BUS_TYPE_KEY           "Bus Type"      // XXX
+#define BUS_ID_KEY             "Bus ID"        // XXX
+
+
+//from here
+// http://unix.superglobalmegacorp.com/darwin01/newsrc/driverkit/ppc/PPCKernBus.h.html
+
+#define IO_PORTS_KEY           "I/O Ports"
+#define MEM_MAPS_KEY           "Memory Maps"
+#define IRQ_LEVELS_KEY         "IRQ Levels"
+#define DMA_CHANNELS_KEY       "DMA Channels"
diff -ruN original/kernel/driverkit/i386/autoconf_i386.m kernel/driverkit/i386/autoconf_i386.m
--- original/kernel/driverkit/i386/autoconf_i386.m      Wed Mar 17 00:54:19 1999
+++ kernel/driverkit/i386/autoconf_i386.m       Fri Apr 21 12:36:05 2017
@@ -57,8 +57,8 @@
 #import <driverkit/driverTypesPrivate.h>
 #import <driverkit/autoconfCommon.h>
 #import <driverkit/i386/EISAKernBus.h>
-#import <driverkit/i386/PCMCIA.h>
-#import <driverkit/i386/PCMCIAKernBus.h>
+//#import <driverkit/i386/PCMCIA.h>
+//#import <driverkit/i386/PCMCIAKernBus.h>
 #import <driverkit/i386/PCIKernBus.h>

 #import <machdep/i386/kernBootStruct.h>
diff -ruN original/kernel/machdep/i386/APM_i386.c kernel/machdep/i386/APM_i386.c
--- original/kernel/machdep/i386/APM_i386.c     Wed Mar 17 00:55:20 1999
+++ kernel/machdep/i386/APM_i386.c      Fri Apr 21 12:46:27 2017
@@ -98,6 +98,7 @@
  */
 PMReturn PMConnect(void)
 {
+#if 0
     KERNBOOTSTRUCT *kbp = KERNSTRUCT_ADDR;

     APM_BIOS_version.major = kbp->apm_config.major_vers;
@@ -110,6 +111,12 @@
        return PM_R_SUCCESS;
     }
     return PM_R_NO_PM;
+#else
+       //For me APM crashes immediatly on boot.
+       //so It's not hard coded out
+    APM_BIOS_connected = FALSE;
+    return PM_R_NO_PM;
+#endif
 }

 /*
diff -ruN original/kernel/machdep/i386/i386_init.c kernel/machdep/i386/i386_init.c
--- original/kernel/machdep/i386/i386_init.c    Wed Mar 17 00:55:25 1999
+++ kernel/machdep/i386/i386_init.c     Fri Apr 21 12:50:34 2017
@@ -305,6 +305,8 @@
        return pid;

     pid = cpuid();
+//hardcoded to become a Pentium
+       pid.family=5;

     efl &= ~EFL_ID;
     set_eflags(efl);
@@ -335,6 +337,9 @@
     (void) strcpy(machine, "i386");

     pid = get_cpuid();
+       //hardcode this to become a Pentium
+       //touch look for 486sx users....
+       pid.family=5;
     switch (pid.family) {

     case 0:
diff -ruN original/kernel/machdep/i386/kernBootStruct.h kernel/machdep/i386/kernBootStruct.h
--- original/kernel/machdep/i386/kernBootStruct.h       Thu Jan  1 07:30:00 1970
+++ kernel/machdep/i386/kernBootStruct.h        Fri Apr 21 12:08:44 2017
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License').  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+/*
+ * kernBootStruct.h
+ * What the booter leaves behind for the kernel.
+ */
+
+#define GRAPHICS_MODE  1
+#define TEXT_MODE 0
+
+#define KERNBOOTMAGIC 0xa7a7a7a7
+
+/* The config table has room for 12 drivers if their config files
+ * are the maximum size allowed.
+ */
+#define CONFIG_SIZE (12 * 4096)
+
+/* Maximum number of boot drivers supported, assuming their
+ * config files fit in the bootstruct.
+ */
+#define NDRIVERS               64
+
+#ifndef __ASSEMBLER__
+
+typedef struct {
+    char    *address;                  // address where driver was loaded
+    int            size;                       // entry point for driver
+} driver_config_t;
+
+typedef struct {
+    unsigned short     major_vers;     // == 0 if not present
+    unsigned short     minor_vers;
+    unsigned long      cs32_base;
+    unsigned long      cs16_base;
+    unsigned long      ds_base;
+    unsigned long      cs_length;
+    unsigned long      ds_length;
+    unsigned long      entry_offset;
+    union {
+       struct {
+           unsigned long       mode_16         :1;
+           unsigned long       mode_32         :1;
+           unsigned long       idle_slows_cpu  :1;
+           unsigned long       reserved        :29;
+       } f;
+       unsigned long data;
+    } flags;
+    unsigned long      connected;
+} APM_config_t;
+
+#if 0
+typedef struct {
+    short   version;
+    char    bootString[160];           // string we booted with
+    int            magicCookie;                // KERNBOOTMAGIC if struct valid
+    int            rootdev;                    // booters guess as to rootdev
+    int            convmem;                    // conventional memory
+    char    boot_file[128];            // name of the kernel we booted
+    int            first_addr0;                // first address for kern convmem
+    int            graphicsMode;               // did we boot in graphics mode?
+    int       kernDev;                 // device kernel was fetched from
+    int     numBootDrivers;            // number of drivers loaded by booter
+    char    *configEnd;                        // pointer to end of config files
+    int            kaddr;                      // kernel load address
+    int     ksize;                     // size of kernel
+    void    *rld_entry;                        // entry point for standalone rld
+
+    driver_config_t driverConfig[NDRIVERS];    // ??
+
+    char   _reserved[4052 - sizeof(driver_config_t) * NDRIVERS];
+       int apm_config;
+
+    char   config[CONFIG_SIZE];                // the config file contents
+} KERNBOOTSTRUCT;
+
+//from http://unix.superglobalmegacorp.com/xnu/newsrc/pexpert/pexpert/i386/boot.h.html
+#else
+
+#define KERNSTRUCT_ADDR   ((KERNBOOTSTRUCT *) 0x11000)
+
+
+typedef struct _EISA_slot_info_t {
+    union {
+       struct {
+           unsigned char       duplicateID     :4;
+           unsigned char       slotType        :1;
+           unsigned char       prodIDPresent   :1;
+           unsigned char       dupIDPresent    :1;
+       } s;
+       unsigned char d;
+    } u_ID;
+    unsigned char      configMajor;
+    unsigned char      configMinor;
+    unsigned short     checksum;
+    unsigned char      numFunctions;
+    union {
+       struct {
+           unsigned char       fnTypesPresent  :1;
+           unsigned char       memoryPresent   :1;
+           unsigned char       irqPresent      :1;
+           unsigned char       dmaPresent      :1;
+           unsigned char       portRangePresent:1;
+           unsigned char       portInitPresent :1;
+           unsigned char       freeFormPresent :1;
+           unsigned char       reserved:1;
+       } s;
+       unsigned char d;
+    } u_resources;
+    unsigned char      id[8];
+} EISA_slot_info_t;
+
+typedef struct _EISA_func_info_t {
+    unsigned char      slot;
+    unsigned char      function;
+    unsigned char      reserved[2];
+    unsigned char      data[320];
+} EISA_func_info_t;
+
+#define NUM_EISA_SLOTS 64
+
+typedef struct _PCI_bus_info_t {
+    union {
+       struct {
+           unsigned char configMethod1 :1;
+           unsigned char configMethod2 :1;
+           unsigned char               :2;
+           unsigned char specialCycle1 :1;
+           unsigned char specialCycle2 :1;
+       } s;
+       unsigned char d;
+    } u_bus;
+    unsigned char maxBusNum;
+    unsigned char majorVersion;
+    unsigned char minorVersion;
+    unsigned char BIOSPresent;
+} PCI_bus_info_t;
+
+/*
+ * Video information..
+ */
+
+struct boot_video {
+        unsigned long   v_baseAddr;     /* Base address of video memory */
+        unsigned long   v_display;      /* Display Code (if Applicable */
+        unsigned long   v_rowBytes;     /* Number of bytes per pixel row */
+        unsigned long   v_width;        /* Width */
+        unsigned long   v_height;       /* Height */
+        unsigned long   v_depth;        /* Pixel Depth */
+};
+
+typedef struct boot_video       boot_video;
+
+#define BOOT_STRING_LEN                160
+
+
+
+typedef struct {
+    short   version;
+    char    bootString[BOOT_STRING_LEN];// string we booted with
+    int            magicCookie;                // KERNBOOTMAGIC if struct valid
+    int            numIDEs;                    // how many IDE drives
+    int            rootdev;                    // booters guess as to rootdev
+    int            convmem;                    // conventional memory
+    int            extmem;                     // extended memory
+    char    boot_file[128];            // name of the kernel we booted
+    int            first_addr0;                // first address for kern convmem
+    int            diskInfo[4];                // bios info for bios dev 80-83
+    int            graphicsMode;               // did we boot in graphics mode?
+    int            kernDev;                    // device kernel was fetched from
+    int     numBootDrivers;            // number of drivers loaded by booter
+    char    *configEnd;                        // pointer to end of config files
+    int            kaddr;                      // kernel load address
+    int     ksize;                     // size of kernel
+    void    *rld_entry;                        // entry point for standalone rld
+
+    driver_config_t driverConfig[NDRIVERS];
+    APM_config_t apm_config;
+
+    char   _reserved[7500];
+
+    boot_video video;
+
+    PCI_bus_info_t pciInfo;
+
+    int            eisaConfigFunctions;
+    EISA_slot_info_t eisaSlotInfo[NUM_EISA_SLOTS];// EISA slot information
+
+    char   config[CONFIG_SIZE];                // the config file contents
+} KERNBOOTSTRUCT;
+#define KERNSTRUCT_ADDR   ((KERNBOOTSTRUCT *) 0x11000)
+#endif
+
+#ifdef KERNEL
+#define static_KERNBOOTSTRUCT (*KERNSTRUCT_ADDR)
+//extern KERNBOOTSTRUCT *KERNSTRUCT_ADDR;
+#else
+/* The assumption is that the booter is the only other consumer of this */
+extern KERNBOOTSTRUCT *kernBootStruct;
+//#undef KERNSTRUCT_ADDR
+// #define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *) BOOTSTRUCT_ADDR)
+#endif
+
+#endif /* __ASSEMBLER__ */

_________________
# include <wittycomment.h>


Last edited by neozeed on Sat Apr 22, 2017 4:05 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Fri Apr 21, 2017 6:37 am    Post subject: Reply with quote

While building other stuff DR2 has a crazy affinity for the PowerPC ...

Just comment out ppc from
Quote:
/System/Developer/Makefiles/CoreOS/ReleaseControl/Common.make


Probably a good idea to kill my crappy static links too.....

Code:
rm -f /usr/include/kern
rm -f /usr/include/machdep
rm -f /usr/include/machdep/i386/features.h
rm -f /usr/include/machine/mach_param.h
rm -f /usr/include/bsd
rm -f /usr/include/driverkit
rm -f /usr/include/audio


There is of course issues when flipping the switch adn trying to make the PCI kernbus actually work. Lots of segfaults. Compiling with -O0 makes it crazy unstable. Since the driverkit is newer than the kernel it's interfaces have obviously drifted. It's going to require some tearing into to see how they have drifted and to meet them in the middle.

One thing of interest is that there is a BUNCH of the m88k documents inside of the driver kit. Does anyone have FrameMaker 2.0J? It may be exciting to go through this stuff, for the machine that never was.... Just look for m88k
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
cuby



Joined: 12 Jan 2006
Posts: 160
Location: Coburg, Germany

PostPosted: Fri Apr 21, 2017 7:04 am    Post subject: Reply with quote

neozeed wrote:
One thing of interest is that there is a BUNCH of the m88k documents inside of the driver kit. Does anyone have FrameMaker 2.0J? It may be exciting to go through this stuff, for the machine that never was.... Just look for m88k


There's the demo version of FrameMaker 3.2 for NeXTstep at http://www.nextcomputers.org/NeXTfiles/Software/NEXTSTEP/Apps/Lighthouse_Design/FrameMaker.3.2.NIH.b.tar.gz - no idea if this is able to open older documents...

-- Michael
Back to top
View user's profile Send private message Visit poster's website
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Fri Apr 21, 2017 7:56 am    Post subject: Reply with quote

cuby wrote:
neozeed wrote:
One thing of interest is that there is a BUNCH of the m88k documents inside of the driver kit. Does anyone have FrameMaker 2.0J? It may be exciting to go through this stuff, for the machine that never was.... Just look for m88k


There's the demo version of FrameMaker 3.2 for NeXTstep at http://www.nextcomputers.org/NeXTfiles/Software/NEXTSTEP/Apps/Lighthouse_Design/FrameMaker.3.2.NIH.b.tar.gz - no idea if this is able to open older documents...

-- Michael


Cool, hoping there is some cool info burried in there!
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Fri Apr 21, 2017 8:04 pm    Post subject: Rhapsody v1.0 Reply with quote


booting up


at the desktop


shutting down.


So I copied my HD image, and then mounted it under /mnt/hdb did a rm -rf /mnt/hdb/* to clean it out. I went ahead and built a bunch of the userland stuff (needed libs, and all the cmd stuff)


Code:
put headers back for driverkit
Libcompat
Libtelnet
kernel/BUILD/RELEASE_I386
objc
driverkit-1
Libc
(cd  /mnt/hdb/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/;tar -cf - .)|(cd /System/Library/Frameworks/System.framework/PrivateHeaders;tar -xvf -)
make install DSTROOT=/mnt/hdb RC_ARCHS=i386
cp /usr/src//kernel/bsd/dev/ppc/drvATADisk/ata_extern.h /usr/include/bsd/dev/
make DSTROOT=/mnt/hdb RC_ARCHS=i386

/System/Library/Frameworks/System.framework/Headers/rpc/rpc.h has a rpcent/getrpcbynumber conflict
commands.....

/usr/src/network_cmds/netstat.tproj/inet.c
   //#include <netinet/in_pcb.h>
   #include "/usr/include/bsd/netinet/in_pcb.h"

/usr/src/network_cmds/ypinit.tproj/Makefile
        -chown root.wheel $(USRSBIN)/ypinit.sh


So after an hour I had a blank disk with all the new stuff, new kernel new libs new new new!!

I copied the /etc directory from my live DR2 system onto that partition, created the /dev tree and tried to boot but I got some mach_init error 88 thing. I don't even know where to start on that.

In a fit of rage I saved the disk images of my HD in phases of the install, so I have a HD image that has the first boot/install as a clean system. I booted that up single user mode with my 'new' slave disk and did a dump/restore overlaying my new userland & kernel onto a bare DR2 system.

Code:
dump 0f - /dev/hd1a | restore -rf -


natrually make sure the / is mounted read-write, and of course you are in the root directory.

So with the overlay, I rebooted, and BLAMO ... it booted up.

PCI drivers still have issues loading.

Is there any ISA based NE2000 drivers for OpenSTEP/Rhapsody??
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



Joined: 15 Apr 2006
Posts: 681
Location: Hong Kong

PostPosted: Fri Apr 21, 2017 11:11 pm    Post subject: Reply with quote

I just realized that the headers that are in the archive for the driver kit don't work.

And as part of it's compilation it'll actually MIG working headers. sigh. so basically build it once and comment out the part that doesn't work, get the haders, then uncomment out the one line, and point IOPCIDirectDevice.m to the MIG'd headder.

driverkit-1/libDriver/pci/IOPCIDirectDevice.m
/mnt/hdb/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/driverkit/KernBus.h

I now have PCI, Video and Ethernet.


Code:


4.4 BSD (rhapsody) (ttyp0)

login: root
Welcome to Rhapsody!

rhapsody:1# hostinfo
Mach kernel version:
         Kernel Release 5.3:
Sat Apr 22 14:04:38 SGT 2017; root(rcbuilder):kernel/BUILD/RELEASE_I386
Copyright (c) 1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved.


Kernel configured for a single processor only.
1 processor is physically available.
Processor type: i586 (Intel 80586)
Processor active: 0
Primary memory available: 64.00 megabytes.
Default processor set: 34 tasks, 74 threads, 1 processors
Load average: 1.00, Mach factor: 0.25
rhapsody:2# uname -a
Rhapsody rhapsody 5.3 Kernel Release 5.3: Sat Apr 22 14:04:38 SGT 2017; root(rcb                                                                                                                                                             uilder):kernel/BUILD/RELEASE_I386 Copyright (c) 1988-1995,1997-1999 Apple Comput                                                                                                                                                             er, Inc. All Rights Reserved.  i386
rhapsody:3# dmesg
Kernel Release 5.3:
Sat Apr 22 14:04:38 SGT 2017; root(rcbuilder):kernel/BUILD/RELEASE_I386
Copyright (c) 1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved.

physical memory = 64.00 megabytes.
using 227 buffers containing 1.27 megabytes of memory
available memory = 59.20 megabytes. vm_page_free_count = 1d9a
minimum quantum is 10 ms
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.

PCI Ver=2.10 BusCount=1 Features=[ BIOS16 CM1 ]
Found PCI 2.0 device: ID=0x12378086 at Dev=0 Func=0 Bus=0
Found PCI 2.0 device: ID=0x70008086 at Dev=1 Func=0 Bus=0
Found PCI 2.0 device: ID=0x70108086 at Dev=1 Func=1 Bus=0
Found PCI 2.0 device: ID=0x00a81013 at Dev=2 Func=0 Bus=0
Found PCI 2.0 device: ID=0x802910ec at Dev=3 Func=0 Bus=0
PCI bus support enabled
PnP: Plug and Play support enabled
ISA/EISA bus support enabled
ISA bus
DriverKit version 500
hc0: device detected at port 0x1f0 irq 14
hc0: Checking for ATA drive 0...  Detected
hc0: Checking for ATA drive 1...
hc0: Checking for ATAPI drive 1...
hc0: Resetting drives...
Registering: hc0
hd0: QEMU HARDDISK 0.9.0
hd0: 4063 cylinders, 16 heads, 63 spt (disk geometry)
hd0: using single sector transfers.
Registering: hd0
hd0: Device Block Size: 512 bytes
hd0: Device Capacity:   1999 MB
hd0: Disk Label:        Disk
hc1: device detected at port 0x170 irq 15
hc1: Checking for ATA drive 0...
hc1: Checking for ATAPI drive 0... Detected
hc1: Checking for ATA drive 1...
hc1: Checking for ATAPI drive 1...
hc1: Resetting drives...
hc1: Drive 0: ATAPI CD-ROM (FAST DRQ, REMOVABLE, CMD PKT LEN=12)
hc1: LBA supported.
hc1: buffer type 3, 512 sectors.
Registering: hc1
IDEDisk: disk 0 is ATAPI
Registering: sc0
SCSIDisk: sc0 does not support ClientThreads selector, using default
sd0: QEMU QEMU CD-ROM 0.9.
Registering: sd0 at Target 0 LUN 0 at sc0
sd0: No Valid Disk Label
sd0: Device Block Size: 2048 bytes
sd0: Device Capacity:   226 MB
SCSIDisk: sc0 does not support ClientThreads selector, using default
Registering: fc0
Registering: PS2Controller
Registering: PCKeyboard0
PCI bus support enabled
Registering: PCI0
Registering: EISA0
Registering: event0
Registering: kmDevice0
rootdev 300, howto 40000
BusMouse mouseInit: no resolution in config table.  Default is 400
Bus mouse running
Registering: BusMouse
NE2000 Generic Driver v0.9.1b
by Gabor Sebestyen

Vendor: RealTek RTL-8029
BASE: 0xc100; IRQ: 11
Registering: en0
en0: Ethernet address 52:54:00:12:34:56
Device inited...
Display0: Cirrus Logic GD5434 detected (2097152 Bytes)
Display0: PCI Dev: 2 Func: 0 Bus: 0
Display: Mode selected: 800 x 600 @ 60 Hz (RGB:256/8)
Registering: Display0





Oh yeah!
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NeXT Computers Forum Index -> Porting New Software All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4, 5 ... 12, 13, 14  Next
Page 4 of 14

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2017 phpBB Group