• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: simple script to build a mach_kernel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple script to build a mach_kernel


  • Subject: Re: simple script to build a mach_kernel
  • From: Andreas Fink <email@hidden>
  • Date: Fri, 2 Nov 2007 13:27:44 +0100

Tried this approach but I fail on the first package already.
I presume the package is buggy as it relies on a tool which isn't there or has changed.


make install in bootstrap_cmds delivers

...
/usr/bin/chgrp -R wheel /usr/libexec/migcom
/usr/sbin/chown -R root /usr/libexec/migcom
if [ ! -d "/usr/bin" ] ; then  	\
		mkdir /usr/bin ; 		\
	fi
install -c -m 755 mig.sh /usr/bin/mig
Compressing man pages...
Usage: compress-man-pages.pl [-d prefix] dir ...
make[1]: *** [compress-man-pages] Error 255
make: *** [email@hidden] Error 2
sh-3.2#


Hopefully its only a manpage which will be missing

On 02.11.2007, at 01:10, Tom Garcia wrote:

Since the source is out and last time I tried it was difficult to start from scratch, I've scribbled a script that ends up with a mach_kernel, based on the method in http://slagheap.net/ etherspoof/ . Maybe it'll entice other dilettantes.

1. Install Xcode.

2. Download:
  * bootstrap_cmds-60.tar.gz
  * Libstreams-25.tar.gz
  * kext_tools-117.tar.gz
  * xnu-1228.tar.gz
  * cctools-667.3.tar.gz
  * IOKitUser-376.tar.gz
from the 10.5 sources page and place into a directory dist/.

3. Execute in dist's parent:
----- snip -----
#!/bin/sh

sudo mkdirhier /usr/local/bin
mkdir build
cd build

tar zxf ../dist/bootstrap_cmds-*.tar.gz
cd bootstrap_cmds-*/relpath.tproj/
make all
sudo make install

cd ../..
tar zxf ../dist/Libstreams-*.tar.gz
cd Libstreams-*
make all
sudo make install

cd ..
tar zxf ../dist/cctools-*.tar.gz
cd cctools-*/libstuff
mv Makefile Makefile.orig
sed 's,\-DKERNEL,\-I/usr/include \-DKERNEL,g' Makefile.orig >Makefile
make all
cd ../misc
make macos_all
sudo cp seg_hack.NEW /usr/local/bin/seg_hack
cd ../libmacho
make macos
cd ../ld
mv Makefile Makefile.orig
sed 's,\-DKERNEL,\-I/usr/include \-DKERNEL,g' Makefile.orig >Makefile
make kld_build
sudo cp static_kld/libkld.a /usr/local/lib
cd ..
sudo mkdirhier /usr/local/include/mach-o
sudo cp include/mach-o/kld.h /usr/local/include/mach-o

cd ..
tar zxf ../dist/IOKitUser-*.tar.gz
cd IOKitUser-*
sudo mkdirhier /usr/local/include/IOKit/kext
sudo cp kext.subproj/KXKext.h kext.subproj/KXKextManager.h kext.subproj/KXKextRepository.h /usr/local/include/IOKit/kext


cd ..
tar zxf ../dist/kext_tools-*.tar.gz
cd kext_tools-*
gcc -I/usr/local/include kextsymboltool.c -o kextsymboltool
sudo cp kextsymboltool /usr/local/bin

cd ..
tar zxf ../dist/xnu*.tar.gz
cd xnu*
make
----- snip -----

Kernel at build/xnu-1228/BUILD/obj/RELEASE_I386/mach_kernel .

(Where is ctfconvert ?)

Regards,

--
Tom Garcia | email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: simple script to build a mach_kernel
      • From: Tom Garcia <email@hidden>
References: 
 >simple script to build a mach_kernel (From: Tom Garcia <email@hidden>)

  • Prev by Date: Re: simple script to build a mach_kernel
  • Next by Date: Re: simple script to build a mach_kernel
  • Previous by thread: Re: simple script to build a mach_kernel
  • Next by thread: Re: simple script to build a mach_kernel
  • Index(es):
    • Date
    • Thread