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

Add kernel builder skeleton #6

Open
samueldr opened this issue Oct 2, 2020 · 1 comment
Open

Add kernel builder skeleton #6

samueldr opened this issue Oct 2, 2020 · 1 comment

Comments

@samueldr
Copy link
Member

samueldr commented Oct 2, 2020

See: mobile-nixos/mobile-nixos#212


Now that there is a clearer way to define the skeleton, we can provide one.

Things to provide:

  • isQcdt via Identify QCDT image files #3
  • isImageGzDtb, detected via CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE
  • kernel-builder-gcc* or kernel-builder-clang* suggested via the kernel version string
  • suggested patches?
    • With the SoC identified, we can suggest known useful patches (e.g. RGBA)
    • With "boot as recovery" known, we can suggest the patch to drop command line arguments

The patches would likely need a note addressing the fact that they might or might not apply, since sometimes OEMs customize more the tree.


Suggested compiler identification

Kernel version string examples:

 "Linux version 3.18.71-perf-g0442dde1 (hudsoncm@ilclbld26) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Aug 14 04:48:08 CDT 2018\n"
 "Linux version 4.9.112-perf+ (ubuntu@ip-172-31-37-89) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Mar 5 05:30:46 UTC 2019\n"
 "Linux version 3.18.131-ga2426c4f8f23 ([email protected]) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Fri May 10 20:32:26 UTC 2019\n"
 "Linux version 3.4.0-gcf10b7e ([email protected]) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Mon Sep 19 22:14:08 UTC 2016\n"
 "Linux version 4.4.192-perf+ ([email protected]) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Jul 13 23:28:40 CST 2020\n"
 "Linux version 4.9.223-g5bded8e40b62-ab6647920 (android-build@abfarm-us-west1-c-0040) (Android (6443078 based on r383902) clang version 11.0.1 (https://android.googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79)) #0 SMP PREEMPT Thu Jul 2 03:22:48 UTC 2020\n"
 "Linux version 3.18.79 (dguidi@planet) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #1 SMP PREEMPT Wed May 8 09:31:08 BST 2019\n"
 "Linux version 3.10.54+ (build@i3-ri-14-use1a-b-108) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Sat Mar 21 01:43:57 UTC 2020\n"
 "Linux version 4.4.153-perf+ (BuildUser@BuildHost) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon May 6 16:27:58 2019\n"
 "Linux version 4.14.141-g5e607c7 ([email protected]) (Android (5484270 based on r353983c) clang version 9.0.3 (https://android.googlesource.com/toolchain/clang 745b335211bb9eadfa6aa6301f84715cee4b37c5) (https://android.googlesource.com/toolchain/llvm 60cf23e54e46c807513f7a36d0a7b777920b5881) (based on LLVM 9.0.3svn)) #1 SMP PREEMPT Thu Jun 4 03:32:41 CST 2020\n"
 "Linux version 3.10.49-g2e9678a (hudsoncm@ilclbld30) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Thu Apr 6 09:32:43 CDT 2017\n"
 "Linux version 4.14.117-perf+ (nobody@android-build) (clang version 8.0.11 for Android NDK) #1 SMP PREEMPT Tue Jul 7 09:33:13 CDT 2020\n"
 "Linux version 4.4.223-g1bc566a21f60-ab6662096 (android-build@abfarm-east4-067) (Android (6443078 based on r383902) clang version 11.0.1 (https://android.googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79)) #1 SMP PREEMPT Wed Jul 8 09:51:18 UTC 2020\n"
 "Linux version 4.14.117-duo-d-2020_812_28+ (user@7d04ed37ca3c) (clang version 8.0.12 for Android NDK) #1 SMP PREEMPT Tue Aug 25 19:48:05 UTC 2020\n"

So /(gcc|clang) version ([^ ])/ or something along the line.

@samueldr
Copy link
Member Author

(Also fix the callPackage invocation that changed.)

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

No branches or pull requests

1 participant