kernel_devicetree icon indicating copy to clipboard operation
kernel_devicetree copied to clipboard

Device Tree for Picasso seems broken

Open PeterCxy opened this issue 4 years ago • 5 comments

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

PeterCxy avatar Mar 01 '20 09:03 PeterCxy

Setiing CONFIG_BUILD_ARM64_DT_OVERLAY=y in defconfig works for my Mi10 device

wbs306 avatar Mar 23 '20 08:03 wbs306

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 avatar May 16 '20 12:05 atomsand

@atomsand does not work. get this FETAL ERROR: Unrecogonized check name "simple_bus_reg", but use scripts/dtc/dtc can compile passed

sophimp avatar Jun 03 '20 12:06 sophimp

@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 avatar Jun 05 '20 16:06 atomsand

@atomsand yeah, man, your kernel is awesome, it can replace the stock boot.img to boot system, but the wifi module has some problems.

sophimp avatar Jun 10 '20 04:06 sophimp