RNX-iMX93-OSM Yocto Linux: Difference between revisions
Camera test: change image format to 640x480 |
Add note about CPU revision |
||
| Line 8: | Line 8: | ||
== Important Note == | == Important Note == | ||
<span style="color:red"> | <span style="color:red"> | ||
The | The CPU modules currently available are equipped with the NXP i.MX93 Revision A0 CPU.<br> | ||
Revision A0 has a bug, which causes unexpected reboots, the u-boot shows "Reset cause: CSU (0x200)"<br> | Revision A0 has a bug, which causes unexpected reboots, the u-boot shows "Reset cause: CSU (0x200)"<br> | ||
Unfortunately, there is no workaround. <br> | Unfortunately, there is no workaround. <br> | ||
Revision as of 16:31, 12 August 2024

Important Note
The CPU modules currently available are equipped with the NXP i.MX93 Revision A0 CPU.
Revision A0 has a bug, which causes unexpected reboots, the u-boot shows "Reset cause: CSU (0x200)"
Unfortunately, there is no workaround.
The bug will be fixed in the next Revision A1.
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-OSM CPU module using:
| Linux Kernel | U-BOOT | |
|---|---|---|
| Yocto micledore | 6.1.55 | v2023.04 |
Setting Boot mode
| BOOT | J31:1-2 | J31:3-4 | J31:5-6 | J31: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-OSM board uses the second 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-osm DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build-rnx-imx93-osm
- or setup if already configured:
$ source setup-environment build-rnx-imx93-osm
- Build:
$ bitbake imx-image-core
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-osm.
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-A (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-osm $ uuu -b emmc_all imx-boot-rnx-imx93-osm-sd.bin-flash_singleboot imx-image-core-rnx-imx93-osm.wic.zst
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 ! "video/x-raw,width=640,height=480" ! 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 ...