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 ... 11, 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
Rob Blessin Black Hole
Site Admin


Joined: 05 Sep 2006
Posts: 597
Location: Ft. Collins, Colorado

PostPosted: Thu Jun 01, 2017 1:33 am    Post subject: Reply with quote

I know when installing custom drivers on NeXTstep or Openstep for intel they always go into the path /private/Drivers/i386

This is a good read on Rhapsody driver tweaks https://www.williamreading.com/2004/04/25/rhapsody.html

This may help jump through some hoops....

I found this as well which may help as it looks like there is some cross over

Creation Date: January 18, 1996
Last Updated: <<Date June 17, 1997>>

Table of Contents

....Overview
....Definitions
....Screen Goes Black
....Convincing the Booter That You Actually Have Drivers
....Bypassing Configure
....Bypassing BuildDisk

Overview

Sometimes, the NEXTSTEP installation programs can get confused about your system configuration, or there may be some incompatibility that prevents you from going through a certain phase of installation. Often, if you can jump over these hurdles, you can still get NEXTSTEP installed and running on your system. This NeXTanswer details why the installation process does what it does during certain phases of the installation, the steps to take to bypass them.

Definitions

For the sake of clarity let's define two phases of installation.
Phase 1: This is when you initially boot your system off of the installation floppy and load the software off the CD-ROM. It goes up to the point when the dots have finished travelling across the screen, and the system reboots.
Phase 2: This is the configuration and package installation phase. When the system reboots off the hard disk, you still need to have the CD-ROM in the drive to load packages from, but all essential information is already on your hard disk. It goes up to the end of package installation, and subsequent reboot.
Phase 3: This is when the system is fully up and running, and you are asked to configure the language and keyboard preferences.

Screen Goes Black

When booting some systems, the screen may just go black, and the system will hang. On some systems this can be prevented by booting in verbose mode. Type "-v" at the boot: prompt to boot in verbose mode.

Convincing the Booter That You Actually Have Drivers

When rebooting into Phase 2, the booter will determine if you used drivers that were not on the CD-ROM during installation. If so, it will ask you to insert the driver floppy. Sometimes, it may have trouble reading the driver floppy. You can boot up in single-user mode off the CD-ROM and copy the drivers onto the hard drive.

To boot single-user off the CD-ROM:
1. Make a copy of the 3.3 Core Drivers Floppy and the 3.3 Additional Drivers Floppy (see 1921_Creating_FDs_From_Images_Under_NEXTSTEP_and_DOS.rtf)
2. Boot off the installation floppy as if you were going to install, but type "-s" at the boot: prompt. (You will be prompted for the driver floppy, and everything will proceed the same as a regular installation, but it will stop short of actually installing.)
3. Make sure that you specify the Floppy Driver off of the Core Drivers Floppy as well as the regular boot drivers. You need it so you can use the floppy drive in single user mode.
4. At the # prompt, type "mount -n -o -ro /dev/hd0a /Disk" (use /dev/sd0a if it is a SCSI drive) to mount the hard drive.
5. Insert your floppy with the additional drivers on it that you need to copy over.
6. At the # prompt, type "mount -n /dev/fd0a /Floppy" to mount the floppy.
7. At the # prompt, type "cp -rp /Floppy/private/Drivers/i386/drivername.config /Disk/private/Drivers/i386/" to copy a driver to the hard drive.
8. At the # prompt, type "mv /private/Drivers/i386/System.config/InstallHints /private/Drivers/i386/System.config/InstallHints.old" to rename the InstallHints file. Both the booter and Configure use the InstallHints file to determine if you used drivers that were not on the CD-ROM.

Bypassing Configure

Configure is the first graphical program that comes up in Phase 2. For some machines, it can crash the installation process and render your system unbootable. To bypass Configure, you can boot up in single-user mode off the hard drive and create the Instance0.table file.

To do this:
1. Boot normally off the hard drive, but type "-s" at the boot: prompt
2. At the # prompt, type "cd /private/Drivers/i386/System.config" Smile
3. At the # prompt, type "cp Default.table Instance0.table"
4. At the # prompt, type "exit"

This will exit single-user mode, and continue on with the rest of the configuration. After you've completed the rest of the configuration, you should be able to log in as root, launch Configure.app, and configure all the drivers for your system.

Note: You should always save and quit in Configure, then log out and reboot your machine for changes to take effect. Doing the "quick reboot" could cause your disk to become corrupted and unbootable.
Warning: Because you created the Instance0.table by hand, it could become out of sync with what Configure shows you. After running Configure to set up your drivers, you should check the Instance0.table manally (by viewing it in Edit) to make sure that drivers are not listed twice, and that extra drivers are not listed.

Bypassing BuildDisk

BuildDisk is the second graphical program that comes up in Phase 2. It is the one that lets you choose what packages to install. Sometimes, especially with large disks, BuildDisk can become confused and report that you have little or no disk space available to install packages. It won't let you continue beyond this point. You can bypass BuildDisk by booting up in in single-user mode off the CD-ROM and creating the /usr/adm/BuildDisk.custom file.

To do this:
1. Boot normally off the hard drive, but type "-s" at the boot: prompt
2. At the # prompt, type "touch /usr/adm/BuildDisk.custom" to create the BuildDisk.custom file. Smile

4. At the # prompt, type "exit"

This will exit single-user mode and allow you to continue with the rest of the installation. NEXTSTEP has been fully installed and functional at this point, but none of the extra packages have been installed. You can install them individually by logging in as root and double clicking on the packages in the folder /NeXTCD/Packages on the CD-ROM.
_________________
Rob Blessin President computerpowwow ebay sales@blackholeinc.com http://www.blackholeinc.com
303-741-9998 Serving the NeXT Community since 2/9/93
Back to top
View user's profile Send private message Send e-mail Visit poster's website
neozeed



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

PostPosted: Thu Jun 01, 2017 5:19 am    Post subject: Reply with quote

Since I'm in my office, I've loaded up a VMWare instance, and I'm rebuilding everything again to see if my hacks are good enough to 'just work'

I hit the 8GB ceiling hard. Got a nice 'float' error accessing blocks over 8,000,000 or so. without GDB not sure what was going on.
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



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

PostPosted: Thu Jun 01, 2017 9:04 am    Post subject: Reply with quote

stumbling blocks...

Code:
driverkit/configTablePrivate.h
driverkit/i386/PCI.h

cp /usr/src/srcroot//driverkit-3/driverkit/configTablePrivate.h /tmp/roots/boot-64-2.roots/boot-64-2.root/System/Library/Frameworks/System.framework/Headers/driverkit/
mkdir /tmp/roots/boot-64-2.roots/boot-64-2.root/System/Library/Frameworks/System.framework/Headers/driverkit/i386
cp /usr/src/srcroot/driverkit-3//driverkit/i386/PCI.h /tmp/roots/boot-64-2.roots/boot-64-2.root/System/Library/Frameworks/System.framework/Headers/driverkit/i386



ipconfig/ipconfig_ext.h

mkdir /tmp/roots/netinfo-1.67-167.roots/netinfo-1.67-167.root/System/Library/Frameworks/System.framework/Headers/ipconfig
cp /tmp/roots/netinfo-1.67-167.roots//netinfo-1.67-167.root/Local/Developer/Headers/ipconfig/* /tmp/roots/netinfo-1.67-167.roots/netinfo-1.67-167.root/System/Library/Frameworks/System.framework/Headers/ipconfig



I don't get why it includes . .. Rolling Eyes

Anyways

Code:
bash-2.02# darwin-missing /usr/src/srcroot/ /usr/src/dstroot/
must build ._0_i386-apple-darwin.deb using dir /usr/src/srcroot//.
must build .._0_i386-apple-darwin.deb using dir /usr/src/srcroot//..
must build gdb_142-1_i386-apple-darwin.deb using dir /usr/src/srcroot//gdb-1
must build rcs_5.7-1_i386-apple-darwin.deb using dir /usr/src/srcroot//rcs-1
must build zsh_3.1.5-1_i386-apple-darwin.deb using dir /usr/src/srcroot//zsh-1
must build build.sh_0_i386-apple-darwin.deb using dir /usr/src/srcroot//build.sh


So rcs & zsh build outside ok, and GDB has that foundation kit issue so yeah I got a rebuild! ... time to purge and do it again.
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
Rob Blessin Black Hole
Site Admin


Joined: 05 Sep 2006
Posts: 597
Location: Ft. Collins, Colorado

PostPosted: Thu Jun 01, 2017 11:30 am    Post subject: Reply with quote

Hello: I found this document which helps break the differences between NeXTSTEP and openstep and how to pport NeXTSTEP apps to Openstep apps , I'm guessing this may offer some clues as to why you may be getting certain errors
http://www.nextcomputers.org/NeXTfiles/Docs/Software/OPENSTEP/802-2115.pdf

And this one how to port from NeXTstep to Openstep to Rhapsody to OSX
http://www.rhapsodyos.org/
_________________
Rob Blessin President computerpowwow ebay sales@blackholeinc.com http://www.blackholeinc.com
303-741-9998 Serving the NeXT Community since 2/9/93
Back to top
View user's profile Send private message Send e-mail Visit poster's website
neozeed



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

PostPosted: Thu Jun 01, 2017 11:46 am    Post subject: Reply with quote

Rob Blessin Black Hole wrote:
Hello: I found this document which helps break the differences between NeXTSTEP and openstep and how to pport NeXTSTEP apps to Openstep apps , I'm guessing this may offer some clues as to why you may be getting certain errors
http://www.nextcomputers.org/NeXTfiles/Docs/Software/OPENSTEP/802-2115.pdf


I'm not sure I think that's the PDO over OPENSTEP, although the last thing Im going to do is turn down information!

First thing I see is CORBA & database access... oh dear this is where WebObjects was born. Back in the day I did have an EOF CD, and I did image it, but I never did get PDO.. What is interesting is that the objectiveC compiler does have PDO hooks so it ought to build for OpenSTEP. Or at least somewhat build.

I've seen a few mentions of SUN/PDO and HP/PDO along with NT/PDO here and there.

As it mentions:


Foundation Kit OpenStep Foundation Kit is an enhanced
superset of the NEXTSTEP 3.3 Foundation
Kit. The OpenStep Kit contains API
modifications and additions.

While we have no Foundation Kit...

Even with the older Netinfo we had the following un-resolved:


Code:
NXFreeObjectBuffer
NXReadArray
NXReadObjectFromBuffer
NXReadTypes
NXWriteArray
NXWriteRootOBjectToBuffer
NXWriteTypes


I don't see any GNUStep equivalents. Although it does look like an object library... At the surface not that involved, but Im sure it's chock full of edge case exceptions.
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
NCommander



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

PostPosted: Thu Jun 01, 2017 3:45 pm    Post subject: Reply with quote

I'm fairly badly swamped right now so I can't dig into this, but the CoreFoundation problem is a serious headache that ultimately killed OpenDarwin. That being said, later Darwin's were self-hostable (at least 10.4 was).

PureDarwin reimplemented the wheel here (https://github.com/PureDarwin/PureFoundation) so theorically we have the necessary bits to get the compiler to go, but honestly, I'm debating if we're saner simply grabbing what we need from DR2. That would mean we're dependent on a propertiary blob which kinda sucks.

EDIT: Looking through Darwin 10.4.x86, I was right, CoreFoundation was released, but it looks like Apple took a fairly large bludgen to NetInfo so it could build standalone. Might be worth a shot ...
Back to top
View user's profile Send private message
neozeed



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

PostPosted: Thu Jun 01, 2017 6:06 pm    Post subject: Reply with quote

NCommander wrote:
I'm fairly badly swamped right now so I can't dig into this, but the CoreFoundation problem is a serious headache that ultimately killed OpenDarwin. That being said, later Darwin's were self-hostable (at least 10.4 was).

PureDarwin reimplemented the wheel here (https://github.com/PureDarwin/PureFoundation) so theorically we have the necessary bits to get the compiler to go, but honestly, I'm debating if we're saner simply grabbing what we need from DR2. That would mean we're dependent on a propertiary blob which kinda sucks.

EDIT: Looking through Darwin 10.4.x86, I was right, CoreFoundation was released, but it looks like Apple took a fairly large bludgen to NetInfo so it could build standalone. Might be worth a shot ...


It's ok, the netinfo from 1.0 is running! And I can login to myself. The only binary blobs is some device drivers.

This is a VM running on my desk. Check the kernel build date!

Code:
# telnet 192.168.1.55
Trying 192.168.1.55...
Connected to 192.168.1.55.
Escape character is '^]'.


4.4 BSD (vdarwin) (ttyp1)

login: root
Password:
tcsh: No entry for terminal type "linux"
tcsh: using dumb terminal settings.
[vdarwin:~] root# hostinfo
Mach kernel version:
         Kernel Release 5.5:
Thu Jun  1 04:15:23 PDT 2017; root
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: pentium (Intel Pentium)
Processor active: 0
Primary memory available: 384.00 megabytes.
Default processor set: 34 tasks, 71 threads, 1 processors
Load average: 1.56, Mach factor: 0.08
[vdarwin:~] root#



I'll upload an iso later on with all the binaries. If I could make UFS CD-ROM'S I'd make a bootable distro. But really the only missing package out of the source is GDB.

I too was occupied with work as well, so don't worry, but Tha KS to those build scripts I could let my PC hammer out a build.

Do you still have the build order to really bootstrap the whole thing? The build all seems as dumb as me using bash and doing a "for i in *;do ./build.sh $i;done" ....

Ii think I'm at the point where I want to start incorporating some of the bsd kernel changes from 0.3 to 1.0. At a minimum it looks like there is a bunch of NFS fixes.
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
NCommander



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

PostPosted: Thu Jun 01, 2017 6:38 pm    Post subject: Reply with quote

Build order was only important for bootstrapping. Just make sure the entire set of debs are in repo and then let it rip. It will pull from dstroot over repo if necessary (I think it prefers it).
Back to top
View user's profile Send private message
neozeed



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

PostPosted: Thu Jun 01, 2017 6:44 pm    Post subject: Reply with quote

NCommander wrote:
Build order was only important for bootstrapping. Just make sure the entire set of debs are in repo and then let it rip. It will pull from dstroot over repo if necessary (I think it prefers it).


I wanted to rebuild on a bootstrap order to make sure I didn't fuck anything up in some cascading hidden failure...

Otherwise, that VMware box is actually a 3rd generation!

I made it build 2x so it's Deb's are 5th generation.

While poking around I saw cc has a "Grail" target... I386/m68k/hppa/sparc.

--edit

Also I'm scared to say, but after the 1st built kernels failure to load drivers, every one onward I have used, has worked. It looks like there really was a subtle change from the DR2 to 0.1/0.3 ... I'm on the train. I'm going to make a 5th gen install and see how it goes. But yeah TL;DR we are 98% self hosting!
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



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

PostPosted: Thu Jun 01, 2017 10:46 pm    Post subject: Reply with quote

http://mirror.informatimago.com/next/developer.apple.com/documentation/Darwin/Conceptual/howto/booting_on_x86/booting_on_x86.html

Quote:
Create a root filesystem

Now you just need to make a root filesystem for the CD. To do this, put all the things you need into one directory. For instance, assume /cdimage will be the "/" for your CD. You can put whatever you want here.

The list of Darwin projects that are used on Darwin/x86 install CD are:

iokituser
xnu
startup
Libsystem
boot
diskdev_cmds
text_cmds
zsh
basic_cmds
awk
file_cmds
shell_cmds
system_cmds
files
adv_cmds
corefoundation
zlib
cctools
Once you have built yourself a suitable "/" in /cdimage, you'll need to create the actual ISO image of the cdrom. First, copy the boot floppy to an appropriate place on the cd:

cp boot.flp /cdimage/usr/standalone/i386/boot.flp
And then create the image. You'll need the "mkisofs" project installed on your machine.

mkhybrid -r -J -h -c user/standalone/i386/boot.catalog -b \
usr/standalone/i386/boot.flp -o darwincd.iso /cdimage
You will now have a bootable Darwin/x86 cd image ready to be burned to disc.


So in the Darwin 1.x days, yeah HFS CD's....
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



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

PostPosted: Fri Jun 02, 2017 7:13 am    Post subject: Reply with quote

In between circuit failures, and firewall issues I had time to do an overlay

I did a darwin full 'install' and deleted the /private directory, Then I took a DR2 install and overlaid the darwin on top.

It actually boots up into the UI, and let's me login. Things mostly work, however there is some expected falling bits.

A *LOT* of applications will not run.

Code:
Jun  2 13:12:43 rhapsody /System/Administration/BuildDisk.app/BuildDisk: objc: please link appropriate classes in your program
Jun  2 13:12:44 rhapsody /System/Administration/Configure.app/Configure: objc: please link appropriate classes in your program


This is the most verbose I could get out of clicking like crazy. A lot of demos run fine. It's also good to know the Darwin 1.0 netinfo is working fine with DR2.

Code:
Jun 02 14:07:10 Terminal[329] Can't connect to the distributed notification server: bootstrap_look_up returned bootstrap unknown service.
dyld: ./Terminal Undefined symbols:
_NXFreeObjectBuffer
_NXReadArray
_NXReadObjectFromBuffer
_NXReadTypes
_NXWriteArray
_NXWriteRootObjectToBuffer
_NXWriteTypes


It looks like these are all in objc-1\typedstream.m so... I'm unsure about the linkage and why these are 'missing'...

As predicted.

Rhapsody:

Code:
rhapsody:13# otool -v -T /System/Library/Frameworks/System.framework/Versions/B/System | grep typedstream
typedstream.o    _NXCloseTypedStream
typedstream.o    _NXEndOfTypedStream
typedstream.o    _NXFlushTypedStream
typedstream.o    _NXFreeObjectBuffer
typedstream.o    _NXGetTypedStreamZone
typedstream.o    _NXOpenTypedStream
typedstream.o    _NXOpenTypedStreamForFile
typedstream.o    _NXReadArray
typedstream.o    _NXReadObject
typedstream.o    _NXReadObjectFromBuffer
typedstream.o    _NXReadObjectFromBufferWithZone
typedstream.o    _NXReadType
typedstream.o    _NXReadTypes
typedstream.o    _NXSetTypedStreamZone
typedstream.o    _NXSystemVersion
typedstream.o    _NXTypedStreamClassVersion
typedstream.o    _NXTypedStreamIsSwapped
typedstream.o    _NXWriteArray
typedstream.o    _NXWriteObject
typedstream.o    _NXWriteObjectReference
typedstream.o    _NXWriteRootObject
typedstream.o    _NXWriteRootObjectToBuffer
typedstream.o    _NXWriteType
typedstream.o    _NXWriteTypes
typedstream.o    _getSizeOfType


Darwin:

Code:
rhapsody:3# otool -v -T /System/Library/Frameworks/System.framework/Versions/B/System | grep typedstream


More digging to be done...
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
NCommander



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

PostPosted: Fri Jun 02, 2017 9:21 am    Post subject: Reply with quote

It looks like on the older DR2 systems, NX* was part of libSystem and in Foundation where it lives now. That would actually explain why NeXTstep software will not run on DR2 due to the library linker not pulling in the right bits even though from an ABI perspective, shat more or less stayed the same until Mac OS X 10.0 and IOKit.

Theoretically, if we could solve that, we would be able to run NS/OS apps under Rhaspody.

I'm sort of tempted to try Darwin 1.0 and see if it will run Rhaspody 5.5. stuff in a chroot. No hope of getting WindowServer to go but just userland compatbility.
Back to top
View user's profile Send private message
neozeed



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

PostPosted: Fri Jun 02, 2017 10:17 am    Post subject: Reply with quote

NCommander wrote:
It looks like on the older DR2 systems, NX* was part of libSystem and in Foundation where it lives now. That would actually explain why NeXTstep software will not run on DR2 due to the library linker not pulling in the right bits even though from an ABI perspective, shat more or less stayed the same until Mac OS X 10.0 and IOKit.

Theoretically, if we could solve that, we would be able to run NS/OS apps under Rhaspody.

I'm sort of tempted to try Darwin 1.0 and see if it will run Rhaspody 5.5. stuff in a chroot. No hope of getting WindowServer to go but just userland compatbility.


I tried 10.12.3 .. it's all killed signal 9. chroot or not. Kind of disapointing, but not surprising. I don't think x64 is that compatible.
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



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

PostPosted: Fri Jun 02, 2017 7:30 pm    Post subject: Reply with quote

http://lisp.gotgeeks.com/Documentation/NEXTSTEP-0.8/RelNotes/OSNotes.txt

Quote:
Future Directions

The following shared libraries will be merged into one library by
release 0.9 or 1.0:

libappkit_s.a
libdpsclient_s.a
libstreams_s.a
libdb_s.a
libobjc_s.a


Lots of documents on this site, including release notes.

In the advent we can't build everything that ought to be in System, I guess a 'plan b' would be a way to extract a target's System objects, overlay them with what we do have, and re-link that? Is that even possible? I've only done something like this a long long time ago.[/url]
_________________
# include <wittycomment.h>
Back to top
View user's profile Send private message Visit poster's website
neozeed



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

PostPosted: Sat Jun 03, 2017 8:46 pm    Post subject: Reply with quote

I ran out of space on my VMware build machine, so I thought rebooting would clear tmp... Nope!

It just rename the full directory....

If this rehash goes well I'll post an updated CD with source + binaries.

I'll also finally setup some CVS to work with the tools of the era.

I have to go out to do some chores but I'm still feeling motivated which is good.

Should I do a listserv?

I don't know if I'm just polluting here too much, or if people like to see the (non) progress? I'm nowhere near as talented as andreas_g, so we shall see how far we get ..
_________________
# 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 ... 11, 12, 13, 14  Next
Page 12 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