Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to build a current kernel for a PMac 7600



Hello all,

thought it was time to upgrade the kernel on my good old 7600.

Finally I succeded to compile the kernel, see the cookbook below.

However, when booting, the kernel loads and panics immediatly:

Couldn't alloc class "PowerSurgePE"
panic (cpu 0): unable to find driver for this platform: "AAPL,7500".

Last time I made a kernel work the solution was to uncomment the appropriate sections in KernelConfigTables.cpp. This time it seems to be useless or there is something additional missing.

I remeber some comment about removing things for older Macs on the list a month or two ago but can't find it in the archives.

Any idea how to "fix" the kernel sources?

Cheers,
Markus




* * * * * K E R N E L - C O O K B O O K * * * * * * * * * * * * * * * * * * * * * * * * *

Building a more recent kernel took me several days of hacking. Below is a cookbook, that should work. Tested this with version xnu-115-4-4 of the kernel, other packages current as of 01/30/2001. This <should> work, however there's no gurantee, as I had to do _lots_ of try-and-error.


My environment:
Power Macintosh 7600 (604e, 132 MHz, 96 MB RAM)
Mac OS X Public Beta with developer tools installed
Project "bootstrap_cmds" compiled and installed
shell: zsh



- get the xnu sources from CVS or reuse a source tree by removing the "BUILD" directory

- in the xnu dir, run ". SETUP/setup.sh"

- run "make exporthdrs". Takes 16 Minutes for a xnu-115-4-4 on OS X PB, using UFS Filesystem, was several hours for earlier kernels on HFS+ (Congratulations !)

- then, you need libkld.a

If you don't have it, check the cctools and Libstreams Project out.
- unset OBJROOT SRCROOT DSTROOT SYMROOT (leftover from xnu's setup.sh)
- mkdir -p <path-to-cctools>/include/streams
- from the Libstreams project, copy streams.h over to <cctools>/include/streams
- cd libmacho
- in the Makefile, add "-static" to the definition of CFLAGS (2 times)
- make libmacho_static.a
- cd ../libstuff
- make all
- cd ../misc
- make seg_hack.NEW
- mv seg_hack.NEW /usr/local/bin/seg_hack
- cd ../ld
- in the Makefile, add "-I<path-to-xnu>/osfmk -I<path-to-xnu>/libsa/libsa \"
and "-I<path-to-xnu>/EXTERNAL_HEADERS/ \"
to the definition of the Variable KERN
- still in the Makefile, change "-lmacho_static" to "../libmacho/libmacho_static.a" (2 times)
- make kld_build

- return to xnu dir, run ". SETUP/setup.sh"

- in iokit/KernelConfigTables.cpp uncomment (remove #if's) the following declarations
(this is the 7600 specific part):

- PowerSurgePE
- GrandCentral

- in makedefs/MakeInc.def remove "-fschedule-insns" (3 times) and
modify "-mcpu=750" to "-mcpu=604" (3 times)

- in libsa/conf/Makefile.template change "/usr/local/lib/libkld.a" to show to your libkld.a.
This should be <path-to-cctools>/ls/static_kld/libkld.a .

- run "make" (takes about 2 hours)

- the ready-to-use kernel is BUILD/obj/RELEASE_PPC/mach_kernel





- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter

fon: +49 7551 9452-20

jump-ING Markus Hitter
In der Breite 27
78354 Sipplingen




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.