cancel
Showing results for 
Search instead for 
Did you mean: 

"Modify, rebuild and reload the Linux® kernel" not working

OGiov.1
Associate II

Hello, I have received a STM32MP157F-DK2 so I develop a program to send data through the SPI port toward other device (like a STM32 nucleo, maybe).

Reading about this first device I saw that example code0693W00000Y9WGtQAN.png won't work there but I should use spidev on openstlinux ( wiki st com stm32mpu wiki SPI_overview ). However, in order to spidev get to work is needed to select the port name (i guess)... the case is:

/sys/bus/spi/devices and /dev/spi* have "N-O-T-H-I-N-G":pouting_face: although the port is physically installed >:( . Really I don't know what is the meaning of creating a image for this device if this will no recognize all of the present hardware :fearful_face:.

Well, in wiki st com stm32mpu wiki SPI_overview says in

"3.1 Kernel configuration

Enable SPI support (SPI framework and STM32 SPI driver) in the kernel configuration through the Linux Menuconfig tool: Menuconfig or how to configure kernel. "

This is done manually in your kernel .config file:

CONFIG_SPI=y

CONFIG_SPI_MASTER=y

CONFIG_SPI_SLAVE=y

CONFIG_SPI_STM32=y

CONFIG_SPI_SPIDEV=y"

So, I did it this in the .config file following instructions given at wiki st com stm32mpu wiki Getting_started STM32MP1_boards STM32MP157x-DK2 Develop_on_Arm%C2%AE_Cortex%C2%AE-A7 Modify,_rebuild_and_reload_the_Linux%C2%AE_kernel .

After several installations of so many packages in the PC I've arrived until this step without troubles:

5.4 Reboot the board

Board $> reboot

But... the device doesn't boot now >:(>:(>:(>:( , just keeps hanged on the first screen (ST Logo and "life.augmented" tittle).

In conclusión, I need the SPI port working at that toy so I can use the spidev framework, I had to rebuild the kernel in order to enable the concerned modules following the official documentation and now the device (which doesn't belong to me) doesn't boot.

Thanks in advance (sorry because of my poor english)

6 REPLIES 6
KnarfB
Principal III

The wiki page says in bold red letters: To modify the kernel options, it is not recommended to edit this file directly.

So, revert to the last known good state and better use menuconfig for that.

hth

KnarfB

OGiov.1
Associate II

Thanks for your help, however the device is still hanging after followed each and every one of the steps. In this time I didn't changed the .config file manually but I used "make menuconfig" and there it showed a tree menu where I selected the options specified by https://wiki.st.com/stm32mpu/wiki/SPI_overview (3.1 Kernel configuration). All of the commands finished without errors; when the device was rebooted ( https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Modify,_rebuild_and_reload_the_Linux%C2%AE_kernel ) according to "5.4 Reboot the board", it gets hanged for ever. I don't know what to do anymore, it really is a bad joke to sell a device with unusable hardware components, if the SPI port is too much to ask, then at least don't mention it in the device features.

I appreciate any ideas or guidance on getting this thing to do what it claims to do, thanks.

Gregory PLANCHON
ST Employee

Hello @OGiov.1​ ,

Could you tell me what you changed in your device tree ?

If possible share it with me

And if you have some trace or log you can share them with me too ?

Regards,

Grégory

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.
OGiov.1
Associate II

Hola :), I marked exactly this, nothing more than this:

0693W00000Y9j1mQAB.pngI didn't get errors, at least I didn't see them. I can repeat the process and catch all console output in a text file and upload it if you want.

Thanks for your attention, man.

Gregory PLANCHON
ST Employee

Hello,

after modifying your configuration, did you also modify the device tree, as indicated here :

https://wiki.st.com/stm32mpu/wiki/SPI_overview#Device_tree_configuration ?

if yes, can you share it?

Regards,

Grégory

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.
OGiov.1
Associate II

Hmmm... noup, I did guess the work was rebuild the kernel making a pause for enabling the SPI port master, slave and stm32 :face_without_mouth: . I don't know anything about DTC :smiling_face_with_smiling_eyes: . I'll try to solve it and will post you the results, thanks.