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

Where is the code to execute in user mode after boot? #36

Closed
4ch12dy opened this issue Jan 4, 2021 · 3 comments
Closed

Where is the code to execute in user mode after boot? #36

4ch12dy opened this issue Jan 4, 2021 · 3 comments

Comments

@4ch12dy
Copy link

4ch12dy commented Jan 4, 2021

Here are two confused questions about post kernel patch.

1, I didn't found the code that setup binpack, dropbear , mount checkra1n.dmg and so on.
how launchd process run processes like dropbear? by inject dyld?

2, any boot option/gBootFlag can skip setup loader.app or launch dropbear process after boot patched kernel?

I think the two questions maybe the same problem. Thank you so much for your response!

@Siguza
Copy link
Member

Siguza commented Jan 5, 2021

The ramdisk and binpack aren't part of Pongo. The ramdisk is currently uploaded over LLB at the same time as Pongo, and KPF merely makes the kernel boot it. That takes care of all the early boot stuff, then waits for the binpack upload over USB.

I don't understand your second question. Do you want to explicitly not launch dropbear? Because we currently launch it on port 44, regardless of whether you touch loader.app...

@4ch12dy
Copy link
Author

4ch12dy commented Jan 5, 2021

Thanks! Sorry my bad questions, actually what I want to ask is that it can just use checkra1n-kpf-pongo to patch the kernel instead of automatically doing kind of thing like installing binpack after boot kernel. Or can I do it manually? That mean I can run my code like upload binpack and launch dropbear.

btw, I build the project and I can load kext module, build/checkra1n-kpf-pongo, to patch kernel in pangos shell and send kpf and bootux commands to boot. But I don't know how to use build/Pongo(Mach-O 64-bit preload executable arm64) and build/Pongo.bin(maybe upload to device). Thanks again!

@Siguza
Copy link
Member

Siguza commented Jan 5, 2021

We currently have no "nice" infrastructure in place for a custom ramdisk, but I guess you could set one with your own Pongo module...

And the way you use Pongo.bin is by passing it to checkra1n -k. You can also pass PongoConsolidated.bin, which includes the KPF and will automatically run it.

@4ch12dy 4ch12dy closed this as completed Jan 5, 2021
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