iMX7-CM Yocto Linux: Difference between revisions
Created page with "{{#vardefine:HARDWARE_NAME|i.MX7-CM}} <!-- -->{{#vardefine:RELEASE_NAME|thud-fslc-4.9.88-mx6-v1.0}} <!-- -->{{#vardefine:YOCTO_NAME|Thud}} <!-- -->{{#vardefine:BUILD_FOLDER|..." |
Add WiFi setup and Audio Test |
||
| Line 63: | Line 63: | ||
$ umount /dev/sdX2 | $ umount /dev/sdX2 | ||
$ sudo bmaptool copy tmp/deploy/images/{{#var:MACHINE_NAME}}/fsl-image-gui-{{#var:MACHINE_NAME}}.wic.gz /dev/sdX | $ sudo bmaptool copy tmp/deploy/images/{{#var:MACHINE_NAME}}/fsl-image-gui-{{#var:MACHINE_NAME}}.wic.gz /dev/sdX | ||
= 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 = | = See also = | ||
Revision as of 16:27, 11 August 2020
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 i.MX7-CM CPU module using:
U-BOOT: v2019-10
Linux Kernel: 4.19.35
Installing required packages
Please make sure your host PC is running Ubuntu 18.04+ 64-bit and install the following packages:
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat cpio python 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 \ sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 \ 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 Thud 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 ~/ronetix-fslc-yocto $ cd ~/ronetix-fslc-yocto
- Download the latest version
$ repo init -u https://github.com/ronetix/bsp-repo $ repo sync
Setup and build Yocto
$ MACHINE=imx7-cm DISTRO=fslc-x11 . setup-environment build_x11 $ bitbake fsl-image-gui
Build Results
The resulted images are located in tmp/deploy/images/imx7-cm.
Create a bootable SD card
Replace sdX with the right device name.
$ umount /dev/sdX1 $ umount /dev/sdX2 $ sudo bmaptool copy tmp/deploy/images/imx7-cm/fsl-image-gui-imx7-cm.wic.gz /dev/sdX
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