mobile-nixos / autoport

GNU General Public License v3.0
13 stars 0 forks source link

Add kernel builder skeleton #6

Open samueldr opened 3 years ago

samueldr commented 3 years ago

See: https://github.com/NixOS/mobile-nixos/pull/212


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

Things to provide:

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 (android-build@wprn6.hot.corp.google.com) (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 (android-build@wpiv11.hot.corp.google.com) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Mon Sep 19 22:14:08 UTC 2016\n"
 "Linux version 4.4.192-perf+ (builder@c5-miui-ota-bd37.bj) (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 (builder@c4-miui-ota-bd089.bj) (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 commented 3 years ago

(Also fix the callPackage invocation that changed.)