cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment OpenSTLinux from STM32CubeIDE

AlexandrShipovsky
Associate III

Hello! I use STM32CubeIDE for STM32MP157A-DK1 board. I want to deploy the kernel directly from the development environment. To do this, I set up local and remote paths for the device tree and for the uImage file (see the screenshot). At first, I tried to update only the device tree - I changed the heartbeat LED from blue to yellow - everything works correctly, the extlinux.conf file is changed automatically. But when I tried to update not only the device tree but also the uImage file, SSH stopped working for me. In the UART console, I see the message "disagrees about version of symbol module_layout". My kernel version has been updated. The cat /proc/version command gives this result: "Linux version 5.10.10 (ubuntu@ubuntu-H410M-H) (arm-ostl-linux-gnueabi-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP PREEMPT Thu Jun 17 17: 59:33 MSK 2021". In the wiki (https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm ® _Cortex ® -A7/Modify,_rebuild_and_reload_the_Linux ® _kernel) I read that in addition to the core, you also need to send the core modules to the board and perform several more commands. I have a few questions:

1) Can the lack of new kernel modules be the cause of SSH failure?

2) How should I configure STM32CubeIDE so that after loading the kernel and modules, the "/sbin/depmod-a" and "sync" commands are executed ?

Should I write a script?

3) How do I set up CubeIDE for deployment correctly?

1 ACCEPTED SOLUTION

Accepted Solutions
LudovicR
ST Employee
4 REPLIES 4
AlexandrShipovsky
Associate III

0693W00000Bbl1dQAB.pngI'm sure it's the kernel modules. But I don't have enough memory to load them all with the command: "scp-r install_artefact/lib/modules/* root@<ip of board>:/lib/modules". Then I try to run the command: "find install_artifact/ - name"*.ko" | xargs $STRIP --strip-debug --remove-section=. comment --remove-section=. note --preserve-dates", but I get an error as a result: xargs unrecognized option --strip-debug

LudovicR
ST Employee

Hello SAlex.2,

I confirm you have to align kernel modules with kernel.

The wiki page you mentioned is the reference since there is not yet the full support inside STM32CubeIDE.

Note that before running the find command you have to be in the Yocto SDK environment:

source ./environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi

It is possible to customize STM32CubeIDE creating a makefile in the ***_CA7_linux-5.10.10/Makefile.ide

# Set default path

SRC_PATH ?= $(PWD)

BLD_PATH ?= $(SRC_PATH)/../build

modules_strip:

@cd $(BLD_PATH)

$(shell rm $(BLD_PATH)/$(INSTALL_MOD_PATH)/lib/modules/5.10.10/build)

$(shell rm $(BLD_PATH)/$(INSTALL_MOD_PATH)/lib/modules/5.10.10/source)

@find $(INSTALL_MOD_PATH)/ -name "*.ko" | xargs $(STRIP) --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates

and a create a Build Target:

Hope this help,

LudovicR

LudovicR
ST Employee

0693W00000BcbKmQAJ.png

@LudovicR​ Thank you for answer! I will try