2022-10-19 08:42 AM
Hi, I got the result as below while I was building kernel images (uImage and vmlinux) and device tree (dtbs). Can anyone help me fix it?
$ make ARCH=arm uImage vmlinux dtbs LOADADDR=0xC2000040
GEN Makefile
CALL /home/rickweng/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/scripts/checksyscalls.sh
CALL /home/rickweng/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/scripts/atomic/check-atomics.sh
CHK include/generated/compile.h
make[3]: *** No rule to make target 'drivers/cpuidle/cpuidle-stm32.o', needed by 'drivers/cpuidle/built-in.a'. Stop.
I wonder why there's no rule to make target. I didn't do any modification and just followed the instructions in the README.HOW_TO.txt. Thanks for any help.
2022-10-20 12:08 AM
Hello @RWeng.1 ,
Be sure to have started the SDK in the console that you are using to build.
You need it to be able to use the cross-development toolchain.
Best Regards,
Kevin
2022-10-20 12:40 AM
Hi Kevin,
Thanks for your reply. I repeated the steps in the wiki pages as below. Are there still something I missed? I installed and ran them in Ubuntu 22.04.
~$ cd STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/
~/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package$ source SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
~/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package$ echo $ARCH
arm
~/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package$ echo $CROSS_COMPILE
arm-ostl-linux-gnueabi-
~/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package$ $CC --version
arm-ostl-linux-gnueabi-gcc (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package$ echo $OECORE_SDK_VERSION
4.0.1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15
Best Regards,
Rick
2022-10-20 12:58 AM
Hi @RWeng.1 ,
Seems good, do you still have an error? As explained in the PC Prerequisite page, the packages have been tested on Ubuntu 20.04, not on 22.04:
https://wiki.st.com/stm32mpu/wiki/PC_prerequisites#Recommended_PC_configurations
But I think it should also works.
You can also follow this page from the Getting Started than explains how to build the linux kernel source code:
Just follow the steps and it should works
Best Regards,
Kevin
2022-10-20 01:55 AM
Hi Kevin,
Thanks for your help. I tried to follow the steps on the link you gave me but it still failed. Is there anything I missed?
The outputs of "make ARCH=arm uImage vmlinux dtbs LOADADDR=0xC2000040",
.......
CC drivers/cpuidle/sysfs.o
CC drivers/cpuidle/coupled.o
CC drivers/cpuidle/dt_idle_states.o
make[2]: *** No rule to make target 'drivers/cpuidle/cpuidle-stm32.o', needed by 'drivers/cpuidle/built-in.a'. Stop.
make[1]: *** [scripts/Makefile.build:497: drivers/cpuidle] Error 2
make: *** [Makefile:1822: drivers] Error 2
Best regards,
Rick
2022-10-20 02:10 AM
Hello again @RWeng.1 ,
This file "cpuidle-stm32.c" is built if the config "CONFIG_ARM_STM32_CPUIDLE" is enabled in your Linux.
Normally, this is the case if you followed the tutorial and especially these lines:
$ cd <directory to kernel source code>
$ make ARCH=arm multi_v7_defconfig fragment*.config
$ yes '' | make oldconfig
* or, by loop:
$ for f in `ls -1 ../fragment*.config`; do scripts/kconfig/merge_config.sh -m -r .config $f; done
$ yes '' | make ARCH=arm oldconfig
This config is enabled by the defconfig file "arch/arm/configs/multi_v7_defconfig".
Since it doesn't seem to be the case in your environment, please can you send me your ".config" file that you can find in "stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.15.24-stm32mp1-r1-r0/linux-5.15.24".
Thanks,
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'
2022-10-20 02:22 AM
2022-10-20 02:38 AM
Hi @RWeng.1 ,
I just saw at the beginning of your config file that you are using the linux from the v3.1 ecosystem and not the one from v4.0.
So by looking at your previous messages, you are not using the SDK in line with you Developer Package.
The page that I shared with you previously was for the Linux 5.15.24, the latest one. But on your side you are using Linux 5.10.61. So you have to follow the wiki v3.1 for your setup. Below the link for the SDK of the Ecosystem V3.1:
Please can you follow this page, then the kernel tutorial on the same wiki v.3.1:
Hope it will help you,
Best Regards,
Kevin
2022-10-21 02:20 AM
Hi Kevin,
Thanks for your kindly help. I make all the files and copy them into STM32MP157F-DK2 but errors showed up when I executed the depmod command. The results as below:
root@stm32mp1:~# /sbin/depmod -a
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/crypto_engine.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/seqiv.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/echainiv.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/crypto_user.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/cmac.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/sha512_generic.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/gf128mul.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/ecb.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/xts.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/ctr.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/gcm.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/ccm.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/cryptd.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/aes_generic.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/drbg.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/jitterentropy_rng.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/ghash-generic.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/algif_skcipher.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/algif_rng.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/algif_aead.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/ecc.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/ecdh_generic.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/crypto/crypto_simd.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/lib/crypto/libaes.ko: Invalid argument
depmod: ERROR: failed to load symbols from /lib/modules/5.15.24/kernel/lib/crypto/libarc4.ko: Invalid argument
........
Are there still anything I missed?
Best Regards,
Rick
2022-10-28 08:10 AM
Hello @RWeng.1 ,
In your latest message, you have some errors related to the load of the modules of Kernel 5.15.24, but in your previous messages, you were using a Linux Kernel 5.10.61, so I think something is still wrong in your environment.
Please can you try again to follow the getting Started, but from scratch. Start with a clean environment, without your current developer package that seems to be a mix of two Ecosystem.
Best Regards,
Kevin