Taking the NeXT step (mach kernel upgrades)

Started by NCommander, March 14, 2017, 10:51:02 AM

Previous topic - Next topic

neozeed

Quote from: evolver56k on July 02, 2019, 12:42:42 PMYou can create a 'manifest file' from the extracted tarballs from something like this where you extracted them (if using a bourne shell):
for i in $(ls -1) ; do echo "dir $i all" >> buildmanifest.txt
and using:
darwin-buildall buildmanifest.txt /path/to/debrepo /path/to/debdestination
Will build all the packages it can, and automatically deleting the temp files under /tmp/roots/ on a successful build.
The third field of the manifest is the same as the --target flag for darwin-buildpackage, so it can be any of all|headers|objs|local

There's a Manifest file on the Darwin 0.3 disc (Darwin OS Install CD/Binary Packages/Manifest ... it has mac line endings, so you'll have to change those to unix line endings first before using it with buildall, and change ^cvs to dir) that I believe shows how they built the deb packages for the release

This is what I needed to know.

Sigh, pitty the forum has been down for so long.

I need to do a full build.
# include <wittycomment.h>

NCommander

Yeash, this isn't dead. I actually have all my test VMs from when we did this and I think I have most of my notes as well. I'm not super active here and honestly RL took a serious dump on me about the time I dropped off but I'm around to offer big brain support. a PM works best but I'll set an alert on this thread for the future.

evolver56k

I have had a github repo set up for this for a while now, but recently made it public. I've gotten the entire Darwin 0.3 sources to build fat binaries on both intel and ppc installs, and have a binary tarball from an early build run as a release, which can be used for the binary repo during building.

I've also added the NE2K and VMXNet drivers to the package manifest, so they'll get built (i386 only) during the darwin-buildall run.

https://github.com/evolver56k/Darwin-0.3

The way I use the github repo, is to have it checked out on my modern machine, and have an NFS export of the local repo mounted on the darwin machine, either i386 via VMware, or a B&W G3 running ppc native.

With the repo on an NFS share, I can use modern editors to muck with the packages, and it's instantly reflected on the darwin build box to attempt another build.

My goal is to get other modern packages into the repo like openssh, openssl, etc., all being built with the darwinbuild system natively.

neozeed

Quote from: evolver56k on February 04, 2021, 10:18:43 AMI have had a github repo set up for this for a while now, but recently made it public. I've gotten the entire Darwin 0.3 sources to build fat binaries on both intel and ppc installs, and have a binary tarball from an early build run as a release, which can be used for the binary repo during building.

awesome job!
# include <wittycomment.h>

texta

Hi guys,

Sorry to bump an old post, I've been very eager to see if I can work on the USB stack for MOSX Server 1.2v3, and I was very excited to see a git repo for something that's at least somewhat close to the mach_kernel!

Long thread, I'm having a bit of trouble working out where it ended up. Were you guys able to compile a kernel from the Darwin 0.3 source that ran in multi-user and "just worked" (ran the loginwindow, with drivers, networking etc.?)

Cheers, keen to keep this train going in 2022.

evolver56k

It's been a good while since I've toyed with this but yeah, everything should "work". There's a couple of caveats though that I have found in my testing:

- The kernel source is roughly equivalent to the kernel in MOSX 1.0, so don't expect it to work any magic on MOSX 1.2 or 1.2v3.
- If you're running RDR2 on i386 or ppc, or MOSX 1.0 on ppc, you can't use System.framework built from these sources, as they're missing some libraries like java that'll break everything.

If you're running Darwin 0.3 though, these should compile fine on either arch.

gtnicol

Has anyone played around with OpenDarwin? I still have the source tree and an ISO from it... though I never hacked on it much.

pTeK

#232
From Page 4 Post #54

Quote from: neozeed on April 20, 2017, 10:52:37 PM=== 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

I'm using kernel-7 that came on the darwin source cd of your site?!? But I can't locate machdep/i386/features.h to be able to build drv-EIDE. Does any one have it?

compile errors are on this file /drvEIDE-1/EIDE.drvproj/EIDE.lksproj/AtapiCnt.m

At this location Line 731 at the end of the file

- property_IODeviceType:(char *)types length:(unsigned int *)maxLen
{
    strcat( types, " "IOTypeATAPI);
    return( self);
}
Edit: 2023-Nov-23 This above code has been solved and was located in the file driverkit/IOProperties.h which is in the driverkit-3 archive.

Thanks

Edit: /machdep/i386/features.h is the last missing file I require, the other missing files were able to locate in either the tarballs of driverkit-3 or kernel-7 that were on the user @neozeed CD. It seems that @neozeed created a file link so I'm interested where he managed to locate it or how he built the file.


neozeed

It's been a long while...

[darwin:~] root# find / -name 'features.h' -print
/usr/src/kernel-1/mach/features.h
/usr/src/kernel-1/machdep/machine/features.h
/System/Library/Frameworks/System.framework/Versions/B/Headers/mach/features.h
/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/mach/features.h
/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/machdep/machine/features.h
/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/machdep/ppc/features.h
/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/machdep/i386/features.h

not sure why you'd be missing it...

/*
 * 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@
 */

/*
 * Mach Operating System
 * Copyright (c) 1987 Carnegie-Mellon University
 * All rights reserved.  The CMU software License Agreement specifies
 * the terms and conditions for use and redistribution.
 *
 */
/*
 *  This file is used to pick up the various configuration options that affect
 *  the use of kernel include files by special user mode system applications.
 *
 *  The entire file (and hence all configuration symbols which it indirectly
 *  defines) is enclosed in the (KERNEL && !KERNEL_BUILD) conditional to
 *  prevent accidental interference with normal user applications.  Only
 *  special system applications need to know the precise layout of
 *  internal kernel structures and they will explicitly set the appropriate
 *  flags to obtain the proper environment.
 */

#ifndef _MACH_FEATURES_H_
#define _MACH_FEATURES_H_

#ifdef  KERNEL

#ifdef  KERNEL_BUILD
#import <meta_features.h>

#else   /* KERNEL_BUILD */
#import <machdep/machine/features.h>

#endif  /* KERNEL_BUILD */

#endif  /* KERNEL */

#endif  /* _MACH_FEATURES_H_ */

The emulator package thing Darwin03_qemu090_26_5_2017.7z should be a pre-packaged one I used to build stuff...
# include <wittycomment.h>

gtnicol


pTeK

Thanks.

I'll extract ALL the files on the CD, at the moment I only had the ones I needed or were interested in which were boot, driverkit, kernel, drvEIDE.



https://ibb.co/dj8sMYN

Ignore the illegal function call: found 'IOTypeATAPI' error. This above code has been solved and was located in the file driverkit/IOProperties.h which is in the driverkit-3 archive.