RNX-iMX93-OSM Yocto Linux: Difference between revisions
(Initial creation) |
(Modify to skip Section Level 1 formatting) |
||
Line 4: | Line 4: | ||
{{#vardefine:KERNEL_VER|6.1.36}} | {{#vardefine:KERNEL_VER|6.1.36}} | ||
{{#vardefine:UBOOT_VER|v2023.04}} | {{#vardefine:UBOOT_VER|v2023.04}} | ||
[[File:RNX-iMX93-OSM_top.png|thumb]] | [[File:RNX-iMX93-OSM_top.png|thumb]] | ||
= Overview = | == 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.<br> | 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.<br> | ||
This article show how to build Yocto Image for {{#var:HARDWARE_NAME}} CPU module using:<br> | This article show how to build Yocto Image for {{#var:HARDWARE_NAME}} CPU module using:<br> | ||
Line 23: | Line 22: | ||
[https://www.yoctoproject.org/docs/ Learn more about Yocto] | [https://www.yoctoproject.org/docs/ Learn more about Yocto] | ||
= Setting Boot mode = | == Setting Boot mode == | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 36: | Line 35: | ||
= 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: | ||
Line 54: | Line 53: | ||
[https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html on the Yocto official site] | [https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html on the Yocto official site] | ||
= Download Yocto based on Freescale Community BSP = | == Download Yocto based on Freescale Community BSP == | ||
$ git config --global user.name "Your Name" | $ git config --global user.name "Your Name" | ||
Line 71: | Line 70: | ||
$ repo sync | $ repo sync | ||
= Setup and build Yocto = | == Setup and build Yocto == | ||
$ MACHINE={{#var:MACHINE_NAME}} DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build-waylan_{{#var:MACHINE_NAME}} | $ MACHINE={{#var:MACHINE_NAME}} DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build-waylan_{{#var:MACHINE_NAME}} | ||
$ bitbake imx-image-core | $ bitbake imx-image-core | ||
== Build Results == | === Build Results === | ||
The resulted images are located in tmp/deploy/images/{{#var:MACHINE_NAME}}. | The resulted images are located in tmp/deploy/images/{{#var:MACHINE_NAME}}. | ||
== Booting Linux == | === Booting Linux === | ||
This section describes how to copy the images (U-Boot, Linux kernel, device tree, and | This section describes how to copy the images (U-Boot, Linux kernel, device tree, and | ||
rootfs) to the eMMC device on the module. | rootfs) to the eMMC device on the module. | ||
=== Universal update utility === | ==== 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. | 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 ==== | ===== Downloading UUU ===== | ||
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 info eMMC ==== | ===== Write WIC image info eMMC ===== | ||
Follow the instructions below: | 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 a computer to the J9, port USB-A (Micro-AB) port on the carrier board for download link. | ||
Line 98: | Line 97: | ||
$ uuu -b emmc_all imx-boot-rnx-imx93-osm-sd.bin-flash_singleboot imx-image-core-rnx-imx93-osm.wic.zst | $ uuu -b emmc_all imx-boot-rnx-imx93-osm-sd.bin-flash_singleboot imx-image-core-rnx-imx93-osm.wic.zst | ||
=== Boot Linux === | ==== Boot Linux ==== | ||
* set the boot mode to "Cortex-A55, eMMC", see [[#Setting Boot mode]] | * set the boot mode to "Cortex-A55, eMMC", see [[#Setting Boot mode]] | ||
* reset the board | * reset the board | ||
= WiFi Setup = | == WiFi Setup == | ||
Scan for wireless networks: | Scan for wireless networks: | ||
$ ifconfig wlan0 up | $ ifconfig wlan0 up | ||
Line 118: | Line 117: | ||
$ ifconfig | $ ifconfig | ||
= Audio Test = | == Audio Test == | ||
List all sound cards: | List all sound cards: | ||
$ aplay -L | $ aplay -L | ||
Line 131: | Line 130: | ||
$ amixer cset numid=13 127 | $ amixer cset numid=13 127 | ||
= See also = | == See also == | ||
* [[{{#var:HARDWARE_NAME}} Yocto Linux | Yocto Linux]] | * [[{{#var:HARDWARE_NAME}} Yocto Linux | Yocto Linux]] | ||
* [[{{#var:HARDWARE_NAME}} Linux|Building Linux Kernel]] | * [[{{#var:HARDWARE_NAME}} Linux|Building Linux Kernel]] | ||
* [[{{#var:HARDWARE_NAME}} U-Boot|Building U-Boot]] | * [[{{#var:HARDWARE_NAME}} U-Boot|Building U-Boot]] |
Revision as of 15:41, 16 November 2023
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 |
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 |
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 $ 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
$ MACHINE=rnx-imx93-osm DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build-waylan_rnx-imx93-osm $ 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
- 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 Test.wav
List all sound controls:
$ amixer controls
Set Speaker Playback volume to max:
$ amixer cset numid=13 127