Jump to content

[AMD] Yosemite Kernel Release (for help use the Help Topic)


40 posts in this topic

Recommended Posts

So the source has just been released.

 

kdmpa8.jpg

 

https://opensource.apple.com/release/os-x-1010/

 

With this release I want to do things a bit different:

  • Topic ONLY for releases of kernels (this topic), this will make it easier to find kernels in the forum.
  • Topic ONLY for the testing of a kernel, when a release of a kernel gets posted on this topic inform the other topic of the release and post findings at %5BAMD%5D Yosemite Kernel Testing.
I am also thinking of posting a topic on the building of each kernel release listing the:
  • Dependancies
  • Kernel Version
  • Post the diffs for each release.
Let me know if that would be something the testers would be keen on having.
  • Like 4

I tried to build a kernel using a blend of diffs from previous successful kernels, but my command line tools are simply not behaving: in fact, it outputs the kind of errors it would if there were no CLT installed, despite I having Xcode 6 and having installed the tools from the terminal. Strange. The sum is, I cannot help you folks right now. Good luck!

  • Like 2

I tried to build a kernel using a blend of diffs from previous successful kernels, but my command line tools are simply not behaving: in fact, it outputs the kind of errors it would if there were no CLT installed, despite I having Xcode 6 and having installed the tools from the terminal. Strange. The sum is, I cannot help you folks right now. Good luck!

I've been stilling for an hour now with the same problem, thought it was only me.

 

If anyone else wants to try, here is two versions of xnu-builder

 

 

 

#!/bin/sh
# Download and build OS X Mavericks XNU Source
if [ ! -d "dtrace-118.1" ]; then
  curl -O http://opensource.apple.com/tarballs/dtrace/dtrace-118.1.tar.gz
  tar zxf dtrace-118.1.tar.gz
  rm dtrace-118.1.tar.gz
fi
if [ ! -d "AvailabilityVersions-9" ]; then
  curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-9.tar.gz
  tar zxf AvailabilityVersions-9.tar.gz
  rm AvailabilityVersions-9.tar.gz
fi
if [ ! -d "xnu-2782.1.97" ]; then
  curl -O http://opensource.apple.com/tarballs/xnu/xnu-2782.1.97.tar.gz
  tar zxf xnu-2782.1.97.tar.gz
  rm xnu-2782.1.97.tar.gz
fi
cd dtrace-118.1
mkdir -p obj sym dst
xcodebuild install -target ctfconvert -target ctfdump -target ctfmerge ARCHS="x86_64" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst
sudo ditto $PWD/dst/usr/local /usr/local
cd ..
cd AvailabilityVersions-9
mkdir -p dst
make install SRCROOT=$PWD DSTROOT=$PWD/dst
sudo ditto $PWD/dst/usr/local `xcrun -sdk / -show-sdk-path`/usr/local
cd ..
cd xnu-2782.1.97
make ARCH_CONFIGS=X86_64 KERNEL_CONFIGS=RELEASE
cd ..
echo The built kernel can be found at xnu-2782.1.97/BUILD/obj/RELEASE_X86_64/mach_kernel

 

 

 

 

#!/bin/sh

export PATH="/usr/local/bin:$PATH"

CURL="curl -O "
echo "Download the build tools source(s)" 

DTRACE=dtrace-118.1
AVAILABILITYVERSIONS=AvailabilityVersions-9
KERNEL=xnu-2782.1.97

$CURL http://www.opensource.apple.com/tarballs/dtrace/$DTRACE.tar.gz \
&& $CURL http://www.opensource.apple.com/tarballs/AvailabilityVersions/$AVAILABILITYVERSIONS.tar.gz &&

echo "Unpack the tools" \
&& 
tar zxf $DTRACE.tar.gz \
&& tar zxf $AVAILABILITYVERSIONS.tar.gz &&

echo "Build dtrace" \
&& 
cd $DTRACE \
&& mkdir -p obj sym dst \
&& xcodebuild install -target ctfconvert -target ctfdump -target ctfmerge ARCHS="x86_64" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst \
&& sudo ditto $PWD/dst/usr/local /usr/local \
&& cd .. \
&& 

echo "Build AvailabilityVersions" \
&& 
cd $AVAILABILITYVERSIONS \
&& mkdir -p dst \
&& make install SRCROOT=$PWD DSTROOT=$PWD/dst \
&& sudo ditto $PWD/dst/usr/local `xcrun -sdk / -show-sdk-path`/usr/local \
&& cd .. \

echo "Download the xnu source" \
&& 
$CURL http://www.opensource.apple.com/tarballs/xnu/$KERNEL.tar.gz \
&& 
echo "Unpack xnu" \
&& 
tar zxf $KERNEL.tar.gz \
&& 
echo "Build xnu" \
&& 
cd $KERNEL \
&& make ARCH_CONFIGS="X86_64" KERNEL_CONFIGS="RELEASE"

 

 

UPDATE:

There seems to be a problem with the xnu-2782.1.97/makedefs folder.... Copied the xnu-2422.1.72/makedefs folder and it seems to pick up the command line tools, it of course doesn't compile but it does start

 

So far I've found this different

 

 

MakeInc.cmd

Line 37

SDKROOT ?= macosx.internal

Replace

SDKROOT ?= /

 

  • Like 2

many thanks Bronya, I will test this. :)

 

 

works perfectly with intel kernel buiding! Thanks Bronya :thumbsup_anim:

amd kernel needs to be adjusted. I hang both results as a text file to.

 

the same problem with building FX kernel

successfully intel kernel building.rtf

not successful amd kernel building.rtf

FX amd_kernel building_not successful.rtf

  • Like 2

Meanwhile, try this: kernel.zip

 

Based on Bronzovka's kernel 10.9.2 diff - don't remember exactly with version, since I rename it a long time ago. I comment out some lines, and also added the tsp.c from Almir's repository for Bronzovka's kernel, and also added a Driver folder inside iokit to accommodate some files that were rejected when I applied the patch. Also removed platforms.h. All in all, I really don't expect it to work, but test it anyway. Diff coming soon.


P.S.: Yosemite boots with kernel cache instead of mach_kernel. So you must replace the stock kernel with the one I posted, and rebuild the kernel cache. Good luck!

  • Like 3

 

 

 

UPDATE:

There seems to be a problem with the xnu-2782.1.97/makedefs folder.... Copied the xnu-2422.1.72/makedefs folder and it seems to pick up the command line tools, it of course doesn't compile but it does start

 

So far I've found this different

 

 

MakeInc.cmd

Line 37

SDKROOT ?= macosx.internal

Replace

SDKROOT ?= /

 

 

Duran Keeley , yes thank ! )))

  • Like 1

UPDATE:

 

Compile without editing any files using this

make TARGET_CONFIGS="RELEASE X86_64 NONE" SDKROOT=macosx

 

I tried to build a kernel using a blend of diffs from previous successful kernels, but my command line tools are simply not behaving: in fact, it outputs the kind of errors it would if there were no CLT installed, despite I having Xcode 6 and having installed the tools from the terminal. Strange. The sum is, I cannot help you folks right now. Good luck!

UPDATE:

There seems to be a problem with the xnu-2782.1.97/makedefs folder.... Copied the xnu-2422.1.72/makedefs folder and it seems to pick up the command line tools, it of course doesn't compile but it does start

 

So far I've found this different

 

 

MakeInc.cmd

Line 37

SDKROOT ?= macosx.internal

Replace

SDKROOT ?= /

 

 

 

spakk, you try fix this :

In file MakeInc.cmd

 

see Line 37

 

SDKROOT ?= macosx.internal

 

you should Replace to 

 

SDKROOT ?= /

 

and compile

 

 

Duran Keeley , yes thank ! )))

 

 

Attached you will find the new xnu-builder for Yosemite

 

Downloads the dependancies

  • dtrace-118.1
  • AvailabilityVersions-9
  • xnu-2782.1.97 (Kernel Source)
Open terminal

 

cd to the folder of the script

 

run the cmd

sudo sh ./xnu-builder.sh

xnu-builder.sh.zip

  • Like 2

@Duran,

 

I can create an intel kernel successfully with dtrace-147, but it not work with dtrace-118.1 --> not possible to get a lot of errors.

 

but that's not the main problem, the main problem are to the adaptations of the code snippets into yosemite xnu-source.

Unfortunately, due to lack of programming knowledge, it is not possible for me to do that.

Edited by spakk
  • Like 1

Duran could we all talk on one of you topics (You have 2 with the same name).

Hi Hacker Pro

 

The Yosemite topics have different names:

  • [AMD] Yosemite Kernel Release
  • [AMD] Yosemite Kernel Testing
As I mentioned in the first post this Topic is ONLY for releases of kernels this will make it easier to find kernels in the forum.

 

The other topic is purely to report on the kernel released.

 

Kind Regards

Duran

I'm always this error message.

CC keysock.o
ERROR: ctfconvert: file does not contain dwarf type data (try compiling with -g)
CC keydb.o
CC rc4.o
CC hfs_attrl

at the end, when the kernel creation I get these error messages

CC BTree.o
CC BTreeAllocate.o
CC BTreeMiscOps.o
CC BTreeNodeOps.o
CC BTreeNodeReserve.o
CC BTreeScanner.o
CC BTreeTreeOps.o
CC CatalogUtilities.o
CC FileIDsServices.o
CC BTreeWrapper.o
CC FileExtentMapping.o
CC VolumeAllocation.o
CC UnicodeWrappers.o
CC audit.o
CC audit_arg.o
CC audit_bsd.o
CC audit_bsm.o
CC audit_bsm_errno.o
CC audit_bsm_fcntl.o
CC audit_bsm_domain.o
CC audit_bsm_klib.o
CC audit_bsm_socket_type.o
CC audit_bsm_token.o
CC audit_kevents.o
CC init_sysent.o
CC syscalls.o
LDFILELIST bsd
CC lastkernelconstructor.o
CC version.o
LD kernel.unstripped
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make[3]: *** [/Users/kernel/xnu-2782.1.97_In/BUILD/obj/RELEASE_X86_64//kernel.unstripped] Error 254
make[2]: *** [build_all] Error 2
make[1]: *** [build_all_bootstrap_RELEASE^X86_64^NONE] Error 2
make: *** [install] Error 2
georges-imac:xnu-2782.1.97_In mein$ 
  • 4 weeks later...

I adapted my kernel sources for Yosemite.

Currently untested.

I also updated the builtin decrypter to use corecrypto instead of OpenSSL (way faster).

It is based on BSA R4 with enhancements and fixes.

Could you guys please test and report back as I haven't got an AMD to test it on.

I bet super fast boot times ;)

Source diff included in the zip file :D



I'm always this error message.

CC keysock.o
ERROR: ctfconvert: file does not contain dwarf type data (try compiling with -g)
CC keydb.o
CC rc4.o
CC hfs_attrl
at the end, when the kernel creation I get these error messages
CC BTree.o
CC BTreeAllocate.o
CC BTreeMiscOps.o
CC BTreeNodeOps.o
CC BTreeNodeReserve.o
CC BTreeScanner.o
CC BTreeTreeOps.o
CC CatalogUtilities.o
CC FileIDsServices.o
CC BTreeWrapper.o
CC FileExtentMapping.o
CC VolumeAllocation.o
CC UnicodeWrappers.o
CC audit.o
CC audit_arg.o
CC audit_bsd.o
CC audit_bsm.o
CC audit_bsm_errno.o
CC audit_bsm_fcntl.o
CC audit_bsm_domain.o
CC audit_bsm_klib.o
CC audit_bsm_socket_type.o
CC audit_bsm_token.o
CC audit_kevents.o
CC init_sysent.o
CC syscalls.o
LDFILELIST bsd
CC lastkernelconstructor.o
CC version.o
LD kernel.unstripped
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make[3]: *** [/Users/kernel/xnu-2782.1.97_In/BUILD/obj/RELEASE_X86_64//kernel.unstripped] Error 254
make[2]: *** [build_all] Error 2
make[1]: *** [build_all_bootstrap_RELEASE^X86_64^NONE] Error 2
make: *** [install] Error 2
georges-imac:xnu-2782.1.97_In mein$ 
Use my custom ld64 I posted under the Developers corner.
It will fix that issue.
The problem is not your kernel but a bug in ld.
I had a similar issue when building i386 binaries and I fixed the issue.

BSA_Yos_R1.zip

  • Like 8
×
×
  • Create New...