Yocto

stm32mp157d.jpg

Yocto can be used to create a customised Linux installation on an embedded system with a fully writable root filesystem and package management.

This page builds yocto for the STM32MP157D-DK1 Discovery kit and uses the ST Yocto “recipes”. These recipes may not be what you want but are a good place to start.

Setup

Install required tools for yocto (and buildroot).

apt update
apt full-upgrade
apt install build-essential git libncurses5-dev libssl-dev bc picocom tmux chrpath diffstat gawk zstd lz4 gdisk locales

Install locale for yocto

dpkg-reconfigure locales
  en_US.UTF-8...

Init

Yocto will not build as root so create an installation directory as non-root

sudo -s
mkdir -p /opt/src/yocto
chown user:user /opt/src/yocto
exit

Install

cd /opt/src/yocto
git clone git://git.yoctoproject.org/poky.git
cd /opt/src/yocto/poky
git checkout mickledore
cd /opt/src/yocto
git clone https://github.com/STMicroelectronics/meta-st-stm32mp
cd /opt/src/yocto/meta-st-stm32mp
git checkout mickledore
cd /opt/src/yocto
git clone https://github.com/openembedded/meta-openembedded.git
cd /opt/src/yocto/meta-openembedded
git checkout mickledore

Fixes for meta-st-stm32mp

GCC

GCC has been updated so rename patch version

git mv recipes-devtools/gcc/gcc-source_12.2.bbappend recipes-devtools/gcc/gcc-source_12.3.bbappend

NB the above is a known but unaddressed issue

Dev tools

Fix bugs with the compiler checksum and path on AARCH64

diff -u recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi_11.inc.orig recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi_11.inc
--- recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi_11.inc.orig    2023-08-15 17:54:43.909829551 +0100
+++ recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi_11.inc 2023-08-15 18:05:45.399685699 +0100
@@ -2,6 +2,7 @@
 LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"

 LIC_FILES_CHKSUM = "file://share/info/gcc.info;md5=32f1a898d3ddd89ccb368ff8f483c98a"
+LIC_FILES_CHKSUM:aarch64 = "file://share/info/gcc.info;md5=dfc35c9a2dc2669a7eb33db64ef328cc"

 SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz;name=gcc-arm-x86"
 SRC_URI[gcc-arm-x86.sha256sum] = "8c5acd5ae567c0100245b0556941c237369f210bceb196edfe5a2e7532c60326"
@@ -12,7 +13,7 @@
 PV = "11"

 S = "${WORKDIR}/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi"
-S:aarch64 = "${WORKDIR}/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu"
+S:aarch64 = "${WORKDIR}/gcc-arm-11.2-2022.02-aarch64-arm-none-eabi"

 do_install() {
     install -d ${D}/${datadir}/gcc-arm-none-eabi

NB the above patch has been submitted to ST.

Cortex-M4

Disable the AI demo if the compiler aborts with a floating point bug (seen on AMD64).

diff -u recipes-extended/m4projects/m4projects-stm32mp1.bb.orig recipes-extended/m4projects/m4projects-stm32mp1.bb
--- recipes-extended/m4projects/m4projects-stm32mp1.bb.orig     2023-08-14 19:32:51.813485117 +0100
+++ recipes-extended/m4projects/m4projects-stm32mp1.bb  2023-08-14 19:38:11.402908332 +0100
@@ -36,7 +36,6 @@
        STM32MP157C-EV1/Applications/OpenAMP/OpenAMP_TTY_echo_wakeup \
        STM32MP157C-EV1/Applications/FreeRTOS/FreeRTOS_ThreadCreation \
        STM32MP157C-EV1/Applications/CoproSync/CoproSync_ShutDown \
-       STM32MP157C-EV1/Demonstrations/AI_Character_Recognition \
 "

 PROJECTS_LIST_DK2 = " \
@@ -64,7 +63,6 @@
        STM32MP157C-DK2/Applications/FreeRTOS/FreeRTOS_ThreadCreation \
        STM32MP157C-DK2/Applications/CoproSync/CoproSync_ShutDown \
        STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo_wakeup \
-       STM32MP157C-DK2/Demonstrations/AI_Character_Recognition \
 "

 PROJECTS_LIST = "${PROJECTS_LIST_EV1} ${PROJECTS_LIST_DK2}"

NB the correct solution would be to update the compiler

Configure

Create build directory and enter

cd /opt/src/yocto
bash
source ./poky/oe-init-build-env build

Add layers

diff -u conf/bblayers.conf.orig conf/bblayers.conf
--- conf/bblayers.conf.orig     2023-08-13 15:55:14.394940760 +0100
+++ conf/bblayers.conf  2023-08-13 15:56:27.130193221 +0100
@@ -9,4 +9,7 @@
   /opt/src/yocto/poky/meta \
   /opt/src/yocto/poky/meta-poky \
   /opt/src/yocto/poky/meta-yocto-bsp \
+  /opt/src/yocto/meta-openembedded/meta-oe \
+  /opt/src/yocto/meta-openembedded/meta-python \
+  /opt/src/yocto/meta-st-stm32mp \
   "

Add options

diff -u conf/local.conf.orig conf/local.conf
--- conf/local.conf.orig        2023-08-14 10:26:47.714480200 +0100
+++ conf/local.conf     2023-08-14 10:27:37.948358400 +0100
@@ -36,7 +36,10 @@
 #MACHINE ?= "edgerouter"
 #
 # This sets the default machine to be qemux86-64 if no other machine is selected:
-MACHINE ??= "qemux86-64"
+#MACHINE ??= "qemux86-64"
+MACHINE = "stm32mp1"
+XZ_DEFAULTS = "--memlimit=1500MiB"
+BB_NUMBER_THREADS = "2"

 # These are some of the more commonly used values. Looking at the files in the
 # meta/conf/machine directory, or the conf/machine directory of any additional layers

Layers

bitbake-layers show-layers
NOTE: Starting bitbake server...
layer                 path                                                                    priority
========================================================================================================
core                  /opt/src/yocto/poky/meta                                                5
yocto                 /opt/src/yocto/poky/meta-poky                                           5
yoctobsp              /opt/src/yocto/poky/meta-yocto-bsp                                      5
openembedded-layer    /opt/src/yocto/meta-openembedded/meta-oe                                5
meta-python           /opt/src/yocto/meta-openembedded/meta-python                            5
stm-st-stm32mp        /opt/src/yocto/meta-st-stm32mp                                          6

Test

bitbake -c menuconfig virtual/kernel
exit

ARM64 host

Build Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "aarch64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "stm32mp1"
DISTRO               = "poky"
DISTRO_VERSION       = "4.2.2"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky
meta-yocto-bsp       = "mickledore:0a98281d37b0bd8dc1548c390216cb3978e36e0e"
meta-oe
meta-python          = "mickledore:75cf318cef3b4ee81fad2782cf063ecd69ba8842"
meta-st-stm32mp      = "mickledore:931b3f5be2c00f55d114c8f9122082a9d229b776"

AMD64 host

Build Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "debian-11"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "stm32mp1"
DISTRO               = "poky"
DISTRO_VERSION       = "4.2.2"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky
meta-yocto-bsp       = "mickledore:0a98281d37b0bd8dc1548c390216cb3978e36e0e"
meta-oe
meta-python          = "mickledore:75cf318cef3b4ee81fad2782cf063ecd69ba8842"
meta-st-stm32mp      = "mickledore:931b3f5be2c00f55d114c8f9122082a9d229b776"

Build

Build an image such as `core-image-minimal' or `core-image-full-cmdline'

#! /bin/bash
. /opt/src/yocto/poky/oe-init-build-env /opt/src/yocto/build
bitbake core-image-full-cmdline

Eg.

bitbake core-image-minimal
Loading cache: 100% |#############################################################################################################|
Loaded 4037 entries from dependency cache.
Parsing recipes: 100% |###########################################################################################################|
Parsing of 2370 .bb files complete (2369 cached, 1 parsed). 4037 targets, 144 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "aarch64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "stm32mp1"
DISTRO               = "poky"
DISTRO_VERSION       = "4.2.2"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky
meta-yocto-bsp       = "mickledore:0a98281d37b0bd8dc1548c390216cb3978e36e0e"
meta-oe
meta-python          = "mickledore:75cf318cef3b4ee81fad2782cf063ecd69ba8842"
meta-st-stm32mp      = "mickledore:3fb487682e2896e195000dd8cbf6b29ee968e0d8"

Initialising tasks: 100% |########################################################################################################|
Sstate summary: Wanted 105 Local 0 Mirrors 0 Missed 105 Current 1357 (0% match, 92% complete)
Removing 4 stale sstate objects for arch stm32mp1: 100% |#########################################################################|
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 3809 tasks of which 3618 didn't need to be rerun and all succeeded.

Flash

Write image to microsd card identified as /dev/sdc

#! /bin/bash
cd /opt/src/yocto/build/tmp/deploy/images/stm32mp1
./scripts/create_sdcard_from_flashlayout.sh flashlayout_core-image-full-cmdline/optee/FlashLayout_sdcard_stm32mp157d-dk1-optee.tsv
sudo dd if=FlashLayout_sdcard_stm32mp157d-dk1-optee.raw of=/dev/sdc bs=4M conv=fdatasync,notrunc status=progress
sleep 1
sudo hdparm -z /dev/sdc

Boot

NOTICE:  CPU: STM32MP157DAC Rev.Z
NOTICE:  Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
NOTICE:  Board: MB1272 Var3.0 Rev.C-03
INFO:    PMIC version = 0x21
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    Using SDMMC
INFO:      Instance 1
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.8-stm32mp1-r1.0(debug):lts-v2.8.6-dirty(ff0bd5f9)
NOTICE:  BL2: Built : 17:57:15, Apr 21 2023
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-DDR3L 16bits 533000kHz
INFO:    Memory size = 0x20000000 (512 MB)
INFO:    BL2: Loading image id 1
INFO:    Loading image id=1 at address 0x2ffff000
INFO:    Image id=1 loaded: 0x2ffff000 - 0x2ffff1ea
INFO:    FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO:    FCONF: Reading firmware configuration information for: dyn_cfg
INFO:    FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0xde000000
INFO:    Image id=4 loaded: 0xde000000 - 0xde00001c
INFO:    OPTEE ep=0xde000000
INFO:    OPTEE header info:
INFO:          magic=0x4554504f
INFO:          version=0x2
INFO:          arch=0x0
INFO:          flags=0x0
INFO:          nb_images=0x1
INFO:    BL2: Loading image id 8
INFO:    Loading image id=8 at address 0xde000000
INFO:    Image id=8 loaded: 0xde000000 - 0xde038bc8
INFO:    BL2: Skip loading image id 9
INFO:    BL2: Loading image id 2
INFO:    Loading image id=2 at address 0xc0500000
INFO:    Image id=2 loaded: 0xc0500000 - 0xc051ee40
INFO:    BL2: Skip loading image id 16
INFO:    BL2: Loading image id 5
INFO:    Loading image id=5 at address 0xc0100000
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01f5d3c
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0xde000000
INFO:    SPSR = 0x1d3
I/TC: Early console on UART#4
I/TC:
I/TC: Embedded DTB found
I/TC: OP-TEE version: 3.19.0-dev (gcc version 12.3.0 (GCC)) #1 Fri Oct 14 19:00:05 UTC 2022 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp157d-dk1.dts
I/TC: DTB enables console (non-secure)
I/TC: Primary CPU switching to normal world boot
optee optee: OP-TEE: revision 3.19 (afacf356)


U-Boot 2022.10-stm32mp-r1 (Oct 03 2022 - 19:25:32 +0000)

CPU: STM32MP157DAC Rev.Z
Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157d-dk1)
Board: MB1272 Var3.0 Rev.C-03
DRAM:  512 MiB
optee optee: OP-TEE: revision 3.19 (afacf356)
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core:  359 devices, 39 uclasses, devicetree: board
WDT:   Started watchdog with servicing (32s timeout)
NAND:  0 MiB
MMC:   STM32 SD/MMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc0!
Saving Environment to MMC... Writing to redundant MMC(0)... OK
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:8...
Found U-Boot script /boot.scr.uimg
4187 bytes read in 116 ms (35.2 KiB/s)
## Executing script at c4100000
Executing SCRIPT on target=mmc0
FOUND /mmc0_extlinux/stm32mp157d-dk1_extlinux.conf
Saving Environment to MMC... Writing to MMC(0)... OK
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:8...
Found /mmc0_extlinux/stm32mp157d-dk1_extlinux.conf
Retrieving file: /mmc0_extlinux/stm32mp157d-dk1_extlinux.conf
Retrieving file: /splash_portrait.bmp
Select the boot mode
1:      OpenSTLinux
2:      stm32mp157d-dk1-a7-examples
3:      stm32mp157d-dk1-m4-examples
Enter choice: 1:        OpenSTLinux
Retrieving file: /uImage
append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw   console=ttySTM0,115200
Retrieving file: /stm32mp157d-dk1.dtb
## Booting kernel from Legacy Image at c2000000 ...
   Image Name:   Linux-6.1.28
   Created:      2023-05-11  14:04:52 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    7835448 Bytes = 7.5 MiB
   Load Address: c2000040
   Entry Point:  c2000040
   Verifying Checksum ... OK
## Flattened Device Tree blob at c4000000
   Booting using the fdt blob at 0xc4000000
   XIP Kernel Image
   Loading Device Tree to cffde000, end cffff651 ... OK

Starting kernel ...

I/TC: Secondary CI/TC: Secondary CPU 1 switching to normal world boot
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.28 (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 12.3.0, GNU ld (GNU Binutils) 2.40.0.20230620) #1 SMP PREEMPT Thu May 11 14:04:52 UTC 2023
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: STMicroelectronics STM32MP157D-DK1 Discovery Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created DMA memory pool at 0x10000000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node mcuram2@10000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x10040000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node vdev0vring0@10040000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x10041000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node vdev0vring1@10041000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x10042000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node vdev0buffer@10042000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x10048000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node mcu-rsc-table@10048000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x30000000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node mcuram@30000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x38000000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node retram@38000000, compatible id shared-dma-pool
[    0.000000] cma: Reserved 64 MiB at 0xda000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000c0000000-0x00000000ddffffff]
[    0.000000]   HighMem  [mem 0x00000000de000000-0x00000000dfffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000c0000000-0x00000000d3ffffff]
[    0.000000]   node   0: [mem 0x00000000d4000000-0x00000000d7ffffff]
[    0.000000]   node   0: [mem 0x00000000d8000000-0x00000000ddffffff]
[    0.000000]   node   0: [mem 0x00000000de000000-0x00000000dfffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000dfffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] percpu: Embedded 16 pages/cpu s34004 r8192 d23340 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129992
[    0.000000] Kernel command line: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw   console=ttySTM0,115200
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 335712K/524288K available (12288K kernel code, 1315K rwdata, 3516K rodata, 1024K init, 226K bss, 123040K reserved, 65536K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.001650] Console: colour dummy device 80x30
[    0.001717] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001741] pid_max: default: 32768 minimum: 301
[    0.002053] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002078] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003066] CPU: Testing write buffer coherency: ok
[    0.003564] /cpus/cpu@0 missing clock-frequency property
[    0.003614] /cpus/cpu@1 missing clock-frequency property
[    0.003633] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004934] cblist_init_generic: Setting adjustable number of callback queues.
[    0.004954] cblist_init_generic: Setting shift to 1 and lim to 1.
[    0.005169] Setting up static identity map for 0xc0100000 - 0xc0100060
[    0.005404] rcu: Hierarchical SRCU implementation.
[    0.005413] rcu:     Max phase no-delay instances is 1000.
[    0.007113] smp: Bringing up secondary CPUs ...
[    0.014646] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.014856] smp: Brought up 1 node, 2 CPUs
[    0.014873] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.014884] CPU: All CPU(s) started in SVC mode.
[    0.015811] devtmpfs: initialized
[    0.053447] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.053828] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.053857] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.057459] pinctrl core: initialized pinctrl subsystem
[    0.059836] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.062780] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.064542] thermal_sys: Registered thermal governor 'step_wise'
[    0.065042] cpuidle: using governor menu
[    0.065454] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.065471] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.065898] Serial: AMBA PL011 UART driver
[    0.069519] stm32-pm-domain pm_domain: domain core-ret-power-domain registered
[    0.069554] stm32-pm-domain pm_domain: subdomain core-power-domain registered
[    0.069566] stm32-pm-domain pm_domain: domains probed
[    0.097717] platform 5a001000.display-controller: Fixed dependency cycle(s) with /soc/etzpc@5c007000/i2c@40012000/hdmi-transmitter@39
[    0.100912] platform 4000b000.audio-controller: Fixed dependency cycle(s) with /soc/etzpc@5c007000/i2c@40012000/hdmi-transmitter@39
[    0.104661] platform 49000000.usb-otg: Fixed dependency cycle(s) with /soc/etzpc@5c007000/i2c@5c002000/stusb1600@28/connector
[    0.131634] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    0.138366] SCSI subsystem initialized
[    0.139284] usbcore: registered new interface driver usbfs
[    0.139362] usbcore: registered new interface driver hub
[    0.139427] usbcore: registered new device driver usb
[    0.139941] pps_core: LinuxPPS API ver. 1 registered
[    0.139952] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.139980] PTP clock support registered
[    0.140346] EDAC MC: Ver: 3.0.0
[    0.141480] Driver 'scmi-optee' was unable to register with bus_type 'tee' because the bus was not initialized.
[    0.144577] clocksource: Switched to clocksource arch_sys_counter
[    0.158695] NET: Registered PF_INET protocol family
[    0.159056] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.161228] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.161275] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.161299] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.161353] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.161498] TCP: Hash tables configured (established 4096 bind 4096)
[    0.161645] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.161694] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.161956] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.162947] RPC: Registered named UNIX socket transport module.
[    0.162966] RPC: Registered udp transport module.
[    0.162972] RPC: Registered tcp transport module.
[    0.162977] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.163743] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.165821] Initialise system trusted keyrings
[    0.166360] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.177505] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.178789] NFS: Registering the id_resolver key type
[    0.178858] Key type id_resolver registered
[    0.178865] Key type id_legacy registered
[    0.179027] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.179039] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.179098] ntfs: driver 2.1.32 [Flags: R/O].
[    0.179377] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.180630] Key type asymmetric registered
[    0.180648] Asymmetric key parser 'x509' registered
[    0.180910] bounce: pool size: 64 pages
[    0.181094] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.181107] io scheduler mq-deadline registered
[    0.181116] io scheduler kyber registered
[    0.193769] STM32 USART driver initialized
[    0.213254] brd: module loaded
[    0.223048] loop: module loaded
[    0.230714] CAN device driver interface
[    0.232729] pegasus: Pegasus/Pegasus II USB Ethernet driver
[    0.232808] usbcore: registered new interface driver pegasus
[    0.232877] usbcore: registered new interface driver asix
[    0.232944] usbcore: registered new interface driver ax88179_178a
[    0.232992] usbcore: registered new interface driver cdc_ether
[    0.233069] usbcore: registered new interface driver smsc75xx
[    0.233135] usbcore: registered new interface driver smsc95xx
[    0.233184] usbcore: registered new interface driver net1080
[    0.233232] usbcore: registered new interface driver cdc_subset
[    0.233278] usbcore: registered new interface driver zaurus
[    0.233388] usbcore: registered new interface driver cdc_ncm
[    0.235484] usbcore: registered new interface driver usb-storage
[    0.235766] usbcore: registered new device driver onboard-usb-hub
[    0.239049] i2c_dev: i2c /dev entries driver
[    0.242562] arm_smc_wdt watchdog: Watchdog registered (timeout=32 sec, nowayout=0)
[    0.244782] sdhci: Secure Digital Host Controller Interface driver
[    0.244795] sdhci: Copyright(c) Pierre Ossman
[    0.244802] Synopsys Designware Multimedia Card Interface Driver
[    0.245231] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.246446] ledtrig-cpu: registered to indicate activity on CPUs
[    0.246951] usbcore: registered new interface driver usbhid
[    0.246964] usbhid: USB HID core driver
[    0.249361] optee: probing for conduit method.
[    0.249390] optee: revision 3.19 (afacf356)
[    0.249943] optee: dynamic shared memory is enabled
[    0.252034] optee: initialized driver
[    0.255531] NET: Registered PF_INET6 protocol family
[    0.258491] random: crng init done
[    0.259987] Segment Routing with IPv6
[    0.260032] In-situ OAM (IOAM) with IPv6
[    0.260135] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.261065] NET: Registered PF_PACKET protocol family
[    0.261082] can: controller area network core
[    0.261169] NET: Registered PF_CAN protocol family
[    0.261182] can: raw protocol
[    0.261193] can: broadcast manager protocol
[    0.261208] can: netlink gateway - max_hops=1
[    0.261530] Key type dns_resolver registered
[    0.261652] ThumbEE CPU extension supported.
[    0.261696] Registering SWP/SWPB emulation handler
[    0.262267] Loading compiled-in X.509 certificates
[    0.277882] arm-scmi firmware:scmi: Enabled polling mode TX channel - prot_id:16
[    0.278119] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled.
[    0.278215] arm-scmi firmware:scmi: SCMI Protocol v2.0 'ST:' Firmware version 0x0
[    0.324359] stm32-dma 48000000.dma-controller: STM32 DMA driver registered
[    0.326689] stm32-dma 48001000.dma-controller: STM32 DMA driver registered
[    0.330290] stm32-mdma 58000000.dma-controller: STM32 MDMA driver registered
[    0.334749] stm_thermal 50028000.thermal: stm_thermal_probe: Driver initialized successfully
[    0.338187] /soc/interrupt-controller@5000d000: bank0
[    0.338220] /soc/interrupt-controller@5000d000: bank1
[    0.338238] /soc/interrupt-controller@5000d000: bank2
[    0.340935] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOA bank added
[    0.341625] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOB bank added
[    0.342270] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOC bank added
[    0.342877] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOD bank added
[    0.343516] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOE bank added
[    0.344127] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOF bank added
[    0.344938] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOG bank added
[    0.345683] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOH bank added
[    0.346348] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOI bank added
[    0.346769] stm32mp157-pinctrl soc:pinctrl@50002000: Pinctrl STM32 initialized
[    0.349734] stm32mp157-pinctrl soc:pinctrl@54004000: GPIOZ bank added
[    0.349779] stm32mp157-pinctrl soc:pinctrl@54004000: Pinctrl STM32 initialized
[    0.351746] stm32-usart 40010000.serial: interrupt mode for rx (no dma)
[    0.351766] stm32-usart 40010000.serial: interrupt mode for tx (no dma)
[    0.351796] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 49, base_baud = 4000000) is a stm32-usart
[    1.612603] printk: console [ttySTM0] enabled
[    1.622587] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found
[    1.628236] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42
[    1.634138] stm32-dwmac 5800a000.ethernet:   DWMAC4/5
[    1.639184] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported
[    1.646566] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported
[    1.653745] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported
[    1.660636] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported
[    1.667046] stm32-dwmac 5800a000.ethernet: TSO supported
[    1.672209] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.680011] stm32-dwmac 5800a000.ethernet: Enabled L3L4 Flow TC (entries=2)
[    1.687002] stm32-dwmac 5800a000.ethernet: Enabled RFS Flow TC (entries=10)
[    1.693881] stm32-dwmac 5800a000.ethernet: TSO feature enabled
[    1.699797] stm32-dwmac 5800a000.ethernet: Using 32/32 bits DMA host/device width
[    1.715631] stm32_rtc 5c004000.rtc: registered as rtc0
[    1.719442] stm32_rtc 5c004000.rtc: setting system clock to 2000-01-01T00:00:09 UTC (946684809)
[    1.728487] stm32_rtc 5c004000.rtc: Date/Time must be initialized
[    1.734178] stm32_rtc 5c004000.rtc: registered rev:1.2
[    1.758673] i2c 0-004a: Fixed dependency cycle(s) with /soc/etzpc@5c007000/sai@4400b000/audio-controller@4400b024
[    1.767726] i2c 0-004a: Fixed dependency cycle(s) with /soc/etzpc@5c007000/sai@4400b000/audio-controller@4400b004
[    1.778509] stm32f7-i2c 40012000.i2c: STM32F7 I2C-0 bus adapter
[    1.806586] stpmic1 1-0033: PMIC Chip Version: 0x21
[    1.851117] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.860153] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.870292] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.880519] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.890845] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.901066] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.911287] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.921636] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 1-0033
[    1.932250] stm32f7-i2c 5c002000.i2c: STM32F7 I2C-1 bus adapter
[    1.941391] mmci-pl18x 58005000.mmc: Got CD GPIO
[    1.945586] mmci-pl18x 58005000.mmc: mmc0: PL180 manf 53 rev2 at 0x58005000 irq 66,0 (pio)
[    1.990442] stm32-ipcc 4c001000.mailbox: ipcc rev:1.0 enabled, 6 chans, proc 0
[    2.000654] stm32-rproc 10000000.m4: wdg irq registered
[    2.007928] remoteproc remoteproc0: m4 is available
[    2.022911] i2c i2c-0: Added multiplexed i2c bus 2
[    2.029264] input: pmic_onkey as /devices/platform/soc/5c007000.etzpc/5c002000.i2c/i2c-1/1-0033/5c002000.i2c:stpmic@33:onkey/input/input0
[    2.043973] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0
[    2.053721] [drm] Initialized stm 1.0.0 20170330 for 5a001000.display-controller on minor 0
[    2.062124] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator
[    2.068636] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator
[    2.120154] mmc0: new high speed SDHC card at address 9773
[    2.126288] mmcblk0: mmc0:9773 SD08G 7.42 GiB
[    2.141722] GPT:Primary header thinks Alt. header is not at the end of the disk.
[    2.147880] GPT:10485759 != 15564799
[    2.151363] GPT:Alternate GPT header not at the end of the disk.
[    2.157398] GPT:10485759 != 15564799
[    2.160873] GPT: Use GNU Parted to correct GPT errors.
[    2.166259]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11
[    2.215038] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM
[    2.222617] dwc2 49000000.usb-otg: DWC OTG Controller
[    2.226508] dwc2 49000000.usb-otg: new USB bus registered, assigned bus number 1
[    2.233720] dwc2 49000000.usb-otg: irq 76, io mem 0x49000000
[    2.240869] hub 1-0:1.0: USB hub found
[    2.243288] hub 1-0:1.0: 1 port detected
[    2.250431] ehci-platform 5800d000.usb: EHCI Host Controller
[    2.254816] ehci-platform 5800d000.usb: new USB bus registered, assigned bus number 2
[    2.264159] ehci-platform 5800d000.usb: irq 77, io mem 0x5800d000
[    2.304686] ehci-platform 5800d000.usb: USB 2.0 started, EHCI 1.00
[    2.311686] hub 2-0:1.0: USB hub found
[    2.314165] hub 2-0:1.0: 2 ports detected
[    2.604698] usb 2-1: new high-speed USB device number 2 using ehci-platform
[    2.604831] EXT4-fs (mmcblk0p10): mounted filesystem with ordered data mode. Quota mode: disabled.
[    2.619648] VFS: Mounted root (ext4 filesystem) on device 179:10.
[    2.627016] devtmpfs: mounted
[    2.630495] Freeing unused kernel image (initmem) memory: 1024K
[    2.665298] Run /sbin/init as init process
INIT: version 3.04 booting
[    2.826938] hub 2-1:1.0: USB hub found
[    2.829569] hub 2-1:1.0: 4 ports detected
Starting udev
[    3.247488] udevd[121]: starting version 3.2.11
[    3.293417] udevd[122]: starting eudev-3.2.11
[    4.011962] EXT4-fs (mmcblk0p10): re-mounted. Quota mode: disabled.
Fri Mar  9 12:34:56 UTC 2018
INIT: Entering runlevel: 5
Configuring network interfaces... [    6.703557] stm32-dwmac 5800a000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[    6.824718] stm32-dwmac 5800a000.ethernet eth0: PHY [stmmac-0:00] driver [RTL8211F Gigabit Ethernet] (irq=POLL)
[    6.843500] dwmac4: Master AXI performs any burst length
[    6.847712] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found
[    6.855078] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[    6.863609] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock
[    6.872784] stm32-dwmac 5800a000.ethernet eth0: configuring for phy/rgmii-id link mode
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: broadcasting discover
[   11.120036] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   11.127223] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: broadcasting discover
udhcpc: broadcasting select for 192.168.0.251, server 192.168.0.177
udhcpc: lease of 192.168.0.251 obtained from 192.168.0.177, lease time 86400
/etc/udhcpc.d/50default: Adding DNS 192.168.0.177
/etc/udhcpc.d/50default: Adding DNS 194.168.4.100
/etc/udhcpc.d/50default: Adding DNS 194.168.8.100
done.
Starting syslogd/klogd: done

Poky (Yocto Project Reference Distro) 4.2.2 stm32mp1 /dev/ttySTM0

stm32mp1 login:

It appears that the power controller is probed before the I2C interface is online and consequently it doesn't work

Extra

Add package-management to extra features to gain access to RPM or dpkg/apt in local.conf

EXTRA_IMAGE_FEATURES ?= "debug-tweaks package-management"

Package format defaults to RPM but can be changed to deb.

Rebuild and boot new image.

Copy any RPM packages to host for installation when required.

Eg.

scp e2fsprogs-resize2fs-1.47.0-r0.cortexa7t2hf_neon_vfpv4.rpm root@stm32mp1:

Install package with RPM

rpm -i e2fsprogs-resize2fs-1.47.0-r0.cortexa7t2hf_neon_vfpv4.rpm

Use resize2fs, for example, to resize the root partition.

Before

df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       244M  115M  112M  51% /

Resize

resize2fs /dev/mmcblk0p10
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/mmcblk0p10 is mounted on /; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 32
The filesystem on /dev/mmcblk0p10 is now 4194304 (1k) blocks long.

After

df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       3.8G  115M  3.5G   4% /

Compatibility

Binaries for the RPi have been tested to run on the STM32MP1 but may have missing libraries.

Resources

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information