Created
October 9, 2017 02:46
-
-
Save Proteas/fe7bbb4c1b35a50de5e44d7c121d9601 to your computer and use it in GitHub Desktop.
steps to build arm64 version of xnu-4570.1.46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Following are my steps to build the ARM64 version of xnu-4570.1.46, hope this is helpfull for saving time. | |
1. Use Xcode 9.0 | |
2. Preparation is same as macOS, and there is a guide: https://0xcc.re/building-xnu-kernel-macosx-sierrra-10-12-x/ | |
3. There is an ARM64 version libfirehose: https://github.com/Proteas/install_firehose_lib | |
4. Copy and edit the ARM64 config(CFLAGS, LDFLAGS) from darwin-on-arm/xnu to your target project | |
5. Example CFLAGS: -Darm64 -DARM64 -D__arm64__ -D__ARM64__ -DLP64 -DCONFIG_EMBEDDED -mkernel -DARM64_BOARD_CONFIG_T8011=1 | |
6. Fix compiling stage errors by directly importing the missing headers or editing the code | |
7. Fix linking stage errors by implementing place holder funcitons for: chudxnu_cpu_alloc, etc | |
8. If missing symbol __divti3 in linking stage, get the runtime from llvm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment