RNX-iMX93-OSM Yocto Linux

From Ronetix's Wiki
Revision as of 13:30, 28 December 2023 by Ilko (talk | contribs) (Add paragraph "Terminal Setup")
Jump to navigation Jump to search



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.36 v2023.04

Learn more about Yocto

Setting Boot mode

Boot mode setting on carrier board
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.36-2.1.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-waylan_rnx-imx93-osm
  • or setup if already configured:
$ source setup-environment build-waylan_rnx-imx93-osm
  • Build:
$ bitbake imx-image-core

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 WIC image info 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

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 Test.wav

List all sound controls:

 $ amixer controls

Set Speaker Playback volume to max:

 $ amixer cset numid=13 127

See also