Hello,
I'm working on a Petalinux project with the Ultra96-V2 board on kernel version 6.8.0 (Ubuntu 22.04 LTS), using Petalinux 2024.1. I've set up my project using the steps listed below:
cd ~ mkdir Avnet_2024_1 cd ~/Avnet_2024_1 git clone https://github.com/Avnet/bdf git clone -b 2024.1 https://github.com/Avnet/hdl git clone -b 2024.1 https://github.com/Avnet/petalinux
Then I initiate the build with:
cd ~/Avnet_2024_1/petalinux scripts/make_u96v2_sbc_base.sh
I encountered build errors with the WILC driver in `bt.c` and `power.c` files. The errors seem to be related to deprecated functions that are incompatible with the latest kernel. Specifically, the following issues arise:
1. Error with `class_create`:
- Error: `too few arguments to function 'class_create'`
- It seems the function signature has changed in newer kernels, requiring an explicit owner argument.
2. Error with `of_get_named_gpio_flags`:
- Error: `implicit declaration of function ‘of_get_named_gpio_flags’`
- This function appears to be deprecated in favor of `gpiod` (GPIO descriptor) APIs.
I tried manually updating the code to address these compatibility issues, such as replacing `of_get_named_gpio_flags` with `gpiod_get`. However, I’m still unsure if I’m implementing this correctly, and I'm looking for guidance on how best to adapt the WILC driver for compatibility with the 6.8.0 kernel.
Has anyone faced a similar issue with the WILC driver on Ultra96-V2 or with recent kernel updates? Any advice or solutions would be greatly appreciated! I am able to complete the build if the wilc driver is removed from the petalinux build list.
Thanks in advance for your help!