cancel
Showing results for 
Search instead for 
Did you mean: 

Time out check load galcore module expired, How to solve it?

mteaching
Associate III

This is a problem that has bothered me for months.

I hope someboby could give me some help.

Firstly I use STM32Programmer to flash the STM32MP157F-DK2, it runs really fun.

After I rebuild the kernel V3.1.0 followed by Wiki and use "scp arch/arm/boot/uImage root@192.168.7.1:/boot" many modules can't be probed successfully.

The complete boot log is in boot1.txt.

0693W00000JNFZ8QAP.pngSo I have to compile the modules and use "scp -r install_artifact/lib/modules/* root@192.168.7.1:/lib/modules" to replace the original.There're still some problems.

The complete boot log is in boot2.txt.

0693W00000JNFm7QAH.pngOnly the following problems

0693W00000JNFseQAH.png0693W00000JNFsyQAH.pngWhat's the galcore and how to solve it?

Now the board can't launch the default applications automatically and I can't clicke to started them manually.

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin HUBER
ST Employee

Hello @mteaching​ ,

We found the solution and we will surely add this information into the wiki. Thank you.

Problem explanation:

Usually, this kind of error is related to the version of the modules and happens when there is a mismatch between the version of the kernel and the vermagic field of the module. Which is not the case here, they are identical:

root@stm32mp1:/# modinfo ./lib/modules/5.10.61/extra/galcore.ko
 
filename:       //./lib/modules/5.10.61/extra/galcore.ko
 
vermagic:       5.10.61 SMP preempt mod_unload modversions ARMv7 p2v8 

and the kernel version:

root@stm32mp1:/# uname -a
Linux stm32mp1 5.10.61 #34 SMP PREEMPT Mon Apr 25 05:17:49 EDT 2022 armv7l armv7l armv7l

I have made a test by using the command "modprobe --dump-modversions" to display the module_layout version of two kernel modules built with my developer package:

root@stm32mp1:/# modprobe --dump-modversions /lib/modules/5.10.61/kernel/crypto/ccm.ko  | grep "module_layout"
 
0x99fec9cf      module_layout

and

root@stm32mp1:/# modprobe --dump-modversions /lib/modules/5.10.61/kernel/sound/core/snd-hwdep.ko   | grep "module_layout"
 
0x99fec9cf      module_layout

We can see that the module_layout are identical.

But if I check the one from the galcore.ko:

root@stm32mp1:/# modprobe --dump-modversions /lib/modules/5.10.61/extra/galcore.ko    | grep "module_layout"
0xf0051103      module_layout

The version is different and prevents the load of the module

Context and why:

Galcore is an out of tree module, but it is installed by default in the distribution package, with yocto recipes.

However, galcore is not present in Kernel sources, so with Developer package, the galcore present on the SD card come from the first image that we flashed, and is not re-generated when we compile modules (that creates versions checking issue, because it considers that galcore is not in phase with kernel config and other modules).

Solution:

Find below the method to avoid the galcore module issue in the Developer package context:

First:

You need to get the source of the gcnano driver, this is the one that generate the galcore module.

To do it you can clone the following link somewhere on the working PC:

PC $> git clone https://github.com/STMicroelectronics/gcnano-binaries.git
 
PC $> cd gcnano-binaries

Now extract gcnano-driver-6.4.3.tar.xz

PC $> cd gcnano-driver-6.4.3

You should observe all the sources to compile the driver.

We will call this folder ${GALCORE_DIR}.

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

Second:

Go to the Linux kernel source folder, in the folder where you built the kernel config and other modules (2 possibilities, you did it in the same folder as sources, not so clean, or you did it in a specific "build" folder, which is better).

Make sure that the kernel modules have been compiled one first time before doing next step.

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

Third:

In this folder, we will compile the gcnano sources with the following commands:

Compilation of module:

PC $> make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} modules

Installation of module:

PC $> make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} INSTALL_MOD_PATH=$PWD/install_artifact modules_install

At the end of this step, you should see that the galcore.ko has been installed properly.

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

You can now copy the modules on the SD card and not see the galcore error anymore.

Thank you for your help to identify this error :).

Hope it helps,

Regards,

Kevin

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.

View solution in original post

8 REPLIES 8
Olivier GALLIEN
ST Employee

Hi @mteaching​ ,

galcore.ko is the driver for the GPU.

Error : galcore: disagrees about version of symbol module_layout

Highlight that the module looks to no been built with same version of kernel installed on the board.

Does all your environnement consistent with DV3.1 ?

Means Starter originally load on board, SDK and Kernel sources ?

What gives modinfo galcore on the target ?

Olivier

Olivier GALLIEN
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.

I'm sorry I didn't reply in time due to my business trip.I'm sure my environnement consistents with DV3.1 only.I build the kernel by following the tutorial on the wiki step by step.Can I fix it by using "make menuconfig"?Some people have the same problems(Since V2.0) as me.:grimacing_face:

"modinfo galcore" shows this:

0693W00000KZYJ2QAP.pngsee this:https://community.st.com/s/question/0D53W00000JiZmuSAF/stm32mp157caa3-galcoreko

Kevin HUBER
ST Employee

Hello @mteaching​ ,

My reply take into account the proposals made in this post: https://community.st.com/s/question/0D53W00001FmZsJSAV/building-kernel-modules

and the "error.log" shared by mteaching.

To summarize:

All the errors of "disagrees about version of symbol module_layout" disappeared when the copy of the modules is correctly done, BUT, "Time out check load galcore module expired" still exists.

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

After several tries, I finally was able to reproduce the problem on my MP157C-DK2 board with the Developer Package v3.1 (Linux 5.10.61) like your log.

The fist error of timeout doesn't seem to disturb the behavior of the screen:

root@stm32mp1:~# [   44.510073] Time out check load galcore module expired

But when the second errors occur:

root@stm32mp1:~# [   56.109899] Time out check galcore device expired
[   56.182392] Weston already configured on pixman

The screen goes black during 1-2 seconds. This doesn't happens with the Starter Package, so it looks like the bug that you describe.

Since I reproduced the bug, I start the investigation with my board and tell you when I find the fix.

Regards,

Kévin

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.

This problem has been appearing after SDK1.2 (Linux 4.19), but I’m shocked that your official did not find and fix it in the past two years, I think anyone who compiles this SDK will encounter this problem. But luckily you reproduced the problem and I think you can fix it soon. In fact after updating the kernel and driver modules correctly, this program called “3D GPU�? introduced in this page(https://wiki.stmicroelectronics.cn/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Use_the_demo_launcher)can’t work.And I know some manufacturers have used your chip and made modifications and adaptations based on your SDK , but their programs are fine and no obvious errors exit.

Thank you!

Kevin HUBER
ST Employee

Hello @mteaching​ ,

We found the solution and we will surely add this information into the wiki. Thank you.

Problem explanation:

Usually, this kind of error is related to the version of the modules and happens when there is a mismatch between the version of the kernel and the vermagic field of the module. Which is not the case here, they are identical:

root@stm32mp1:/# modinfo ./lib/modules/5.10.61/extra/galcore.ko
 
filename:       //./lib/modules/5.10.61/extra/galcore.ko
 
vermagic:       5.10.61 SMP preempt mod_unload modversions ARMv7 p2v8 

and the kernel version:

root@stm32mp1:/# uname -a
Linux stm32mp1 5.10.61 #34 SMP PREEMPT Mon Apr 25 05:17:49 EDT 2022 armv7l armv7l armv7l

I have made a test by using the command "modprobe --dump-modversions" to display the module_layout version of two kernel modules built with my developer package:

root@stm32mp1:/# modprobe --dump-modversions /lib/modules/5.10.61/kernel/crypto/ccm.ko  | grep "module_layout"
 
0x99fec9cf      module_layout

and

root@stm32mp1:/# modprobe --dump-modversions /lib/modules/5.10.61/kernel/sound/core/snd-hwdep.ko   | grep "module_layout"
 
0x99fec9cf      module_layout

We can see that the module_layout are identical.

But if I check the one from the galcore.ko:

root@stm32mp1:/# modprobe --dump-modversions /lib/modules/5.10.61/extra/galcore.ko    | grep "module_layout"
0xf0051103      module_layout

The version is different and prevents the load of the module

Context and why:

Galcore is an out of tree module, but it is installed by default in the distribution package, with yocto recipes.

However, galcore is not present in Kernel sources, so with Developer package, the galcore present on the SD card come from the first image that we flashed, and is not re-generated when we compile modules (that creates versions checking issue, because it considers that galcore is not in phase with kernel config and other modules).

Solution:

Find below the method to avoid the galcore module issue in the Developer package context:

First:

You need to get the source of the gcnano driver, this is the one that generate the galcore module.

To do it you can clone the following link somewhere on the working PC:

PC $> git clone https://github.com/STMicroelectronics/gcnano-binaries.git
 
PC $> cd gcnano-binaries

Now extract gcnano-driver-6.4.3.tar.xz

PC $> cd gcnano-driver-6.4.3

You should observe all the sources to compile the driver.

We will call this folder ${GALCORE_DIR}.

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

Second:

Go to the Linux kernel source folder, in the folder where you built the kernel config and other modules (2 possibilities, you did it in the same folder as sources, not so clean, or you did it in a specific "build" folder, which is better).

Make sure that the kernel modules have been compiled one first time before doing next step.

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

Third:

In this folder, we will compile the gcnano sources with the following commands:

Compilation of module:

PC $> make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} modules

Installation of module:

PC $> make -C ${PWD} AQROOT=${GALCORE_DIR} M=${GALCORE_DIR} INSTALL_MOD_PATH=$PWD/install_artifact modules_install

At the end of this step, you should see that the galcore.ko has been installed properly.

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

You can now copy the modules on the SD card and not see the galcore error anymore.

Thank you for your help to identify this error :).

Hope it helps,

Regards,

Kevin

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.

Thank you for your reply,I succeed after some difficulties.

Firstly I build the galcore.ko directly, after I did the steps you said, I did get the module "galcore.ko" successfully,and I make the step 3 you said. But after the step Installation of module, it add a diectory called something like 5.10.61-g1620493e133f-dirty with warnnings the directory doesn't exist.

Error "Time out check load galcore module expired" persists after copying, even the network can't be used.

​NOW, PAY ATTENTION.

I delete the directory "install_artifact" in source directory.

I do this step 4 Build kernel module, and the directoray "5.10.61" changes to "5.10.61-g1620493e133f-dirty" automatically.Now no galcore building warnings.

make -C ${PWD} AQROOT=~/stm32mp157/galcore/gcnano-driver-6.4.3 M=~/stm32mp157/galcore/gcnano-driver-6.4.3 INSTALL_MOD_PATH=$PWD/install_artifact modules_install
make: Entering directory '/home/pi/stm32mp157/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61'
  INSTALL /home/pi/stm32mp157/galcore/gcnano-driver-6.4.3/galcore.ko
  DEPMOD  5.10.61-g1620493e133f-dirty
make: Leaving directory '/home/pi/stm32mp157/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61'

I run this command to transfer:

PC:scp arch/arm/boot/uImage root@192.168.7.1:/boot
PC:scp -r install_artifact/lib/modules/* root@192.168.7.1:/lib/modules

Of course two directories exist:

root@stm32mp1:/lib/modules# ls
5.10.61  5.10.61-g1620493e133f-dirty

Now I reboot, ERRORS still.

But after these steps and reboot, everything is OK!

root@stm32mp1:depmod -a
depmod: ERROR: could not open directory /lib/modules/5.10.61-g1620493e133f: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
root@stm32mp1:~# cd /lib/modules/
root@stm32mp1:/lib/modules# ls
5.10.61  5.10.61-g1620493e133f-dirty
root@stm32mp1:/lib/modules# rm -rf 5.10.61
root@stm32mp1:/lib/modules# mv 5.10.61-g1620493e133f-dirty 5.10.61-g1620493e133f
root@stm32mp1:/lib/modules# ls
5.10.61-g1620493e133f
root@stm32mp1:/lib/modules# depmod -a
root@stm32mp1:/lib/modules# sync
root@stm32mp1:/lib/modules# reboot

Nice, the screen doesn't reboot,and the application "3D GPU" works well.

Please tell me why the directory name changes?

I am looking forwarding to the update in wiki.

Now only one error exist but the net work normally:

[  6.279871] ipv6: module verification failed: signature and/or required key missing - tainting kernel

Here I show you the full log and you can find the detail including module verification failed.

I hope the galcore will be include source code in next version without "ipv6: module verification failed" after I compile it.

The most important is before the version is released, test it you yourself.

In short, the compiled logs and SDK logs should be as consistent as possible.

Thank you again and good luck.

Hello @mteaching​ ,

Thank you for your feedback and I'm happy to see that your galcore.ko works!

Regarding the issue that you encountered with the modules versions, I will search information why you have this sha1-dirty at the end of your version.

I made again the steps that I described above and I didn't encounter this problem of version:

The build and install log are attached to this reply.

make: Entering directory '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61'
  INSTALL /home/osboxes/Documents/galcore/gcnano-binaries/gcnano-driver-6.4.3/galcore.ko
  DEPMOD  5.10.61
make: Leaving directory '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61'

Maybe you can try to follow the step 4.2 Predefined kernel version vs auto-generated kernel version of the "../README.HOW_TO.txt".

Adding the file ".scmversion" will by pass the auto-generation of kernel version-number and will use the predifined version.

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

I also have the ipv6 error, but the ipv6 works well after. It is not related to the original problem of this post, but we will have a look at it too.

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.

With the logs

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.