cancel
Showing results for 
Search instead for 
Did you mean: 

Error in "Prepare the Linux® kernel source code"

Sisyphus38
Associate III

Hello,

I tried to apply the step by step "Modify, rebuild and reload the Linux® kernel" form wiki.st .

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

Everything works fine from the first step of the "Getting started " until i uncoutered the error bellow.

Unfortunately i am a complete beginner on these tools and don't understand whats happen.

Thank you by advance for any help.

@PC:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.0.0/Developer-Package/stm32mp1-openstlinux-5.4-dunfell-mp1-20-06-24/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.4.31-r0/linux-5.4.31$ make ARCH=arm multi_v7_defconfig "fragment*.config"

 HOSTCC scripts/basic/fixdep

 HOSTCC scripts/kconfig/conf.o

 HOSTCC scripts/kconfig/confdata.o

 HOSTCC scripts/kconfig/expr.o

 LEX    scripts/kconfig/lexer.lex.c

/bin/sh: 1: flex: not found

scripts/Makefile.host:9: recipe for target 'scripts/kconfig/lexer.lex.c' failed

make[2]: *** [scripts/kconfig/lexer.lex.c] Error 127

Makefile:567: recipe for target 'multi_v7_defconfig' failed

make[1]: *** [multi_v7_defconfig] Error 2

Makefile:326: recipe for target '__build_one_by_one' failed

make: *** [__build_one_by_one] Error 2

22 REPLIES 22

Thanks @Sisyphus38​ , when I repeated the reinstallation, I kept a close eye on the messages fired back and I realized some of the modules were not being installed because of storage space. So I increased the virtual disk in my VMWare from 20GB to 50GB and everything went on smoothly to the end, the only problem still troubling me is that the board returns an IPv6 address only, while the instructions show as if I have to use IPv4.

So now I get stuck on this command trying to communicate between my laptop and the board0693W000007CFAmQAO.jpg 

Sisyphus38
Associate III

Hello MSele.1,

Good news !

I have noticied the same situation. That moment I thaugth the device is only IPv6 Compatible, but i was wrong.

If I am right your host developpement computer needs to attribute an ipv4 adress. So you have to adjust network parameters in the host computer like DHCP, subnetwork mask....

Maybe this link can help you.

https://www.cyberciti.biz/faq/linux-unix-ifconfig-does-not-show-ip-address/

Don't hesitate to give feedback for other users.

Regards

Sisyphus38
Associate III

Sorry MSele1, post sent twice.

Hi @Sisyphus38​ ,

I deleted the duplicate comment.

@MSele.1​ ,

To get ipv4 address seems you have to set :

[Network]
 
DHCP=ipv4

in some conf file in /lib/systemd/network

See https://wiki.st.com/stm32mpu/wiki/How_to_configure_ethernet_interface

Hope it help,

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.

Hi @Community member​ I was unable to connect my pc to the board using ethernet, because of IP differences. Resolving between IPv4 and IPv6 has become too complicated for me since the board has no editor that I can use to edit the files indicated at the link you provided; in future I will use a router between my pc and the board, but I need this problem to be solved now before I get the router. My work around was by copying to a USB memory stick all files that were supposed to be sent by the command

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

in Section 5.2 here Modify, rebuild and reload the Linux® kernel - stm32mpu and transfer them to the board manually.

The problem comes again as a I move to Section 5.3 where the command

PC $> find install_artifact/ -name "*.ko" | xargs $STRIP --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates

fires the following error

0693W000007CWOMQA4.jpgIf I ignore that error and proceed by copying all files intended by the command

PC $> scp -r install_artifact/lib/modules/* root@<ip of board>:/lib/modules

then I run into memory problems where many modules of the kernel cannot be installed because of insufficient space as shown below.

0693W000007CWVNQA4.jpgDo you have any ideas to go around it? Please @Community member​ and @Sisyphus38​ help with your expertise and experience with this board

Hi @MSele.1​ ,

Did you remove busybox/"vi" editor support from 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.

@Community member​  No, and I don't know what is that! I was trying to use gedit

"vi" is a very basic but famous light text editor.

It present by default in OpenSTLinux.

Make a try and consult the web for a "vi cheat sheet" in order to get command syntax.

basically

vi file

move to the line to edit with arrow

hit key "i" to insert

type the text

escapte + :wq ( for write + quit) and that's done

-> in case of any error :q! to quit without saving

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.

@Community member​ 

I got that "vi" one and I already have read its basic commands; I will go back to the setup later. However, at this moment I want to resolve the following problem to reduce the required memory space

PC $> find install_artifact/ -name "*.ko" | xargs $STRIP --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates

 0693W000007CWOMQA4.jpg 

@Community member​ and @Sisyphus38​ 

Thank you for your help. I got through all my problems now. All I did was to connect the Laptop to the board through a switch (router) and everything went smoothly. Initially I was connecting the laptop directly to the board, and it seems this laptop cannot implement DHCP services.

However, I've got another serious problem that following the instructions of Section 6 to recompile the kernel as presented at Modify, rebuild and reload the Linux® kernel - stm32mpu

Now the board is failing to load the recompiled kernel; it stops here and restarts again.

0693W000007Cl2GQAS.jpgAny advise how to address it?