cancel
Showing results for 
Search instead for 
Did you mean: 

Basic boot scheme fails u-boot-stm32mp recipe build.

KSuch.2
Associate II

smt32mp157a-dk1/c-ev1 boards. When BOOTSCHEME_LABELS (stm32mp1-eval.conf) is changed from "trusted" to "basic" the build of u-boot-stm32mp recipe fails. Ecosystem 1.2.0 .

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @KSuch.2​ 

Can you share build trace ?

Did you clean your environment between "trusted" and "basic" build ?

Thanks,

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.
KSuch.2
Associate II

What do you mean "build trace"?

  1. i fix stm32mp1-eval.conf and do:
DISTRO=openstlinux-x11 MACHINE=stm32mp1-eval source layers/meta-st/scripts/envsetup.sh

2. after that appear a dir "build-openstlinuxx11-stm32mp1-eval"

3.and then run:

bitbake u-boot-stm32mp

4.about 30 mins later the recipe crashed (look at the log):

...
| arm-ostl-linux-gnueabi-ld.bfd: /home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work-shared/stm32mp1-eval/uboot-source/drivers/ram/stm32mp1/stm32mp1_tests.c:604: undefined reference to `rand'
| arm-ostl-linux-gnueabi-ld.bfd: drivers/built-in.o: in function `test_read':
| /home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work-shared/stm32mp1-eval/uboot-source/drivers/ram/stm32mp1/stm32mp1_tests.c:1268: undefined reference to `rand'
| arm-ostl-linux-gnueabi-ld.bfd: drivers/built-in.o: in function `BIST_test':
| /home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work-shared/stm32mp1-eval/uboot-source/drivers/ram/stm32mp1/stm32mp1_tuning.c:375: undefined reference to `rand'
| /home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work-shared/stm32mp1-eval/uboot-source/scripts/Makefile.spl:364: recipe for target 'spl/u-boot-spl' failed
| make[2]: *** [spl/u-boot-spl] Error 1
| /home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work-shared/stm32mp1-eval/uboot-source/Makefile:1539: recipe for target 'spl/u-boot-spl' failed
| make[1]: *** [spl/u-boot-spl] Error 2
| make[1]: Leaving directory '/home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work/stm32mp1_eval-ostl-linux-gnueabi/u-boot-stm32mp/2018.11-r0/build/stm32mp15_basic_defconfig'
| Makefile:148: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| make: Leaving directory '/home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work-shared/stm32mp1-eval/uboot-source'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/support/STM32MP15-Ecosystem-v1.2.0/Distribution-Package/openstlinux-20-02-19/build-openstlinuxx11-stm32mp1-eval/tmp-glibc/work/stm32mp1_eval-ostl-linux-gnueabi/u-boot-stm32mp/2018.11-r0/temp/log.do_compile.14073)
...

that's all

When i revert conf file to "trusted" boot scheme, repeat step 1 and do:

bitbake -c cleansstate u-boot-stm32mp

after that the recipe is builded fine.

Olivier GALLIEN
ST Employee

Thanks. I see in log : undefined reference to 'rand'

Can you try after doing "apt-get install rand" on your station ?

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.
KSuch.2
Associate II

No. Wrong attempt.

As i understand the "rand" and "srand" are library functions which reside into stdlib.h (for Linux)

"apt-get install rand" does not affect..

Olivier GALLIEN
ST Employee

Hi @KSuch.2​ 

Tested at our end with success.

Might come from something badly installed/configured in you station.

In which environment are you working ?

If not done, worth to check you have all packages listed here :

https://wiki.st.com/stm32mpu/wiki/PC_prerequisites#Install_extra_packages

Please confirm it compile ok when you let "trusted".

MACHINE=stm32mp1 compiled basic boot by default. Maybe something to try also

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.