DESK-MP1-L/pdf
Contents
- 1 History
- 2 General Information
- 2.1 Release Notes
- 2.2 Virtual Machine
- 2.3 ConfigID and UniqueID
- 2.4 ConfigID
- 2.5 Booting from NFS
- 3 Development
- 3.1 Synchronizing the git repositories
- 3.2 Using the STM32CubeMX Configuration file
- 3.3 Building Boot image
- 3.4 Building Linux
- 3.5 Building the Yocto BSP
- 3.6 How to create a bootable microSD card
- 3.7 Hello word example
- 3.8 Asymmetric Multiprocessing (AMP) with OpenAMP
- 4 Deployment
- 4.1 Customizing the splash screen
- 4.2 How to configure the network interfaces
- 4.3 MAC Address programming
- 4.4 Management of prebuilt packages
- 5 Peripherals
- 5.1 Peripheral Ethernet
- 5.2 Peripheral LCD
- 5.3 Pheripheral Touchscreen
- 5.4 Peripheral SD
- 5.5 Peripheral UARTs
- 5.6 Peripheral USB Host
- 5.7 Peripheral USB OTG
- 5.8 Pheripheral RTC
- 5.9 Pheripheral DWS
- 5.10 Peripheral GPIOs
History[edit | edit source]
DESK-MP1-L History | |||
---|---|---|---|
Version | Issue Date | Notes | Refers to |
Aug 2023 | DESK-MP1-L-1.0.0 release | ETRA SOM | |
ETRA SBC | |||
1.0.1 | Aug 2023 | DESK-MP1-L-1.0.1 Minor release | ETRA SOM |
ETRA SBC |
General Information[edit | edit source]
Release Notes[edit | edit source]
DAVE Embedded Systems adds to the latest Linux BSP from STMicroelectronics the customization required to support the SOC platform. For this reason most of the documentation provided by STMicroelectronics remains valid for the DESK development kit.
However, some customization is required, in particular at bootloader and linux kernel levels.
The following table reports the DESK releases information.
DESK version | |
---|---|
Release number | 1.1.0 |
Release type | Minor |
Status | Released |
Release date | 21/10/2024 |
Release notes | Ver 1.1.0 |
Product support | ETRA SOM, ETRA SBC |
MVM (distro version) | Ubuntu 20.04 |
U-Boot version | 2021.10-desk-mp1-l-1.1.0 |
Linux version | 5.15.167-desk-mp1-l-1.1.0 |
Drivers |
UART debug (2-wire) Ethernet |
Manufacturer BSP version | openstlinux-5.15-yocto-kirkstone-mp1-v24.07.17 |
Graphic libraries | Qt 5.15.7 |
Build System | Yocto kirkstone |
DESK-MP1-L 1.1.0[edit | edit source]
Release notes:
- update arm-gnu toolchain to 11.3
- update openembedded-core to yocto-4.0.21
- update to V4.1.2 ecosystem release by ST
- update bitbake to 2022-04.21-kirkstone
- update meta-openembedded to community version
- add support to KAS
- update TF-A, U-Boot, Linux to desk-mp1-l-1.1.0
- add support to gitlab-ci
- add support to flutter gallery and counter
Known Limitations[edit | edit source]
The following table reports the known limitations of this DESK release:
Issue | Description |
---|---|
Run Qt5 application from the serial console | Start a Qt application from the serial console requires some environment variables to be set: see here |
Downloadable binary images[edit | edit source]
All binary images for DESK-MP1-L are hosted on DAVE Embedded System mirror server. There is a sub directory for each version of this development kit.
U-Boot performs a 2-stage bootloader providing two files: ATF
and fip
. Both files must be stored on an SD card using the dd
command.
A summary of images with a brief description can be found in the table below:
Image | DESK version 1.1.0 |
---|---|
Platform | DCSB50000 |
Carrier Board ConfigID | 0001 |
LCD panel | Ampire AM-800480BTMQW-TBMH-A 800x480 7"RGB |
Touchscreen | capacitive (USB) |
ATF | ATF |
Fip | uSD FIP |
Linux kernel | uImage |
Device tree | stm32mp157a-dcsb5000dd1r |
Yocto images and built-in packages[edit | edit source]
Yocto target images for DESK-MP1-L are hosted on DAVE Embedded System mirror server. There are more build targets which include a list of built and installed packages in the root file system image.
A summary of built images and their included packages can be found in the table below:
Image | DESK version 1.1.0 | |
---|---|---|
SD card image | rootfs packages list | |
devel MP1 | dave-image-devel-mp1.wic.bz2 | image-devel_installed-packages.txt |
qt5 MP1 | desk-image-qt5-mp1.wic.bz2 | image-qt5_installed-packages.txt |
flutter gallery demo MP1 | desk-image-flutter-gallery-desk-mp1.wic.bz2 | image-flutter-gallery_installed-packages.txt |
DESK-MP1-L 1.0.1[edit | edit source]
Release notes:
- Change URL from ssh to https protocol
Known Limitations[edit | edit source]
The following table reports the known limitations of this DESK release:
Issue | Description |
---|---|
Run Qt5 application from serial console | Start a Qt application from the serial console requires some environment variables to be set: see here |
Downloadable binary images[edit | edit source]
All binary images for DESK-MP1-L are hosted on DAVE Embedded System mirror server. There you can find a sub directory for each version of this development kit.
U-Boot performs 2-stage bootloader providing two files: ATF
and fip
. Both two files must be stored into SD card using dd
command.
A summary of images with a brief description can be found into the table below:
Image | DESK version 1.0.1 |
---|---|
Platform | DCSB50000 |
Carrier Board ConfigID | 0001 |
LCD panel | Ampire AM-800480BTMQW-TBMH-A 800x480 7"RGB |
Touchscreen | capacitive (USB) |
ATF | ATF |
Fip | uSD FIP |
Linux kernel | uImage |
Device tree | stm32mp157a-dcsb5000dd1r |
DESK-MP1-L 1.0.0[edit | edit source]
Release notes:
- First release based on STM
openstlinux-5.15
Known Limitations[edit | edit source]
The following table reports the known limitations of this DESK release:
Issue | Description |
---|---|
Run Qt5 application from serial console | Start a Qt application from the serial console requires some environment variables to be set: see here |
Downloadable binary images[edit | edit source]
All binary images for DESK-MP1-L are hosted on DAVE Embedded System mirror server. There you can find a sub directory for each version of this development kit.
U-Boot performs 2-stage bootloader providing two files: ATF
and fip
. Both two files must be stored into SD card using dd
command.
A summary of images with a brief description can be found into the table below:
Image | DESK version 1.0.0 |
---|---|
Platform | DCSB50000 |
Carrier Board ConfigID | 0001 |
LCD panel | Ampire AM-800480BTMQW-TBMH-A 800x480 7"RGB |
Touchscreen | capacitive (USB) |
ATF | ATF |
Fip | uSD FIP |
Linux kernel | uImage |
Device tree | stm32mp157a-dcsb5000dd1r |
Virtual Machine[edit | edit source]
DESK-MP1-L contains all the required software and documentation to start developing Linux application on the Etra platform. In particular, DESK-MP1-L includes a virtual machine, called MVM, which is a specific implementation of the general Managed Virtual Machine concept.
The DESK-MP1-L-specific MVM provides the followings:
- VirtualBox virtual machine (.OVA archive)
- based on Lubuntu 20.04 LTS (64-bit version)
- pre-installed VirtualBox Guest Additions
- LXDE desktop environment
- Source code, tools and services:
Arm trusted firmware (ATF)
: source tree cloned from DAVE Embedded Systems public git repository.U-boot
: source tree cloned from DAVE Embedded Systems public git repository.Desk mp1 boot image
: source tree cloned from DAVE Embedded Systems public git repository .Kernel
: ource tree cloned from DAVE Embedded Systems public git repository.- External pre-built
toolchain
. Yocto package
: all package needed for build BSP with yocto.TFTP
: service for download binary on U-boot, with base directory/tftp/
.NFS
: root path of RFS on/home/dvdk/desk-mp1-l/rfs/desk-mp1-l/
directory.
- administrator account (
dvdk
) with autologin. Please note that the user account credentials are provided with the development kit (you can find them in theREADME
file contained in thesw/dvdk
folder of the kit distribution).- user:
dvdk
- password:
dvdk
- user:
Please note that ATF, U-Boot, and kernel source trees are derived from the official trees released by ST; these trees have been customized to add support for the ETRA SOM.
Host setup[edit | edit source]
Since your OS, where VirtualBox is running, can be different compared to the version that we using, in case of an error we suggest updating VirtualBox to the latest release patch. For example, if we used |
As stated previously, ETRA SOM host tools are based on a Managed Virtual Machine, we used virtualbox-6.1_6.1.18-142142
to perform virtual machine.
It is also worth remembering that access to git repositories is required to download target source code. To enable it, please refer to this page.
MVM can be downloaded here. For accessing DESK Reserved area please contact our helpdesk support channel
To install it, please refer to this page.
Virtual Machine updates[edit | edit source]
The Ubuntu distribution may ask for an update, if available, due to the Update Notifier.
The updates are not required for the proper DESK Virtual Machine functionality.
Even if the update can be transparent to the VM normal operations, it is suggested not to install the updates. They may change (or in a worst-case corrupt) what has been tested and documented in our wiki pages. |
If this is annoying for you, it is possible to disable it.
ConfigID and UniqueID[edit | edit source]
ConfigID[edit | edit source]
ConfigID is a new feature of DAVE Embedded Systems products. Its main purpose is providing an automatic mechanism for the identification of the product model and configuration.
With ConfigID, we aim at:
- completing the hardware configuration information that the software can't normally auto-detect (i.e. RAM chip version,...), implementing a dedicated reliable detect procedure
- when required, overriding the auto-detected hardware configuration information
When implemented, this mechanism allows for:
- initializing in the proper way the hardware platform, based on the specific features and parameters of the product, using a common software base (eg: a typical case is the SDRAM controller parameters, which must be configured by U-Boot depending on the particular memory chip, which can be different for the various SOM models)
- getting the complete hardware configuration (combining ConfigID with the information collectable at runtime) of a product deployed on the field
In simple words, model identification means the capability of reading a numerical code, stored in an available device (SOC's OTP , I2C EEPROM, 1-wire memories, protected NOR flash, etc.)
There are two ConfigIDs:
- SOM ConfigID: which reflects the characteristics of the SOM (stored on the SOM itself)
- Carrier Board (CB) ConfigID: which reflects the characteristics of the carrier board that hosts the SOM (stored on the carrier board itself and read by the SOM at boot time)
UniqueID[edit | edit source]
An additional attribute is UniqueID, which is a read-only code which univocally identifies a single product and is used for traceability.
It is worth remembering that ConfigID and UniqueID are independent from product serial number. |
Customer's action[edit | edit source]
DAVE Embedded Systems recommends to be up-to-date with Official SOM's BSPs for taking advantages of ConfigID/UniqueId features: this is the only required action.
- ConfigID advantage: to allow U-Boot bootloader to be executed only with the correct configuration (if the U-Boot loaded is not the proper one, it may stop execution avoiding incorrect behaviour)
- UniqueID advantage: to trace univocally each individual SOMs and, in turn, all the on-the-field equipments
ConfigID values[edit | edit source]
ConfigID is a N-bit (typically N>8) signed integer, that can have the following values:
- < 0: error
- -1: not initialized
- = 0: ConfigID legacy
- for prototypes (ConfigID not yet defined) or for products manufactured before the introduction of the ConfigID feature
- > 0: valid ConfigID
- values are reported accordingly with the specific product table
Hardware implementations of the ConfigID[edit | edit source]
The following paragraphs briefly describe the available solutions for storing the ConfigID.
OTP on the SOC[edit | edit source]
Some SOCs provides programmable OTPs (eg. for security, MAC address, boot modes, etc). Usually, some of these are general purpose registers and can be managed by the user.
This is the ideal implementation, because:
- ConfigID is stored in the most important component of the SOM
- the component that hosts the ConfigID is NOT optional
- typically, a very selective lock can be forced. In general, for reliability and/or security reasons, OTP areas used to store ConfigIDs may be locked during the manufacturing process.
OTP 1-wire memory[edit | edit source]
This implementation requires a 1-wire memory chip.
I2C Eeprom[edit | edit source]
This implementation requires connecting an EEPROM to an I2C bus of the SOC. Moreover, routing a write protect pin to the SOM connector is required.
NOR Flash SPI[edit | edit source]
This implementation requires a NOR flash connected to the SPI bus of the SOC.
DAVE Embedded Systems' hardware implementation[edit | edit source]
DAVE's SOCs implement the ConfigID feature depending on hardware Capabilities of the SOCs. The following list shows the priority used for its implementation:
- OTPs
- example: AXEL family processor (i.MX6) implements ConfigID using processor's OTP
- AXEL uses GP1 eFuse register to store ConfigID
- NOR Flash SPI
- example: DIVA family processor (AM335x) implements ConfigID using NOR SPI (if present)
- DIVA and BORA use the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)
- I2C Eeprom
- example: DIVA family processor (AM335x) or BORA Lite processor (ZYNQ) implements ConfigID using I2C Eeprom when NOR SPI is not present (module boots from NAND or SD)
- DIVA and BORA Lite use the first 32bytes on I2C EPROM to store ConfigID (and its CRC32), UniqueID (and its CRC32)
- 1-wire
- example: latest AXEL Lite, AXEL ULite and BORA/BORA Xpress/BORA Lite Evaluation Kits implement CB ConfigID using the onboard 1-wire device (DS2431)
Software implementation[edit | edit source]
U-Boot[edit | edit source]
u-boot integrates the software routines for reading and displaying the ConfigID: hereunder an example of SOM ConfigID at startup:
U-Boot 2013.04-00010-gcb05b30 (Jun 26 2015 - 12:49:26)-xelk-2.1.0 CPU: Freescale i.MX6Q rev1.5 at 792 MHz CPU: Temperature 47 C, limits (-40 C, 125 C), calibration data: 0xc0 Reset cause: POR Environment: SPI Flash I2C: ready DRAM: 2 GiB Now running in RAM - U-Boot at: 8ff35000 NAND: 512 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 SF: Detected S25FL256S with page size 64 KiB, total 32 MiB In: serial Out: serial Err: serial Power: found PFUZE100 (devid=10, revid=21) SOM ConfigID#: 00000003 SOM UniqueID#: df646299:0b0579d4
For accessing these information on Linux procfs
, the device tree must be modified (using u-boot fdt command): for example:
DIVA# setenv fdtfixup 'fdt addr ${fdtaddr}; run fdtfixup_configid' DIVA# setenv fdtfixup_configid 'fdt set / som_configid ${som_configid#}; fdt set / som_uniqueid ${som_uniqueid#}; fdt set / cb_configid ${cb_configid#}; fdt set / cb_uniqueid ${cb_uniqueid#}'
Linux[edit | edit source]
It is possible to read the ConfigID/UniqueID via procfs
; for example:
root@axel-lite:~# cat /proc/device-tree/som/configid && echo 00000003 root@axel-lite:~# cat /proc/device-tree/som/uniqueid && echo df646299:0b0579d4 root@axel-lite:~#
Legacy device tree, has a sightly different procfs
structure:
root@axel-lite:~# cat /proc/device-tree/som_configid && echo 00000003 root@axel-lite:~# cat /proc/device-tree/som_uniqueid && echo df646299:0b0579d4 root@axel-lite:~#
A real case example of ConfigID benefit[edit | edit source]
The ConfigID benefit is clear when:
- there is a number of products deployed on the field
- the products deployed on the field needs a SW update
The ideal scenario is that all products are equal and there are no differences on the Bill Of Material (BOM):
In this case there are no problems to deploy a new SW update on the field: all products have the same HW configuration, then the same SW configuration.
Unfortunately, this is an ideal scenario. The reality is that:
- component obsolescence
- product shortage
- second source strategies
force to have an on-the-field different version of product (with same functionalities but with different HW configuration) which doesn't permit to realize what proposed in the ideal case.
The usage of the ConfigID technique, allows the running SW to identify the underlying HW configuration and automatically adapt the BSP (i.e. the driver layer) to properly use the HW subsystems: this, maintaining the overall product features identical to the final User point-of-view. |
With a scenario, like the one described above, if you would like to update the SW you need to implement a strategy for understanding what platform version is going to be updated. The Config ID is used exactly for this goal.
The ConfigID provides to the software update routine the information on which product version is so the update can be adapted to the exact product version.
In this way, you can distribute one single version of the software update which will automatically adapt itself to the currently running platform.
How to handle After Sales with Config ID[edit | edit source]
One of the mos common questions about Config ID is how to handle the Config ID issue. Below is described with an example how to handle it.
This product is returned from the field with a problem on the display:
After Sales Dept analizes the product and decide to substitute the display. The problem is that the existing display is not available - because of is End Of Life (EOL) - and it is required to move to a different display: in the product a different Config ID will be written because of the 2 displays requires a dedicated SW version and cannot be distinguished automatically during the startup. The final result is to have the similar product:
As indicated, the new display requires a different Config ID (from A to B) so it can be updated with an easy software routine before start the SW update. This Config ID update routine can be implemented in manufacturing facility typically using a dedicated USB pen drive which modify the saved ConfigID to the new one depending on the storage memory in use
ConfigID[edit | edit source]
This article describes how the ConfigID is implemented in the products supported by the DESK-MP1-L Linux Kit.
ETRA[edit | edit source]
As ETRA is a system-on-module (SOM), the typical mechanism described here is used.
Moreover, a system is composed of the combination of a SOM and a carrier board. In this case, two ConfigIDs are used to identify the actual board configuration like it was a SOM+carrier board system.
For the sake of simplicity, the first ConfigID is denoted as SOM ConfigID, while the second one is denoted as CB ConfigID:
... SOM ConfigID#: 00000001 SOM UniqueID#: 39303435:33385105:001e0024 CB ConfigID#: 00000001 CB UniqueID#: 0d000035:c4a4762d Board: ETRA on SBC ...
Generally speaking:
- SOM ConfigID is used to identify the configuration of the basic features of the SOM, it is stored in the OTPs on the SOC.
- CB ConfigID is used to identify the peripherals and the I/O interfaces, it is stored in an external one-wire eeprom memory present in the carrier board.
Booting from NFS[edit | edit source]
This configuration is very helpful during the software development (both for kernel and applications). The kernel image is downloaded via TFTP while the root file system is remotely mounted via NFS from the host. It is assumed that the development host:
- is connected with the target host board through an Ethernet LAN
- exports the directory containing the root file system for the target through the NFS server
- runs a TFTP server.
- has a proper subnet IP address
net_nfs configuration[edit | edit source]
DESK-MP1-L Virtual Machine is properly configured for the TFTP and NFS debug.
In any case, some variables has to be configured on the target and the VM itself has to be configured for respect to the network environment.
Host (Virtual Machine) configuration[edit | edit source]
The DESK-MP1-L Virtual Machine has the tftp and nfs services already running. Optionally, their configuration has to be changed according to the network configuration where the target is connected to.
Check and properly configure the items describe in VirtualBox Network Configuration
Target configuration[edit | edit source]
The IP address for server and target should be configured: an example (for a network subnet 192.168.0.x
)
=> setenv serverip 192.168.0.125 => setenv ipaddr 192.168.0.90
serverip
is the IP address of the host machine running the tftp/nfs serveripaddr
is the IP address of the target
The kernel and device tree files has to be selected
=> setenv bootfile desk-mp1-l/uImage => setenv fdtfile desk-mp1-l/stm32mp157a-dcsb5000dd1r.dtb
finally, the root file system directory on the Virtual Machine should be configured for let the kernel to find the INIT
=> setenv rootpath /home/dvdk/desk-mp1-l/rfs/desk-MP1-l/
To run this configuration just issue the net_nfs command which firstly download the kernel and device tree using the tftp protocol
NOTICE: CPU: STM32MP157AAB Rev.B NOTICE: Model: DAVE desk-mp1 stm32mp157a-dcsb5000dd1r 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.6-stm32mp1-r2.0(debug):desk-mp1-l-1.0.0(709eafce) NOTICE: BL2: Built : 08:34:10, Jul 25 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 - 0x2ffff226 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 0x2ffc5000 INFO: Image id=4 loaded: 0x2ffc5000 - 0x2ffd9820 INFO: BL2: Skip loading image id 8 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 - 0xc0512e30 INFO: BL2: Loading image id 16 INFO: Loading image id=16 at address 0x2ffc0000 INFO: Image id=16 loaded: 0x2ffc0000 - 0x2ffc3ff5 INFO: BL2: Loading image id 5 INFO: Loading image id=5 at address 0xc0100000 INFO: Image id=5 loaded: 0xc0100000 - 0xc01e8ba0 NOTICE: BL2: Booting BL32 INFO: Entry point address = 0x2ffc5000 INFO: SPSR = 0x1d3 NOTICE: SP_MIN: v2.6-stm32mp1-r2.0(debug):desk-mp1-l-1.0.0(709eafce) NOTICE: SP_MIN: Built : 08:34:10, Jul 25 2023 INFO: ARM GICv2 driver initialized INFO: ETZPC: UART1 (3) could be non secure INFO: ETZPC: SPI6 (4) could be non secure INFO: ETZPC: RNG1 (7) could be non secure INFO: ETZPC: HASH1 (8) could be non secure INFO: ETZPC: CRYP1 (9) could be non secure INFO: ETZPC: I2C6 (12) could be non secure INFO: SP_MIN: Initializing runtime services INFO: SP_MIN: Preparing exit to normal world serial_stm32 serial@40010000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2021.10-desk-mp1-l-1.0.0 (Jul 25 2023 - 08:53:53 +0000) CPU: STM32MP157AAB Rev.B Model: Dave desk-mp1 stm32mp157a-dcsb5000dd1r Board: Etra in trusted mode (st,stm32mp157a-dcsb5000dd1r) DRAM: 512 MiB Clocks: - MPU : 650 MHz - MCU : 208.878 MHz - AXI : 266.500 MHz - PER : 0 MHz - DDR : 533 MHz WDT: Started with servicing (32s timeout) NAND: 0 MiB MMC: STM32 SD/MMC: 2, STM32 SD/MMC: 0, STM32 SD/MMC: 1 Loading Environment from MMC... OK In: serial Out: serial Err: serial invalid MAC address 0 in OTP 00:00:00:00:00:00 SOM ConfigID#: 00000001 SOM UniqueID#: 39303435:33385105:001e0024 CB ConfigID#: 00000001 CB UniqueID#: 0d000035:c4a4762d Board: ETRA on SBC Net: Warning: ethernet@5800a000 (eth0) using random MAC address - 0a:7f:53:9f:1a:77 eth0: ethernet@5800a000 Hit any key to stop autoboot: 0 STM32MP> STM32MP> STM32MP> edit serverip edit: 192.168.0.169 STM32MP> savee Saving Environment to MMC... Writing to MMC(0)... OK STM32MP> run net_nfs ethernet@5800a000 Waiting for PHY auto negotiation to complete..... done Using ethernet@5800a000 device TFTP from server 192.168.0.169; our IP address is 192.168.0.89 Filename 'desk-mp1-l/uImage'. Load address: 0xc2000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ####################### 1.2 MiB/s done Bytes transferred = 8765832 (85c188 hex) Using ethernet@5800a000 device TFTP from server 192.168.0.169; our IP address is 192.168.0.89 Filename 'desk-mp1-l/stm32mp157a-dcsb5000dd1r.dtb'. Load address: 0xc4000000 Loading: ############ 915 KiB/s done Bytes transferred = 60967 (ee27 hex) ## Booting kernel from Legacy Image at c2000000 ... Image Name: Linux-5.15.67-desk-mp1-l-1.0.0 Created: 2023-07-26 6:51:54 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 8765768 Bytes = 8.4 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 cffee000, end cffffe26 ... OK ETZPC: 0x54003000 node disabled, decprot 7=0 ETZPC: 0x48001000 node disabled, decprot 89=2 Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.15.67-desk-mp1-l-1.0.0 (jenkins@focalbakery) (arm-ostl-linux-gnueabi-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Wed Jul 26 08:48:59 CEST 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: Dave desk-mp1 stm32mp157a-dcsb5000dd1r [ 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 128 MiB at 0xd8000000 [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000c0000000-0x00000000dfffffff] [ 0.000000] HighMem empty [ 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-0x00000000dfffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000dfffffff] [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.1 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.2 [ 0.000000] percpu: Embedded 17 pages/cpu s37004 r8192 d24436 u69632 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129920 [ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.169:/home/dvdk/desk-mp1-l/rfs/desk-mp1-l,v3,tcp ip=192.168.0.89:192.168.0.169:192.168.0.254:255.255.255.0:etra:eth0:off panic=1 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:off, heap alloc:off, heap free:off [ 0.000000] Memory: 300948K/524288K available (13312K kernel code, 1379K rwdata, 3896K rodata, 1024K init, 218K bss, 92268K reserved, 131072K 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] Tracing 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] 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.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000030] Switching to timer-based delay loop, resolution 41ns [ 0.001201] Console: colour dummy device 80x30 [ 0.001272] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.001305] pid_max: default: 32768 minimum: 301 [ 0.001622] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.001660] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.003046] CPU: Testing write buffer coherency: ok [ 0.003575] /cpus/cpu@0 missing clock-frequency property [ 0.003646] /cpus/cpu@1 missing clock-frequency property [ 0.003680] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.005432] Setting up static identity map for 0xc0100000 - 0xc0100060 [ 0.005697] rcu: Hierarchical SRCU implementation. [ 0.008145] smp: Bringing up secondary CPUs ... [ 0.009536] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.009802] smp: Brought up 1 node, 2 CPUs [ 0.009844] SMP: Total of 2 processors activated (96.00 BogoMIPS). [ 0.009862] CPU: All CPU(s) started in SVC mode. [ 0.010838] devtmpfs: initialized [ 0.032452] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.032864] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.032908] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.040445] pinctrl core: initialized pinctrl subsystem [ 0.043161] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.046724] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.048623] thermal_sys: Registered thermal governor 'step_wise' [ 0.049008] cpuidle: using governor menu [ 0.049407] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.049438] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.049983] Serial: AMBA PL011 UART driver [ 0.053265] stm32-pm-domain pm_domain: domain core-ret-power-domain registered [ 0.053322] stm32-pm-domain pm_domain: subdomain core-power-domain registered [ 0.053343] stm32-pm-domain pm_domain: domains probed [ 0.087761] platform panel-rgb@0: Fixing up cyclic dependency with 5a001000.display-controller [ 0.106230] Kprobes globally optimized [ 0.121810] SCSI subsystem initialized [ 0.122791] usbcore: registered new interface driver usbfs [ 0.122884] usbcore: registered new interface driver hub [ 0.122968] usbcore: registered new device driver usb [ 0.123377] pps_core: LinuxPPS API ver. 1 registered [ 0.123399] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.123439] PTP clock support registered [ 0.123796] EDAC MC: Ver: 3.0.0 [ 0.125013] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled. [ 0.125132] arm-scmi firmware:scmi: SCMI Protocol v2.0 'ST:' Firmware version 0x0 [ 0.126577] Advanced Linux Sound Architecture Driver Initialized. [ 0.127754] Bluetooth: Core ver 2.22 [ 0.127866] NET: Registered PF_BLUETOOTH protocol family [ 0.127885] Bluetooth: HCI device and connection manager initialized [ 0.127911] Bluetooth: HCI socket layer initialized [ 0.127931] Bluetooth: L2CAP socket layer initialized [ 0.127971] Bluetooth: SCO socket layer initialized [ 0.129075] clocksource: Switched to clocksource arch_sys_counter [ 0.222304] NET: Registered PF_INET protocol family [ 0.222717] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.224423] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.224495] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.224524] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear) [ 0.224595] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.224699] TCP: Hash tables configured (established 4096 bind 4096) [ 0.224844] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.224901] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.225282] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.230164] RPC: Registered named UNIX socket transport module. [ 0.230203] RPC: Registered udp transport module. [ 0.230217] RPC: Registered tcp transport module. [ 0.230230] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.232495] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available [ 0.234675] Initialise system trusted keyrings [ 0.235207] workingset: timestamp_bits=14 max_order=17 bucket_order=3 [ 0.246806] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.248380] NFS: Registering the id_resolver key type [ 0.248479] Key type id_resolver registered [ 0.248498] Key type id_legacy registered [ 0.248714] ntfs: driver 2.1.32 [Flags: R/O]. [ 0.249020] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 0.250003] fuse: init (API version 7.34) [ 0.395127] NET: Registered PF_ALG protocol family [ 0.395171] Key type asymmetric registered [ 0.395187] Asymmetric key parser 'x509' registered [ 0.395381] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 0.395407] io scheduler mq-deadline registered [ 0.395422] io scheduler kyber registered [ 0.405306] reg11: supplied by regulator-dummy [ 0.405769] reg18: supplied by regulator-dummy [ 0.406151] usb33: supplied by regulator-dummy [ 0.411183] STM32 USART driver initialized [ 0.434054] brd: module loaded [ 0.445036] loop: module loaded [ 0.454344] CAN device driver interface [ 0.456688] pegasus: Pegasus/Pegasus II USB Ethernet driver [ 0.456791] usbcore: registered new interface driver pegasus [ 0.456877] usbcore: registered new interface driver asix [ 0.456942] usbcore: registered new interface driver ax88179_178a [ 0.457024] usbcore: registered new interface driver cdc_ether [ 0.457107] usbcore: registered new interface driver smsc75xx [ 0.457188] usbcore: registered new interface driver smsc95xx [ 0.457253] usbcore: registered new interface driver net1080 [ 0.457320] usbcore: registered new interface driver cdc_subset [ 0.457381] usbcore: registered new interface driver zaurus [ 0.457557] usbcore: registered new interface driver cdc_ncm [ 0.458877] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.458938] ehci-platform: EHCI generic platform driver [ 0.459309] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.459354] ohci-platform: OHCI generic platform driver [ 0.460175] usbcore: registered new interface driver cdc_acm [ 0.460198] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 0.460313] usbcore: registered new interface driver usb-storage [ 0.464732] i2c_dev: i2c /dev entries driver [ 0.468648] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=1) [ 0.468681] softdog: soft_reboot_cmd=<not set> soft_active_on_boot=0 [ 0.470821] sdhci: Secure Digital Host Controller Interface driver [ 0.470851] sdhci: Copyright(c) Pierre Ossman [ 0.470864] Synopsys Designware Multimedia Card Interface Driver [ 0.471385] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.472651] ledtrig-cpu: registered to indicate activity on CPUs [ 0.472763] arm-scmi firmware:scmi: Failed. SCMI protocol 17 not active. [ 0.473021] SMCCC: SOC_ID: ID = jep106:0020:0500 Revision = 0x00002000 [ 0.473965] hid: raw HID events driver (C) Jiri Kosina [ 0.474246] usbcore: registered new interface driver usbhid [ 0.474267] usbhid: USB HID core driver [ 0.483142] NET: Registered PF_PACKET protocol family [ 0.483200] can: controller area network core [ 0.483333] NET: Registered PF_CAN protocol family [ 0.483355] can: raw protocol [ 0.483373] can: broadcast manager protocol [ 0.483394] can: netlink gateway - max_hops=1 [ 0.483851] Bluetooth: RFCOMM TTY layer initialized [ 0.483897] Bluetooth: RFCOMM socket layer initialized [ 0.483951] Bluetooth: RFCOMM ver 1.11 [ 0.484429] lib80211: common routines for IEEE802.11 drivers [ 0.484965] Key type dns_resolver registered [ 0.485104] ThumbEE CPU extension supported. [ 0.485138] Registering SWP/SWPB emulation handler [ 0.485634] registered taskstats version 1 [ 0.485669] Loading compiled-in X.509 certificates [ 0.525316] stm32-mdma 58000000.dma-controller: STM32 MDMA driver registered [ 0.528679] stm32-dma 48000000.dma-controller: no dma pool: can't use MDMA: 0 [ 0.530588] stm32-dma 48000000.dma-controller: STM32 DMA driver registered [ 0.549548] stm_thermal 50028000.thermal: stm_thermal_probe: Driver initialized successfully [ 0.556571] /soc/interrupt-controller@5000d000: bank0 [ 0.556627] /soc/interrupt-controller@5000d000: bank1 [ 0.556658] /soc/interrupt-controller@5000d000: bank2 [ 0.558652] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOA bank added [ 0.559604] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOB bank added [ 0.560374] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOC bank added [ 0.561133] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOD bank added [ 0.561852] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOE bank added [ 0.562533] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOF bank added [ 0.563284] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOG bank added [ 0.563966] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOH bank added [ 0.564049] stm32mp157-pinctrl soc:pinctrl@50002000: Pinctrl STM32 initialized [ 0.565018] stm32mp157-pinctrl soc:pinctrl@54004000: at least one GPIO bank is required [ 0.565051] stm32mp157-pinctrl: probe of soc:pinctrl@54004000 failed with error -22 [ 0.566995] LCD_5V: supplied by vin [ 0.567757] wlan-en-regulator: supplied by vin [ 0.571816] stm32-usart 4000f000.serial: interrupt mode for rx (no dma) [ 0.571855] stm32-usart 4000f000.serial: interrupt mode for tx (no dma) [ 0.571893] 4000f000.serial: ttySTM1 at MMIO 0x4000f000 (irq = 49, base_baud = 4000000) is a stm32-usart [ 0.574102] stm32-usart 40010000.serial: interrupt mode for rx (no dma) [ 0.574137] stm32-usart 40010000.serial: interrupt mode for tx (no dma) [ 0.574175] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 50, base_baud = 4000000) is a stm32-usart [ 1.876693] printk: console [ttySTM0] enabled [ 1.883384] stm32-usart 40018000.serial: interrupt mode for rx (no dma) [ 1.888580] stm32-usart 40018000.serial: interrupt mode for tx (no dma) [ 1.895372] 40018000.serial: ttySTM3 at MMIO 0x40018000 (irq = 51, base_baud = 4000000) is a stm32-usart [ 1.906972] stm32-usart 40019000.serial: interrupt mode for rx (no dma) [ 1.912252] stm32-usart 40019000.serial: interrupt mode for tx (no dma) [ 1.918854] 40019000.serial: ttySTM2 at MMIO 0x40019000 (irq = 52, base_baud = 4000000) is a stm32-usart [ 1.934966] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found [ 1.940786] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42 [ 1.946602] stm32-dwmac 5800a000.ethernet: DWMAC4/5 [ 1.951618] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported [ 1.958909] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported [ 1.966231] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported [ 1.973137] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported [ 1.979571] stm32-dwmac 5800a000.ethernet: TSO supported [ 1.984744] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 1.992573] stm32-dwmac 5800a000.ethernet: device MAC address 0a:7f:53:9f:1a:77 [ 1.999893] stm32-dwmac 5800a000.ethernet: Enabled L3L4 Flow TC (entries=2) [ 2.006881] stm32-dwmac 5800a000.ethernet: Enabled RFS Flow TC (entries=8) [ 2.013829] stm32-dwmac 5800a000.ethernet: TSO feature enabled [ 2.019637] stm32-dwmac 5800a000.ethernet: Using 32 bits DMA width [ 2.034230] stm32_rtc 5c004000.rtc: registered as rtc0 [ 2.038053] stm32_rtc 5c004000.rtc: setting system clock to 2000-01-01T00:00:29 UTC (946684829) [ 2.047401] stm32_rtc 5c004000.rtc: Date/Time must be initialized [ 2.052874] stm32_rtc 5c004000.rtc: registered rev:1.2 [ 2.078617] stm32f7-i2c 40015000.i2c: using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers [ 2.086833] stm32f7-i2c 40015000.i2c: STM32F7 I2C-0 bus adapter [ 2.117717] stpmic1 1-0033: PMIC Chip Version: 0x21 [ 2.126328] vddcore: supplied by vin [ 2.131599] vdd_ddr: supplied by vin [ 2.136721] vdd: supplied by vin [ 2.141565] v3v3: supplied by vin [ 2.146472] v1v8_audio: supplied by v3v3 [ 2.153323] v3v3_hdmi: supplied by vin [ 2.159381] vtt_ddr: supplied by vdd_ddr [ 2.164720] vdd_usb: supplied by vin [ 2.170470] vdda: supplied by vin [ 2.175914] v1v2_hdmi: supplied by v3v3 [ 2.181586] vref_ddr: supplied by vin [ 2.187238] bst_out: supplied by vin [ 2.190390] vbus_otg: supplied by bst_out [ 2.194352] vbus_sw: supplied by bst_out [ 2.203933] hwmon hwmon1: temp1_input not attached to any thermal zone [ 2.211164] rtc-ds3232 1-0068: registered as rtc1 [ 2.215372] stm32f7-i2c 5c002000.i2c: STM32F7 I2C-1 bus adapter [ 2.222556] i2c i2c-0: Added multiplexed i2c bus 2 [ 2.226036] i2c-mux-gpio i2cmux: 1 port mux on STM32F7 I2C(0x40015000) adapter [ 2.238182] mmci-pl18x 48004000.mmc: mmc0: PL180 manf 53 rev2 at 0x48004000 irq 38,0 (pio) [ 2.437741] mmci-pl18x 58005000.mmc: Got CD GPIO [ 2.442335] mmci-pl18x 58005000.mmc: mmc1: PL180 manf 53 rev2 at 0x58005000 irq 42,0 (pio) [ 2.467897] mmc0: queuing unknown CIS tuple 0x01 [d9 01 ff] (3 bytes) [ 2.480403] mmci-pl18x 58007000.mmc: mmc2: PL180 manf 53 rev2 at 0x58007000 irq 43,0 (pio) [ 2.488797] mmc0: queuing unknown CIS tuple 0x1a [01 01 00 02 07] (5 bytes) [ 2.498312] mmc0: queuing unknown CIS tuple 0x1b [c1 41 30 30 ff ff 32 00] (8 bytes) [ 2.505375] mmc0: queuing unknown CIS tuple 0x14 [] (0 bytes) [ 2.518285] mmc0: new high speed SDIO card at address 0001 [ 2.524170] mmc1: new high speed SDHC card at address 59b4 [ 2.528525] stm32-ipcc 4c001000.mailbox: ipcc rev:1.0 enabled, 6 chans, proc 0 [ 2.538317] mmcblk1: mmc1:59b4 USDU1 14.9 GiB [ 2.542967] stm32-rproc 10000000.m4: IRQ index 0 not found [ 2.548806] remoteproc remoteproc0: m4 is available [ 2.555924] mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 [ 2.561309] rfkill_gpio bt_rfkill: bt_rfkill device registered. [ 2.572955] LCD_VDD: supplied by vdd [ 2.575854] TOUCH_VDD: supplied by vdd [ 2.581775] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0 [ 2.594873] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator [ 2.601351] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator [ 2.616961] mmc2: new DDR MMC card at address 0001 [ 2.621840] mmcblk2: mmc2:0001 W62704 3.53 GiB [ 2.631363] mmcblk2boot0: mmc2:0001 W62704 2.00 MiB [ 2.638100] mmcblk2boot1: mmc2:0001 W62704 2.00 MiB [ 2.644545] mmcblk2rpmb: mmc2:0001 W62704 512 KiB, chardev (240:0) [ 2.746682] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM [ 2.753845] dwc2 49000000.usb-otg: DWC OTG Controller [ 2.757856] dwc2 49000000.usb-otg: new USB bus registered, assigned bus number 1 [ 2.765325] dwc2 49000000.usb-otg: irq 74, io mem 0x49000000 [ 2.777575] hub 1-0:1.0: USB hub found [ 2.780050] hub 1-0:1.0: 1 port detected [ 2.789196] ehci-platform 5800d000.usb: EHCI Host Controller [ 2.793527] ehci-platform 5800d000.usb: new USB bus registered, assigned bus number 2 [ 2.802069] ehci-platform 5800d000.usb: irq 75, io mem 0x5800d000 [ 2.829166] ehci-platform 5800d000.usb: USB 2.0 started, EHCI 1.00 [ 2.835387] hub 2-0:1.0: USB hub found [ 2.837820] hub 2-0:1.0: 2 ports detected [ 2.843655] ohci-platform 5800c000.usb: Generic Platform OHCI controller [ 2.848982] ohci-platform 5800c000.usb: new USB bus registered, assigned bus number 3 [ 2.857389] ohci-platform 5800c000.usb: irq 45, io mem 0x5800c000 [ 2.934566] hub 3-0:1.0: USB hub found [ 2.937003] hub 3-0:1.0: 2 ports detected [ 2.944293] input: pmic_onkey as /devices/platform/soc/5c002000.i2c/i2c-1/1-0033/5c002000.i2c:stpmic@33:onkey/input/input0 [ 2.959781] [drm] Initialized stm 1.0.0 20170330 for 5a001000.display-controller on minor 0 [ 3.008138] Console: switching to colour frame buffer device 100x30 [ 3.030009] stm32-display 5a001000.display-controller: [drm] fb0: stmdrmfb frame buffer device [ 3.122904] stm32-dwmac 5800a000.ethernet eth0: PHY [stmmac-0:00] driver [Micrel KSZ8081 or KSZ8091] (irq=POLL) [ 3.132530] stm32-dwmac 5800a000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 3.150511] dwmac4: Master AXI performs any burst length [ 3.154398] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found [ 3.162079] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported [ 3.170642] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock [ 3.177562] stm32-dwmac 5800a000.ethernet eth0: configuring for phy/rmii link mode [ 3.419113] usb 1-1: new full-speed USB device number 2 using dwc2 [ 3.687148] input: ILITEK ILITEK-TP as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.0/0003:222A:0001.0001/input/input1 [ 3.698097] hid-multitouch 0003:222A:0001.0001: input,hidraw0: USB HID v1.10 Device [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input0 [ 3.713869] input: ILITEK ILITEK-TP Mouse as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.1/0003:222A:0001.0002/input/input2 [ 3.725526] hid-generic 0003:222A:0001.0002: input,hidraw1: USB HID v1.10 Mouse [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input1 [ 6.320796] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 6.359106] IP-Config: Complete: [ 6.360954] device=eth0, hwaddr=0a:7f:53:9f:1a:77, ipaddr=192.168.0.89, mask=255.255.255.0, gw=192.168.0.254 [ 6.371211] host=etra, domain=, nis-domain=(none) [ 6.376377] bootserver=192.168.0.169, rootserver=192.168.0.169, rootpath= [ 6.376828] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 6.396413] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 6.401928] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 6.409626] ALSA device list: [ 6.410396] cfg80211: failed to load regulatory.db [ 6.413189] No soundcards found. [ 6.465895] VFS: Mounted root (nfs filesystem) on device 0:17. [ 6.473236] devtmpfs: mounted [ 6.476923] Freeing unused kernel image (initmem) memory: 1024K [ 6.509601] Run /sbin/init as init process [ 7.164993] systemd[1]: System time before build time, advancing clock. [ 8.858278] NET: Registered PF_INET6 protocol family [ 9.036621] Segment Routing with IPv6 [ 9.038976] In-situ OAM (IOAM) with IPv6 [ 9.249571] systemd[1]: systemd 250.5+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK -SECCOMP -GCRYPT -GNUTLS -OPENSSL -ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN +IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid) [ 9.281000] systemd[1]: Detected architecture arm. Welcome to ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 4.0.4-snapshot-20230408 (kirkstone)! [ 9.515713] systemd[1]: Hostname set to <desk-mp1>. [ 9.537741] systemd[1]: Initializing machine ID from random generator. [ 9.656925] systemd[1]: Using hardware watchdog 'Software Watchdog', version 0, device /dev/watchdog0 [ 9.664999] systemd[1]: Watchdog running with a timeout of 32s. [ 14.233967] systemd[1]: /lib/systemd/system/mount-partitions.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether. [ 14.289772] systemd[1]: Queued start job for default target Multi-User System. [ 14.368558] systemd[1]: Created slice Slice /system/getty. [ OK ] Created slice Slice /system/getty. [ 14.413806] systemd[1]: Created slice Slice /system/modprobe. [ OK ] Created slice Slice /system/modprobe. [ 14.463714] systemd[1]: Created slice Slice /system/serial-getty. [ OK ] Created slice Slice /system/serial-getty. [ 14.503013] systemd[1]: Created slice User and Session Slice. [ OK ] Created slice User and Session Slice. [ 14.540207] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ OK ] Started Dispatch Password …ts to Console Directory Watch. [ 14.580065] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ OK ] Started Forward Password R…uests to Wall Directory Watch. [ 14.620176] systemd[1]: Reached target Path Units. [ OK ] Reached target Path Units. [ 14.659576] systemd[1]: Reached target Remote File Systems. [ OK ] Reached target Remote File Systems. [ 14.699515] systemd[1]: Reached target Slice Units. [ OK ] Reached target Slice Units. [ 14.729577] systemd[1]: Reached target Swaps. [ OK ] Reached target Swaps. [ 14.798763] systemd[1]: Listening on RPCbind Server Activation Socket. [ OK ] Listening on RPCbind Server Activation Socket. [ 14.839771] systemd[1]: Reached target RPC Port Mapper. [ OK ] Reached target RPC Port Mapper. [ 14.883395] systemd[1]: Listening on Syslog Socket. [ OK ] Listening on Syslog Socket. [ 14.949848] systemd[1]: Listening on Process Core Dump Socket. [ OK ] Listening on Process Core Dump Socket. [ 14.990227] systemd[1]: Listening on initctl Compatibility Named Pipe. [ OK ] Listening on initctl Compatibility Named Pipe. [ 15.075919] systemd[1]: Journal Audit Socket was skipped because of a failed condition check (ConditionSecurity=audit). [ 15.089365] systemd[1]: Listening on Journal Socket (/dev/log). [ OK ] Listening on Journal Socket (/dev/log). [ 15.131121] systemd[1]: Listening on Journal Socket. [ OK ] Listening on Journal Socket. [ 15.173872] systemd[1]: Listening on Network Service Netlink Socket. [ OK ] Listening on Network Service Netlink Socket. [ 15.216743] systemd[1]: Listening on udev Control Socket. [ OK ] Listening on udev Control Socket. [ 15.250605] systemd[1]: Listening on udev Kernel Socket. [ OK ] Listening on udev Kernel Socket. [ 15.293212] systemd[1]: Listening on User Database Manager Socket. [ OK ] Listening on User Database Manager Socket. [ 15.330842] systemd[1]: Huge Pages File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/mm/hugepages). [ 15.351178] systemd[1]: Mounting POSIX Message Queue File System... Mounting POSIX Message Queue File System... [ 15.398093] systemd[1]: Mounting Kernel Debug File System... Mounting Kernel Debug File System... [ 15.437485] systemd[1]: Mounting Kernel Trace File System... Mounting Kernel Trace File System... [ 15.486853] systemd[1]: Mounting Temporary Directory /tmp... Mounting Temporary Directory /tmp... [ 15.532023] systemd[1]: Starting Create List of Static Device Nodes... Starting Create List of Static Device Nodes... [ 15.578425] systemd[1]: Starting Load Kernel Module configfs... Starting Load Kernel Module configfs... [ 15.618035] systemd[1]: Starting Load Kernel Module drm... Starting Load Kernel Module drm... [ 15.658288] systemd[1]: Starting Load Kernel Module fuse... Starting Load Kernel Module fuse... [ 15.708218] systemd[1]: Starting Mount partitions... Starting Mount partitions... [ 15.754965] systemd[1]: Starting RPC Bind... Starting RPC Bind... [ 15.792506] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathIsReadWrite=!/). [ 15.829805] systemd[1]: Starting Journal Service... Starting Journal Service... [ 15.909746] systemd[1]: Load Kernel Modules was skipped because all trigger condition checks failed. [ 15.940986] systemd[1]: Mounting NFSD configuration filesystem... Mounting NFSD configuration filesystem... [ 16.021919] systemd[1]: Starting Generate network units from Kernel command line... Starting Generate network …ts from Kernel command line... [ 16.071364] systemd[1]: Starting Remount Root and Kernel File Systems... Starting Remount Root and Kernel File Systems... [ 16.125471] systemd[1]: Starting Apply Kernel Variables... Starting Apply Kernel Variables... [ 16.170783] systemd[1]: Starting Coldplug All udev Devices... Starting Coldplug All udev Devices... [ 16.349626] systemd[1]: Started RPC Bind. [ OK ] Started RPC Bind. [ 16.398954] systemd[1]: Mounted POSIX Message Queue File System. [ OK ] Mounted POSIX Message Queue File System. [ 16.418574] systemd[1]: Mounted Kernel Debug File System. [ OK ] Mounted Kernel Debug File System. [ 16.462920] systemd[1]: Mounted Kernel Trace File System. [ OK ] Mounted Kernel Trace File System. [ 16.500812] systemd[1]: Started Journal Service. [ OK ] Started Journal Service. [ OK ] Mounted Temporary Directory /tmp. [ OK ] Finished Create List of Static Device Nodes. [ OK ] Finished Load Kernel Module configfs. [ OK ] Finished Load Kernel Module drm. [ OK ] Finished Load Kernel Module fuse. [ OK ] Finished Mount partitions. [FAILED] Failed to mount NFSD configuration filesystem. See 'systemctl status proc-fs-nfsd.mount' for details. [DEPEND] Dependency failed for NFS server and services. [DEPEND] Dependency failed for NFS Mount Daemon. [ OK ] Finished Generate network units from Kernel command line. [ OK ] Finished Remount Root and Kernel File Systems. [ OK ] Finished Apply Kernel Variables. Mounting FUSE Control File System... Mounting Kernel Configuration File System... [ OK ] Started Starts Psplash Boot screen. Starting Resize root files…to fit available disk space... Starting Flush Journal to Persistent Storage... Starting Create System Users... [ 17.391122] systemd-journald[593]: Received client request to flush runtime journal. [ OK ] Mounted FUSE Control File System. [ OK ] Mounted Kernel Configuration File System. [ OK ] Finished Flush Journal to Persistent Storage. [ OK ] Finished Create System Users. Starting Create Static Device Nodes in /dev... [ OK ] Finished Create Static Device Nodes in /dev. [ OK ] Reached target Preparation for Local File Systems. Mounting /var/volatile... Starting Rule-based Manage…for Device Events and Files... [ OK ] Finished Coldplug All udev Devices. [ OK ] Mounted /var/volatile. Starting Wait for udev To …plete Device Initialization... Starting Load/Save Random Seed... [ OK ] Started Rule-based Manager for Device Events and Files. [ 18.986106] random: crng init done [ OK ] Finished Load/Save Random Seed. [ OK ] Created slice Slice /system/systemd-backlight. Starting Load/Save Screen …ness of backlight:backlight... [ OK ] Finished Load/Save Screen …htness of backlight:backlight. [ 21.174007] galcore: loading out-of-tree module taints kernel. [ 21.392716] Galcore version 6.4.9.436021 [ 21.882137] using random self ethernet address [ 21.907565] using random host ethernet address [ 22.401105] usb0: HOST MAC 5c:c0:78:d3:5c:60 [ 22.403995] usb0: MAC 76:b2:0b:ea:da:0d [ 22.407910] dwc2 49000000.usb-otg: bound driver configfs-gadget [ OK ] Reached target Hardware activated USB gadget. [ OK ] Listening on Load/Save RF …itch Status /dev/rfkill Watch. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ OK ] Finished Wait for udev To Complete Device Initialization. [ OK ] Finished Resize root files…m to fit available disk space. [ OK ] Reached target Local File Systems. Starting Rebuild Dynamic Linker Cache... Starting Create Volatile Files and Directories... [ OK ] Finished Create Volatile Files and Directories. [FAILED] Failed to start Hardware RNG Entropy Gatherer Daemon. See 'systemctl status rngd.service' for details. Starting Rebuild Journal Catalog... [FAILED] Failed to start Network Time Synchronization. See 'systemctl status systemd-timesyncd.service' for details. [ OK ] Reached target System Time Set. Starting Record System Boot/Shutdown in UTMP... [ OK ] Stopped Network Time Synchronization. [FAILED] Failed to start Network Time Synchronization. See 'systemctl status systemd-timesyncd.service' for details. [ OK ] Finished Record System Boot/Shutdown in UTMP. [ OK ] Stopped Network Time Synchronization. [FAILED] Failed to start Network Time Synchronization. See 'systemctl status systemd-timesyncd.service' for details. [ OK ] Finished Rebuild Journal Catalog. [ OK ] Stopped Network Time Synchronization. [FAILED] Failed to start Network Time Synchronization. See 'systemctl status systemd-timesyncd.service' for details. [ OK ] Stopped Network Time Synchronization. [FAILED] Failed to start Network Time Synchronization. See 'systemctl status systemd-timesyncd.service' for details. [ OK ] Stopped Network Time Synchronization. [FAILED] Failed to start Network Time Synchronization. See 'systemctl status systemd-timesyncd.service' for details. [ OK ] Finished Rebuild Dynamic Linker Cache. Starting Update is Completed... [ OK ] Finished Update is Completed. [ OK ] Reached target System Initialization. [ OK ] Started Daily rotation of log files. [ OK ] Started Daily Cleanup of Temporary Directories. [ OK ] Reached target Timer Units. [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Listening on dropbear.socket. [ OK ] Reached target Socket Units. [ OK ] Reached target Basic System. [ OK ] Started Job spooling tools. [ OK ] Started Periodic Command Scheduler. Starting D-Bus System Message Bus... Starting IPv6 Packet Filtering Framework... Starting IPv4 Packet Filtering Framework... Starting Hold until boot process finishes up... [ OK ] Started System Logging Service. Starting Resets System Activity Logs... syslogd[805]: Error opening log file: /var/log/auth.log: No such file or directory syslogd[805]: Error opening log file: /var/log/syslog: No such file or directory syslogd[805]: Error opening log file: /var/log/kern.log: No such file or directory syslogd[805]: Error opening log file: /var/log/mail.log: No such file or directory [FAILED] Failed to start User Login Management. See 'systemctl status systemd-logind.service' for details. syslogd[805]: Error opening log file: /var/log/mail.err: No such file or directory Starting Userfs cleanup package... syslogd[805]: Error opening log file: /var/log/messages: No such file or directory [ OK ] Finished IPv6 Packet Filtering Framework. [ OK ] Started D-Bus System Message Bus. [ OK ] Finished IPv4 Packet Filtering Framework. [ OK ] Finished Hold until boot process finishes up. [FAILED] Failed to start Resets System Activity Logs. See 'systemctl status sysstat.service' for details. [ OK ] Reached target Preparation for Network. [ OK ] Stopped User Login Management. Starting Load Kernel Module drm... Starting Network Configuration... Starting Check if the gpu …orrect weston configuration... [ OK ] Finished Load Kernel Module drm. [FAILED] Failed to start User Login Management. See 'systemctl status systemd-logind.service' for details. [ OK ] Stopped User Login Management. Starting Load Kernel Module drm... [ OK ] Finished Load Kernel Module drm. [FAILED] Failed to start User Login Management. See 'systemctl status systemd-logind.service' for details. [ OK ] Stopped User Login Management. Starting Load Kernel Module drm... [ OK ] Finished Load Kernel Module drm. [FAILED] Failed to start User Login Management. See 'systemctl status systemd-logind.service' for details. [ OK ] Stopped User Login Management. Starting Load Kernel Module drm... [ OK ] Finished Check if the gpu … correct weston configuration. [ OK ] Started Network Configuration. [ OK ] Finished Load Kernel Module drm. [FAILED] Failed to start User Login Management. See 'systemctl status systemd-logind.service' for details. [FAILED] Failed to start Network Name Resolution. See 'systemctl status systemd-resolved.service' for details. [ OK ] Reached target Network. [ OK ] Reached target Host and Network Name Lookups. Starting Avahi mDNS/DNS-SD Stack... [ OK ] Started IIO Daemon. Starting Real time performance monitoring... [ OK ] Started NFS status monitor for NFSv2/3 locking.. [FAILED] Failed to start Respond to IPv6 Node Information Queries. See 'systemctl status ninfod.service' for details. [FAILED] Failed to start Network Router Discovery Daemon. See 'systemctl status rdisc.service' for details. Starting Permit User Sessions... Starting Target Communication Framework agent... [ OK ] Started Xinetd A Powerful Replacement For Inetd. [FAILED] Failed to start Real time performance monitoring. See 'systemctl status netdata.service' for details. [ OK ] Finished Permit User Sessions. [ OK ] Started Avahi mDNS/DNS-SD Stack. [ OK ] Started Target Communication Framework agent. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttySTM0. [ OK ] Reached target Login Prompts. [ OK ] Stopped User Login Management. Starting Load Kernel Module drm... [ OK ] Stopped Network Name Resolution. [FAILED] Failed to start Network Name Resolution. See 'systemctl status systemd-resolved.service' for details. [ OK ] Started Weston, a Wayland …mpositor, as a system service. [ OK ] Finished Load Kernel Module drm. [FAILED] Failed to start User Login Management. See 'systemctl status systemd-logind.service' for details. [ OK ] Stopped Network Name Resolution. [FAILED] Failed to start Network Name Resolution. See 'systemctl status systemd-resolved.service' for details. [ OK ] Stopped Network Name Resolution. [FAILED] Failed to start Network Name Resolution. See 'systemctl status systemd-resolved.service' for details. [ OK ] Stopped Network Name Resolution. [FAILED] Failed to start Network Name Resolution. See 'systemctl status systemd-resolved.service' for details. Starting User Database Manager... [ OK ] Stopped Network Name Resolution. [FAILED] Failed to start Network Name Resolution. See 'systemctl status systemd-resolved.service' for details. [ OK ] Started User Database Manager. ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 4.0.4-snapshot desk-mp1 ttySTM0 desk-mp1 login: root (automatic login) alias: gawkpath_default not found alias: gawkpath_prepend not found alias: gawkpath_append not found alias: gawklibpath_default not found alias: gawklibpath_prepend not found alias: gawklibpath_append not found root@desk-mp1:~# ls -l /lib/modules/$(uname -r) total 812 lrwxrwxrwx 1 541 502 63 Jul 26 2023 build -> /home/jenkins/workspace/workspace/DESK-MP1-L-1.x.x_Linux-kernel drwxr-xr-x 2 541 502 4096 Jul 26 2023 extra drwxr-xr-x 10 541 502 4096 Jul 26 2023 kernel -rw-r--r-- 1 541 502 91303 Jul 26 2023 modules.alias -rw-r--r-- 1 541 502 105556 Jul 26 2023 modules.alias.bin -rw-r--r-- 1 541 502 21761 Jul 26 2023 modules.builtin -rw-r--r-- 1 541 502 45829 Jul 26 2023 modules.builtin.alias.bin -rw-r--r-- 1 541 502 24366 Jul 26 2023 modules.builtin.bin -rw-r--r-- 1 541 502 137570 Jul 26 2023 modules.builtin.modinfo -rw-r--r-- 1 541 502 54201 Jul 26 2023 modules.dep -rw-r--r-- 1 541 502 85427 Jul 26 2023 modules.dep.bin -rw-r--r-- 1 541 502 94 Jul 26 2023 modules.devname -rw-r--r-- 1 541 502 26264 Jul 26 2023 modules.order -rw-r--r-- 1 541 502 190 Jul 26 2023 modules.softdep -rw-r--r-- 1 541 502 84407 Jul 26 2023 modules.symbols -rw-r--r-- 1 541 502 108328 Jul 26 2023 modules.symbols.bin lrwxrwxrwx 1 541 502 63 Jul 26 2023 source -> /home/jenkins/workspace/workspace/DESK-MP1-L-1.x.x_Linux-kernel root@desk-mp1:~#
QT5 App[edit | edit source]
To run QT5 applications in the target after booting via NFS it is first necessary to set the environment correctly, to do this you need to execute these 2 commands:
/etc/profile.d/qt-wayland.sh
export XDG_RUNTIME_DIR=/home/weston
Development[edit | edit source]
Synchronizing the git repositories[edit | edit source]
In DESK-MP1-L the following source trees are clones of the correspondent DAVE Embedded Systems git repositories: stm32cubemx.git
Component | GIT Remote |
---|---|
STM32CubeMX Configuration file (.ioc )
|
https://git.dave.eu/git/desk-mp1-l/stm32cubemx.git
|
ATF | https://git.dave.eu/git/desk-mp1-l/arm-trusted-firmware.git
|
U-Boot | https://git.dave.eu/git/desk-mp1-l/u-boot.git
|
Linux kernel | https://git.dave.eu/git/desk-mp1-l/linux.git
|
Boot Image | https://git.dave.eu/git/desk-mp1-l/desk-mp1-boot-image.git
|
Yocto meta DESK | https://git.dave.eu/git/desk-mp1-l/meta-desk-mp1.git
|
For more information about access to these repositories, please refer to this link.
Access to DAVE Embedded Systems' git repositories is granted to the development kit's owners only. Please refer to this page for detailed instructions on how to get access.
Instructions[edit | edit source]
The components listed in the table above can be kept in sync and up to date with DAVE Embedded Systems' repositories.
Once the git account has been enabled, the developer can:
- clone the repository with the
git clone <git_remote_repository>
command - synchronize a source tree entering the repository directory and launching the
git fetch origin
command.
Please note that git fetch doesn't merge the commits on the current branch. To do that, the developer should run the git merge
command or replace the fetch-merge process with a single git pull
command. Please note that the recommended method is the fetch-merge process. For further information on Git, please refer to the official Git Documentation
Using the STM32CubeMX Configuration file[edit | edit source]
This page explains the role of the STM32CubeMX Configuration file (.ioc
) in the context of the DESK-MP1-L. Each hardware platform supported by the DESK-MP1-L has a specific .ioc
file. For customers' convenience, these files are available in a dedicated repository available named stm32cubemx.git.
Generating the Device Tree files[edit | edit source]
U-Boot/Linux Device Tree (DT) files provided by the DESK-MX1-L are generated starting from a STM32CubeMX Configuration file as illustrated in the following image.
The first step consisted of creating a .ioc
file with the help of the STM32CubeMX tool. The file name is the model version of the hardware platforms it is associated with. For instance, the file DCSB5000DD1R.ioc
refers to the model of the SBC ETRA included in the evaluation kit (for more details about model version and serial numbers, please see this page).
STM32CubeMX is then used for exporting a set of intermediate files including the Device Trees. These DTs are subsequently tweaked by hand to add further hardware-specific definitions that it is not possible to handle with STM32CubeMX. The final DTs, along with other files, are eventually pushed to GitLab repositories accessible by the customers. These repositories are the same ones used by Yocto to build the Linux BSP.
Developing applications for the ARM Cortex M4[edit | edit source]
Another typical usage of the STM32CubeMX Configuration file is related to the development of applications for the ARM Cortex M4. In this case, the .ioc
file can be imported in the STM32CubeIDE to start one's own project.
Building Boot image[edit | edit source]
Quick reference[edit | edit source]
URL | https://git.dave.eu/git/desk-mp1-l/desk-mp1-boot-image.git |
---|---|
stable branch | desk-mp1-l-1.x.x |
stable tag | desk-mp1-l-1.1.0 |
Platform | SOM ConfigID | CB ConfigID | defconfig |
---|---|---|---|
SBC ETRA | 0x00000001 | 0x00000001 | stm32mp15_desk_mp1_usd_defconfig |
Instructions[edit | edit source]
It is assumed that the development environment has been set up properly as described here.
To build the boot binaries you need to perform these steps:
- start the Linux development VM and login into the system
- open a terminal window and cd into
desk-mp1-boot-image
directory
cd ~/desk-mp1-l/desk-mp1-boot-image
- in case of needs you can update your local repository with the following git command
git pull --recurse-submodules
- configure the build environment
source ~/desk-mp1-l/desk-mp1-l-1.0.1_env.sh
- use the following script:
build_start.sh
: for build boot binaryATF
+U-boot
, the result can be find onboot-binary-files/uSD/
.build_and_put_to_tftpboot_dir.sh
: for build boot binaryATF
+U-boot
and have the result on/tftpboot/desk-mp1-l/boot-binary-files/uSD/
.
- on each script file there are configuration section
#ATF_MD=SD \ #ATF_LOGLEVEL=50 \ # if you set this, ATF_DEBUG will be ignored #ATF_DEBUG=1 \ #OUTPUT_BINARY="$PWD/boot-binary-files" \ #MAKECONF="-j 6 -l 10" \ UBOOT_DTS=stm32mp157a-dcsb5000dd1r \ UBOOT_DEF=stm32mp15_desk_mp1_usd_defconfig \ ATF_DTS=stm32mp157a-dcsb5000dd1r \ ./build_all.sh
- configurations:
ATF_MD
: default value ->SD
, media device from which to boot.ATF_LOGLEVEL
: default value ->20
, log level of ATF, if you change this value theATF_DEBUG
will be ignored.ATF_DEBUG
: default value ->1
, enable debug.OUTPUT_BINARY
: default value ->"$PWD/boot-binary-files"
, output binary directory.MAKECONF
: default value ->"-j 32 -l 50"
, configuration for makefile.UBOOT_DTS
: no default value, device tree name of u-boot to build, value needed for build!UBOOT_DEF
: no default value, name of defconfig to use on build of u-boot, value needed for build!ATF_DTS
: no default value, devce tree name of ATF to build, value needed for build!
- Default configuration (if not specified the default value is used):
- boot from uSD:
UBOOT_DTS=stm32mp157a-dcsb5000dd1r
UBOOT_DEF=stm32mp15_desk_mp1_usd_defconfig
ATF_DTS=stm32mp157a-dcsb5000dd1r
- boot from uSD:
i.e.
./build_start.sh
Building Linux[edit | edit source]
Quick reference[edit | edit source]
URL | https://git.dave.eu/git/desk-mp1-l/linux.git |
---|---|
stable branch | desk-mp1-l-1.x.x |
stable tag | desk-mp1-l-1.1.0 |
defconfig | multi_v7_desk_mp1_defconfig | |
---|---|---|
Kernel binary | UIMAGE_LOADADDR=0xC2000040 uImage | |
Device trees | Platform | DTB |
SBC ETRA | stm32mp157a-dcsb5000dd1r.dtb |
Instructions[edit | edit source]
It is assumed that the development environment has been set up properly as described here.
- start the Linux development VM and login into the system
- open a terminal window and cd into Linux kernel source code
cd ~/desk-mp1-l/linux
- in case of needs you can update your local repository with the following git command
git pull
- configure the build environment
source ~/desk-mp1-l/desk-mp1-l-1.0.1_env.sh
- enter the source tree directory and run the following commands:
make multi_v7_desk_mp1_defconfig make LOADADDR=0xC2000040 uImage stm32mp157a-dcsb5000dd1r.dtb
NOTE: this is the default configuration suitable for latest target.
- The former command selects the default DESK-MP1-L configuration, while the latter builds the kernel binary image with the required u-boot header and the kernel device tree.
Default Linux kernel configuration can be changed by using the standard menuconfig
, xconfig
, or gconfig
make target. Subsequent builds just require uImage
make target to update the binary image. Once the build process is complete, the kernel binary image is stored into the arch/arm/boot/uImage
file. Both this file and the kernel device tree can be copied to the tftp root directory /tftpboot/desk-mp1-l/
with the following commands:
cp arch/arm/boot/uImage /tftpboot/desk-mp1-l/ cp arch/arm/boot/dts/*.dtb /tftpboot/desk-mp1-l/
Usually, kernel modules are installed with make modules_install
command, but this method installs the modules into the /lib/modules
directory of you MVM, which is not what you want.
A better way to deploy kernel modules while cross-compiling is
- generate a
.tar.gz
archive - install this archive into the target root file system
User can create such an archive, for example, using the following commands:
make modules mkdir modules-install make INSTALL_MOD_PATH=modules-install modules_install cd modules-install && tar cvzf ../modules.tar.gz . && cd ..
Now copy modules.tar.gz
into the target root file system and install them as root with the following command
tar xvzf modules.tar.gz -C /
Building the Yocto BSP[edit | edit source]
Quick reference[edit | edit source]
Repository Information | ||
---|---|---|
Repository | Yocto BSP Layer | |
URL | https://git.dave.eu/git/desk-mp1-l/meta-desk-mp1.git | |
stable branch | kirkstone | |
stable tag | desk-mp1-l-1.1.0 |
Build targets | ||
---|---|---|
Distro | Image name | Description |
openstlinux-eglfs | dave-image-devel | This image include tools for development/debugging |
openstlinux-weston | dave-image-qt5-weston | In addition dave-image-devel , this image provides Qt5 libraries using the weston backend with wayland server
|
openstlinux-weston | desk-image-flutter-gallery | In addition dave-image-qt5-weston , this image provides Flutter Gallery demo using the weston backend with wayland server
|
Introduction[edit | edit source]
As known, in addition to a bootloader and the o.s. kernel, an embedded Linux system needs a root file system to operate. The root file system must contain everything needed to support the Linux system (applications, settings, data, etc.). The root file system is the file system that is contained on the same partition on which the root directory is located. The Linux kernel, at the end of its startup stage, mounts the root file system on the configured root device and finally launches the /sbin/init
, the first user space process and "father" of all the other processes.
For more information on the Linux filesystem, please refer to http://www.thegeekstuff.com/2010/09/linux-file-system-structure/.
desk-mp1-l provides one (or more) pre-built root file system, that can be used during the evaluation/development/deployment cycle. For instance, the root file system included in the dave-image-qt5-weston
image is suited for the development phase, since it provides a relatively rich set of packages including tools and libraries used to debug the application code. The pre-built root file systems are located here: /home/dvdk/<target_name>/rfs/<kit_name>
.
Besides the pre-built root file systems, DAVE also provides a rich repository containing pre-built applications and libraries. These packages can be easily installed on the target by using the apt-get
tool. Please refer to this section for more details.
To generate the supported root file systems, the build of the Yocto BSP has to be run. The output of this process is an image containing the U-Boot binary file, the Linux kernel image, and the selected root file system image. The following sections describe in detail how to execute this operation.
For more general information regarding the Yocto build system, please refer the dedicated category page.
Yocto build system can be cumbersome and its learning curve is generally quite steep for developers who have no or little familiarity with the embedded Linux world. For these reasons, "yoctoization" of users' applications as described here may be a hard task. DAVE Embedded Systems, however, can provide consultant services to support our customers dealing with such issues. For more details, please contact our Sales Department. |
How to build the Yocto BSP images including the U-Boot binary file, the Linux kernel image, and the target root file system image with KAS[edit | edit source]
The following procedure requires the access to the DAVE Embedded Systems' git repositories. The access to such repositories is granted to development kit's owners only. Please refer to this page for detailed instructions on how to get it. |
This process requires a lot of hardware resources in terms of disk storage, RAM, and processing power. For this reason, it also is recommended to consider the use of a physical machine. For more details on this topic, please refer to the NXP documentation on this BSP, i.e. the i.MX Yocto Project User's Guide, which talks about the host setup for the Yocto build system. |
Initialize the build environment[edit | edit source]
Check that the following packages are install:
dvdk@vagrant:~$ sudo apt-get update && sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool virtualenv
Before running the build, the KAS environment must be initialized properly.
dvdk@vagrant:~$ virtualenv -p /usr/bin/python3 venv created virtual environment CPython3.8.10.final.0-64 in 351ms creator CPython3Posix(dest=/home/dooraim/venv, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/dooraim/.local/share/virtualenv) added seed packages: pip==24.0, setuptools==69.1.1, wheel==0.42.0 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator dvdk@vagrant:~$ source venv/bin/activate (venv) dvdk@vagrant:~$ pip3 install kas==4.2 Collecting kas==4.2 Downloading kas-4.2.tar.gz (39 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting PyYAML<7,>=3.0 (from kas==4.2) Using cached PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB) Collecting distro<2,>=1.0.0 (from kas==4.2) Downloading distro-1.9.0-py3-none-any.whl.metadata (6.8 kB) Collecting jsonschema<5,>=2.5.0 (from kas==4.2) Using cached jsonschema-4.21.1-py3-none-any.whl.metadata (7.8 kB) Collecting kconfiglib<15,>=14.1.0 (from kas==4.2) Downloading kconfiglib-14.1.0-py2.py3-none-any.whl.metadata (39 kB) Collecting attrs>=22.2.0 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached attrs-23.2.0-py3-none-any.whl.metadata (9.5 kB) Collecting importlib-resources>=1.4.0 (from jsonschema<5,>=2.5.0->kas==4.2) Downloading importlib_resources-6.4.0-py3-none-any.whl.metadata (3.9 kB) Collecting jsonschema-specifications>=2023.03.6 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached jsonschema_specifications-2023.12.1-py3-none-any.whl.metadata (3.0 kB) Collecting pkgutil-resolve-name>=1.3.10 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached pkgutil_resolve_name-1.3.10-py3-none-any.whl.metadata (624 bytes) Collecting referencing>=0.28.4 (from jsonschema<5,>=2.5.0->kas==4.2) Downloading referencing-0.34.0-py3-none-any.whl.metadata (2.8 kB) Collecting rpds-py>=0.7.1 (from jsonschema<5,>=2.5.0->kas==4.2) Using cached rpds_py-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.1 kB) Collecting zipp>=3.1.0 (from importlib-resources>=1.4.0->jsonschema<5,>=2.5.0->kas==4.2) Downloading zipp-3.18.1-py3-none-any.whl.metadata (3.5 kB) Downloading distro-1.9.0-py3-none-any.whl (20 kB) Using cached jsonschema-4.21.1-py3-none-any.whl (85 kB) Downloading kconfiglib-14.1.0-py2.py3-none-any.whl (145 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.9/145.9 kB 12.2 MB/s eta 0:00:00 Using cached PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (736 kB) Using cached attrs-23.2.0-py3-none-any.whl (60 kB) Downloading importlib_resources-6.4.0-py3-none-any.whl (38 kB) Using cached jsonschema_specifications-2023.12.1-py3-none-any.whl (18 kB) Using cached pkgutil_resolve_name-1.3.10-py3-none-any.whl (4.7 kB) Downloading referencing-0.34.0-py3-none-any.whl (26 kB) Using cached rpds_py-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB) Downloading zipp-3.18.1-py3-none-any.whl (8.2 kB) Building wheels for collected packages: kas Building wheel for kas (pyproject.toml) ... done Created wheel for kas: filename=kas-4.2-py3-none-any.whl size=57786 sha256=919ab9cedc442039708d8846f9fb02e8b43d823cb54d8785737bf46361c594a6 Stored in directory: /home/dooraim/.cache/pip/wheels/5f/47/a7/e9a292a85a88f96c6b3d834d5e9aceb6927ae2e2b89b123ecb Successfully built kas Installing collected packages: zipp, rpds-py, PyYAML, pkgutil-resolve-name, kconfiglib, distro, attrs, referencing, importlib-resources, jsonschema-specifications, jsonschema, kas Successfully installed PyYAML-6.0.1 attrs-23.2.0 distro-1.9.0 importlib-resources-6.4.0 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 kas-4.2 kconfiglib-14.1.0 pkgutil-resolve-name-1.3.10 referencing-0.34.0 rpds-py-0.18.0 zipp-3.18.1 (venv) dvdk@vagrant:~$
then, create an working directory and fetch the meta-desk-mp1
repositories with the proper branch:
(venv) dvdk@vagrant:~$ mkdir desk-mp1-l/yocto (venv) dvdk@vagrant:~$ cd desk-mp1-l/yocto (venv) dvdk@vagrant:~/desk-mp1-l/yocto$ git clone git@git.dave.eu:desk-mp1-l/meta-desk-mp1.git -b desk-mp1-l-1.1.0
Running the build[edit | edit source]
Please note that even the basic root file system requires a few hours to build on a mid/hi range desktop (4-6 cores, 8-12 GiB RAM) also depending on your Internet connection speed (all sources are fetched from the network). Nearly 20GiB of disk space is required for the build. The process may be slowed down significantly since the performances of a virtual machine are reduced if compared to the physical hardware. Thus, it's recommended to check the hardware capabilities of the host system and, when building with Yocto is required, to consider the following options:
- Migrating the build system to a physical machine
- Assuming that the host system has the required resources, extending the hardware capabilities of the default MVM (e.g. adding more cores and disk space).
Once completed the initialization phase, developers can launch the Yocto image build with KAS, with the following commands:
- for build
dave-image-devel
image withDESK-MP1-L
machine
(venv) dvdk@vagrant:~/desk-mp1-l/yocto/meta-desk-mp1$ kas build desk-mp1_devel_eglfs.yml
Where dave-image-devel
is one of the images listed in here.
- for build
dave-image-qt5-weston
image withDESK-MP1-L
machine
(venv) dvdk@vagrant:~/desk-mp1-l/yocto/meta-desk-mp1$ kas build desk-mp1_qt5_weston.yml
Where dave-image-qt5-weston
is one of the images listed in here.
- for build
desk-image-flutter-gallery
image withDESK-MP1-L
machine
(venv) dvdk@vagrant:~/desk-mp1-l/yocto/meta-desk-mp1$ kas build desk-mp1_flutter-gallery_weston.yml
Where desk-image-flutter-gallery
is one of the images listed in here.
Once the build process is completed, the resulting files (the U-Boot binaries, the Linux kernel image, the device tree blob, the .tar.gz compressed root file system image, etc.) will be available in build/tmp-glibc/deploy/images/<machine_name>
.
Generating the SDKs[edit | edit source]
In way to get the corresponding SDK for QT5, perform the following command:
- for
DESK-MP1-L
machine
(venv) dvdk@vagrant:~/desk-mp1-l/yocto/meta-desk-mp1$ KAS_TASK="populate_sdk" kas build desk-mp1_qt5_weston.yml
Generating the Toolchain[edit | edit source]
The toolchain can be created by the following command:
- for
DESK-MP1-L
machine
(venv) dvdk@vagrant:~/desk-mp1-l/yocto/meta-desk-mp1$ KAS_TARGET="meta-toolchain" kas build desk-mp1_devel_eglfs.yml
Building additional packages[edit | edit source]
To build additional packages, for example memtester
the user need to perform the following command
(venv) dvdk@vagrant:~/desk-mp1-l/yocto/meta-desk-mp1$ KAS_TARGET="memtester" kas build desk-mp1_devel_eglfs.yml
The resulting packages (the default format is deb) can be found inside build/tmp-glibc/deploy/deb
.
How to create a bootable microSD card[edit | edit source]
The process is relatively straightforward: writing the WIC file of interest generated by Yocto onto the SD card. There are multiple ways to do that.
The most common is to use the well-known BalenaEtcher tool (download BalenaEtcher). The following instructions explain how to use it on a Windows host. The procedure is similar to that used when working with a Linux host.
- Download the desired binary image to flash (
*.wic
or*.wic.bz2
)- Among the binaries made available in the mirror there are several
*.wic.bz2
files for the available releases. In particular, there is thedesk-image-qt5-openstlinux-weston-desk-mp1.wic.bz2
file. This image is the one used to program the microSD card delivered along with the evaluation kit.
- Among the binaries made available in the mirror there are several
- Connect the microSD card to the PC Host
- Open BalenaEtcher tool
- Once the tool is open:
- Select the binary to flash by clicking on "Flash from file"
- Select the microSD to flash by clicking on "Select target"
- Flash the uSD by clicking o "Flash".
Flashing the microSD card with STM32CubeProgrammer[edit | edit source]
Another way is to use the STM32CubeProgrammer tool, which has a little different approach than BalenaEtcher as it allows to program the card without removing it from the target. Furthermore, STM32CubeProgrammer makes use of several files generated by Yocto instead of the WIC image. For the sake of simplicity, the following procedure shows how to run STM32CubeProgrammer on the MVM so that it can access these files directly. By default, STM32CubeProgrammer is not installed in the MVM. Please refer to the STM documentation for installation instructions. In principle, the same procedure can be executed on a Windows host as well. It is worth remembering that the programming procedure is obviously much slower when executed in a virtual machine like MVM.
First of all, execute the build with Yocto to generate the required files. See here for more information.
Open STM32CubeProgrammer, click on Open file
, and select the tsv
file /home/dvdk/desk-mp1-l/build/tmp-glibc/deploy/images/desk-mp1/flashlayout_dave-image-qt5-weston/trusted/FlashLayout_sdcard_stm32mp157a-dcsb5000dd1r-trusted.tsv
.
Click on Browse
and select the directory with the artifacts generated by Yocto /home/dvdk/desk-mp1-l/build/tmp-glibc/deploy/images/desk-mp1/
.
On the target, change the S1 DIP-switch into ON-ON-ON-OFF
.
Connect the board (connector J16) to the host with a USB <-> USB OTG cable.
Add the device detected to the MVM:
Establish the connection with STM32CubeProgrammer tool:
- Select USB instead of ST-LINK.
- Make sure that the
Port
value is notNo DFU detected
. It should be something likeUSB1
. - Click on
Connect
.
Click on Download
for programming the microSD card.
Attention: the board resets after the first programming steps, so make sure that the device remains connected to the MVM during the process. Otherwise, repeat the connection steps.
When programming ends, this message appears:
Unplug the OTG cable, power off the target, and change the DIP-switch into ON-OFF-ON-OFF
.
Power on the board. If the procedure was completed properly, you will see the typical bootstrap messages on the console:
NOTICE: CPU: STM32MP157AAB Rev.B NOTICE: Model: DAVE desk-mp1 stm32mp157a-dcsb5000dd1r INFO: PMIC version = 0x21 INFO: Reset reason (0x14): INFO: Pad Reset from NRST 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.6-stm32mp1-r2.2(debug):desk-mp1-l-1.1.0(de8793d9) NOTICE: BL2: Built : 15:00:44, Oct 16 2024 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 - 0x2ffff226 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 0x2ffc5000 INFO: Image id=4 loaded: 0x2ffc5000 - 0x2ffd9820 INFO: BL2: Skip loading image id 8 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 - 0xc0512e40 INFO: BL2: Loading image id 16 INFO: Loading image id=16 at address 0x2ffc0000 INFO: Image id=16 loaded: 0x2ffc0000 - 0x2ffc4105 INFO: BL2: Loading image id 5 INFO: Loading image id=5 at address 0xc0100000 INFO: Image id=5 loaded: 0xc0100000 - 0xc01ecbd8 NOTICE: BL2: Booting BL32 INFO: Entry point address = 0x2ffc5000 INFO: SPSR = 0x1d3 NOTICE: SP_MIN: v2.6-stm32mp1-r2.2(debug):desk-mp1-l-1.1.0(de8793d9) NOTICE: SP_MIN: Built : 15:00:44, Oct 16 2024 INFO: ARM GICv2 driver initialized INFO: ETZPC: UART1 (3) could be non secure INFO: ETZPC: SPI6 (4) could be non secure INFO: ETZPC: RNG1 (7) could be non secure INFO: ETZPC: HASH1 (8) could be non secure INFO: ETZPC: CRYP1 (9) could be non secure INFO: ETZPC: I2C6 (12) could be non secure INFO: SP_MIN: Initializing runtime services INFO: SP_MIN: Preparing exit to normal world serial_stm32 serial@40010000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2021.10-desk-mp1-l-1.1.0 (Oct 16 2024 - 15:23:13 +0000) CPU: STM32MP157AAB Rev.B Model: Dave desk-mp1 stm32mp157a-dcsb5000dd1r Board: Etra in trusted mode (st,stm32mp157a-dcsb5000dd1r) DRAM: 512 MiB Clocks: - MPU : 650 MHz - MCU : 208.878 MHz - AXI : 266.500 MHz - PER : 0 MHz - DDR : 533 MHz WDT: Started with servicing (32s timeout) NAND: 0 MiB MMC: STM32 SD/MMC: 2, STM32 SD/MMC: 0, STM32 SD/MMC: 1 Loading Environment from MMC... *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial SOM ConfigID#: 00000001 SOM UniqueID#: 39303435:33385105:001e0024 CB ConfigID#: 00000001 CB UniqueID#: 0d000035:c4a4762d Board: ETRA on SBC Net: eth0: ethernet@5800a000 Hit any key to stop autoboot: 1 ��� 0 switch to partitions #0, OK mmc0 is current device 1151 bytes read in 2 ms (561.5 KiB/s) Running bootscript from mmc ... ## Executing script at c2000000 bootscript generated with command "./tools/mkimage -C none -A arm -T script -d boot.src.cmd boot.scr.uimg" 60979 bytes read in 6 ms (9.7 MiB/s) 8793008 bytes read in 376 ms (22.3 MiB/s) ## Booting kernel from Legacy Image at c2000000 ... Image Name: Linux-5.15.167-desk-mp1-l-1.1.0 Created: 2024-10-16 15:53:13 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 8792944 Bytes = 8.4 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 cffee000, end cffffe32 ... OK ETZPC: 0x54003000 node disabled, decprot 7=0 ETZPC: 0x48001000 node disabled, decprot 89=2 Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.15.167-desk-mp1-l-1.1.0 (oe-user@oe-host) (arm-ostl-linux-gnueabi-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Wed Oct 16 15:53:13 UTC 2024 [ 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: Dave desk-mp1 stm32mp157a-dcsb5000dd1r [ 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 128 MiB at 0xd8000000 [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000c0000000-0x00000000dfffffff] [ 0.000000] HighMem empty [ 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-0x00000000dfffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000dfffffff] [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.1 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.2 [ 0.000000] percpu: Embedded 17 pages/cpu s40076 r8192 d21364 u69632 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129920 [ 0.000000] Kernel command line: root=/dev/mmcblk1p10 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:off, heap alloc:off, heap free:off [ 0.000000] Memory: 300944K/524288K available (13312K kernel code, 1383K rwdata, 3908K rodata, 1024K init, 216K bss, 92272K reserved, 131072K 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] Tracing 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] 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.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000028] Switching to timer-based delay loop, resolution 41ns [ 0.001199] Console: colour dummy device 80x30 [ 0.001268] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.001298] CPU: Testing write buffer coherency: ok [ 0.001365] pid_max: default: 32768 minimum: 301 [ 0.001647] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.001682] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.003385] /cpus/cpu@0 missing clock-frequency property [ 0.003461] /cpus/cpu@1 missing clock-frequency property [ 0.003489] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.005248] Setting up static identity map for 0xc0100000 - 0xc0100060 [ 0.005520] rcu: Hierarchical SRCU implementation. [ 0.007824] smp: Bringing up secondary CPUs ... [ 0.009136] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.009363] smp: Brought up 1 node, 2 CPUs [ 0.009402] SMP: Total of 2 processors activated (96.00 BogoMIPS). [ 0.009419] CPU: All CPU(s) started in SVC mode. [ 0.010478] devtmpfs: initialized [ 0.030687] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.031085] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.031128] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.038470] pinctrl core: initialized pinctrl subsystem [ 0.041305] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.044417] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.046287] thermal_sys: Registered thermal governor 'step_wise' [ 0.046656] cpuidle: using governor menu [ 0.047058] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.047086] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.047546] Serial: AMBA PL011 UART driver [ 0.050697] stm32-pm-domain pm_domain: domain core-ret-power-domain registered [ 0.050750] stm32-pm-domain pm_domain: subdomain core-power-domain registered [ 0.050769] stm32-pm-domain pm_domain: domains probed [ 0.081834] platform panel-rgb@0: Fixing up cyclic dependency with 5a001000.display-controller [ 0.099597] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible. [ 0.114001] SCSI subsystem initialized [ 0.114900] usbcore: registered new interface driver usbfs [ 0.114989] usbcore: registered new interface driver hub [ 0.115067] usbcore: registered new device driver usb [ 0.115467] pps_core: LinuxPPS API ver. 1 registered [ 0.115487] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.115525] PTP clock support registered [ 0.115972] EDAC MC: Ver: 3.0.0 [ 0.117078] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled. [ 0.117191] arm-scmi firmware:scmi: SCMI Protocol v2.0 'ST:' Firmware version 0x0 [ 0.118611] Advanced Linux Sound Architecture Driver Initialized. [ 0.119817] Bluetooth: Core ver 2.22 [ 0.119925] NET: Registered PF_BLUETOOTH protocol family [ 0.119943] Bluetooth: HCI device and connection manager initialized [ 0.119968] Bluetooth: HCI socket layer initialized [ 0.119987] Bluetooth: L2CAP socket layer initialized [ 0.120021] Bluetooth: SCO socket layer initialized [ 0.121167] clocksource: Switched to clocksource arch_sys_counter [ 0.197164] NET: Registered PF_INET protocol family [ 0.197523] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.199245] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.199313] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.199348] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear) [ 0.199419] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.199521] TCP: Hash tables configured (established 4096 bind 4096) [ 0.199665] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.199723] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.200105] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.201223] RPC: Registered named UNIX socket transport module. [ 0.201261] RPC: Registered udp transport module. [ 0.201273] RPC: Registered tcp transport module. [ 0.201283] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.203447] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available [ 0.205538] Initialise system trusted keyrings [ 0.206033] workingset: timestamp_bits=14 max_order=17 bucket_order=3 [ 0.216405] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.218267] NFS: Registering the id_resolver key type [ 0.218369] Key type id_resolver registered [ 0.218386] Key type id_legacy registered [ 0.218600] ntfs: driver 2.1.32 [Flags: R/O]. [ 0.218911] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 0.219732] fuse: init (API version 7.34) [ 0.364639] NET: Registered PF_ALG protocol family [ 0.364685] Key type asymmetric registered [ 0.364700] Asymmetric key parser 'x509' registered [ 0.364899] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 0.364925] io scheduler mq-deadline registered [ 0.364939] io scheduler kyber registered [ 0.374745] reg11: supplied by regulator-dummy [ 0.375125] reg18: supplied by regulator-dummy [ 0.375512] usb33: supplied by regulator-dummy [ 0.379920] STM32 USART driver initialized [ 0.401327] brd: module loaded [ 0.411435] loop: module loaded [ 0.420021] CAN device driver interface [ 0.422426] pegasus: Pegasus/Pegasus II USB Ethernet driver [ 0.422533] usbcore: registered new interface driver pegasus [ 0.422617] usbcore: registered new interface driver asix [ 0.422702] usbcore: registered new interface driver ax88179_178a [ 0.422768] usbcore: registered new interface driver cdc_ether [ 0.422858] usbcore: registered new interface driver smsc75xx [ 0.422941] usbcore: registered new interface driver smsc95xx [ 0.423005] usbcore: registered new interface driver net1080 [ 0.423066] usbcore: registered new interface driver cdc_subset [ 0.423127] usbcore: registered new interface driver zaurus [ 0.423207] usbcore: registered new interface driver cdc_ncm [ 0.424456] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.424516] ehci-platform: EHCI generic platform driver [ 0.424781] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.424818] ohci-platform: OHCI generic platform driver [ 0.425563] usbcore: registered new interface driver cdc_acm [ 0.425583] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 0.425669] usbcore: registered new interface driver usb-storage [ 0.429848] i2c_dev: i2c /dev entries driver [ 0.433523] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=1) [ 0.433557] softdog: soft_reboot_cmd=<not set> soft_active_on_boot=0 [ 0.435524] sdhci: Secure Digital Host Controller Interface driver [ 0.435552] sdhci: Copyright(c) Pierre Ossman [ 0.435564] Synopsys Designware Multimedia Card Interface Driver [ 0.436082] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.437054] ledtrig-cpu: registered to indicate activity on CPUs [ 0.437158] arm-scmi firmware:scmi: Failed. SCMI protocol 17 not active. [ 0.437384] SMCCC: SOC_ID: ID = jep106:0020:0500 Revision = 0x00002000 [ 0.438236] hid: raw HID events driver (C) Jiri Kosina [ 0.438512] usbcore: registered new interface driver usbhid [ 0.438533] usbhid: USB HID core driver [ 0.446814] NET: Registered PF_PACKET protocol family [ 0.446873] can: controller area network core [ 0.447158] NET: Registered PF_CAN protocol family [ 0.447185] can: raw protocol [ 0.447202] can: broadcast manager protocol [ 0.447223] can: netlink gateway - max_hops=1 [ 0.447761] Bluetooth: RFCOMM TTY layer initialized [ 0.447807] Bluetooth: RFCOMM socket layer initialized [ 0.447857] Bluetooth: RFCOMM ver 1.11 [ 0.448323] lib80211: common routines for IEEE802.11 drivers [ 0.448815] Key type dns_resolver registered [ 0.448946] ThumbEE CPU extension supported. [ 0.448976] Registering SWP/SWPB emulation handler [ 0.449543] registered taskstats version 1 [ 0.449597] Loading compiled-in X.509 certificates [ 0.483846] stm32-mdma 58000000.dma-controller: STM32 MDMA driver registered [ 0.486903] stm32-dma 48000000.dma-controller: no dma pool: can't use MDMA: 0 [ 0.488480] stm32-dma 48000000.dma-controller: STM32 DMA driver registered [ 0.501650] stm_thermal 50028000.thermal: stm_thermal_probe: Driver initialized successfully [ 0.508206] /soc/interrupt-controller@5000d000: bank0 [ 0.508259] /soc/interrupt-controller@5000d000: bank1 [ 0.508284] /soc/interrupt-controller@5000d000: bank2 [ 0.510076] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOA bank added [ 0.510783] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOB bank added [ 0.511571] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOC bank added [ 0.512320] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOD bank added [ 0.513010] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOE bank added [ 0.513690] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOF bank added [ 0.514376] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOG bank added [ 0.514991] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOH bank added [ 0.515062] stm32mp157-pinctrl soc:pinctrl@50002000: Pinctrl STM32 initialized [ 0.515957] stm32mp157-pinctrl soc:pinctrl@54004000: at least one GPIO bank is required [ 0.515989] stm32mp157-pinctrl: probe of soc:pinctrl@54004000 failed with error -22 [ 0.517751] LCD_5V: supplied by vin [ 0.518449] wlan-en-regulator: supplied by vin [ 0.522226] stm32-usart 4000f000.serial: interrupt mode for rx (no dma) [ 0.522264] stm32-usart 4000f000.serial: interrupt mode for tx (no dma) [ 0.522301] 4000f000.serial: ttySTM1 at MMIO 0x4000f000 (irq = 49, base_baud = 4000000) is a stm32-usart [ 0.524333] stm32-usart 40010000.serial: interrupt mode for rx (no dma) [ 0.524369] stm32-usart 40010000.serial: interrupt mode for tx (no dma) [ 0.524406] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 50, base_baud = 4000000) is a stm32-usart [ 1.821230] printk: console [ttySTM0] enabled [ 1.827743] stm32-usart 40018000.serial: interrupt mode for rx (no dma) [ 1.833030] stm32-usart 40018000.serial: interrupt mode for tx (no dma) [ 1.839594] 40018000.serial: ttySTM3 at MMIO 0x40018000 (irq = 51, base_baud = 4000000) is a stm32-usart [ 1.851071] stm32-usart 40019000.serial: interrupt mode for rx (no dma) [ 1.856344] stm32-usart 40019000.serial: interrupt mode for tx (no dma) [ 1.862957] 40019000.serial: ttySTM2 at MMIO 0x40019000 (irq = 52, base_baud = 4000000) is a stm32-usart [ 1.878316] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found [ 1.883952] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42 [ 1.889896] stm32-dwmac 5800a000.ethernet: DWMAC4/5 [ 1.894908] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported [ 1.902239] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported [ 1.909538] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported [ 1.916456] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported [ 1.922881] stm32-dwmac 5800a000.ethernet: TSO supported [ 1.928053] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 1.935949] stm32-dwmac 5800a000.ethernet: Enabled L3L4 Flow TC (entries=2) [ 1.942921] stm32-dwmac 5800a000.ethernet: Enabled RFS Flow TC (entries=8) [ 1.949800] stm32-dwmac 5800a000.ethernet: TSO feature enabled [ 1.955687] stm32-dwmac 5800a000.ethernet: Using 32 bits DMA width [ 1.969932] stm32_rtc 5c004000.rtc: registered as rtc0 [ 1.973721] stm32_rtc 5c004000.rtc: setting system clock to 2024-10-18T09:47:18 UTC (1729244838) [ 1.983038] stm32_rtc 5c004000.rtc: registered rev:1.2 [ 2.007992] stm32f7-i2c 40015000.i2c: using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers [ 2.016054] stm32f7-i2c 40015000.i2c: STM32F7 I2C-0 bus adapter [ 2.046533] stpmic1 1-0033: PMIC Chip Version: 0x21 [ 2.054577] vddcore: supplied by vin [ 2.059748] vdd_ddr: supplied by vin [ 2.064892] vdd: supplied by vin [ 2.069578] v3v3: supplied by vin [ 2.074477] v1v8_audio: supplied by v3v3 [ 2.080921] v3v3_hdmi: supplied by vin [ 2.086911] vtt_ddr: supplied by vdd_ddr [ 2.092167] vdd_usb: supplied by vin [ 2.097793] vdda: supplied by vin [ 2.103050] v1v2_hdmi: supplied by v3v3 [ 2.108602] vref_ddr: supplied by vin [ 2.114149] bst_out: supplied by vin [ 2.117096] vbus_otg: supplied by bst_out [ 2.121111] vbus_sw: supplied by bst_out [ 2.129471] rtc-ds3232 1-0068: oscillator discontinuity flagged, time unreliable [ 2.136473] hwmon hwmon1: temp1_input not attached to any thermal zone [ 2.142704] rtc-ds3232 1-0068: registered as rtc1 [ 2.147616] stm32f7-i2c 5c002000.i2c: STM32F7 I2C-1 bus adapter [ 2.154771] i2c i2c-0: Added multiplexed i2c bus 2 [ 2.158229] i2c-mux-gpio i2cmux: 1 port mux on STM32F7 I2C(0x40015000) adapter [ 2.170872] mmci-pl18x 58005000.mmc: Got CD GPIO [ 2.175104] mmci-pl18x 48004000.mmc: mmc0: PL180 manf 53 rev2 at 0x48004000 irq 38,0 (pio) [ 2.177012] stm32-ipcc 4c001000.mailbox: ipcc rev:1.0 enabled, 6 chans, proc 0 [ 2.183142] mmci-pl18x 58007000.mmc: mmc2: PL180 manf 53 rev2 at 0x58007000 irq 43,0 (pio) [ 2.190876] stm32-rproc 10000000.m4: IRQ index 0 not found [ 2.198151] mmci-pl18x 58005000.mmc: mmc1: PL180 manf 53 rev2 at 0x58005000 irq 42,0 (pio) [ 2.204822] remoteproc remoteproc0: m4 is available [ 2.219202] rfkill_gpio bt_rfkill: bt_rfkill device registered. [ 2.381854] LCD_VDD: supplied by vdd [ 2.384468] TOUCH_VDD: supplied by vdd [ 2.390094] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0 [ 2.401813] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator [ 2.408185] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator [ 2.443217] mmc0: queuing unknown CIS tuple 0x01 [d9 01 ff] (3 bytes) [ 2.455189] mmc0: queuing unknown CIS tuple 0x1a [01 01 00 02 07] (5 bytes) [ 2.466606] mmc1: new high speed SDHC card at address aaaa [ 2.472067] mmc0: queuing unknown CIS tuple 0x1b [c1 41 30 30 ff ff 32 00] (8 bytes) [ 2.478642] mmcblk1: mmc1:aaaa SA16G 14.8 GiB [ 2.483712] mmc0: queuing unknown CIS tuple 0x14 [] (0 bytes) [ 2.500544] mmc2: new DDR MMC card at address 0001 [ 2.504214] mmc0: new high speed SDIO card at address 0001 [ 2.511934] mmcblk2: mmc2:0001 W62704 3.53 GiB [ 2.518373] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 2.524644] GPT:8834115 != 31116287 [ 2.527845] GPT:Alternate GPT header not at the end of the disk. [ 2.534077] GPT:8834115 != 31116287 [ 2.537503] GPT: Use GNU Parted to correct GPT errors. [ 2.542820] mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 [ 2.548857] mmcblk2boot0: mmc2:0001 W62704 2.00 MiB [ 2.558631] mmcblk2boot1: mmc2:0001 W62704 2.00 MiB [ 2.558841] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM [ 2.571072] mmcblk2rpmb: mmc2:0001 W62704 512 KiB, chardev (240:0) [ 2.576955] dwc2 49000000.usb-otg: DWC OTG Controller [ 2.580926] dwc2 49000000.usb-otg: new USB bus registered, assigned bus number 1 [ 2.588415] dwc2 49000000.usb-otg: irq 74, io mem 0x49000000 [ 2.600425] hub 1-0:1.0: USB hub found [ 2.602831] hub 1-0:1.0: 1 port detected [ 2.611791] ehci-platform 5800d000.usb: EHCI Host Controller [ 2.616069] ehci-platform 5800d000.usb: new USB bus registered, assigned bus number 2 [ 2.624726] ehci-platform 5800d000.usb: irq 75, io mem 0x5800d000 [ 2.651225] ehci-platform 5800d000.usb: USB 2.0 started, EHCI 1.00 [ 2.657336] hub 2-0:1.0: USB hub found [ 2.659783] hub 2-0:1.0: 2 ports detected [ 2.665448] ohci-platform 5800c000.usb: Generic Platform OHCI controller [ 2.670759] ohci-platform 5800c000.usb: new USB bus registered, assigned bus number 3 [ 2.679063] ohci-platform 5800c000.usb: irq 45, io mem 0x5800c000 [ 2.756516] hub 3-0:1.0: USB hub found [ 2.758881] hub 3-0:1.0: 2 ports detected [ 2.765851] input: pmic_onkey as /devices/platform/soc/5c002000.i2c/i2c-1/1-0033/5c002000.i2c:stpmic@33:onkey/input/input0 [ 2.780773] [drm] Initialized stm 1.0.0 20170330 for 5a001000.display-controller on minor 0 [ 2.829863] Console: switching to colour frame buffer device 100x30 [ 2.852619] stm32-display 5a001000.display-controller: [drm] fb0: stmdrmfb frame buffer device [ 2.863398] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.874737] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.882814] cfg80211: Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600' [ 2.889694] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.891359] clk: Disabling unused clocks [ 2.898224] cfg80211: failed to load regulatory.db [ 2.902638] ALSA device list: [ 2.909914] No soundcards found. [ 3.251286] usb 1-1: new full-speed USB device number 2 using dwc2 [ 3.336491] EXT4-fs (mmcblk1p10): recovery complete [ 3.341686] EXT4-fs (mmcblk1p10): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled. [ 3.350561] VFS: Mounted root (ext4 filesystem) on device 179:10. [ 3.358459] devtmpfs: mounted [ 3.362106] Freeing unused kernel image (initmem) memory: 1024K [ 3.367013] Run /sbin/init as init process [ 3.520575] input: ILITEK ILITEK-TP as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.0/0003:222A:0001.0001/input/input1 [ 3.531743] hid-multitouch 0003:222A:0001.0001: input,hidraw0: USB HID v1.10 Device [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input0 [ 3.547776] input: ILITEK ILITEK-TP Mouse as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.1/0003:222A:0001.0002/input/input2 [ 3.559599] hid-generic 0003:222A:0001.0002: input,hidraw1: USB HID v1.10 Mouse [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input1 [ 3.858187] NET: Registered PF_INET6 protocol family [ 3.902675] Segment Routing with IPv6 [ 3.905033] In-situ OAM (IOAM) with IPv6 [ 3.968076] systemd[1]: systemd 250.5+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK -SECCOMP -GCRYPT -GNUTLS -OPENSSL -ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN +IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid) [ 3.999193] systemd[1]: Detected architecture arm. Welcome to ST OpenSTLinux - EGLfs - (A Yocto Project Based Distro) 4.0.19-snapshot-20241017 (kirkstone)! [ 4.184279] systemd[1]: Hostname set to <desk-mp1>. [ 4.229921] systemd[1]: Using hardware watchdog 'Software Watchdog', version 0, device /dev/watchdog0 [ 4.237955] systemd[1]: Watchdog running with a timeout of 32s. [ 6.676527] systemd[1]: /lib/systemd/system/mount-partitions.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether. [ 6.720619] systemd[1]: Queued start job for default target Multi-User System. [ 6.791959] systemd[1]: Created slice Slice /system/getty. [ OK ] Created slice Slice /system/getty. [ 6.835572] systemd[1]: Created slice Slice /system/modprobe. [ OK ] Created slice Slice /system/modprobe. [ 6.875560] systemd[1]: Created slice Slice /system/serial-getty. [ OK ] Created slice Slice /system/serial-getty. [ 6.914869] systemd[1]: Created slice User and Session Slice. [ OK ] Created slice User and Session Slice. [ 6.952173] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ OK ] Started Dispatch Password …ts to Console Directory Watch. [ 6.992097] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ OK ] Started Forward Password R…uests to Wall Directory Watch. [ 7.032408] systemd[1]: Reached target Path Units. [ OK ] Reached target Path Units. [ 7.071694] systemd[1]: Reached target Remote File Systems. [ OK ] Reached target Remote File Systems. [ 7.111678] systemd[1]: Reached target Slice Units. [ OK ] Reached target Slice Units. [ 7.141716] systemd[1]: Reached target Swaps. [ OK ] Reached target Swaps. [ 7.207702] systemd[1]: Listening on RPCbind Server Activation Socket. [ OK ] Listening on RPCbind Server Activation Socket. [ 7.241901] systemd[1]: Reached target RPC Port Mapper. [ OK ] Reached target RPC Port Mapper. [ 7.282766] systemd[1]: Listening on Syslog Socket. [ OK ] Listening on Syslog Socket. [ 7.337453] systemd[1]: Listening on Process Core Dump Socket. [ OK ] Listening on Process Core Dump Socket. [ 7.372211] systemd[1]: Listening on initctl Compatibility Named Pipe. [ OK ] Listening on initctl Compatibility Named Pipe. [ 7.419869] systemd[1]: Journal Audit Socket was skipped because of a failed condition check (ConditionSecurity=audit). [ 7.430784] systemd[1]: Listening on Journal Socket (/dev/log). [ OK ] Listening on Journal Socket (/dev/log). [ 7.473063] systemd[1]: Listening on Journal Socket. [ OK ] Listening on Journal Socket. [ 7.513169] systemd[1]: Listening on Network Service Netlink Socket. [ OK ] Listening on Network Service Netlink Socket. [ 7.553140] systemd[1]: Listening on udev Control Socket. [ OK ] Listening on udev Control Socket. [ 7.592576] systemd[1]: Listening on udev Kernel Socket. [ OK ] Listening on udev Kernel Socket. [ 7.632837] systemd[1]: Listening on User Database Manager Socket. [ OK ] Listening on User Database Manager Socket. [ 7.672781] systemd[1]: Huge Pages File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/mm/hugepages). [ 7.692725] systemd[1]: Mounting POSIX Message Queue File System... Mounting POSIX Message Queue File System... [ 7.739138] systemd[1]: Mounting Kernel Debug File System... Mounting Kernel Debug File System... [ 7.778906] systemd[1]: Mounting Kernel Trace File System... Mounting Kernel Trace File System... [ 7.821745] systemd[1]: Mounting Temporary Directory /tmp... Mounting Temporary Directory /tmp... [ 7.871906] systemd[1]: Starting Create List of Static Device Nodes... Starting Create List of Static Device Nodes... [ 7.920104] systemd[1]: Starting Load Kernel Module configfs... Starting Load Kernel Module configfs... [ 7.959844] systemd[1]: Starting Load Kernel Module drm... Starting Load Kernel Module drm... [ 8.000056] systemd[1]: Starting Load Kernel Module fuse... Starting Load Kernel Module fuse... [ 8.039699] systemd[1]: Starting Mount partitions... Starting Mount partitions... [ 8.086957] systemd[1]: Starting RPC Bind... Starting RPC Bind... [ 8.122355] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathIsReadWrite=!/). [ 8.178328] systemd[1]: Starting Journal Service... Starting Journal Service... [ 8.195255] systemd[1]: Load Kernel Modules was skipped because all trigger condition checks failed. [ 8.229207] systemd[1]: Mounting NFSD configuration filesystem... Mounting NFSD configuration filesystem... [ 8.303323] systemd[1]: Starting Generate network units from Kernel command line... Starting Generate network …ts from Kernel command line... [ 8.362277] systemd[1]: Starting Remount Root and Kernel File Systems... Starting Remount Root and Kernel File Systems... [ 8.416563] systemd[1]: Starting Apply Kernel Variables... Starting Apply Kernel Variables... [ 8.467305] systemd[1]: Starting Coldplug All udev Devices... Starting Coldplug All udev Devices... [ 8.535764] EXT4-fs (mmcblk1p10): re-mounted. Opts: (null). Quota mode: disabled. [ 8.626310] systemd[1]: Started RPC Bind. [ OK ] Started RPC Bind. [ 8.662890] systemd[1]: Mounted POSIX Message Queue File System. [ OK ] Mounted POSIX Message Queue File System. [ 8.702584] systemd[1]: Mounted Kernel Debug File System. [ OK ] Mounted Kernel Debug File System. [ 8.716224] EXT4-fs (mmcblk1p8): recovery complete [ 8.719615] EXT4-fs (mmcblk1p8): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled. [ 8.766999] systemd[1]: Mounted Kernel Trace File System. [ OK ] Mounted Kernel Trace File System. [ 8.812436] systemd[1]: Started Journal Service. [ OK ] Started Journal Service. [ OK ] Mounted Temporary Directory /tmp. [ OK ] Finished Create List of Static Device Nodes. [ OK ] Finished Load Kernel Module configfs. [ OK ] Finished Load Kernel Module drm. [ OK ] Finished Load Kernel Module fuse. [FAILED] Failed to mount NFSD configuration filesystem. See 'systemctl status proc-fs-nfsd.mount' for details. [DEPEND] Dependency failed for NFS server and services. [DEPEND] Dependency failed for NFS Mount Daemon. [ OK ] Finished Generate network units from Kernel command line. [ OK ] Finished Remount Root and Kernel File Systems. [ 9.233308] EXT4-fs (mmcblk1p9): recovery complete [ 9.236851] EXT4-fs (mmcblk1p9): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled. [ OK ] Finished Apply Kernel Variables. Mounting FUSE Control File System... Mounting Kernel Configuration File System... [ OK ] Started Starts Psplash Boot screen. Starting Flush Journal to Persistent Storage... [ 9.511776] EXT4-fs (mmcblk1p11): recovery complete [ 9.517111] EXT4-fs (mmcblk1p11): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled. [ 9.564204] systemd-journald[596]: Received client request to flush runtime journal. Starting Create Static Device Nodes in /dev... [ OK ] Finished Mount partitions. [ OK ] Mounted FUSE Control File System. [ OK ] Mounted Kernel Configuration File System. [ OK ] Finished Flush Journal to Persistent Storage. [ OK ] Finished Create Static Device Nodes in /dev. [ OK ] Reached target Preparation for Local File Systems. Mounting /var/volatile... Starting Rule-based Manage…for Device Events and Files... [ OK ] Mounted /var/volatile. Starting Load/Save Random Seed... [ OK ] Reached target Local File Systems. Starting Create Volatile Files and Directories... [ OK ] Started Rule-based Manager for Device Events and Files. [ OK ] Finished Create Volatile Files and Directories. Starting Network Time Synchronization... Starting Record System Boot/Shutdown in UTMP... [ OK ] Finished Record System Boot/Shutdown in UTMP. [ OK ] Finished Coldplug All udev Devices. Starting Wait for udev To …plete Device Initialization... [ OK ] Created slice Slice /system/systemd-backlight. Starting Load/Save Screen …ness of backlight:backlight... [ OK ] Started Network Time Synchronization. [ OK ] Finished Load/Save Screen …htness of backlight:backlight. [ OK ] Reached target System Time Set. [ 12.451733] wlan: loading out-of-tree module taints kernel. [ 12.605693] Galcore version 6.4.9.436021 [ 13.539442] using random self ethernet address [ 13.563018] using random host ethernet address [ 13.671307] random: crng init done [ 13.723266] usb0: HOST MAC 5c:c0:78:d3:5c:60 [ 13.728924] usb0: MAC 1e:ad:a4:61:69:37 [ 13.734985] dwc2 49000000.usb-otg: bound driver configfs-gadget [ OK ] Finished Load/Save Random Seed. [ 14.102110] wlan: loading driver v4.5.25.46 [ 14.149230] hifDeviceInserted: Dumping clocks (50000000,99000000) [ 14.433617] [TELIT] Using WE866C6 board data. [ 14.509403] ol_download_firmware: chip_id:0x5020001 board_id:0x0 [ 14.554651] __ol_transfer_bin_file: Failed to get bdwlan30_c6.b00:-2 [ 14.559599] __ol_transfer_bin_file: Trying to load default bdwlan30_c6.bin [ 14.634124] __ol_transfer_bin_file: Loading setup file qsetup30.bin [ 14.639123] __ol_transfer_bin_file: Failed to get qsetup30.bin:-2 [ 15.354312] R0: wlan: [740:E :SAP] dfs_init_radar_filters[217]: Unknown dfs domain 0 [ 15.535173] Host SW:4.5.25.46, FW:0.0.0.111, HW:QCA93x7_REV1_1 [ 15.550385] ENTER sme_set_btc_coex_dutycycle = 30 [ 15.550423] ENTER sme_set_btc_coex_dutycycle =30 [ 15.556166] ath_hif_sdio: HIF (Atheros/multi-bss) [ 15.567758] wlan: driver loaded in 1460000 [* ] A start job is running for Wait for…vice Initialization (9s / 3min 4s) [ OK ] Finished Wait for udev To Complete Device Initialization. [ OK ] Reached target Hardware activated USB gadget. [ OK ] Listening on Load/Save RF …itch Status /dev/rfkill Watch. [ OK ] Started Hardware RNG Entropy Gatherer Daemon. [ OK ] Reached target System Initialization. [ OK ] Started Daily rotation of log files. [ OK ] Started Daily Cleanup of Temporary Directories. [ OK ] Reached target Timer Units. [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Listening on dropbear.socket. [ OK ] Reached target Socket Units. [ OK ] Reached target Basic System. [ OK ] Started Job spooling tools. [ OK ] Started Periodic Command Scheduler. Starting D-Bus System Message Bus... Starting IPv6 Packet Filtering Framework... Starting IPv4 Packet Filtering Framework... Starting Hold until boot process finishes up... [ OK ] Started System Logging Service. Starting Resets System Activity Logs... Starting User Login Management... [ OK ] Started D-Bus System Message Bus. [ OK ] Finished IPv6 Packet Filtering Framework. [ OK ] Finished IPv4 Packet Filtering Framework. [ OK ] Finished Hold until boot process finishes up. [ OK ] Finished Resets System Activity Logs. [ OK ] Reached target Preparation for Network. Starting Network Configuration... Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ OK ] Started User Login Management. [ OK ] Started Network Configuration. Starting Network Name Resolution... [ OK ] Started Network Name Resolution. [ OK ] Reached target Network. [ OK ] Reached target Host and Network Name Lookups. Starting Avahi mDNS/DNS-SD Stack... [ OK ] Started IIO Daemon. Starting Real time performance monitoring... [ OK ] Started NFS status monitor for NFSv2/3 locking.. [ OK ] Started Respond to IPv6 Node Information Queries. [ OK ] Started Network Router Discovery Daemon. Starting Permit User Sessions... Starting Target Communication Framework agent... [ OK ] Started Xinetd A Powerful Replacement For Inetd. [ OK ] Finished Permit User Sessions. [ OK ] Started Target Communication Framework agent. [ OK ] Started Avahi mDNS/DNS-SD Stack. [ OK ] Started Real time performance monitoring. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttySTM0. [ OK ] Reached target Login Prompts. [ OK ] Reached target Multi-User System. Starting Record Runlevel Change in UTMP... [ OK ] Finished Record Runlevel Change in UTMP. ST OpenSTLinux - EGLfs - (A Yocto Project Based Distro) 4.0.19-snapshot desk-mp1 ttySTM0 desk-mp1 login: root (automatic login) id: 'weston': no such user id: 'weston': no such user id: 'weston': no such user alias: gawkpath_default not found alias: gawkpath_prepend not found alias: gawkpath_append not found alias: gawklibpath_default not found alias: gawklibpath_prepend not found alias: gawklibpath_append not found id: 'weston': no such user id: 'weston': no such user id: 'weston': no such user root@desk-mp1:~#
Hello word example[edit | edit source]
Here below an example on C code displaying the classic Hello World! message on the target serial console.
This example shows how to use the arm cross-compiler using the environment configured for this purpose
Setting the cross-compiler[edit | edit source]
- start the Linux development VM and login into the system
- open a terminal window and cd into your source code directory
dvdk@vagrant:~$ mkdir myproject dvdk@vagrant:~$ cd myproject/ dvdk@vagrant:~/myproject$ vi hello.c dvdk@vagrant:~/myproject$ cat hello.c #include <stdio.h> int main(){ printf("Hello, World!\n"); return 0; }
- configure the build environment
dvdk@vagrant:~/myproject$ source /home/dvdk/desk-mp1-l/desk-mp1-l-1.0.1_env.sh
- as you can see here below, the
$CC
environment variable has been properly configured for using the SDKsysroot
parameter:
dvdk@vagrant:~/myproject$ echo $CC arm-ostl-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/opt/yocto/sdk/desk-mp1-l/desk-mp1-l-1.0.1/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi dvdk@vagrant:~/myproject$
- invoke the cross-compiler for compiling your source code example: the object file obtained, is a proper ELF 32-bit for the target microprocessor
dvdk@vagrant:~/myproject$ $CC hello.c -o hello dvdk@vagrant:~/myproject$ file hello hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=70fc28d38cfb763980920bd9c16765823ed4b087, for GNU/Linux 3.2.0, with debug_in dvdk@vagrant:~/myproject$
Running the example on the target[edit | edit source]
Now it is enough to copy the object file in the /home/root
rfs directory and boot from nfs...
dvdk@vagrant:~/myproject$ sudo cp hello /home/dvdk/desk-mp1-l/rfs/desk-mp1-l/home/root/ dvdk@vagrant:~/myproject$ sudo ls -la /home/dvdk/desk-mp1-l/rfs/desk-mp1-l/home/root/ total 28 drwx------ 2 root root 4096 Aug 1 08:21 . drwxr-xr-x 4 root root 4096 Sep 20 2022 .. -rwxr-xr-x 1 root root 11980 Aug 1 08:21 hello -rw-r--r-- 1 root root 959 Sep 20 2022 .profile -rw-r--r-- 1 root root 238 Sep 20 2022 README-CHECK-GPU dvdk@vagrant:~/myproject$
on the target:
root@desk-mp1:~# ls -la total 32 drwx------ 2 root root 4096 Aug 1 2023 . drwxr-xr-x 4 root root 4096 Sep 20 2022 .. -rw------- 1 root root 13 Aug 1 2023 .ash_history -rw-r--r-- 1 root root 959 Sep 20 2022 .profile -rw-r--r-- 1 root root 238 Sep 20 2022 README-CHECK-GPU -rwxr-xr-x 1 root root 11980 Aug 1 2023 hello root@desk-mp1:~# ./hello Hello, World! root@desk-mp1:~#
Asymmetric Multiprocessing (AMP) with OpenAMP[edit | edit source]
As known, the STM32MP115x SoC is powered by a heterogeneous architecture comprising a single/dual ARM Cortex-A7 (CA7) and an ARM Cortex-M4 (CM4). When the application requires implementing an Asymmetric Multiprocessing configuration (AMP), the most common scenario is to use Linux on the CA7, and bare metal or RTOS-based firmware on the CM4. In either case, the OpenAMP framework is typically used to establish a communication channel between the cores. The Yocto build system at the heart of the DESK-MP1-L provides some examples based on OpenAMP to demonstrate how to set up AMP configurations. The following section illustrates one of them, namely OpenAMP_TTY_echo
. This example is built when Yocto is run to generate the Linux root file system for the target.
For more details, please see the STM32CubeMP1 firmware documentation and the associated source code.
Running the OpenAMP_TTY_echo example[edit | edit source]
The example is automatically built by Yocto. To run it, please issue the following commands on the target's Linux console:
root@desk-mp1:~# cp /usr/local/Cube-M4-examples/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/lib/firmware/OpenAMP_TTY_echo.elf /lib/firmware/ root@desk-mp1:~# echo -n OpenAMP_TTY_echo.elf > /sys/class/remoteproc/remoteproc0/firmware root@desk-mp1:~# echo start >/sys/class/remoteproc/remoteproc0/state root@desk-mp1:~# dmesg | tail -n 8 [ 69.935241] remoteproc remoteproc0: powering up m4 [ 69.940260] remoteproc remoteproc0: Booting fw image OpenAMP_TTY_echo.elf, size 219192 [ 69.947843] remoteproc0#vdev0buffer: assigned reserved memory node vdev0buffer@10042000 [ 69.957458] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x400 [ 69.964031] virtio_rpmsg_bus virtio0: rpmsg host is online [ 69.968816] remoteproc0#vdev0buffer: registered virtio0 (type 7) [ 69.976364] remoteproc remoteproc0: remote processor m4 is now up [ 69.981515] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty addr 0x401 root@desk-mp1:~# stty -onlcr -echo -F /dev/ttyRPMSG0 root@desk-mp1:~# cat /dev/ttyRPMSG0 & root@desk-mp1:~# echo "Hello Virtual UART0" > /dev/ttyRPMSG0 Hello Virtual UART0 root@desk-mp1:~# cat /sys/class/remoteproc/remoteproc0/state running
To stop the demo:
root@desk-mp1:~# echo stop > /sys/class/remoteproc/remoteproc0/state [ 104.989459] remoteproc remoteproc0: warning: remote FW shutdown without ack [1]+ Done cat /dev/ttyRPMSG0 root@desk-mp1:~# cat /sys/class/remoteproc/remoteproc0/state offline root@desk-mp1:~#
It is worth remembering that it is also possible to start the CM4 firmware before the Linux kernel is started.
Deployment[edit | edit source]
Customizing the splash screen[edit | edit source]
The following U-Boot environment variables are required for the splash image display when u-boot starts:
splashimage
: RAM address where the BMP image is loaded. Please note that it must be a 32-bit (eg:0xc4100000
)splashfile
: image name to load and then display at boot. (eg:splash_landscape.bmp
)
U-Boot variables example[edit | edit source]
splashimage=0xc4100000 splashfile=splash_landscape.bmp
How to update splashscreen image[edit | edit source]
As an example, you can update the splash image with the following steps:
- connect the uSD to the host
- mount the boot partition (eg:
sudo mount /dev/sdb8 /mnt
) - copy on
/mnt
partition the image with this name:splash_landscape.bmp
- umount the uSD and excecute the boot
How to configure the network interfaces[edit | edit source]
For deploying an Embedded System, one of the most important configuration is the Network Interface configuration.
Once the Embedded Device is finally configured for stand-alone bootstrap, the network interface should be configured for reaching the device remotely via network connections like ssh, telnet, ftp, http, etc.
This Application Note briefly describes how it is possible to simply configure the network interfaces on systemd
Resources[edit | edit source]
For further details on network configuration, please refer - for example - to:
Examples[edit | edit source]
The following configuration assumptions are used in the paragraphs shown below:
- IP address range of the LAN network 192.168.1.0 - 192.168.1.255
- IP address of the gateway 192.168.1.254
- IP address of the device 192.168.1.100
systemd[edit | edit source]
The network configuration for systemd are basically found in the /etc/systemd/network/
directory.
The most simply way for configuring the network interface is to create/edit the file /etc/systemd/network/1-eth0.network as per the following paragraphs. In the event that there are another network interface, then this must be create/edit as /etc/systemd/network/1-eth0.network.
Static IP address[edit | edit source]
Here below, an example for configuring eth0
ethernet interface.
[Match] Name=eth0 # Prevent the interface loading if the kernel boots from nfs KernelCommandLine=!nfsroot [Network] Address=192.168.1.100 Gateway=192.168.1.254 DNS=192.168.1.1
Once modified, the networkd
service should be resarted:
systemctl restart systemd-networkd
Dynamic IP addres (DHCP)[edit | edit source]
The network interface can be configured - using a proper DHCP server on the network - using the DHCP key in the configuration file as the following:
[Match] Name=eth0 # Prevent the interface loading if the kernel boots from nfs KernelCommandLine=!nfsroot [Network] DHCP=yes
When systemd network starts, it tries to use a DHCP server present in the network to configure the interface.
DNS[edit | edit source]
The DNS key (in the configuration file) is used only if the systemd-resolved service is enabled and the /etc/resolv.conf has a symbolic link to /run/systemd/resolve/stub-resolv.conf
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Once modified, the resolved
service should be resarted:
systemctl restart systemd-resolved
loopback network interface[edit | edit source]
systemd contains native implementations of various tasks that need to be executed as part of the boot process.
For example, it sets the hostname or configures the loopback network device.
Apply configuration changes[edit | edit source]
After editing the above files, changes are applied after reboot or by restarting systemd-networkd.service
:
root@desk-mp1:~# systemctl restart systemd-networkd.service
MAC Address programming[edit | edit source]
Every network adapter has a Media Access Control address (usually shortened to MAC address). A MAC address is a six-byte identifying number permanently embedded in the firmware of the adapter, and is readable by the network and the operating system of the device on which the adapter is installed.
The address must follow the standards set by the Institute of Electrical and Electronics Engineers (IEEE), which sets computer networking standards.
The MAC address is a six-pair set of hexadecimal numbers, for example a1-c2-e3-44-5f-6d
. Specifically, in Ethernet, the MAC address is known as the Ethernet Address, which is the unique ID serial number of the Ethernet device in one's computer. MAC Addresses are used in a Local Area Network (LAN) by computers to communicate with each other. Every adapter has a unique MAC address.
Platform supported[edit | edit source]
In this Application Note, we will describe how to use the ETRA eFuse for programming and using the MAC address(es) and it applies to the following DAVE ETRA family
products:
This Application Note has been validated in the ETRA SOM. |
Obtaining a MAC address[edit | edit source]
To obtain a MAC address for your organization, please refer to our Setting the MAC address wiki page with the overall information about this topic.
Permanent storage areas[edit | edit source]
Some SOCs provide programmable OTPs for security, MAC address, boot modes, etc. Usually, some of these are general-purpose registers and can be managed by the user.
In other cases, an external permanent storage device can be used for storing permanent settings like the MAC address: for the ETRA product family, DAVE proposes to use the General Purposes eFuses (OTP blocks) on SoC itself for storing permanently the MAC address(es).
MAC address programming on ETRA family[edit | edit source]
MAC address configuration in u-boot[edit | edit source]
If the MAC address is not already programmed in the OTPs and the ethaddr
u-boot variable is not set, u-boot assignes a random value (different at every power on cycle):
Net: Warning: ethernet@5800a000 (eth0) using random MAC address - d6:39:06:41:0f:b2 eth0: ethernet@5800a000
If the ethaddr
is set and saved in the u-boot environment, its value is used as the MAC Address:
u-boot=> setenv ethaddr 00:50:c2:1e:af:a8 u-boot=> saveenv Saving Environment to MMC... Writing to MMC(0)... OK u-boot=>
eFuse bank registers[edit | edit source]
ETRA family uses the Bank0 Word 57, Word 58 for storing the MAC address. The MAC values should be properly divided in two registers for correct programming.
The related 57, 58, OTP registers will be used for the purposes illustrated in this AN.
Warning!! eFuse programming is a permanent and non-reversible action. Pay attention to the values and commands used during MAC programming. |
eth0 read current value[edit | edit source]
U-boot uses the fuse sense
command to read the MAC address value into the eFuse
STM32MP> fuse sense 0 57 2 Sensing bank 0: Word 0x00000039: 00000000 00000000
If it is all zero there should also be the following print from U-Boot invalid MAC address 0 in OTP 00:00:00:00:00:00
.
If the present MAC address is not valid, a random one is generated.
To check if the OTPs have been blocked execute use the fuse sense
command, the address to use is calculated as follows:
OTP 57 (decimal) -> 0x39 (Hex) as shown by the output of the previous command (Word 0x00000039: XXXXXXXX YYYYYYYY
), add on address this value 0x10000000
-> 0x10000039
STM32MP> fuse sense 0 0x10000039 2 Sensing bank 0: Word 0x10000039: 00000000 00000000
If the value is 0 in both cells, they have not been locked.
If the value is 40000000 the cell has been locked.
eth0 eFuse programming[edit | edit source]
U-Boot uses the fuse prog
command for writing the MAC address into the eFuse. The MAC address should be divided in two parts, for example MAC address AB:CD:12:34:56:78
for eth0 is then divided into :
fuse prog 0 57 0x12cd34ab fuse prog 0 58 0x00007856
In the following example the MAC address 2A:01:7A:9F:3E:20
is stored in the SOC:
- (in case of presence) clear the
ethaddr
u-boot variable
u-boot=> setenv ethaddr u-boot=> saveenv Saving Environment to MMC... Writing to MMC(1)... OK
- program the MAC address in the OPTs with the following commands:
STM32MP> fuse prog 0 57 0x9f7a012a 0x0000203e Programming bank 0 word 0x00000039 to 0x9f7a012a... Warning: Programming fuses is an irreversible operation! This may brick your system. Use this command only if you are sure of what you are doing! Really perform this fuse programming? <y/N> y Programming bank 0 word 0x0000003a to 0x0000203e... Warning: Programming fuses is an irreversible operation! This may brick your system. Use this command only if you are sure of what you are doing! Really perform this fuse programming? <y/N> y STM32MP>
If you want to write the eFuse value directly without confirmation, uses the -y
parameter with the fuse prog
command, as per the previous example:
STM32MP> fuse prog -y 0 57 0x9f7a012a 0x0000203e Programming bank 0 word 0x00000039 to 0x9f7a012a... Programming bank 0 word 0x0000003a to 0x0000203e...
At the next boot, the ethaddr
value wil be read from the OPTs:
STM32MP> pri ethaddr ethaddr=2a:01:7a:9f:3e:20 STM32MP>
eFuse locking[edit | edit source]
The OTP eFuse registers should be locked in order to avoid unwanted registers (and then MAC addresses) modifications. OTP lock grants the MAC values cannot be modified anymore.
If not locked yet, OTP bits can be set to '1' but not reversed to '0' value, so some modifications can be applied if the eFuse registers are not locked. |
The registers lock can be forced using the following command:
STM32MP> fuse prog 0 0x10000039 0x40000000 0x40000000 STM32MP> fuse sense 0 0x10000039 2 Sensing bank 0: Word 0x10000039: 40000000 40000000 STM32MP>
eFuse reading[edit | edit source]
The eFuse registers can be read - after programming - for checking the written values:
STM32MP> fuse sense 0 57 2 Sensing bank 0: Word 0x00000039: 9f7a012a 0000203e STM32MP>
Linux kernel MAC address[edit | edit source]
The MAC Address configured in u-boot is passed to the kernel which configures the eth0
peripherals with the correct values:
root@desk-mp1:~# ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.89 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::2801:7aff:fe9f:3e20 prefixlen 64 scopeid 0x20<link> ether 2a:01:7a:9f:3e:20 txqueuelen 1000 (Ethernet) RX packets 199 bytes 19957 (19.4 KiB) RX errors 0 dropped 5 overruns 0 frame 0 TX packets 58 bytes 7816 (7.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 44 base 0xa000 root@desk-mp1:~#
Management of prebuilt packages[edit | edit source]
During the development of custom applications, developers generally realize that they need to add libraries and other software packages to the root file systems to make their code run properly. If these packages are prebuilt, developers can install them onto the root file system very easily. By configuring the target as described in this document, they achieve a user experience similar to the one you have with a desktop Linux distro such as Ubuntu. DESK-MP1-L uses by default the deb
package format. As such, apt commands can be used for package management. Prebuilt packages are provided by this repository that DAVE Embedded Systems makes available for its customers.
apt-get[edit | edit source]
The following instructions detail how to use apt-get for installing packages with Yocto repositories created by DAVE's build system for DESK-MP1-L.
Configuring apt
[edit | edit source]
Edit the file /etc/apt/apt.conf
like this:
root@desk-mp1:~# cat /etc/apt/apt.conf APT::Architecture "armhf"; APT::Get::AllowUnauthenticated "true"; Acquire::Languages "none";
Edit the file /etc/apt/sources.list.d/debian-10.list
like this:
root@desk-mp1:~# cat /etc/apt/sources.list.d/debian-10.list deb [trusted=yes] http://yocto.dave.eu/desk-mp1-l-1.0.1/ all/ deb [trusted=yes] http://yocto.dave.eu/desk-mp1-l-1.0.1/ cortexa7t2hf-neon-vfpv4/ deb [trusted=yes] http://yocto.dave.eu/desk-mp1-l-1.0.1/ desk_mp1/
Execute the following commands in order to re-create the apt cache based on the new server's list:
rm -rf /var/lib/apt/lists/* apt-get clean apt-get update
root@desk-mp1:~# rm -rf /var/lib/apt/lists/* root@desk-mp1:~# apt-get clean root@desk-mp1:~# apt-get update The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found at https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses. Ign:1 http://yocto.dave.eu/desk-mp1-l-1.0.1 all/ InRelease Ign:2 http://yocto.dave.eu/desk-mp1-l-1.0.1 cortexa7t2hf-neon-vfpv4/ InRelease Ign:3 http://yocto.dave.eu/desk-mp1-l-1.0.1 desk_mp1/ InRelease Get:4 http://yocto.dave.eu/desk-mp1-l-1.0.1 all/ Release [1215 B] Get:5 http://packages.openstlinux.st.com/4.1 kirkstone InRelease [3459 B] Get:6 http://yocto.dave.eu/desk-mp1-l-1.0.1 cortexa7t2hf-neon-vfpv4/ Release [1235 B] Get:7 http://yocto.dave.eu/desk-mp1-l-1.0.1 desk_mp1/ Release [1220 B] Ign:8 http://yocto.dave.eu/desk-mp1-l-1.0.1 all/ Release.gpg Ign:9 http://yocto.dave.eu/desk-mp1-l-1.0.1 cortexa7t2hf-neon-vfpv4/ Release.gpg Ign:10 http://yocto.dave.eu/desk-mp1-l-1.0.1 desk_mp1/ Release.gpg Get:11 http://yocto.dave.eu/desk-mp1-l-1.0.1 all/ Packages [158 kB] Get:12 http://yocto.dave.eu/desk-mp1-l-1.0.1 cortexa7t2hf-neon-vfpv4/ Packages [4123 kB] Get:13 http://packages.openstlinux.st.com/4.1 kirkstone/untested armhf Packages [1251 kB] Get:14 http://yocto.dave.eu/desk-mp1-l-1.0.1 desk_mp1/ Packages [238 kB] Get:15 http://packages.openstlinux.st.com/4.1 kirkstone/updates armhf Packages [30.9 kB] Get:16 http://packages.openstlinux.st.com/4.1 kirkstone/main armhf Packages [684 kB] Fetched 6492 kB in 9s (716 kB/s) Reading package lists... Done W: Conflicting distribution: http://yocto.dave.eu/desk-mp1-l-1.0.1 all/ Release (expected all/ but got ) W: Conflicting distribution: http://yocto.dave.eu/desk-mp1-l-1.0.1 cortexa7t2hf-neon-vfpv4/ Release (expected cortexa7t2hf-neon-vfpv4/ but got ) W: Conflicting distribution: http://yocto.dave.eu/desk-mp1-l-1.0.1 desk_mp1/ Release (expected desk_mp1/ but got )
Then, modify the cached package list due to the proper DAVE's server configuration:
sed -i 's/\.\//cortexa7t2hf-neon-vfpv4\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mp1-l-1.0.1_cortexa7t2hf-neon-vfpv4_Packages sed -i 's/\.\//all\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mp1-l-1.0.1_all_Packages sed -i 's/\.\//desk%5fmp1\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mp1-l-1.0.1_desk%5fmp1_Packages
Installing packages on target[edit | edit source]
We assume that network interface has been already configured for Internet access. In any case, a simple network configuration can be done according to the How to configure the network interfaces wiki page.
The target is finally ready to install new packages. The following example shows for instance the installation of graphviz
:
root@desk-mp1:~# apt-get install graphviz Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: graphviz 0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded. Need to get 2007 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://yocto.dave.eu/desk-mp1-l-1.0.1 cortexa7t2hf-neon-vfpv4/ graphviz 2.50.0-r0.0 [2007 kB] Fetched 2007 kB in 1s (2522 kB/s) The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found at https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses. Selecting previously unselected package graphviz. (Reading database ... 28119 files and directories currently installed.) Preparing to unpack .../graphviz_2.50.0-r0.0_armhf.deb ... Unpacking graphviz (2.50.0-r0.0) ... Setting up graphviz (2.50.0-r0.0) ...
Other useful apt commands[edit | edit source]
List of configured software repositories[edit | edit source]
As shown before, the target is configured for accessing the Yocto repositories as listed in the /etc/apt/sources.list.d
apt configuration directory:
root@desk-mp1:~# cat /etc/apt/sources.list.d/debian-10.list deb [trusted=yes] http://yocto.dave.eu/desk-mp1-l-1.0.1/ all/ deb [trusted=yes] http://yocto.dave.eu/desk-mp1-l-1.0.1/ cortexa7t2hf-neon-vfpv4/ deb [trusted=yes] http://yocto.dave.eu/desk-mp1-l-1.0.1/ desk_mp1/
Search for packages[edit | edit source]
To search for an available package into the current configured channels use apt-cache search
Please note that this will show all packages, it's usually more useful to grep for a pattern, e.g.:
root@desk-mp1:~# apt-cache search vim u-boot-tools-mkenvimage - U-Boot bootloader tools vim-common - Vi IMproved - enhanced vi editor vim-dev - Vi IMproved - enhanced vi editor - Development files vim-doc - Vi IMproved - enhanced vi editor - Documentation files vim-help - Vi IMproved - enhanced vi editor vim-src - Vi IMproved - enhanced vi editor - Source files vim-syntax - Vi IMproved - enhanced vi editor vim-tiny-dev - Vi IMproved - enhanced vi editor (with tiny features) - Development files vim-tiny-src - Vi IMproved - enhanced vi editor (with tiny features) - Source files vim-tiny - Vi IMproved - enhanced vi editor (with tiny features) vim-tools - Vi IMproved - enhanced vi editor vim-tutor - Vi IMproved - enhanced vi editor vim-vimrc - Vi IMproved - enhanced vi editor vim - Vi IMproved - enhanced vi editor
List of installed packages[edit | edit source]
User can see the list of installed packages with dpkg --get-selections | sed 's:install$::'
(sed removes the install string from the output list)
acl adwaita-icon-theme-symbolic alsa-conf alsa-plugins alsa-plugins-pulseaudio-conf alsa-state alsa-state-stm32mp1 alsa-states alsa-topology-conf alsa-ucm-conf ... [snip] ... weston-init wget wireless-regdb-static wpa-supplicant wpa-supplicant-cli wpa-supplicant-passphrase xinetd xkeyboard-config xxhash xz
Peripherals[edit | edit source]
Peripheral Ethernet[edit | edit source]
Device tree configuration[edit | edit source]
Here below an example of device tree configuration used on Kernel Linux:
From stm32mp157a-dcsb5000dd1r.dts
:
ðernet0{ pinctrl-names = "default", "sleep"; pinctrl-0 = <ð1_pins_mx>; pinctrl-1 = <ð1_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN ethernet0 */ phy-mode = "rmii"; max-speed = <100>; phy-handle = <&phy0>; nvmem-cells = <ðernet_mac_address>; nvmem-cell-names = "mac-address"; mdio0 { #address-cells = <1>; #size-cells = <0>; compatible = "snps,dwmac-mdio"; phy0: ethernet-phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0>; }; }; /* USER CODE END ethernet0 */ }; ... ... &pinctrl { ... ... eth1_pins_mx: eth1_mx-0 { pins1 { pinmux = <STM32_PINMUX('A', 1, AF11)>, /* ETH1_REF_CLK */ <STM32_PINMUX('B', 12, AF11)>, /* ETH1_TXD0 */ <STM32_PINMUX('C', 1, AF11)>, /* ETH1_MDC */ <STM32_PINMUX('G', 14, AF11)>; /* ETH1_TXD1 */ bias-disable; drive-push-pull; slew-rate = <1>; }; pins2 { pinmux = <STM32_PINMUX('A', 2, AF11)>; /* ETH1_MDIO */ bias-disable; drive-push-pull; slew-rate = <0>; }; pins3 { pinmux = <STM32_PINMUX('A', 7, AF11)>, /* ETH1_CRS_DV */ <STM32_PINMUX('C', 4, AF11)>, /* ETH1_RXD0 */ <STM32_PINMUX('C', 5, AF11)>, /* ETH1_RXD1 */ <STM32_PINMUX('G', 12, AF11)>; /* ETH1_PHY_INTN */ bias-disable; }; pins4 { pinmux = <STM32_PINMUX('B', 11, AF11)>; /* ETH1_TX_EN */ }; }; eth1_sleep_pins_mx: eth1_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('A', 1, ANALOG)>, /* ETH1_REF_CLK */ <STM32_PINMUX('A', 2, ANALOG)>, /* ETH1_MDIO */ <STM32_PINMUX('A', 7, ANALOG)>, /* ETH1_CRS_DV */ <STM32_PINMUX('B', 11, ANALOG)>, /* ETH1_TX_EN */ <STM32_PINMUX('B', 12, ANALOG)>, /* ETH1_TXD0 */ <STM32_PINMUX('C', 1, ANALOG)>, /* ETH1_MDC */ <STM32_PINMUX('C', 4, ANALOG)>, /* ETH1_RXD0 */ <STM32_PINMUX('C', 5, ANALOG)>, /* ETH1_RXD1 */ <STM32_PINMUX('G', 12, ANALOG)>, /* ETH1_PHY_INTN */ <STM32_PINMUX('G', 14, ANALOG)>; /* ETH1_TXD1 */ }; }; ... ... };
Accessing the peripheral[edit | edit source]
ETRA SOM provides the primary network interface mapped at eth0
.
Linux messages at boot time[edit | edit source]
root@desk-mp1:~# dmesg | grep eth [ 1.922023] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found [ 1.927733] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42 [ 1.933692] stm32-dwmac 5800a000.ethernet: DWMAC4/5 [ 1.938567] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported [ 1.945994] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported [ 1.953305] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported [ 1.960108] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported [ 1.966518] stm32-dwmac 5800a000.ethernet: TSO supported [ 1.971729] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 1.979598] stm32-dwmac 5800a000.ethernet: device MAC address 9a:47:f7:21:89:34 [ 1.986895] stm32-dwmac 5800a000.ethernet: Enabled L3L4 Flow TC (entries=2) [ 1.993922] stm32-dwmac 5800a000.ethernet: Enabled RFS Flow TC (entries=8) [ 2.000739] stm32-dwmac 5800a000.ethernet: TSO feature enabled [ 2.006616] stm32-dwmac 5800a000.ethernet: Using 32 bits DMA width [ 14.927490] using random self ethernet address [ 14.939533] using random host ethernet address [ 19.442843] stm32-dwmac 5800a000.ethernet eth0: PHY [stmmac-0:00] driver [Micrel KSZ8081 or KSZ8091] (irq=POLL) [ 19.443849] stm32-dwmac 5800a000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 19.453202] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found [ 19.453248] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported [ 19.455133] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock [ 19.468213] stm32-dwmac 5800a000.ethernet eth0: configuring for phy/rmii link mode [ 22.561014] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 22.561100] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Cable connection:
... ... [ 222.241453] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx ... ...
Check the interface with ifconfig[edit | edit source]
root@desk-mp1:~# ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.89 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::10c2:6bff:febc:378a prefixlen 64 scopeid 0x20<link> ether 12:c2:6b:bc:37:8a txqueuelen 1000 (Ethernet) RX packets 4409 bytes 489414 (477.9 KiB) RX errors 0 dropped 123 overruns 0 frame 0 TX packets 147 bytes 20171 (19.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 44 base 0xa000
Test with iperf[edit | edit source]
root@desk-mp1:~# iperf3 -t 5 -c 192.168.0.168 Connecting to host 192.168.0.168, port 5201 [ 5] local 192.168.0.89 port 47054 connected to 192.168.0.168 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 11.3 MBytes 95.1 Mbits/sec 0 153 KBytes [ 5] 1.00-2.00 sec 11.1 MBytes 92.8 Mbits/sec 0 168 KBytes [ 5] 2.00-3.00 sec 11.3 MBytes 94.9 Mbits/sec 0 239 KBytes [ 5] 3.00-4.00 sec 10.9 MBytes 91.7 Mbits/sec 0 252 KBytes [ 5] 4.00-5.00 sec 11.2 MBytes 94.4 Mbits/sec 0 279 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-5.00 sec 55.9 MBytes 93.8 Mbits/sec 0 sender [ 5] 0.00-5.05 sec 55.2 MBytes 91.8 Mbits/sec receiver iperf Done.
Peripheral LCD[edit | edit source]
Device tree configuration[edit | edit source]
Here below an example of device tree configuration used on standard DAVE's kit for the ETRA SOM:
From the kernel device tree stm32mp157a-dcsb5000dd1r.dts
where RGB interface has been configured for a LCD panel (800x480 18bit):
/ { ... ... panel-rgb@0 { status = "okay"; power-supply = <&lcd_vdd>; backlight = <&panel_backlight>; compatible = "panel-dpi", "simple-panel"; data-mapping = "bgr666"; width-mm = <154>; height-mm = <87>; panel-timing { clock-frequency = <33000000>; hactive = <800>; vactive = <480>; hsync-len = <1>; hfront-porch = <210>; hback-porch = <88>; vsync-len = <3>; vfront-porch = <22>; vback-porch = <32>; hsync-active = <0>; vsync-active = <0>; de-active = <1>; pixelclk-active = <1>; }; port { panel_rgb_in: endpoint { remote-endpoint = <<dc_out_rgb>; }; }; }; panel_backlight: backlight { compatible = "pwm-backlight"; pwms = <&bl_pwm 3 5000000 0>; pwm-names = "backlight"; power-supply = <&lcd_5v>; brightness-levels = <0 3 6 8 11 13 16 18 21 23 26 29 31 34 36 39 41 44 46 49 51 54 57 59 62 64 67 69 72 74 77 80 82 85 87 90 92 95 97 100 102 105 108 110 113 115 118 120 123 125 128 131 133 136 138 141 143 146 148 151 153 156 159 161 164 166 169 171 174 176 179 182 184 187 189 192 194 197 199 202 204 207 210 212 215 217 220 222 225 227 230 233 235 238 240 243 245 248 250 253 255>; default-brightness-level = <75>; }; ... ... }; ... ... <dc{ pinctrl-names = "default", "sleep"; pinctrl-0 = <<dc_pins_mx>; pinctrl-1 = <<dc_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN ltdc */ port { ltdc_out_rgb: endpoint { remote-endpoint = <&panel_rgb_in>; }; }; /* USER CODE END ltdc */ }; ... ... &pinctrl{ ... ... ltdc_pins_mx: ltdc_mx-0 { pins1 { pinmux = <STM32_PINMUX('A', 3, AF14)>, /* LTDC_B5 */ <STM32_PINMUX('A', 4, AF14)>, /* LTDC_VSYNC */ <STM32_PINMUX('A', 5, AF14)>, /* LTDC_R4 */ <STM32_PINMUX('A', 6, AF14)>, /* LTDC_G2 */ <STM32_PINMUX('B', 0, AF9)>, /* LTDC_R3 */ <STM32_PINMUX('B', 1, AF9)>, /* LTDC_R6 */ <STM32_PINMUX('B', 8, AF14)>, /* LTDC_B6 */ <STM32_PINMUX('B', 9, AF14)>, /* LTDC_B7 */ <STM32_PINMUX('B', 10, AF14)>, /* LTDC_G4 */ <STM32_PINMUX('C', 0, AF14)>, /* LTDC_R5 */ <STM32_PINMUX('C', 6, AF14)>, /* LTDC_HSYNC */ <STM32_PINMUX('C', 7, AF14)>, /* LTDC_G6 */ <STM32_PINMUX('C', 10, AF14)>, /* LTDC_R2 */ <STM32_PINMUX('D', 3, AF14)>, /* LTDC_G7 */ <STM32_PINMUX('D', 10, AF14)>, /* LTDC_B3 */ <STM32_PINMUX('E', 11, AF14)>, /* LTDC_G3 */ <STM32_PINMUX('E', 12, AF14)>, /* LTDC_B4 */ <STM32_PINMUX('E', 13, AF14)>, /* LTDC_DE */ <STM32_PINMUX('E', 15, AF14)>, /* LTDC_R7 */ <STM32_PINMUX('F', 11, AF14)>, /* LTDC_G5 */ <STM32_PINMUX('G', 10, AF14)>; /* LTDC_B2 */ bias-disable; drive-push-pull; slew-rate = <0>; }; pins2 { pinmux = <STM32_PINMUX('G', 7, AF14)>; /* LTDC_CLK */ bias-disable; drive-push-pull; slew-rate = <1>; }; }; ltdc_sleep_pins_mx: ltdc_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('A', 3, ANALOG)>, /* LTDC_B5 */ <STM32_PINMUX('A', 4, ANALOG)>, /* LTDC_VSYNC */ <STM32_PINMUX('A', 5, ANALOG)>, /* LTDC_R4 */ <STM32_PINMUX('A', 6, ANALOG)>, /* LTDC_G2 */ <STM32_PINMUX('B', 0, ANALOG)>, /* LTDC_R3 */ <STM32_PINMUX('B', 1, ANALOG)>, /* LTDC_R6 */ <STM32_PINMUX('B', 8, ANALOG)>, /* LTDC_B6 */ <STM32_PINMUX('B', 9, ANALOG)>, /* LTDC_B7 */ <STM32_PINMUX('B', 10, ANALOG)>, /* LTDC_G4 */ <STM32_PINMUX('C', 0, ANALOG)>, /* LTDC_R5 */ <STM32_PINMUX('C', 6, ANALOG)>, /* LTDC_HSYNC */ <STM32_PINMUX('C', 7, ANALOG)>, /* LTDC_G6 */ <STM32_PINMUX('C', 10, ANALOG)>, /* LTDC_R2 */ <STM32_PINMUX('D', 3, ANALOG)>, /* LTDC_G7 */ <STM32_PINMUX('D', 10, ANALOG)>, /* LTDC_B3 */ <STM32_PINMUX('E', 11, ANALOG)>, /* LTDC_G3 */ <STM32_PINMUX('E', 12, ANALOG)>, /* LTDC_B4 */ <STM32_PINMUX('E', 13, ANALOG)>, /* LTDC_DE */ <STM32_PINMUX('E', 15, ANALOG)>, /* LTDC_R7 */ <STM32_PINMUX('F', 11, ANALOG)>, /* LTDC_G5 */ <STM32_PINMUX('G', 7, ANALOG)>, /* LTDC_CLK */ <STM32_PINMUX('G', 10, ANALOG)>; /* LTDC_B2 */ }; }; ... ... };
Accessing the peripheral[edit | edit source]
Linux messages at boot time[edit | edit source]
root@desk-mp1:~# dmesg | grep display [ 0.087536] platform panel-rgb@0: Fixing up cyclic dependency with 5a001000.display-controller [ 2.919515] [drm] Initialized stm 1.0.0 20170330 for 5a001000.display-controller on minor 0 [ 2.989666] stm32-display 5a001000.display-controller: [drm] fb0: stmdrmfb frame buffer device
Pheripheral Touchscreen[edit | edit source]
The screen supplied with the kit has a capacitive touchscreen, it is connected to the board via the USB OTG port
Linux messages at boot time[edit | edit source]
... [ 3.408937] usb 1-1: new full-speed USB device number 2 using dwc2 [ 3.678177] input: ILITEK ILITEK-TP as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.0/0003:222A:0001.0001/input/input1 [ 3.689297] hid-multitouch 0003:222A:0001.0001: input,hidraw0: USB HID v1.10 Device [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input0 [ 3.705350] input: ILITEK ILITEK-TP Mouse as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.1/0003:222A:0001.0002/input/input2 [ 3.717019] hid-generic 0003:222A:0001.0002: input,hidraw1: USB HID v1.10 Mouse [ILITEK ILITEK-TP] on usb-49000000.usb-otg-1/input1 ...
Usage with evtest[edit | edit source]
Use command evtest
:
root@desk-mp1:~# evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: pmic_onkey /dev/input/event1: ILITEK ILITEK-TP /dev/input/event2: ILITEK ILITEK-TP Mouse Select the device event number [0-2]: 1 Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x222a product 0x1 version 0x110 Input device name: "ILITEK ILITEK-TP" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 330 (BTN_TOUCH) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 0 Min 0 Max 16384 Resolution 53 Event code 1 (ABS_Y) Value 0 Min 0 Max 9600 Resolution 55 Event code 47 (ABS_MT_SLOT) Value 0 Min 0 Max 9 Event code 53 (ABS_MT_POSITION_X) Value 0 Min 0 Max 16384 Resolution 53 Event code 54 (ABS_MT_POSITION_Y) Value 0 Min 0 Max 9600 Resolution 55 Event code 57 (ABS_MT_TRACKING_ID) Value 0 Min 0 Max 65535 Event type 4 (EV_MSC) Event code 5 (MSC_TIMESTAMP) Properties: Property type 1 (INPUT_PROP_DIRECT) Testing ... (interrupt to exit) Event: time 1690972553.988150, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0 Event: time 1690972553.988150, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 7993 Event: time 1690972553.988150, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 4871 Event: time 1690972553.988150, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 1690972553.988150, type 3 (EV_ABS), code 0 (ABS_X), value 7993 Event: time 1690972553.988150, type 3 (EV_ABS), code 1 (ABS_Y), value 4871 Event: time 1690972553.988150, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0 Event: time 1690972553.988150, -------------- SYN_REPORT ------------ Event: time 1690972553.994101, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 8000 Event: time 1690972553.994101, -------------- SYN_REPORT ------------ Event: time 1690972554.000104, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 16000 Event: time 1690972554.000104, -------------- SYN_REPORT ------------ Event: time 1690972554.006103, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 1690972554.006103, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 1690972554.006103, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 24000 Event: time 1690972554.006103, -------------- SYN_REPORT ------------
Peripheral SD[edit | edit source]
Device tree configuration[edit | edit source]
Here below an example of device tree configuration used on standard DAVE's kit for the ETRA SOM:
From kernel device tree stm32mp157a-dcsb5000dd1r.dts
:
&pinctrl { ... ... sdmmc1_pins_mx: sdmmc1_mx-0 { u-boot,dm-pre-reloc; pins1 { u-boot,dm-pre-reloc; pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */ <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */ <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */ <STM32_PINMUX('D', 2, AF12)>, /* SDMMC1_CMD */ <STM32_PINMUX('E', 6, AF8)>; /* SDMMC1_D2 */ bias-disable; drive-push-pull; slew-rate = <1>; }; pins2 { u-boot,dm-pre-reloc; pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */ bias-disable; drive-push-pull; slew-rate = <3>; }; }; sdmmc1_opendrain_pins_mx: sdmmc1_opendrain_mx-0 { u-boot,dm-pre-reloc; pins1 { u-boot,dm-pre-reloc; pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */ <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */ <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */ <STM32_PINMUX('E', 6, AF8)>; /* SDMMC1_D2 */ bias-disable; drive-push-pull; slew-rate = <1>; }; pins2 { u-boot,dm-pre-reloc; pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */ bias-disable; drive-push-pull; slew-rate = <3>; }; pins3 { u-boot,dm-pre-reloc; pinmux = <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */ bias-disable; drive-open-drain; slew-rate = <1>; }; }; sdmmc1_sleep_pins_mx: sdmmc1_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1_D0 */ <STM32_PINMUX('C', 9, ANALOG)>, /* SDMMC1_D1 */ <STM32_PINMUX('C', 11, ANALOG)>, /* SDMMC1_D3 */ <STM32_PINMUX('C', 12, ANALOG)>, /* SDMMC1_CK */ <STM32_PINMUX('D', 2, ANALOG)>, /* SDMMC1_CMD */ <STM32_PINMUX('E', 6, ANALOG)>; /* SDMMC1_D2 */ }; }; ... ... }; ... ... &sdmmc1{ pinctrl-names = "default", "opendrain", "sleep"; pinctrl-0 = <&sdmmc1_pins_mx>; pinctrl-1 = <&sdmmc1_opendrain_pins_mx>; pinctrl-2 = <&sdmmc1_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN sdmmc1 */ cd-gpios = <&gpioe 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; disable-wp; st,neg-edge; bus-width = <4>; vmmc-supply = <&v3v3>; /* USER CODE END sdmmc1 */ }; ... ...
Accessing the peripheral[edit | edit source]
Once initialized, the SD device is mapped to the standard /dev/mmcblk1pX
block device, depending on how many partition are created on the SD card.
Linux messages at boot time[edit | edit source]
If the microSd card is inserted at boot time, the kernel - once the USDHC interface has been initialized - prints the device information and the partition detected like p1, p2, etc.:
root@desk-mp1:~# dmesg | grep mmc [ 0.000000] Kernel command line: root=/dev/mmcblk1p10 rootwait rw console=ttySTM0,115200 [ 2.216453] mmci-pl18x 48004000.mmc: mmc0: PL180 manf 53 rev2 at 0x48004000 irq 38,0 (pio) [ 2.417608] mmci-pl18x 58005000.mmc: Got CD GPIO [ 2.422190] mmci-pl18x 58005000.mmc: mmc1: PL180 manf 53 rev2 at 0x58005000 irq 42,0 (pio) [ 2.447764] mmc0: queuing unknown CIS tuple 0x01 [d9 01 ff] (3 bytes) [ 2.459096] mmci-pl18x 58007000.mmc: mmc2: PL180 manf 53 rev2 at 0x58007000 irq 43,0 (pio) [ 2.467440] mmc0: queuing unknown CIS tuple 0x1a [01 01 00 02 07] (5 bytes) [ 2.476177] mmc0: queuing unknown CIS tuple 0x1b [c1 41 30 30 ff ff 32 00] (8 bytes) [ 2.484060] mmc0: queuing unknown CIS tuple 0x14 [] (0 bytes) [ 2.495219] mmc0: new high speed SDIO card at address 0001 [ 2.502454] mmc1: new high speed SDHC card at address 59b4 [ 2.509422] mmcblk1: mmc1:59b4 USDU1 14.9 GiB [ 2.532495] mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 [ 2.598234] mmc2: new DDR MMC card at address 0001 [ 2.603366] mmcblk2: mmc2:0001 W62704 3.53 GiB [ 2.612505] mmcblk2boot0: mmc2:0001 W62704 2.00 MiB [ 2.619409] mmcblk2boot1: mmc2:0001 W62704 2.00 MiB [ 2.625675] mmcblk2rpmb: mmc2:0001 W62704 512 KiB, chardev (240:0) [ 3.320665] EXT4-fs (mmcblk1p10): recovery complete [ 3.328018] EXT4-fs (mmcblk1p10): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled. [ 8.586451] EXT4-fs (mmcblk1p10): re-mounted. Opts: (null). Quota mode: disabled. [ 8.819545] EXT4-fs (mmcblk1p8): recovery complete [ 8.822966] EXT4-fs (mmcblk1p8): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled. [ 9.403677] EXT4-fs (mmcblk1p9): recovery complete [ 9.411111] EXT4-fs (mmcblk1p9): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled. [ 9.745622] EXT4-fs (mmcblk1p11): recovery complete [ 9.749683] EXT4-fs (mmcblk1p11): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
Additional information[edit | edit source]
If the root file system configuration does not automatically mount the partition, it is possible to mount the device using the following command:
root@desk-mp1:~# mkdir -p /mnt/boot root@desk-mp1:~# mkdir -p /mnt/rfs root@desk-mp1:~# mount /dev/mmcblk1p1 /mnt/boot/ root@desk-mp1:~# mount /dev/mmcblk1p2 /mnt/rfs/ root@desk-mp1:~# ls /mnt/boot/ boot.scr lost+found stm32mp157a-dcsb5000dd1r.dtb uImage root@desk-mp1:~# ls /mnt/rfs/ bin boot dev etc home lib lost+found media mnt proc run sbin srv sys tmp usr var vendor root@desk-mp1:~#
and then the mounted partition are available on the /mnt/boot and /mnt/rfs root file system directories.
Peripheral UARTs[edit | edit source]
Device tree configuration[edit | edit source]
Here below an example of device tree configuration used on standard DAVE's kit for the ETRA SOM:
From the kernel stm32mp157a-dcsb5000dd1r.dts
device tree:
&uart4{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart4_pins_mx>; pinctrl-1 = <&uart4_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN uart4 */ /delete-property/dmas; /delete-property/dma-names; /* USER CODE END uart4 */ }; ... ... &pinctrl { ... ... uart4_pins_mx: uart4_mx-0 { pins1 { pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */ bias-disable; }; pins2 { pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */ bias-disable; drive-push-pull; slew-rate = <0>; }; }; uart4_sleep_pins_mx: uart4_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('B', 2, ANALOG)>, /* UART4_RX */ <STM32_PINMUX('G', 11, ANALOG)>; /* UART4_TX */ }; }; ... ... };
Accessing the peripheral[edit | edit source]
Linux messages at boot time[edit | edit source]
root@desk-mp1:~# dmesg | grep serial [ 0.559130] stm32-usart 4000f000.serial: interrupt mode for rx (no dma) [ 0.559170] stm32-usart 4000f000.serial: interrupt mode for tx (no dma) [ 0.559210] 4000f000.serial: ttySTM1 at MMIO 0x4000f000 (irq = 49, base_baud = 4000000) is a stm32-usart [ 0.561377] stm32-usart 40010000.serial: interrupt mode for rx (no dma) [ 0.561413] stm32-usart 40010000.serial: interrupt mode for tx (no dma) [ 0.561450] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 50, base_baud = 4000000) is a stm32-usart [ 1.861292] stm32-usart 40018000.serial: interrupt mode for rx (no dma) [ 1.866587] stm32-usart 40018000.serial: interrupt mode for tx (no dma) [ 1.873293] 40018000.serial: ttySTM3 at MMIO 0x40018000 (irq = 51, base_baud = 4000000) is a stm32-usart [ 1.884932] stm32-usart 40019000.serial: interrupt mode for rx (no dma) [ 1.890313] stm32-usart 40019000.serial: interrupt mode for tx (no dma) [ 1.896815] 40019000.serial: ttySTM2 at MMIO 0x40019000 (irq = 52, base_baud = 4000000) is a stm32-usart
Usage with stty[edit | edit source]
N.B. UART mapping respect to ttymxcX
is the following one:
uart4 <-> serial0 <-> ttySTM0 usart3 <-> serial1 <-> ttySTM1 uart8 <-> serial2 <-> ttySTM2 uart7 <-> serial3 <-> ttySTM3
For example, using a loopback HW connection (RX short circuited to TX on UART232 port) it is possible to test the send and receive data using the ttySTM1
device:
root@desk-mp1:~# stty -F /dev/ttySTM1 115200 -echo root@desk-mp1:~# cat /dev/ttySTM1 & root@desk-mp1:~# echo "Test loopback" > /dev/ttySTM1 root@desk-mp1:~# Test loopback
Additional information[edit | edit source]
Serial ports can be used through the standard serial programming API.
For detailed information, please refer to the Serial Programming HOWTO at Serial-Programming-HOWTO
Peripheral USB Host[edit | edit source]
Device tree configuration[edit | edit source]
Here below an example of device tree configuration used on standard DAVE's kit for the ETRA SOM:
From kernel device tree stm32mp157a-dcsb5000dd1r.dts
:
... ... &usbh_ehci{ status = "okay"; /* USER CODE BEGIN usbh_ehci */ phys = <&usbphyc_port0>; phy-names = "usb"; /* USER CODE END usbh_ehci */ }; &usbh_ohci{ status = "okay"; /* USER CODE BEGIN usbh_ohci */ /* USER CODE END usbh_ohci */ }; &usbphyc{ status = "okay"; /* USER CODE BEGIN usbphyc */ /* USER CODE END usbphyc */ }; &usbphyc_port0{ status = "okay"; /* USER CODE BEGIN usbphyc_port0 */ phy-supply = <&vdd_usb>; connector { compatible = "usb-a-connector"; vbus-supply = <&vbus_sw>; }; /* USER CODE END usbphyc_port0 */ }; ... ...
Accessing the peripheral[edit | edit source]
Linux messages at boot time[edit | edit source]
When a USB peripheral is inserted, in the following example a memory mass storage device, the kernel recognizes the device (i.e. xlass, vendor id, product id, etc.)
[ 496.159495] usb 2-1: new high-speed USB device number 2 using ehci-platform [ 496.368878] usb-storage 2-1:1.0: USB Mass Storage device detected [ 496.379336] scsi host0: usb-storage 2-1:1.0 [ 496.846840] usbcore: registered new interface driver uas [ 497.441374] scsi 0:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6 [ 497.453487] sd 0:0:0:0: [sda] 60125184 512-byte logical blocks: (30.8 GB/28.7 GiB) [ 497.461344] sd 0:0:0:0: [sda] Write Protect is off [ 497.464745] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 [ 497.472234] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 497.488444] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 497.507380] sda: sda1 [ 497.603592] sd 0:0:0:0: [sda] Attached SCSI removable disk
Additional information[edit | edit source]
If the root file system configuration does not automatically mount the partition, it is possible to mount the device using the following command:
root@desk-mp1:~# mkdir -p /mnt/usb root@desk-mp1:~# mount /dev/sda1 /mnt/usb/ root@desk-mp1:~# ls -la /mnt/usb/ total 24 drwxr-xr-x 3 root root 16384 Jan 1 1970 . drwxr-xr-x 4 root root 4096 Jul 28 13:38 .. drwx------ 2 root root 16384 Jul 28 08:54 lost+found -rw-r--r-- 1 root root 8765832 Jul 28 08:54 uImage
Peripheral USB OTG[edit | edit source]
Device tree configuration[edit | edit source]
Here below an example of device tree configuration used on standard DAVE's kit for the ETRA SOM
OTG port can be forced using the 4th DIP-switch (see the DIP settings section on the Boot configurations page):
OFF
: otg mode, the connected peripheral has its ID pin properly set and it is able to change the working mode according to the pin logic valueON
: host force the host mode.
From kernel device tree stm32mp157a-dcsb5000dd1r.dts
:
... ... &usbotg_hs{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&usb_otg_hs_pins_mx>; pinctrl-1 = <&usb_otg_hs_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN usbotg_hs */ compatible = "st,stm32mp15-hsotg", "snps,dwc2"; phys = <&usbphyc_port1 0>; phy-names = "usb2-phy"; vbus-supply = <&vbus_otg>; dr_mode = "otg"; /* USER CODE END usbotg_hs */ }; &usbphyc_port1{ status = "okay"; /* USER CODE BEGIN usbphyc_port1 */ phy-supply = <&vdd_usb>; /* USER CODE END usbphyc_port1 */ }; ... ... pinctrl { ... ... usb_otg_hs_pins_mx: usb_otg_hs_mx-0 { pins { pinmux = <STM32_PINMUX('A', 10, ANALOG)>; /* USB_OTG_HS_ID */ }; }; usb_otg_hs_sleep_pins_mx: usb_otg_hs_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('A', 10, ANALOG)>; /* USB_OTG_HS_ID */ }; }; ... ... }; ... ...
Accessing the peripheral[edit | edit source]
Linux messages at boot time[edit | edit source]
root@desk-mp1:~# dmesg | grep otg [ 2.202854] vbus_otg: supplied by bst_out [ 2.591726] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator [ 2.598534] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator [ 2.746347] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM [ 2.753429] dwc2 49000000.usb-otg: DWC OTG Controller [ 2.757541] dwc2 49000000.usb-otg: new USB bus registered, assigned bus number 1 [ 2.765060] dwc2 49000000.usb-otg: irq 74, io mem 0x49000000 [ 13.812830] dwc2 49000000.usb-otg: bound driver configfs-gadget
Usage in Host mode[edit | edit source]
When a USB peripheral is inserted, in the following example a memory mass storage device, the kernel recognizes the device (i.e. class, vendor id, product id, etc.)
[ 109.857720] usb 1-1: new high-speed USB device number 2 using dwc2 [ 110.117799] usb-storage 1-1:1.0: USB Mass Storage device detected [ 110.127163] scsi host1: usb-storage 1-1:1.0 [ 111.447577] scsi 1:0:0:0: Direct-Access ADATA USB Flash Drive 1100 PQ: 0 ANSI: 0 CCS [ 111.462507] sd 1:0:0:0: [sdb] 7913472 512-byte logical blocks: (4.05 GB/3.77 GiB) [ 111.471019] sd 1:0:0:0: Attached scsi generic sg1 type 0 [ 111.491495] sd 1:0:0:0: [sdb] Write Protect is off [ 111.495087] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 00 [ 111.501814] sd 1:0:0:0: [sdb] No Caching mode page found [ 111.505814] sd 1:0:0:0: [sdb] Assuming drive cache: write through [ 111.520046] sdb: sdb1 [ 111.528131] sd 1:0:0:0: [sdb] Attached SCSI removable disk
Usage with mass-storage[edit | edit source]
root@desk-mp1:~# dd if=/dev/zero of=/tmp/mass count=16 bs=1M 16+0 records in 16+0 records out 16777216 bytes (17 MB, 16 MiB) copied, 0.111651 s, 150 MB/s root@desk-mp1:~# mkfs.ext4 /tmp/mass mke2fs 1.46.5 (30-Dec-2021) Discarding device blocks: done Creating filesystem with 16384 1k blocks and 4096 inodes Filesystem UUID: 354cc3e0-2b27-4573-b1d6-d7fb99c3a535 Superblock backups stored on blocks: 8193 Allocating group tables: done Writing inode tables: done Creating journal (1024 blocks): done Writing superblocks and filesystem accounting information: done root@desk-mp1:~# mkdir -p /tmp/loop root@desk-mp1:~# mount /tmp/mass /tmp/loop root@desk-mp1:~# dd if=/dev/urandom of=/tmp/loop/pippo bs=1M count=10 10+0 records in 10+0 records out 10485760 bytes (10 MB, 10 MiB) copied, 0.715313 s, 14.7 MB/s root@desk-mp1:~# md5sum /tmp/loop/pippo 31743a261ce01c14f9c28f6529caba72 /tmp/loop/pippo root@desk-mp1:~# umount /tmp/loop root@desk-mp1:~# echo "" > /sys/kernel/config/usb_gadget/g1/UDC root@desk-mp1:~# rm /sys/kernel/config/usb_gadget/g1/configs/c.1/rndis.0 root@desk-mp1:~# mkdir /sys/kernel/config/usb_gadget/g1/functions/mass_storage.1 root@desk-mp1:~# echo "/tmp/mass" > /sys/kernel/config/usb_gadget/g1/functions/mass_storage.1/lun.0/file root@desk-mp1:~# ln -s /sys/kernel/config/usb_gadget/g1/functions/mass_storage.1 /sys/kernel/config/usb_gadget/g1/configs/c.1 root@desk-mp1:~# echo 49000000.usb-otg > /sys/kernel/config/usb_gadget/g1/UDC root@desk-mp1:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 1 16M 0 disk mmcblk1 179:0 0 14.9G 0 disk |-mmcblk1p1 179:1 0 256K 0 part |-mmcblk1p2 179:2 0 256K 0 part |-mmcblk1p3 179:3 0 256K 0 part |-mmcblk1p4 179:4 0 256K 0 part |-mmcblk1p5 179:5 0 4M 0 part |-mmcblk1p6 179:6 0 4M 0 part |-mmcblk1p7 179:7 0 512K 0 part |-mmcblk1p8 179:8 0 64M 0 part /boot |-mmcblk1p9 179:9 0 16M 0 part /vendor |-mmcblk1p10 179:10 0 2G 0 part / `-mmcblk1p11 179:11 0 128M 0 part /usr/local mmcblk2 179:16 0 3.5G 0 disk mmcblk2boot0 179:32 0 2M 1 disk mmcblk2boot1 179:48 0 2M 1 disk root@desk-mp1:~# mkdir -p /tmp/usb root@desk-mp1:~# mount /dev/sda /tmp/usb/ root@desk-mp1:~# md5sum /tmp/usb/pippo 31743a261ce01c14f9c28f6529caba72 /tmp/usb/pippo
Pheripheral RTC[edit | edit source]
On SBC ETRA there are two rtc one on ETRA SOM and one on carrier board.
root@desk-mp1:~# ls -la /dev/rtc* lrwxrwxrwx 1 root root 4 Aug 2 10:45 /dev/rtc -> rtc0 crw------- 1 root root 253, 0 Aug 2 10:45 /dev/rtc0 crw------- 1 root root 253, 1 Aug 2 10:45 /dev/rtc1
Device tree configuration[edit | edit source]
... ... &i2c4{ ... ... ds3232: rtc@68 { compatible = "dallas,ds3232"; reg = <0x68>; interrupt-parent = <&gpiod>; interrupts = <6 IRQ_TYPE_EDGE_FALLING>; status = "okay"; }; ... ... }; ... ... &rtc{ status = "okay"; /* USER CODE BEGIN rtc */ /* USER CODE END rtc */ }; ... ...
Linux messages at boot time[edit | edit source]
... [ 2.006753] stm32_rtc 5c004000.rtc: registered as rtc0 [ 2.010619] stm32_rtc 5c004000.rtc: setting system clock to 2023-08-02T10:45:30 UTC (1690973130) [ 2.019926] stm32_rtc 5c004000.rtc: registered rev:1.2 ... [ 2.177792] rtc-ds3232 1-0068: registered as rtc1 ...
Usage with hwclock[edit | edit source]
root@desk-mp1:~# hwclock -f /dev/rtc1 -v hwclock from util-linux 2.37.4 System Time: 1690975162.373458 Using the rtc interface to the clock. Assuming hardware clock is kept in UTC time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2023/08/02 11:19:24 Hw clock time : 2023/08/02 11:19:24 = 1690975164 seconds since 1969 Time since last adjustment is 1690975164 seconds Calculated Hardware Clock drift is 0.000000 seconds 2023-08-02 11:19:23.549038+00:00
Pheripheral DWS[edit | edit source]
The DWS add-on module present on ETRA EVK it used to have the Wireless and Bluetooth connection.
The binary provided in the kit and the downloadable binary desk-image-qt5-openstlinux-weston-desk-mp1.wic.bz2, if the DWS module is present, the drivers for the wireless and Bluetooth connection will automatically start.
The Bluetooth and the wireless connection are managed with rfkill
.
Device tree configuration[edit | edit source]
The device tree has three sections devoted to the wireless subsystems configuration, i.e. wifi
, bluetooth
, rfkill
Wifi[edit | edit source]
The wireless driver is a module built out of tree, the source is present only in the bsp, the module in question therefore cannot be built having only the kernel source code
The communication bus used is the one destined for the sdmmc3.
... ... /{ ... ... reg_wlan_en: wlan_en { compatible = "regulator-fixed"; regulator-name = "wlan-en-regulator"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high; gpio = <&gpioe 8 GPIO_ACTIVE_HIGH>; vin-supply = <&vin>; startup-delay-us = <150000>; }; ... ... }; ... ... &pinctrl { ... ... sdmmc3_pins_mx: sdmmc3_mx-0 { pins1 { pinmux = <STM32_PINMUX('D', 0, AF10)>, /* SDMMC3_CMD */ <STM32_PINMUX('D', 1, AF10)>, /* SDMMC3_D0 */ <STM32_PINMUX('D', 4, AF10)>, /* SDMMC3_D1 */ <STM32_PINMUX('D', 5, AF10)>, /* SDMMC3_D2 */ <STM32_PINMUX('D', 7, AF10)>; /* SDMMC3_D3 */ bias-disable; drive-push-pull; slew-rate = <1>; }; pins2 { pinmux = <STM32_PINMUX('G', 15, AF10)>; /* SDMMC3_CK */ bias-disable; drive-push-pull; slew-rate = <3>; slew-rate = <1>; }; }; sdmmc3_opendrain_pins_mx: sdmmc3_opendrain_mx-0 { pins1 { pinmux = <STM32_PINMUX('D', 0, AF10)>; /* SDMMC3_CMD */ bias-disable; drive-open-drain; slew-rate = <1>; }; pins2 { pinmux = <STM32_PINMUX('D', 1, AF10)>, /* SDMMC3_D0 */ <STM32_PINMUX('D', 4, AF10)>, /* SDMMC3_D1 */ <STM32_PINMUX('D', 5, AF10)>, /* SDMMC3_D2 */ <STM32_PINMUX('D', 7, AF10)>; /* SDMMC3_D3 */ bias-disable; drive-push-pull; slew-rate = <1>; }; pins3 { pinmux = <STM32_PINMUX('G', 15, AF10)>; /* SDMMC3_CK */ bias-disable; drive-push-pull; slew-rate = <1>; }; }; sdmmc3_sleep_pins_mx: sdmmc3_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('D', 0, ANALOG)>, /* SDMMC3_CMD */ <STM32_PINMUX('D', 1, ANALOG)>, /* SDMMC3_D0 */ <STM32_PINMUX('D', 4, ANALOG)>, /* SDMMC3_D1 */ <STM32_PINMUX('D', 5, ANALOG)>, /* SDMMC3_D2 */ <STM32_PINMUX('D', 7, ANALOG)>, /* SDMMC3_D3 */ <STM32_PINMUX('G', 15, ANALOG)>; /* SDMMC3_CK */ }; }; ... ... }; ... ... &sdmmc3{ pinctrl-names = "default", "opendrain", "sleep"; pinctrl-0 = <&sdmmc3_pins_mx>; pinctrl-1 = <&sdmmc3_opendrain_pins_mx>; pinctrl-2 = <&sdmmc3_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN sdmmc3 */ broken-cd; non-removable; no-1-8-v; st,neg-edge; bus-width = <4>; vmmc-supply = <&vdd>; vmmc-supply = <®_wlan_en>; /* USER CODE END sdmmc3 */ }; ... ...
Bluetooth[edit | edit source]
Bluetooth hardware configuration has shared pins in conflict with the NOR memory option The gpios used for the serial bus to use Bluetooth in the DWS are shared with the SPI bus to communicate with the NOR. If the BT interface is required the NOR memory cannot be used and vice versa |
... ... / { ... ... aliases{ ... ... serial3 = &uart7; ... ... }; ... ... }; ... ... &pinctrl{ uart7_pins_mx: uart7_mx-0 { pins1 { pinmux = <STM32_PINMUX('F', 6, AF7)>, /* UART7_RX */ <STM32_PINMUX('F', 9, AF7)>; /* UART7_CTS */ bias-disable; }; pins2 { pinmux = <STM32_PINMUX('F', 7, AF7)>, /* UART7_TX */ <STM32_PINMUX('F', 8, AF7)>; /* UART7_RTS */ bias-disable; drive-push-pull; slew-rate = <0>; }; }; uart7_sleep_pins_mx: uart7_sleep_mx-0 { pins { pinmux = <STM32_PINMUX('F', 6, ANALOG)>, /* UART7_RX */ <STM32_PINMUX('F', 7, ANALOG)>, /* UART7_TX */ <STM32_PINMUX('F', 8, ANALOG)>, /* UART7_RTS */ <STM32_PINMUX('F', 9, ANALOG)>; /* UART7_CTS */ }; }; }; ... ... &qspi{ ... ... status = "disabled"; ... ... }; ... ... &uart7{ pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart7_pins_mx>; pinctrl-1 = <&uart7_sleep_pins_mx>; status = "okay"; /* USER CODE BEGIN uart7 */ /delete-property/dmas; /delete-property/dma-names; uart-has-rtscts; /* USER CODE END uart7 */ }; ... ...
rfkill[edit | edit source]
For the Bluetooth driver it is necessary to add a rfkill_gpio
node in the device tree:
... ... /{ ... ... bt_rfkill { compatible = "net,rfkill-gpio"; name = "bt_rfkill"; type = "bluetooth"; reset-gpios = <&gpioe 7 GPIO_ACTIVE_HIGH>; }; ... ... }; ... ...
Accessing the peripheral[edit | edit source]
rfkill[edit | edit source]
Linux messages at boot time[edit | edit source]
[ 2.527639] rfkill_gpio bt_rfkill: bt_rfkill device registered.
Usage[edit | edit source]
root@desk-mp1:~# rfkill ID TYPE DEVICE SOFT HARD 0 bluetooth bt_rfkill unblocked unblocked 1 wlan phy0 unblocked unblocked
So, for example, for enabling the wlan interface:
root@desk-mp1:~# rfkill unblock wlan
Wifi[edit | edit source]
Linux messages at boot time[edit | edit source]
... [ 0.567773] wlan-en-regulator: supplied by vin ... [ 12.422451] wlan: loading out-of-tree module taints kernel. ... [ 14.266062] wlan: loading driver v4.5.25.46 [ 14.291737] hifDeviceInserted: Dumping clocks (50000000,99000000) [ 14.563255] [TELIT] Using WE866C6 board data. [ 14.642957] ol_download_firmware: chip_id:0x5020001 board_id:0x0 [ 14.648126] __ol_transfer_bin_file: Failed to get bdwlan30_c6.b00:-2 [ 14.688736] __ol_transfer_bin_file: Trying to load default bdwlan30_c6.bin [ 14.752763] __ol_transfer_bin_file: Loading setup file qsetup30.bin [ 14.757937] __ol_transfer_bin_file: Failed to get qsetup30.bin:-2 [ 15.657329] R0: wlan: [735:E :SAP] dfs_init_radar_filters[217]: Unknown dfs domain 0 [ 15.832920] Host SW:4.5.25.46, FW:0.0.0.111, HW:QCA93x7_REV1_1 [ 15.848740] ENTER sme_set_btc_coex_dutycycle = 30 [ 15.848777] ENTER sme_set_btc_coex_dutycycle =30 [ 15.855583] ath_hif_sdio: HIF (Atheros/multi-bss) [ 15.864661] wlan: driver loaded in 1600000
Check if the wlan
module are loaded:
root@desk-mp1:~# lsmod Module Size Used by wlan 5111808 0 galcore 528384 5 sch_fq_codel 20480 3 ip_tables 24576 0 x_tables 24576 1 ip_tables ipv6 507904 58
Usage with wpa_supplicant[edit | edit source]
Wireless connection using wpa_supplicant
root@desk-mp1:~# rfkill unblock wlan root@desk-mp1:~# killall wpa_supplicant wpa_supplicant: no process found root@desk-mp1:~# echo network={ > /tmp/wpa_supplicant.conf root@desk-mp1:~# echo 'ssid="ZyXEL"' >> /tmp/wpa_supplicant.conf root@desk-mp1:~# echo key_mgmt=NONE >> /tmp/wpa_supplicant.conf root@desk-mp1:~# echo } >> /tmp/wpa_supplicant.conf root@desk-mp1:~# wpa_supplicant -i wlan0 -c /tmp/wpa_supplicant.conf -B -P /tmp/wpa_supplicant.pid Successfully initialized wpa_supplicant root@desk-mp1:~# dmesg | tail -n 2 [ 2229.194152] DEBUGFS PEER MAC = 0xfc:0xf5:0x28:0xcc:0x3:0x90 [ 2229.312740] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready root@desk-mp1:~# ifconfig wlan0 192.168.11.89 up root@desk-mp1:~# ping -c 5 192.168.11.243 PING 192.168.11.243 (192.168.11.243) 56(84) bytes of data. 64 bytes from 192.168.11.243: icmp_seq=1 ttl=64 time=36.9 ms 64 bytes from 192.168.11.243: icmp_seq=2 ttl=64 time=15.6 ms 64 bytes from 192.168.11.243: icmp_seq=3 ttl=64 time=13.6 ms 64 bytes from 192.168.11.243: icmp_seq=4 ttl=64 time=11.7 ms 64 bytes from 192.168.11.243: icmp_seq=5 ttl=64 time=19.6 ms --- 192.168.11.243 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4007ms rtt min/avg/max/mdev = 11.691/19.481/36.911/9.100 ms root@desk-mp1:~#
It is possible to use also the iw
application:
root@desk-mp1:~# iw Usage: iw [options] command Options: --debug enable netlink debugging --version show version (5.16) Commands: dev <devname> ap stop dev <devname> ap start ...
Bluetooth[edit | edit source]
Usage with hci[edit | edit source]
First of all it is required to open the serial interface to the BT device:
root@desk-mp1:~# stty -F /dev/ttySTM3 3000000 -echo -echoe crtscts
root@desk-mp1:~# hciattach /dev/ttySTM3 qca 3000000 -t120 flow [...] root@desk-mp1:~# hciconfig hci0 up root@desk-mp1:~# hcitool dev Devices: hci0 00:21:7E:33:1D:5C root@desk-mp1:~# bluetoothctl Agent registered [CHG] Controller 00:21:7E:33:1D:5C Pairable: yes [bluetooth]# scan on Discovery started [CHG] Controller 00:21:7E:33:1D:5C Discovering: yes [NEW] Device 61:39:85:BD:57:71 61-39-85-BD-57-71 [NEW] Device D4:CA:6E:C1:0E:E8 NINA-B1-C10EE8 [CHG] Device 61:39:85:BD:57:71 RSSI: -75 [CHG] Device 61:39:85:BD:57:71 ManufacturerData Key: 0x004c [CHG] Device 61:39:85:BD:57:71 ManufacturerData Value: 10 05 2e 18 00 b2 00 ....... [NEW] Device 08:97:98:34:48:2C Cat S52 Fox [DEL] Device 61:39:85:BD:57:71 61-39-85-BD-57-71 [bluetooth]# scan off Discovery stopped [CHG] Device 08:97:98:34:48:2C RSSI is nil [CHG] Device D4:CA:6E:C1:0E:E8 TxPower is nil [CHG] Device D4:CA:6E:C1:0E:E8 RSSI is nil [CHG] Controller 00:21:7E:33:1D:5C Discovering: no [bluetooth]# exit root@desk-mp1:~#
Boot via NFS[edit | edit source]
If booted via NFS with the RFS present in the supplied MVM, the wireless driver module is present but not mounted automatically, to mount the driver run the command:
root@desk-mp1:~# lsmod Module Size Used by galcore 528384 5 sch_fq_codel 20480 2 ip_tables 24576 0 x_tables 24576 1 ip_tables ipv6 507904 34 root@desk-mp1:~# rfkill ID TYPE DEVICE SOFT HARD 0 bluetooth bt_rfkill unblocked unblocked root@desk-mp1:~# insmod /lib/modules/5.15.67-desk-mp1-l-1.0.1/extra/wlan.ko root@desk-mp1:~# dmesg | tail -n 20 [ 21.280405] dwc2 49000000.usb-otg: bound driver configfs-gadget [ 36.959153] vdda: disabling [ 209.045510] wlan: loading driver v4.5.25.46 [ 209.046619] hifDeviceInserted: Dumping clocks (50000000,99000000) [ 209.261565] ol_download_firmware: chip_id:0x5020001 board_id:0x0 [ 209.263430] __ol_transfer_bin_file: Failed to get bdwlan30.b00:-2 [ 209.263465] __ol_transfer_bin_file: Trying to load default bdwlan30.bin [ 209.269239] Board extended Data download address: 0x0 [ 209.283596] __ol_transfer_bin_file: Loading setup file qsetup30.bin [ 209.285157] __ol_transfer_bin_file: Failed to get qsetup30.bin:-2 [ 209.962733] R0: wlan: [898:E :SAP] dfs_init_radar_filters[217]: Unknown dfs domain 0 [ 209.979722] Target Ready! : transmit resources : 3 size:1792, MaxMsgsPerHTCBundle = 32 [ 210.119632] target uses HTT version 3.60; host uses 3.28 [ 210.119676] *** Warning: host/target HTT versions are different, though compatible! [ 210.132808] DEBUGFS PEER MAC = 0x2:0x21:0x7e:0x71:0x8d:0x2 [ 210.200890] Host SW:4.5.25.46, FW:0.0.0.111, HW:QCA93x7_REV1_1 [ 210.227208] ENTER sme_set_btc_coex_dutycycle = 30 [ 210.227248] ENTER sme_set_btc_coex_dutycycle =30 [ 210.227758] ath_hif_sdio: HIF (Atheros/multi-bss) [ 210.227787] wlan: driver loaded in 1180000 root@desk-mp1:~# lsmod Module Size Used by wlan 5111808 0 galcore 528384 5 sch_fq_codel 20480 2 ip_tables 24576 0 x_tables 24576 1 ip_tables ipv6 507904 34 root@desk-mp1:~# rfkill ID TYPE DEVICE SOFT HARD 0 bluetooth bt_rfkill unblocked unblocked 1 wlan phy0 unblocked unblocked
Peripheral GPIOs[edit | edit source]
In ETRA SOM there is an I2C I/O Expander: in this way, ETRA can handle several pins in different ways and most of them can be configured as GPIOs. These GPIOs are available in J11 connector.
To configure and write/read the GPIOs you need to configure the I/O expander via I2C commands.
Accessing the peripheral[edit | edit source]
Usage with I2C command[edit | edit source]
Set all GPIO on output mode, all pins low:
root@desk-mp1:~# i2cset -y 1 0x34 0x30 0xff root@desk-mp1:~# i2cset -y 1 0x34 0x31 0xff root@desk-mp1:~# i2cset -y 1 0x34 0x32 0x07
Set all pin to high, one by one:
root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x01 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x02 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x04 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x08 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x10 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x20 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x40 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x80 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x01 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x02 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x04 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x08 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x10 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x20 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x40 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x80 root@desk-mp1:~# i2cset -y 1 0x34 0x2c 0x01 root@desk-mp1:~# i2cset -y 1 0x34 0x2c 0x02 root@desk-mp1:~# i2cset -y 1 0x34 0x2c 0x04
Set all pin to high and set all to low one by one:
root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xff root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xff root@desk-mp1:~# i2cset -y 1 0x34 0x2c 0x07 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xfe root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xfd root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xfb root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xf7 root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xef root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xdf root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xbf root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0x7f root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xfe root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xfd root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xfb root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xf7 root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xef root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xdf root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0xbf root@desk-mp1:~# i2cset -y 1 0x34 0x2b 0x7f root@desk-mp1:~# i2cset -y 1 0x34 0x2c 0x06 root@desk-mp1:~# i2cset -y 1 0x34 0x2c 0x05 root@desk-mp1:~# i2cset -y 1 0x34 0x2c 0x03
Set GPIO input mode, disable debounce:
root@desk-mp1:~# i2cset -y 1 0x34 0x30 0x00 root@desk-mp1:~# i2cset -y 1 0x34 0x31 0x00 root@desk-mp1:~# i2cset -y 1 0x34 0x32 0x00 root@desk-mp1:~# i2cset -y 1 0x34 0x27 0xff root@desk-mp1:~# i2cset -y 1 0x34 0x28 0xff root@desk-mp1:~# i2cset -y 1 0x34 0x29 0x07
Read input value:
root@desk-mp1:~# i2cget -y 1 0x34 0x16 root@desk-mp1:~# i2cget -y 1 0x34 0x17 root@desk-mp1:~# i2cget -y 1 0x34 0x18