kernel_devicetree
kernel_devicetree copied to clipboard
Device Tree for Picasso seems broken
I don't know if it's my mess-up, but I was not able to build the exact same dtb image as found in the official boot.img
. My built dtb image is 4.4M when concatenated while the official one is only ~800K, and most importantly, when packaged into boot.img
, the one built by me does not work and fails straight into bootloader. In console-ramoops
I can't even see kernel messages during such a crash, which probably means the kernel isn't even booted enough to output anything to ramoops. I tried to unpack the concatenated dtb images and compare them one-by-one, but it seemed to me that even the same dtb in the two images do not really match up and differs quite significantly.
In my current effort to port LineageOS 17.1 to this device, I resorted to using OSS kernel + prebuilt DTB / DTBO for now. I hope that this can be sorted out soon as some of my kernel changes had to be dirty hacks without functional OSS DTB / DTBO.
Of course, since I'm not aware of anyone else that is currently trying to build kernel + dt for this device, it could be totally my fault instead of Xiaomi's. But for now since I do not know, I'm keeping this open until someone fixed it or could help figure out why mine does not work. My forked kernel source code (with dt included) is at https://github.com/PeterCxy/android_kernel_xiaomi_sm7250
Setiing CONFIG_BUILD_ARM64_DT_OVERLAY=y
in defconfig works for my Mi10 device
Set
TARGET_KERNEL_ADDITIONAL_FLAGS := \ DTC=$(shell pwd)/prebuilts/misc/$(HOST_OS)-x86/dtc/dtc \ MKDTIMG=$(shell pwd)/prebuilts/misc/$(HOST_OS)-x86/libufdt/mkdtimg
in BoardConfig.mk
does work.
@atomsand does not work. get this FETAL ERROR: Unrecogonized check name "simple_bus_reg", but use scripts/dtc/dtc can compile passed
@atomsand does not work. get this FETAL ERROR: Unrecogonized check name "simple_bus_reg", but use scripts/dtc/dtc can compile passed
https://github.com/atomsand/android_kernel_xiaomi_sm8250/commit/3a09ae3eb06947605f070e80b2b535ff7d593185
@atomsand yeah, man, your kernel is awesome, it can replace the stock boot.img to boot system, but the wifi module has some problems.