cancel
Showing results for 
Search instead for 
Did you mean: 

Why kernel name does not change after sync & reboot commands?

Arnas Celkys
Associate II

Good evening,

I am using stm32mp157F-DK-2 board. And I want to update the kernel from old 5.4.31 to 5.10.10.

I was following step-by-step "Modify, rebuild and reload the Linux® kernel" on the "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#Build_the_Linux-C2-AE_kernel_source_code_for_the_first_time".

Only strange thing the command: >> /sbin/depmod -a - does not return any success/failure info. No errors appeared so I used >> sync and >>reboot.

After reboot I see that both old and new kernel modules are present:

>> ls /lib/modules

5.10.10  5.4.31

When i try to check current kernel version :

>> uname -a

Linux stm32mp1 5.4.31 #1 SMP PREEMPT Wed Apr 8 07:08:47 UTC 2020 armv7l armv7l armv7l GNU/Linux

Have I missed something? Does the old kernel module should be removed entirely?

I have tried re-flashing the board and repeating procedure multiple times. Thanks for any information!

1 ACCEPTED SOLUTION

Accepted Solutions
OlivierK
ST Employee

Hi ACELK.1 (Community Member)

You shouldn't have 5.4.x modules mixed with 5.10.x. I suggest that you start from a clean directory, different from your old kernel 5.4 environment.

Install the Developper package (OpenSTLinux V3.x) following the link you mentioned, and source the SDK environment (V3.x) before you rebuild the kernel:

source <STM32MPU-Release-21-03-31 Dev Package Dir>/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi

The boot partitions should be updated also according to OpenSTLInux V3.x. If not done so, you can flash a OpenSTLinux V3,x starter package then update the kernel according to your needs.

Best Regards

Olivier

View solution in original post

4 REPLIES 4
OlivierK
ST Employee

Hi ACELK.1 (Community Member)

You shouldn't have 5.4.x modules mixed with 5.10.x. I suggest that you start from a clean directory, different from your old kernel 5.4 environment.

Install the Developper package (OpenSTLinux V3.x) following the link you mentioned, and source the SDK environment (V3.x) before you rebuild the kernel:

source <STM32MPU-Release-21-03-31 Dev Package Dir>/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi

The boot partitions should be updated also according to OpenSTLInux V3.x. If not done so, you can flash a OpenSTLinux V3,x starter package then update the kernel according to your needs.

Best Regards

Olivier

Thank, Olivier,

I am trying cleaning all directories and re-doing everything from scratch. Just couple of questions poped-up - if you don't mind.

1.The boot partitions should be just copied from my 5.10.10 work directory, or do I have to update the Bootfs according to?

7.2. Update via network:

------------------------

* kernel + devicetree

  $ cd <path to install_artifact dir>/install_artifact

  if bootfs are not monted on target, mount it

    $ ssh root@<ip of board> df to see if there is a partition mounted on /boot

  else

    $ ssh root@<ip of board> mount <device corresponding to bootfs> /boot

  $ scp -r boot/* root@<ip of board>:/boot/

  $ ssh root@<ip of board> umount /boot

or just these two copy commands are enough ?

scp arch/arm/boot/uImage root@<board ip address>:/boot

scp arch/arm/boot/dts/stm32mp157*.dtb root@<board ip address>:/boot

2.So just to clarify after successful kernel update & sync & reboot, the BOARDs /lib/modules should only contain the latest module's name?

 Best Regards, Arnas, LCC Simbiotecha

Arnas Celkys
Associate II

UPDATE: I have cleaned the directory and refollowing the steps in "Modify, rebuild and reload the Linux® kernel", but kep having issues -like boot getting stuck or version not changing after reboot.

So in the end I have followed Oliver's advice, re'flashed the board via USB-C by using the 5.10.10 flash image on the en.FLASH-stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31.tar.xz, from : https://wiki.st.com/stm32mpu/wiki/STM32MP1_Starter_Package_-_images. Everything seems to be working fine now, thanks!

Arnas Celkys
Associate II

But it is still unclear, why i could not do that successfully after cleaning the directory.... Is there a chance to perhaps get a video tutorials, of step-by-step for kernel-configuration-uploading ?