Taking the NeXT step (mach kernel upgrades)

Started by NCommander, March 14, 2017, 04:51:02 pm

Previous topic - Next topic

t-rexky

Are you reigniting your enthusiasm for additional tweaking of the Darwin sources?

:wink:

I wish I could be more active but my only free time nowadays is consumed by redesigning my home network including the rack, wiring, firewall, UTM, NAS, etc.  I am drowning...

neozeed

I have been stepping back through the process...

I need to document it more, it really is a mountain of "special" to be standing on...

That and pull in a whole lot of the rest of Darwin to get a better footing, along with leaning a lot more on Rhapsody......

It's been a year since I posted anything significant, and I'm dying to change that a little......

I also want to check out Visual Studio 2017 and it's "cross Linux" tools and see if it'll just ssh to any other OpenSSL host...
# include <wittycomment.h>

neozeed



Also I kinda worked around the weird installer thing and got Darwin 0.3 to install!

You need to install OS 9, I used the G4 Cube version, onto a disk.  Then get the Darwin 1.0 CD image, and copy the disk imaging tool to the hard disk.  Then using that tool, restore the image on the Darwin 0.3 CD onto a empty disk.

And then I used Steve Troughton Smith's BootX loader https://github.com/steventroughtonsmith/BootX


qemu-system-ppc.exe -L pc-bios -drive file=..\darwin03.qcow2,index=0,format=qcow2,media=disk -drive file=BootX_custom.dmg,index=2,format=raw,media=disk -prom-env "boot-device=ide1:2,\BootX" -prom-env "boot-args=-v rd=hd0 debug=0xffe kdp=2" -prom-env "boot-file=ide0:8,\mach_kernel" -M g3beige

Yes it does take a while to boot up, but yay now I can test feature parity between x86 and PowerPC

Oh yeah download link:

https://sourceforge.net/projects/aapl-darwin/files/qemu-images/Darwin03-PowerPC_qemu-2.11_04_22_2018.7z/download

Also here is Darwin 1.0

https://sourceforge.net/projects/aapl-darwin/files/qemu-images/Darwin1.00PowerPC_qemu-2.11_04_22_2018.7z/download

At least on Qemu Darwin 1.0 is significantly faster than 0.3 ..
# include <wittycomment.h>

neozeed

Q. But I heard Darwin OS runs on Intel PCs...

Most of Darwin code is platform-independant, and some of the platform-dependant code includes some support for Intel processor-based systems. There are, however, some parts of the system (eg. HFS+ and AppleTalk) which have not been ported to the Intel platform. The current Darwin release is compiled for PowerPC only, but it should be possible to bring up an Intel version with some additional work.

http://web.archive.org/web/19990821004420/http://publicsource.apple.com:80/projects/darwin/faq.html

Well that certainly explains a lot.

And the original 0.1 certainly was just some source files:

Q. What do I need to compile this code?
Presently, you need to buy and install a copy of Mac OS X Server with the developer tools. We are actively working on putting together a self-hosting binary distribution of Darwin so that you can install that as your development platform. This will include all of the needed development tools.

http://web.archive.org/web/19990508075706/http://www.publicsource.apple.com:80/projects/darwin/faq.html
# include <wittycomment.h>

neozeed

Something I should have done years ago, but I guess no time like the present...


https://opensource.apple.com//tarballs/

mirror this directory.

# du -hs opensource.apple.com
26G     opensource.apple.com


Ever since the 'great reset' of Darwin with the release of 10.0 it really isn't that much to be honest..

https://opensource.apple.com/release/mac-os-x-100.html
# include <wittycomment.h>

t-rexky

I pulled all the tarballs for 10.0 through 10.5 back in the days when I was fiddling with cctools.  I have them stored locally on my Synology NAS.

neozeed

Quote from: "t-rexky"I pulled all the tarballs for 10.0 through 10.5 back in the days when I was fiddling with cctools.  I have them stored locally on my Synology NAS.


I wonder if anything went missing during this time..?
# include <wittycomment.h>

t-rexky

Quote from: "neozeed"I wonder if anything went missing during this time..?


I will make a file list when I have a chance...

t-rexky


evolver56k

Excellent work!

I'm not sure how you guys managed to compile the kernel without it panicking! I've applied every patch on the forums and on neozeed's site, it compiles fine. I just can't get it to boot.

The freshly compiled kernel will boot to single user, but will panic as soon as you exit to multiuser after rc starts /etc/startup/0300_Devices (which uses driverLoader to load the Active Drivers in the Instance table)

Any hints on what I could be missing? FWIW, I'm using the darwin-0.3 dpkg-based compile scripts, shoehorning in dpkg/config files to all the source packages. They're pretty complete on the build dependencies, only a few packages fail to build.

EDIT: to clarify, I'm trying to build Darwin 0.1 sources (kernel 5.3)

neozeed

Quote from: "evolver56k"Excellent work!

I'm not sure how you guys managed to compile the kernel without it panicking! I've applied every patch on the forums and on neozeed's site, it compiles fine. I just can't get it to boot.

The freshly compiled kernel will boot to single user, but will panic as soon as you exit to multiuser after rc starts /etc/startup/0300_Devices (which uses driverLoader to load the Active Drivers in the Instance table)

Any hints on what I could be missing? FWIW, I'm using the darwin-0.3 dpkg-based compile scripts, shoehorning in dpkg/config files to all the source packages. They're pretty complete on the build dependencies, only a few packages fail to build.

EDIT: to clarify, I'm trying to build Darwin 0.1 sources (kernel 5.3)


Sorry I've been locked out for a few months.

Can you show the steps you have done, and where it bombed?
# include <wittycomment.h>

evolver56k

Eventually figured it out, it was the patch to modify the PCI bus lookup in IOPCIDirectDevice.m in driverkit. I'm now running my own build of 5.3, and (ancient) openssh/openssl:

RhapsodyVM01:Administrator root# uname -a ; ssh -V
Rhapsody RhapsodyVM01 5.3 Kernel Release 5.3: Thu Jan 31 13:53:26 EST 2019; root(rcbuilder):kernel/BUILD/RELEASE_I386 Copyright (c) 1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved.  i386
OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7i 14 Oct 2005
RhapsodyVM01:Administrator root#

neozeed

Quote from: "evolver56k"Eventually figured it out, it was the patch to modify the PCI bus lookup in IOPCIDirectDevice.m in driverkit. I'm now running my own build of 5.3, and (ancient) openssh/openssl:

RhapsodyVM01:Administrator root# uname -a ; ssh -V
Rhapsody RhapsodyVM01 5.3 Kernel Release 5.3: Thu Jan 31 13:53:26 EST 2019; root(rcbuilder):kernel/BUILD/RELEASE_I386 Copyright (c) 1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved.  i386
OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.7i 14 Oct 2005
RhapsodyVM01:Administrator root#


Good job!

It's a bit of a rough ride to 5.3, but once you get it running it's great.

I should have kept better notes on the whole thing.

I had partial notes on using CVS to download and bootstrap from DR2, although I keep on getting distracted.  :cry:
# include <wittycomment.h>