adeii / huawei-london-kernel Goto Github PK
View Code? Open in Web Editor NEWOccasional upgrades of huawei_kernel_msm8937
License: Other
Occasional upgrades of huawei_kernel_msm8937
License: Other
# kernel_huawei_msm8937 1. How to Build - get Toolchain From android git server , codesourcery and etc .. - aarch64-linux-android-4.9 Example: git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 - edit Makefile edit "CROSS_COMPILE" to right toolchain path (You'd downloaded). Example: CROSS_COMPILE=/home/user/kernel/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- Example: CROSS_COMPILE=/usr/local/toolchain/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- // check the location of toolchain or try: export CROSS_COMPILE=arm-linux-androideabi- export PATH=$PATH:<toolchain_parent_dir>/aarch64-linux-android-4.9/bin $ make ARCH=arm64 L21_defconfig (stock Y7 Prime 2018 kernel config + Ezz's SE Permissive) $ make ARCH=arm64 Image.gz-dtb (full kernel zImage, currentilly updated to 3.18.67) NOTICE - separated commands make few error, use single line command from kernel folder like: $ make ARCH=arm64 CROSS_COMPILE=/home/ade/kernel/aarch64-linux-android-4.9/bin/aarch64-linux-android- L21_defconfig Image.gz-dtb 2. Output files - Kernel : arch/arm64/boot/Image.gz-dtb - module : drivers/*/*.o (not needed after all, even pass compiling but error 2 in the end.) 3. How to Clean $ make ARCH=arm64 distclean 4. Future upgrades Patch source: https://github.com/android-linux-stable/msm-3.18 Look for commits "Merge 3.18.xx into android-3.18" Download it as patch....wget not works on SSL, use aria2c, ex. of 3.18.70 to 3.18.71 aria2c https://github.com/android-linux-stable/msm-3.18/commit/7a365d34991f0eb95317bfaaa75cc482dd3f5dcb.patch Rename file as 3.18.71.patch into root of kernel sourcecode Check patch and apply it: git apply --check 3.18.71.patch git am < 3.18.71.patch when error, manualy fix/edit files from xx/NN patch and skip that patch to next xx+1/NN and apply again. git am --skip git am < 3.18.71.patch 5. Far future plan Add commits from various Xiaomi MSM8937 kernels to make new cpu gov/io or more compatible to Pie/Q/R... Like: https://github.com/LordShenron/Direwolf_unified , https://github.com/sunnyraj84348/android_kernel_xiaomi_msm8917/tree/inferno , https://github.com/ChimeraKernelProject/chimera_land-current , https://github.com/Ubports-Land/android_device_xiaomi_msm8937-common , https://github.com/linuxpanda/android_kernel_xiaomi_rosy/tree/3.18 ################################################################################ This package make out Image.gz-dtb only, you have to get ramdisk and add kernel cmdline to generate a total kernel.img before replace your phone's kernelimage. In AIKernel.zip, we got repacking tool from osmosis. Place Image.gz-dtb to split_img folder. Rename it as KERNEL.img-zImage and use repackimg.bat (yes, it is Windows version). For GNU/Linux use mktool - repack image [https://techstop.github.io/mktool/] Current files are for rom 8.0.0.147 c432 from 2020-02. If you use another version of rom, change file KERNEL.img-oslevel. Tested and working!!! UPDATE1> Let's test EVA-GCC (gcc v10) --- WORKS with Nathan Chance's gcc7+ patch 1a - git clone https://github.com/mvaisakh/gcc-arm64.git -b gcc-master eva-gcc 1b - make ARCH=arm64 CROSS_COMPILE=/home/ade/kernel/eva-gcc/bin/aarch64-elf- L21_defconfig Image.gz-dtb 1c - patches (not needed): https://gist.github.com/mvaisakh/50cfeb0308d09636ba489a79e6d8aca9#file-gcc-inline-regressions-patch UPDATE2> Let's test gcc v7 --- WORKS with Nathan Chance's gcc7+ patch 1a - git clone --depth=1 https://github.com/nathanchance/gcc-prebuilts -b aarch64-gnu-7.x gcc7 1b - make ARCH=arm64 CROSS_COMPILE=/home/ade/kernel/gcc7/bin/aarch64-gnu-linux-android- L21_defconfig Image.gz-dtb
Hello, I kept getting this issue when compiling the kernel :
aarch64-none-elf-ld: kernel/built-in.o: in function `free_task':
/home/arm/git/huawei-london-kernel/kernel/fork.c:229: undefined reference to `cpufreq_task_stats_exit'
/home/arm/git/huawei-london-kernel/kernel/fork.c:229:(.text+0x9a0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `cpufreq_task_stats_exit'
make[1]: *** [Makefile:982: vmlinux] Error 1
make: *** [Makefile:540: __build_one_by_one] Error 2
Command exited with non-zero status 2
It happens without regard to the compiler I used ( aarch64-none-elfgcc on alpine musl (aarch64) or eva-gcc 12 on debian)
I have also tried looking for the definition of the function using grep in the kernel root but only its declaration could be found.
Have you any idea?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.