element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Ultra96 Hardware Design Petalinux 2024.1 Build Error for Ultra96-V2 with WILC Driver on Kernel 6.8.0
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • +1 person also asked this people also asked this
  • Replies 3 replies
  • Subscribers 351 subscribers
  • Views 1221 views
  • Users 0 members are here
Related

Petalinux 2024.1 Build Error for Ultra96-V2 with WILC Driver on Kernel 6.8.0

agingwarrior
agingwarrior over 1 year ago

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!

  • Sign in to reply
  • Cancel

Top Replies

  • bidrohini
    bidrohini over 1 year ago +2
    In Linux kernel 6.x, class_create has changed, and an additional THIS_MODULE parameter is now required to specify the module owner. This should be a straightforward change: Original code: struct class…
Parents
  • bidrohini
    0 bidrohini over 1 year ago

    In Linux kernel 6.x, class_create has changed, and an additional THIS_MODULE parameter is now required to specify the module owner. This should be a straightforward change:

    Original code: 

    struct class *my_class = class_create("my_class");
    

    Updated code:

    struct class *my_class = class_create(THIS_MODULE, "my_class");
    

    Updating this to add THIS_MODULE as the first argument should resolve the “too few arguments” error. Make sure this change is implemented wherever class_create is invoked.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • bidrohini
    0 bidrohini over 1 year ago

    In Linux kernel 6.x, class_create has changed, and an additional THIS_MODULE parameter is now required to specify the module owner. This should be a straightforward change:

    Original code: 

    struct class *my_class = class_create("my_class");
    

    Updated code:

    struct class *my_class = class_create(THIS_MODULE, "my_class");
    

    Updating this to add THIS_MODULE as the first argument should resolve the “too few arguments” error. Make sure this change is implemented wherever class_create is invoked.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • agingwarrior
    0 agingwarrior over 1 year ago in reply to bidrohini

    Hi,

    Thanks for your guidance on the class_create issue. I'm new to Petalinux and still getting familiar with the specifics of the code and its structure. I'm not entirely sure where to implement the change you suggested or how to go about it.

    Could you please provide some more details on where to look for the class_create calls in my project? Any specific files or sections in the code that I should focus on would be really helpful.

    Thanks again for your support!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube