Coder Social home page Coder Social logo

adeii / huawei-london-kernel Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 248.9 MB

Occasional upgrades of huawei_kernel_msm8937

License: Other

Makefile 0.27% C 97.68% Assembly 1.74% C++ 0.03% Shell 0.05% Perl 0.12% Awk 0.01% sed 0.01% Python 0.04% GDB 0.01% Raku 0.02% Yacc 0.02% Lex 0.01% UnrealScript 0.01% SmPL 0.01% Scilab 0.01% XS 0.01% Roff 0.01% Clojure 0.01% M4 0.01%

huawei-london-kernel's Introduction


# 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.