I'm doing it like that (my case is Marlin (Pixel, Pixel XL), AOSP 8.1), don't know anything about Pie and later.
1. Download the kernel for msm, checkout the proper branch 2. Rename the kernel checkout directory to "marlin" and place it to kernel/google/ in the AOSP tree, 3. Open AndroidKernel.mk and find lines: TARGET_KERNEL := msm-$(TARGET_KERNEL_VERSION) ifeq ($(TARGET_KERNEL),$(current_dir)) # New style, kernel/msm-version BUILD_ROOT_LOC := ../../ TARGET_KERNEL_SOURCE := kernel/$(TARGET_KERNEL) KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/kernel/$(TARGET_KERNEL) KERNEL_SYMLINK := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ KERNEL_USR := $(KERNEL_SYMLINK)/usr else # Legacy style, kernel source directly under kernel KERNEL_LEGACY_DIR := true BUILD_ROOT_LOC := ../ TARGET_KERNEL_SOURCE := kernel KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ endif and change them to TARGET_KERNEL := google/marlin BUILD_ROOT_LOC := ../../../ 4. In device/google/marlin make a new file called AndroidBoard.mk with the following content: #ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) #KERNEL_DEFCONFIG := marlin-debug_defconfig #else KERNEL_DEFCONFIG := marlin_defconfig #endif KERNEL_DIR := kernel/google/marlin TARGET_KERNEL_APPEND_DTB := true include $(TOP)/$(KERNEL_DIR)/AndroidKernel.mk .PHONY: $(PRODUCT_OUT)/kernel $(PRODUCT_OUT)/kernel: $(TARGET_PREBUILT_KERNEL) cp $(TARGET_PREBUILT_KERNEL) $(PRODUCT_OUT)/kernel uncomment the condition on the top if you need. 5. In device/google/marlin/device-common.mk find lines: ifeq ($(TARGET_PREBUILT_KERNEL),) LOCAL_KERNEL := device/google/marlin-kernel/Image.lz4-dtb else LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) endif PRODUCT_COPY_FILES += \ $(LOCAL_KERNEL):kernel and delete them. 6. In device/google/marlin/marlin and device/google/marlin/sailfish make a symlink AndroidBoard.mk -> device/google/marlin/AndroidBoard.mk 7. I don't know exactly, but if you really need, you can try to uncomment the line in BoardConfig.mk # TARGET_COMPILE_WITH_MSM_KERNEL := true to make your condition work. I never did that so can't say if it works. BTW: Personally I don't know if Pie is different about compiling kernels. I see the same conditions about prebuilt kernels as in Oreo. понедельник, 9 сентября 2019 г., 4:23:23 UTC+3 пользователь Clienthax написал: > > Problem with that is that the kernel headers won't get 'installed', > breaking qcom msm kernel header locations, > https://android.googlesource.com/platform/hardware/qcom/display/+/refs/heads/master/msm8994/common.mk#48 > > On Monday, 9 September 2019 01:18:43 UTC+1, The Glitchh wrote: >> >> Use prebuilt kernel , compile the kernel separately and then push the >> Image.gz-dtb to the device tree and use the preceding flags to define the >> prebuilt kernel >> >> # Prebuilt \kernel >> PRODUCT_COPY_FILES += \ >> $(LOCAL_PATH)/Image.gz-dtb:kernel >> >> Paste this in device.mk makkefile of your device tree > > -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to android-building@googlegroups.com To unsubscribe from this group, send email to android-building+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-building+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/004620f7-e5e6-4e30-ba53-4aa11539a632%40googlegroups.com.