Skip to main content
RWeng.1
Associate
October 19, 2022
Question

Errors on building the Linux® kernel source code

  • October 19, 2022
  • 10 replies
  • 3903 views

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.

This topic has been closed for replies.

10 replies

Kevin HUBER
ST Employee
October 20, 2022

Hello @RWeng.1​ ,

Be sure to have started the SDK in the console that you are using to build.

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Install_the_SDK#Start_the_SDK_up

You need it to be able to use the cross-development toolchain.

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
RWeng.1
RWeng.1Author
Associate
October 20, 2022

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

Kevin HUBER
ST Employee
October 20, 2022

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:

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#Prepare_the_Linux-C2-AE_kernel_source_code

Just follow the steps and it should works

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Kevin HUBER
ST Employee
October 28, 2022

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
RWeng.1
RWeng.1Author
Associate
October 31, 2022

Hi Kevin,

​

Sorry for late and thanks for your recommendation. I will try again.

​

Thanks and Best Regards,

Rick