agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
510 stars 398 forks source link

when we can use Linux kernel 6.1.21?or checkout old kernel 5.15.76, 5.15.84 ,so that I can install DSI touchscreen driver. #1193

Closed gitgonewithwind closed 2 weeks ago

gitgonewithwind commented 1 year ago

Hi all, I need to connect to a Waveshare-DSI-LCD DSI touchscreen,but the company has the newest Linux kernel 6.1.21 driver .KO. it can support raspbian image 2023-05-03-raspios-bullseye-arm64.img . but currently yocto image is 6.1.20. I can not install the driver. sudo bash ./WS Driver Start Settings modprobe: ERROR: could not insert 'WS_xinchDSI_Touch': Exec format error modprobe: ERROR: could not insert 'WS_xinchDSI_Screen': Exec format error It already exists and does not need to be added It already exists and does not need to be added It already exists and does not need to be added It already exists and does not need to be added Driver end Settings

-- how can I do?

the drivers can support kernel 5.10.103, 5.15.61, 5.15.76, 5.15.84, 6.1.21 .

but we can not get 6.1.21 now, how can I checkout 5.15.84 or some others old kernel branch from here meta-raspberrypi so I just can install the anyone driver?

Thank you very much.

agherzan commented 1 year ago

If you have a hard dependency on the kernel version, I recommend having an extra layer with a provider of that version that says with your product/use-case. So in your case, have a local provider for one of the supported kernel versions.

gitgonewithwind commented 1 year ago

If you have a hard dependency on the kernel version, I recommend having an extra layer with a provider of that version that says with your product/use-case. So in your case, have a local provider for one of the supported kernel versions.

Thank you. if I use kernel 6.1.21 source from scratch,but for there are a lot of patch for raspberry? if it is complex for me to do that? do you think I can directly use meta-raspberrypi and only change kernel to 6.1.21? or in meta-raspberrypi which commit can just fit 5.10.103, 5.15.61, 5.15.76, 5.15.84 ? my last checkout is meta-raspberrypi e1014d41ef459af807f95cb7ff9105f077bc6daa which kernel is lower than 5.10.103

gitgonewithwind commented 1 year ago

If you have a hard dependency on the kernel version, I recommend having an extra layer with a provider of that version that says with your product/use-case. So in your case, have a local provider for one of the supported kernel versions.

can I use kernel here https://github.com/raspberrypi/linux and modified current [meta-raspberrypi] (https://github.com/agherzan/meta-raspberrypi) to fit the supported kerenls driver?

gitgonewithwind commented 1 year ago

If you have a hard dependency on the kernel version, I recommend having an extra layer with a provider of that version that says with your product/use-case. So in your case, have a local provider for one of the supported kernel versions.

can I use kernel here https://github.com/raspberrypi/linux and modified current [meta-raspberrypi] (https://github.com/agherzan/meta-raspberrypi) to fit the supported kerenls driver?

@agherzan

can I directly change file:meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1.bb

LINUX_VERSION ?= "6.1.20" LINUX_RPI_BRANCH ?= "rpi-6.1.y" LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1" ...

to LINUX_VERSION ?= "6.1.21" something else to try ?

gitgonewithwind commented 1 year ago

Hi @agherzan

I changed :meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1.bb to LINUX_VERSION ?= "6.1.21" LINUX_RPI_BRANCH ?= "rpi-6.1.y" LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1" KERNEL_VERSION_SANITY_SKIP="1"

it could fetch source code and compile successfully. and I seems I actually compiled 6.1.21 version ~/work/opt_work/pi4-v1.4/dsi-8/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_6.1.21+gitAUTOINC+1a97a82e62_a1cd5351f4-r0

but after running. use uname -a to see. it's still 6.1.20 . where I need to change?

if I removed KERNEL_VERSION_SANITY_SKIP="1" error happened:

linux-raspberrypi-1_6.1.21+gitAUTOINC+1a97a82e62_a1cd5351f4-r0 do_kernel_version_sanity_check: Package Version (6.1.21+gitAUTOINC+1a97a82e62_a1cd5351f4) does not match of kernel being built (6.1.20). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe. ERROR: linux-raspberrypi-1_6.1.21+gitAUTOINC+1a97a82e62_a1cd5351f4-r0 do_kernel_version_sanity_check: ExecutionError('/home/yocto/yocto/source/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_6.1.21+gitAUTOINC+1a97a82e62_a1cd5351f4-r0/temp/run.do_kernel_version_sanity_check.205', 1, None, None) ERROR: Logfile of failure stored in: /home/yocto/yocto/source/build/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_6.1.21+gitAUTOINC+1a97a82e62_a1cd5351f4-r0/temp/log.do_kernel_version_sanity_check.205 ERROR: Task (/home/yocto/yocto/source/layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1.bb:do_kernel_version_sanity_check) failed with exit code '1'


but I can not find where can find some else change 6.1.20 to 6.1.21 so that I can change kernel to 6.1.21. I think the versions just have a little bit change, Maybe it change directly work or change a little bit patch.

any help?

Thank you