cancel
Showing results for 
Search instead for 
Did you mean: 

Linux Kernel headers for STM32MP157(openstlinux-weston)

Kanthan
Associate

I am trying to get started on Linux kernel development on STM32MP157F-DK2 board. Thus far I have been able to,

1. Flash the started package and get Linux booting successfully

2. Download the developer package, add extra logs and update the linux kernel on the board

I am trying to get started on kernel drivers and was not able to find linux headers in the sdk include path. I am getting linux/init.h as not found.

I tried to update the include path by adding the headers from the linux source code from the developer package but am facing a lot of include errors. I tried looking for a way to download the linux headers for the openst linux image online but wasn't able to find any so far.

I have the following queries,

1. Can someone provide a way to download the linux headers for cross compilation?

2. If possible can someone share a simple wiki/example of a custom kernel module/driver on the openstlinux.

Thanks in advance.

1 REPLY 1

Hi @Kanthan,

I could suggest that you have a look at the STM32 MPU wiki (https://wiki.st.com/stm32mpu/wiki/Main_Page).

 The following articles might be interesting for you:

* https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package: this article gives the step-by-step approach to download and install the OpenSTLinux components, and proposes some guidelines to upgrade (add, remove, configure, improve...) any piece of software.

* https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package: this article provides simple examples for the Developer Package of the OpenSTLinux distribution, that illustrate cross-compilation with the SDK (especially, the chapter “Modifying a built-in Linux kernel device driver” gives a very simple example that might help you).

Hope this information helps.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.