Advertisement
gimmeitorilltell

My Kernel Cheets

Apr 22nd, 2017
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. build/core/tasks/kernel.mk
  2.  
  3. make mrproper
  4. export ARCH=arm
  5. export CROSS_COMPILE=~/Desktop/linaro/bin/arm-linux-gnueabihf-
  6. export CROSS_COMPILE=~/Desktop/gcc_kernel/bin/arm-linux-gnueabihf-
  7. export CROSS_COMPILE=~/Desktop/COMPILE_KERNEL/arm-eabi-4.7/bin/arm-eabi-
  8. export CROSS_COMPILE=~/Desktop/COMPILE_KERNEL/arm-eabi-4.7/bin/arm-eabi-
  9. make cyanogenmod_quincyatt_defconfig
  10. make cyanogenmod_skyrocket_defconfig
  11. make gimme_quincyatt_defconfig
  12. make uber_hercules_defconfig
  13. sh kernel.sh
  14. make menuconfig
  15. make -j8
  16. make clean
  17.  
  18. arm-linux-androideabi-
  19. export CROSS_COMPILE=~/Desktop/COMPILE_KERNEL/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-
  20.  
  21. prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-/bin/arm-linux-androideabi-
  22.  
  23. make -C kernel/samsung/msm8660 O=/home/tony/SlimRoms/out/target/product/quincyatt/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/tony/SlimRoms/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-" zImage
  24.  
  25. # disable aggressive loop optimizations in gcc 4.8
  26. KBUILD_CFLAGS += $(call cc-option, -fno-aggressive-loop-optimizations)
  27.  
  28. vendor/slim/config/common.mk
  29. PRODUCT_PROPERTY_OVERRIDES += \
  30. ro.build.selinux=1 <--yes
  31. PRODUCT_PROPERTY_OVERRIDES += \
  32. ro.build.selinux=0
  33.  
  34.  
  35.  
  36. dmesg | grep corrupt
  37.  
  38. Build the kernel:
  39. =================
  40. set the following environment variables:
  41. make menuconfig
  42. make zImage
  43.  
  44. export TOP= [where you installed the toolchain or top of android AOSP code base]
  45. export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
  46. export ARCH=arm
  47. export SUBARCH=arm
  48. export CROSS_COMPILE=arm-eabi-4.6
  49.  
  50. make [the defconfig file for this device above]
  51. make clean (for subsequent builds)
  52. make cyanogenmod_quincyatt_defconfig
  53.  
  54. Output Binary Files:
  55. ====================
  56. After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
  57. If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
  58.  
  59. You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
  60.  
  61. kernel modules:
  62. ./driver/*.ko
  63.  
  64. If you have already built and installed a boot.img with root access you can also install the modules directly into the device using "adb remount" and "apb push [file] system/lib/modules/" for each file listed above. After installing files set permissions with "adb shell chmod 0644 system/lib/modules/*" and "adb reboot"
  65.  
  66. For additional information:
  67. ===========================
  68. http://htcdev.com
  69.  
  70.  
  71.  
  72. #Custom Toolchain
  73. TARGET_KERNEL_CUSTOM_TOOLCHAIN := arm-eabi-4.7
  74.  
  75. #Prebuilt Kernel
  76. TARGET_PREBUILT_KERNEL := device/samsung/skyrocket/kernel
  77.  
  78. TARGET_KERNEL_CUSTOM_TOOLCHAIN := $(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin
  79. KERNEL_TOOLCHAIN := $(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin
  80. KERNEL_TOOLCHAIN := arm-eabi-4.7 <this is in stock cm source>
  81.  
  82. BoardConfig.mk<t6spr>
  83. # Kernel
  84. TARGET_PREBUILT_KERNEL := device/htc/t6spr/kernel
  85. TARGET_KERNEL_CONFIG := cyanogenmod_t6_defconfig
  86. TARGET_KERNEL_SOURCE := kernel/htc/msm8960
  87.  
  88. #Prebuilt Recovery
  89. TARGET_PREBUILT_RECOVERY := device/htc/t6spr/recovery.img
  90.  
  91. full_t6spr.mk
  92. LOCAL_PATH := device/htc/t6spr
  93. ifeq ($(TARGET_PREBUILT_KERNEL),)
  94. LOCAL_KERNEL := $(LOCAL_PATH)/kernel
  95. else
  96. LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
  97. endif
  98.  
  99. PRODUCT_COPY_FILES += \
  100. $(LOCAL_KERNEL):kernel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement