embetrix / meta-stm32f7x

Yocto BSP layer for STM32F7x based MCUs
MIT License
1 stars 0 forks source link

Yocto build error #1

Open adrianalin opened 1 year ago

adrianalin commented 1 year ago

Trying to build an image with bitbake core-image-base (using docker because I don't have Ubuntu) but get following errors:

$ bitbake core-image-base
Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:00
Loaded 1647 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-22.04"
TARGET_SYS           = "arm-poky-linux-musleabi"
MACHINE              = "stm32f769-disco"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0.9"
TUNE_FEATURES        = "armv7em cortexm7"
TARGET_FPU           = "soft"
meta                 
meta-poky            
meta-yocto-bsp       
meta-stm32f7x        = "<unknown>:<unknown>"

...
| ../libffi-3.4.4/src/arm/sysv.S: Assembler messages:
| ../libffi-3.4.4/src/arm/sysv.S:104: Error: selected processor does not support ARM opcodes
| make[2]: Leaving directory '/home/miha/stm/yocto/build/tmp/work/cortexm7-poky-linux-musleabi/libffi/3.4.4-r0/build'
| make[2]: *** [Makefile:1288: src/arm/sysv.lo] Error 1
| make[1]: *** [Makefile:1384: all-recursive] Error 1

...
| make[1]: *** [Makefile:22530: test/asn1_dsa_internal_test] Error 1
| collect2: error: ld returned 1 exit status
| make[1]: *** [Makefile:22500: test/algorithmid_test] Error 1
| collect2: error: ld returned 1 exit status
| make[1]: Leaving directory '/home/miha/stm/yocto/build/tmp/work/cortexm7-poky-linux-musleabi/openssl/3.0.8-r0/build'
| make[1]: *** [Makefile:5263: libcrypto.so.3] Error 1
| make: *** [Makefile:3245: build_sw] Error 2
| ERROR: oe_runmake failed
embetrix commented 1 year ago

This is a known issue:

https://lists.yoctoproject.org/g/yocto/topic/98824124#60005

Right now only the BSP and basic initramfs are building.

This requires external uclibc toolchains to work properly with cortex m7

adrianalin commented 1 year ago

Managed to build the fitimage with kas-container, flashed, and when booting I get (maybe because of missing initramfs):

[    1.156675] This architecture does not have kernel memory protection.                                 
[    1.163142] Run /init as init process                                                                 
[    1.166850]   with arguments:                                                                         
[    1.169830]     /init                                                                                 
[    1.172103]   with environment:                                                                       
[    1.175284]     HOME=/                                                                                
[    1.177657]     TERM=linux                                                                            
[    1.217501]                                                                                           
[    1.217501] Unhandled exception: IPSR = 00000006 LR = fffffffd                                        
[    1.224873] CPU: 0 PID: 1 Comm: init Not tainted 6.3.0 #1                                             
[    1.230266] Hardware name: STM32 (Device Tree Support)                                                
[    1.235416] PC is at 0xc0658a3c                                                                       
[    1.238525] LR is at 0xc0658a19                                                                       
[    1.241737] pc : [<c0658a3c>]    lr : [<c0658a19>]    psr: 61000000                                   
[    1.248017] sp : c053fd20  ip : 00000019  fp : 00000000                                               
[    1.253273] r10: c0479d80  r9 : 00000002  r8 : 84837bf8                                               
[    1.258431] r7 : c053fe40  r6 : c053fee0  r5 : c053fefc  r4 : c069d588                                
[    1.265024] r3 : 00000000  r2 : c053ff7c  r1 : c053fd58  r0 : c053ff84                                
[    1.271615] xPSR: 61000000 
embetrix commented 1 year ago

@adrianalin check the first answer it's explained there !