There was an article some time ago by JB and he said AOSP was not designed 
to have the kernel built with the code. I would recommend building your 
kernel and then create a folder structure like the following

android/devices/htc/device_name (your device files)
android/device/htc/device_name_kernel (your kernel file goes in here)

and then in your device.mk file have something like the following this 
taken from htc flounder

ifeq ($(TARGET_PREBUILT_KERNEL),)
ifeq ($(USE_SVELTE_KERNEL), true)
LOCAL_KERNEL := device/htc/flounder_svelte-kernel/Image.gz-dtb
else
LOCAL_KERNEL := device/htc/flounder-kernel/Image.gz-dtb
endif # USE_SVELTE_KERNEL
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif


BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs


# This ensures the needed build tools are available.
# TODO: make non-linux builds happy with external/f2fs-tool; 
system/extras/f2fs_utils
ifeq ($(HOST_OS),linux)
TARGET_USERIMAGES_USE_F2FS := true
endif


LOCAL_FSTAB := $(LOCAL_PATH)/fstab.flounder




TARGET_RECOVERY_FSTAB = $(LOCAL_FSTAB)


PRODUCT_COPY_FILES := \
    $(LOCAL_KERNEL):kernel \
    $(LOCAL_PATH)/init.flounder.rc:root/init.flounder.rc \
    $(LOCAL_PATH)/init.flounder.usb.rc:root/init.flounder.usb.rc \
    $(LOCAL_PATH)/init.recovery.flounder.rc:root/init.recovery.flounder.rc \
    $(LOCAL_FSTAB):root/fstab.flounder \
    $(LOCAL_PATH)/ueventd.flounder.rc:root/ueventd.flounder.rc


On Saturday, June 3, 2017 at 2:13:52 PM UTC-6, Aditya Parmar wrote:
>
> I have HTC's kernel source code for my device but the issue is I can't add 
> it to my aosp build anyone please tell me how to do that. 
>
> Thank you.

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to