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