By checking my current recovery partition, I noticed DTBs are attached to partition, not to kernel. I also noticed it is not using a compressed kernel. So I'll configure BoardConfig.mk as:
BOARD_KERNEL_IMAGE_NAME := Image
Apparently no kernel patch will be needed... Anyway I created a git repository for it, just in case I need to change something.
Again, the build works, but it doesn't boot.
As I'm focusing on testing the kernel, I'm using the recovery partition.
I just dumped a copy of it with:
host$ adb shell phone$ su phone# cp /dev/block/bootdevice/by-name/recovery /sdcard phone# exit phone$ exit host$ adb pull /sdcard/recovery
To do this, I do
host$ adb reboot bootloader # phone reboots host$ fastboot flash recovery /path/to/recovery.img # it flashes, then, holding volume-up, I type: host$ fastboot reboot
To flash back my working recovery image, I do the same as above, just changing the path to recovery image.