Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform missing #11

Closed
adalric opened this issue Aug 18, 2018 · 5 comments
Closed

Platform missing #11

adalric opened this issue Aug 18, 2018 · 5 comments

Comments

@adalric
Copy link
Collaborator

adalric commented Aug 18, 2018

I'm not completely sure but I think we need some kexts.

After

Reading startup extensions.
Loading Kernel External Components.
Reading built-in kernel personalities for I/O Kit drivers.
Sending all eligible registered kexts' personalities to the IOCatalogue but not starting matching.
0 kext personality sent to the IOCatalogue; matching not started.

Kernel panics with

panic(cpu 0 caller 0xfffffff00785dd0c): "Unable to find driver for this platform: \"~~~~~~~~~~~~~~~~~~~~~~~~\".\n"
Nested panic detected:Kernel data abort. (saved state: 0xffffffe01b50aee0)
	  x0: 0xfffffff00700e852  x1:  0x0000000000000000  x2:  0x000000000000000d  x3:  0x0000000000000000
	  x4: 0x0000000000000001  x5:  0x0000000000000001  x6:  0x0000000000000000  x7:  0xffffffe01b4ebb64
	  x8: 0x0000000000000000  x9:  0xffffffe00020e080  x10: 0xffffffe00020e080  x11: 0x0000000000000000
	  x12: 0x0000000000000010 x13: 0x0000000000000066  x14: 0xffffffe002000000  x15: 0xfffffff007128e30
	  x16: 0xdeb8f177deb8f177 x17: 0xdeb8f177deb8f177  x18: 0xfffffff0072ed000  x19: 0xdeb8f177deb8f177
	  x20: 0x0000000000000000 x21: 0xffffffe01b50b4b0  x22: 0xfffffff0072ed534  x23: 0x00000000600003c4
	  x24: 0x0000000000000000 x25: 0x0000000000000000  x26: 0xdeb8f177deb8f177  x27: 0xdeb8f177deb8f177
	  x28: 0xdeb8f177deb8f177 fp:  0xffffffe01b50b250  lr:  0xfffffff007117db0  sp:  0xffffffe01b50b230
	  pc:  0xfffffff0072fbccc cpsr: 0x600003c4         esr: 0x96000005          far: 0x0000000000000014

The call trace is the following.

screen shot 2018-08-18 at 5 32 19 pm

Do you guys think this is the kernel asking us for the basic kexts or is it something else?

@zhuowei
Copy link
Collaborator

zhuowei commented Aug 19, 2018

@aBradleyUno If you're wondering why the platform name is a bunch of tildes ("~~~~~"):

modifydevicetree.py probably erased the top level compatible node in the device tree. In that script, I only whitelisted the top level platform kext for the iPhone X, which has compatible: b'D22AP\x00iPhone10,3\x00AppleARM\x00'.

This compatible property loads the AppleARMPlatform kext, so even if you fix the modifydevicetree to whitelist that property for your device tree, you'll still get this error since there's no kext - but at least you'll get a better platform name in the error.

@adalric
Copy link
Collaborator Author

adalric commented Aug 22, 2018

@zhuowei Ok so I got the platform message in the panic, and while trying to build a kextcache I got this


Unsupported.kext doesn't support architecture 'arm64'; skipping.
Private.kext doesn't support architecture 'arm64'; skipping.
Mach.kext doesn't support architecture 'arm64'; skipping.
MACFramework.kext doesn't support architecture 'arm64'; skipping.
Libkern.kext doesn't support architecture 'arm64'; skipping.
Kasan.kext doesn't support architecture 'arm64'; skipping.
IOKit.kext doesn't support architecture 'arm64'; skipping.
BSDKernel.kext doesn't support architecture 'arm64'; skipping.
Adding /Volumes/Darm64/System/Library/Extensions/System.kext/PlugIns/IOSystemManagement.kext to prelinked kernel.
Adding /Volumes/Darm64/System/Library/Extensions/System.kext/PlugIns/IONVRAMFamily.kext to prelinked kernel.
Adding /Volumes/Darm64/System/Library/Extensions/System.kext/PlugIns/ApplePlatformFamily.kext to prelinked kernel.
Adding /Volumes/Darm64/System/Library/Extensions/System.kext/PlugIns/AppleNMI.kext to prelinked kernel.
Adding /Volumes/Darm64/System/Library/Extensions/System.kext to prelinked kernel.

command file /Volumes/Darm64/System/Library/Extensions/System.kext/PlugIns/Unsupported.kext/Unsupported reveals something weird

/Volumes/Darm64/System/Library/Extensions/System.kext/PlugIns/Unsupported.kext/Unsupported: Mach-O 64-bit kext bundle ppc64

@zhuowei
Copy link
Collaborator

zhuowei commented Aug 22, 2018

What command did you run to generate the kernelcache?

@adalric
Copy link
Collaborator Author

adalric commented Aug 22, 2018

sudo kextcache -z -a arm64 -c /Volumes/Darm64/kernelcache.debug -K BUILD/obj/mach.debug /Volumes/Darm64/System/Library/Extensions -v 6

@adalric
Copy link
Collaborator Author

adalric commented Aug 23, 2018

@zhuowei so, my bad, wrong cpu type there. Now Assertion failed: (nNonSplitKexts), function __OSKextGetPLKSegSizes, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/IOKitUser/IOKitUser-1483.201.1/kext.subproj/OSKext.c, line 16718. zsh: abort sudo kextcache -z -a arm64 -c /Volumes/Darm64/kernelcache.debug -K -v 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants