RNX-iMX93-SMARC Yocto Linux: Difference between revisions
Update aplay command |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 28: | Line 28: | ||
! BOOT !! J4:1-2 !! J4:3-4 !! J4:5-6 !! J4:7-8 | ! BOOT !! J4:1-2 !! J4:3-4 !! J4:5-6 !! J4:7-8 | ||
|- | |- | ||
| Cortex-A55 Serial Downloader || close || open || open || open | | Cortex-A55 Serial Downloader || '''close''' || open || open || open | ||
|- | |- | ||
| Cortex-A55, eMMC || open || close || open || open | | Cortex-A55, eMMC || open || '''close''' || open || open | ||
|} | |} | ||
| Line 36: | Line 36: | ||
The carrier board connects the host PC using the micro-B USB connector (J3).<br> | The carrier board connects the host PC using the micro-B USB connector (J3).<br> | ||
Common serial communication programs such as Minicom, HyperTerminal, Tera Term, or PuTTY can be used.<br> | Common serial communication programs such as Minicom, HyperTerminal, Tera Term, or PuTTY can be used.<br> | ||
The {{#var:HARDWARE_NAME}} board uses the | The {{#var:HARDWARE_NAME}} board uses the first port for the Arm Cortex-A cores console. | ||
== Installing required packages == | == Installing required packages == | ||
Please make sure your host PC is running Ubuntu 20.04+ 64-bit and install the following packages: | Please make sure your host PC is running Ubuntu 20.04+ 64-bit and install the following packages: | ||
< | <syntaxhighlight lang="console" copyable> | ||
$ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib \ | $ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib \ | ||
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \ | build-essential chrpath socat cpio python3 python3-pip python3-pexpect \ | ||
xz-utils debianutils iputils-ping libsdl1.2-dev xterm python-is-python3 lz4 | xz-utils debianutils iputils-ping libsdl1.2-dev xterm python-is-python3 lz4 | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="console" copyable> | |||
$ sudo apt-get install autoconf libtool libglib2.0-dev libarchive-dev python-git-doc \ | $ sudo apt-get install autoconf libtool libglib2.0-dev libarchive-dev python-git-doc \ | ||
sed cvs subversion coreutils texi2html docbook-utils \ | sed cvs subversion coreutils texi2html docbook-utils \ | ||
| Line 51: | Line 53: | ||
mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv \ | mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv \ | ||
libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev bmap-tools | libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev bmap-tools | ||
</ | </syntaxhighlight> | ||
More details about the Yocto Environment Setup can be found | More details about the Yocto Environment Setup can be found | ||
| Line 83: | Line 85: | ||
$ bitbake imx-image-core | $ bitbake imx-image-core | ||
{{Note| | |||
If the Ubuntu Terminal is crashed without any notification, see here: [[FAQ - Frequently Asked Questions]]}} | |||
=== Build Results === | === Build Results === | ||
| Line 98: | Line 101: | ||
Download UUU version 1.5.21 or later from https://github.com/nxp-imx/mfgtools/releases | Download UUU version 1.5.21 or later from https://github.com/nxp-imx/mfgtools/releases | ||
===== Write WIC image | ===== Write the WIC image into eMMC ===== | ||
Follow the instructions below: | Follow the instructions below: | ||
* Connect a USB cable from a computer to the J9, port USB-0 (Micro-AB) port on the carrier board for download link. | * Connect a USB cable from a computer to the J9, port USB-0 (Micro-AB) port on the carrier board for download link. | ||
| Line 107: | Line 110: | ||
$ cd tmp/deploy/images/{{#var:MACHINE_NAME}} | $ cd tmp/deploy/images/{{#var:MACHINE_NAME}} | ||
$ uuu -b emmc_all imx-boot-{{#var:MACHINE_NAME}}-sd.bin-flash_singleboot imx-image-core-{{#var:MACHINE_NAME}}.wic.zst | $ uuu -b emmc_all imx-boot-{{#var:MACHINE_NAME}}-sd.bin-flash_singleboot imx-image-core-{{#var:MACHINE_NAME}}.wic.zst | ||
{{Note| | |||
If the programming freezes with last message "Failed to configure default pinctrl", then try with another USB cable or USP port on your PC.}} | |||
==== Boot Linux ==== | ==== Boot Linux ==== | ||
| Line 144: | Line 150: | ||
Connect an OV5640 camera (PCAM 5C) to J21 on the carrier board.<br> | Connect an OV5640 camera (PCAM 5C) to J21 on the carrier board.<br> | ||
List capture media devices: | List capture media devices: | ||
<syntaxhighlight lang="console" copyable> | |||
$ v4l2-ctl --list-devices | $ v4l2-ctl --list-devices | ||
FSL Capture Media Device (platform:42800000.bus:camera): | FSL Capture Media Device (platform:42800000.bus:camera): | ||
| Line 150: | Line 157: | ||
mxc-isi-cap (platform:4ae40000.isi:cap_devic): | mxc-isi-cap (platform:4ae40000.isi:cap_devic): | ||
/dev/video0 | /dev/video0 | ||
</syntaxhighlight> | |||
Take a single photo: | Take a single photo: | ||
<syntaxhighlight lang="console" copyable> | |||
$ gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=test.jpg | $ gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=test.jpg | ||
Setting pipeline to PAUSED ... | Setting pipeline to PAUSED ... | ||
| Line 169: | Line 178: | ||
[ 879.341902] dwc-mipi-csi2-host 4ae00000.csi: enter enable=0 | [ 879.341902] dwc-mipi-csi2-host 4ae00000.csi: enter enable=0 | ||
Freeing pipeline ... | Freeing pipeline ... | ||
</syntaxhighlight> | |||
== See also == | == See also == | ||
Latest revision as of 11:56, 2 July 2026

Overview
The Yocto Project is an open source collaboration project that helps developers create custom Linux-based systems for embedded products, regardless of the hardware architecture.
This article show how to build Yocto Image for RNX-iMX93-SMARC CPU module using:
| Linux Kernel | U-BOOT | |
|---|---|---|
| Yocto micledore | 6.1.55 | v2023.04 |
Setting Boot mode
| BOOT | J4:1-2 | J4:3-4 | J4:5-6 | J4:7-8 |
|---|---|---|---|---|
| Cortex-A55 Serial Downloader | close | open | open | open |
| Cortex-A55, eMMC | open | close | open | open |
Terminal Setup
The carrier board connects the host PC using the micro-B USB connector (J3).
Common serial communication programs such as Minicom, HyperTerminal, Tera Term, or PuTTY can be used.
The RNX-iMX93-SMARC board uses the first port for the Arm Cortex-A cores console.
Installing required packages
Please make sure your host PC is running Ubuntu 20.04+ 64-bit and install the following packages:
$ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping libsdl1.2-dev xterm python-is-python3 lz4
$ sudo apt-get install autoconf libtool libglib2.0-dev libarchive-dev python-git-doc \
sed cvs subversion coreutils texi2html docbook-utils \
help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev \
mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv \
libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev bmap-tools
More details about the Yocto Environment Setup can be found on the Yocto official site
Download Yocto based on Freescale Community BSP
$ git config --global user.name "Your Name" $ git config --global user.email "Your Email"
$ mkdir ~/bin $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo $ export PATH=~/bin:$PATH
$ mkdir ~/yocto-ronetix $ cd ~/yocto-ronetix
- Download the Yocto repository
$ repo init -u https://github.com/ronetix/imx-manifest -b imx-linux-mickledore -m imx-6.1.55-2.2.0.xml $ repo sync
Setup and build Yocto
- Setup first time:
$ MACHINE=rnx-imx93-smarc DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build-rnx-imx93-smarc
- or setup if already configured:
$ source setup-environment build-rnx-imx93-smarc
- Build:
$ bitbake imx-image-core
Note: If the Ubuntu Terminal is crashed without any notification, see here: FAQ - Frequently Asked Questions
Build Results
The resulted images are located in tmp/deploy/images/rnx-imx93-smarc.
Booting Linux
This section describes how to copy the images (U-Boot, Linux kernel, device tree, and rootfs) to the eMMC device on the module.
Universal update utility
The Universal Update Utility (UUU) runs on a Windows or Linux OS host and is used to download images to devices on an i.MX board.
Downloading UUU
Download UUU version 1.5.21 or later from https://github.com/nxp-imx/mfgtools/releases
Write the WIC image into eMMC
Follow the instructions below:
- Connect a USB cable from a computer to the J9, port USB-0 (Micro-AB) port on the carrier board for download link.
- Connect a USB cable from J3, port UART-DBG (Micro-AB) port to the computer for console output.
- Open a Terminal emulator program
- Set the boot mode to "Cortex-A55 Serial Downloader", see #Setting Boot mode
$ cd tmp/deploy/images/rnx-imx93-smarc $ uuu -b emmc_all imx-boot-rnx-imx93-smarc-sd.bin-flash_singleboot imx-image-core-rnx-imx93-smarc.wic.zst
Note: If the programming freezes with last message "Failed to configure default pinctrl", then try with another USB cable or USP port on your PC.
Boot Linux
- set the boot mode to "Cortex-A55, eMMC", see #Setting Boot mode
- reset the board
WiFi Setup
Scan for wireless networks:
$ ifconfig wlan0 up $ iw dev wlan0 scan | grep SSID
Connecting to an Access Point:
$ wpa_passphrase <YourAP> <YourPassword> > /etc/wpa_supplicant.conf $ wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf
wait for:
$ wlcore: Association completed.
Get an IP via DHCP:
$ udhcpc -i wlan0 $ ifconfig
Audio Test
List all sound cards:
$ aplay -L
Play a file:
$ aplay -D "sysdefault:CARD=wm8962audio" test.wav
List all sound controls:
$ amixer controls
Set Speaker Playback volume to max:
$ amixer cset numid=13 127
Camera Test
Connect an OV5640 camera (PCAM 5C) to J21 on the carrier board.
List capture media devices:
$ v4l2-ctl --list-devices
FSL Capture Media Device (platform:42800000.bus:camera):
/dev/media0
mxc-isi-cap (platform:4ae40000.isi:cap_devic):
/dev/video0
Take a single photo:
$ gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=test.jpg
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 877.427496] mxc-mipi-csi2.0: format: 0x2008
[ 877.436706] bypass csc
[ 877.439078] input fmt YUV4
[ 877.441775] output fmt YUYV
[ 877.553965] dwc-mipi-csi2-host 4ae00000.csi: enter enable=1
Redistribute latency...
Got EOS from element "pipeline0".
Execution ended after 0:00:02.375455667
Setting pipeline to NULL ...
[ 879.341902] dwc-mipi-csi2-host 4ae00000.csi: enter enable=0
Freeing pipeline ...