Difference between revisions of "IoTGateway/BSP/Linux/iMX8/Yocto LBVA User Guide"

From ESS-WIKI
Jump to: navigation, search
(add rsb3730 hdmi)
Line 1: Line 1:
 
+
<p><span class="fck_mw_template">{{DISPLAYTITLE:Yocto Linux BSP Ver.A User Guide for iMX8 series -Yocto 3.0}}</span> <!--
{{DISPLAYTITLE:Yocto Linux BSP Ver.A User Guide for iMX8 series -Yocto 3.0}} <!--
 
 
{| align="right"
 
{| align="right"
 
  | <span class="fck_mw_magic" _fck_mw_customtag="true" _fck_mw_tagname="TOC" _fck_mw_tagtype="c">_</span>
 
  | <span class="fck_mw_magic" _fck_mw_customtag="true" _fck_mw_tagname="TOC" _fck_mw_tagtype="c">_</span>
 
  |}
 
  |}
-->
+
--></p>
  
= Getting Started =
+
<h1>Getting Started</h1>
  
 +
<h2><span style="color:#0070c0">Conventions</span></h2>
  
== <span style="color:#0070c0">Conventions</span> ==
+
<p><span style="color:purple"><b>${PREBUILT_IMAGE}</b></span>&nbsp;: compressed prebuilt image (*.img.gz)</p>
  
<span style="color:purple">'''${PREBUILT_IMAGE}'''</span>&nbsp;: compressed prebuilt image (*.img.gz)
+
<p><span style="color:purple"><b>${CONTAINER_NAME}</b></span>&nbsp;: container name (e.g. imx8LBVA0016)</p>
  
<span style="color:purple">'''${CONTAINER_NAME}'''</span>&nbsp;: container name (e.g. imx8LBVA0016)
+
<p><span style="color:purple"><b>${BSP_TARBALL}</b></span>&nbsp;: BSP tarball (*.tgz)</p>
  
<span style="color:purple">'''${BSP_TARBALL}'''</span>&nbsp;: BSP tarball (*.tgz)
+
<p><span style="color:purple"><b>${BSP_HOME}</b></span>&nbsp;: home directory of the BSP</p>
  
<span style="color:purple">'''${BSP_HOME}'''</span>&nbsp;: home directory of the BSP
+
<p><span style="color:purple"><b>${BDIR}</b></span>&nbsp;: build directory (e.g. build_x11)</p>
  
<span style="color:purple">'''${BDIR}'''</span>&nbsp;: build directory (e.g. build_x11)
+
<p><span style="color:purple"><b>${MX8PROC}</b></span>&nbsp;: i.MX8 Processor</p>
  
<span style="color:purple">'''${MX8PROC}'''</span>&nbsp;: i.MX8 Processor
+
<dl>
 +
<dd>mx8mq for iMX8M Dual Core</dd>
 +
<dd>mx8mm for iMX8MM</dd>
 +
<dd>mx8mp for iMX8MP</dd>
 +
<dd>mx8qm for iMX8QM</dd>
 +
<dd>mx8qxp for iMX8QXP</dd>
 +
<dd>&nbsp;</dd>
 +
</dl>
  
:mx8mq for iMX8M Dual Core
+
<p><span style="color:purple"><b>${IMX8PROC}</b></span>&nbsp;: i.MX8 Processor</p>
:mx8mm for iMX8MM
 
:mx8mp for iMX8MP
 
:mx8qm for iMX8QM
 
:mx8qxp for iMX8QXP
 
:&nbsp;  
 
  
<span style="color:purple">'''${IMX8PROC}'''</span>&nbsp;: i.MX8 Processor
+
<dl>
 +
<dd>imx8mq / imx8mm / imx8qm /imx8qxp /imx8mp</dd>
 +
</dl>
  
:imx8mq / imx8mm / imx8qm /imx8qxp /imx8mp
+
<p><span style="color:purple"><b>${BOARD}</b></span>&nbsp;: available target boards list below</p>
  
<span style="color:purple">'''${BOARD}'''</span>&nbsp;: available target boards list below
+
<dl>
 +
<dd>rom5720</dd>
 +
<dd>rom5721</dd>
 +
<dd>rom7720</dd>
 +
<dd>rom5620</dd>
 +
<dd>rom3620</dd>
 +
<dd>rom5722</dd>
 +
<dd>rsb3720</dd>
 +
<dd>epcr5710</dd>
 +
<dd>rsb3730</dd>
 +
</dl>
  
:rom5720
+
<p><span style="color:purple"><b>${BOARD_REV}</b></span>&nbsp;: board revision</p>
:rom5721
 
:rom7720
 
:rom5620
 
:rom3620
 
:rom5722
 
:rsb3720
 
:epcr5710
 
:rsb3730
 
  
<span style="color:purple">'''${BOARD_REV}'''</span>&nbsp;: board revision
+
<dl>
 +
<dd>a1</dd>
 +
</dl>
  
:a1
+
<p><span style="color:purple"><b>${MC}</b></span>&nbsp;: machine code combined with <span style="color:purple"><b>${IMX8PROC}${BOARD}${BOARD_REV}</b></span></p>
  
<span style="color:purple">'''${MC}'''</span>&nbsp;: machine code combined with <span style="color:purple">'''${IMX8PROC}${BOARD}${BOARD_REV}'''</span>
+
<dl>
 +
<dd>for example,</dd>
 +
</dl>
  
:for example,
+
<dl>
 +
<dd>
 +
<dl>
 +
<dd><tt>imx8mqrom5720a1 for ROM-5720 A1</tt></dd>
 +
<dd><tt>imx8qmrom7720a1 for ROM-7720 A1</tt></dd>
 +
<dd><tt>imx8qxprom5620a1 for ROM-5620 A1</tt></dd>
 +
<dd><tt>imx8qxprom3620a1 for ROM-3620 A1</tt></dd>
 +
<dd><tt>imx8mmrom5721a1 for ROM-5721 A1</tt></dd>
 +
<dd><tt>imx8mprom5722a1 for ROM-5722&nbsp;A1</tt></dd>
 +
<dd><tt>imx8mprsb3720a1 for RSB-3720 A1</tt></dd>
 +
<dd><tt>imx8mpepcr5710a1 for EPC-R5710 A1</tt></dd>
 +
<dd><tt>imx8mmrsb3730a2 for RSB-3730 A2</tt></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
:
+
<dl>
::<tt>imx8mqrom5720a1 for ROM-5720 A1</tt>  
+
<dd>You can also use the command below to check supported machines on BSP
::<tt>imx8qmrom7720a1 for ROM-7720 A1</tt>  
+
<dl>
::<tt>imx8qxprom5620a1 for ROM-5620 A1</tt>  
+
<dd><code>$ source setup-environment</code></dd>
::<tt>imx8qxprom3620a1 for ROM-3620 A1</tt>  
+
</dl>
::<tt>imx8mmrom5721a1 for ROM-5721 A1</tt>
+
</dd>
::<tt>imx8mprom5722a1 for ROM-5722&nbsp;A1</tt>  
+
</dl>
::<tt>imx8mprsb3720a1 for RSB-3720 A1</tt>  
 
::<tt>imx8mpepcr5710a1 for EPC-R5710 A1</tt>
 
::<tt>imx8mmrsb3730a2 for RSB-3730 A2</tt>
 
  
:You can also use the command below to check supported machines on BSP
+
<p><span style="color:purple"><b>${MEM_SIZE}</b></span>&nbsp;: memory size</p>
::<code>$ source setup-environment</code>  
 
  
<span style="color:purple">'''${MEM_SIZE}'''</span>&nbsp;: memory size
+
<dl>
 +
<dd>&nbsp;2G/4G</dd>
 +
</dl>
  
:&nbsp;2G/4G
+
<p><span style="color:purple"><b>${UC}</b></span>&nbsp;: u-boot config</p>
  
<span style="color:purple">'''${UC}'''</span>&nbsp;: u-boot config
+
<dl>
 +
<dd>&nbsp;1G/2G/4G/FSPI_1G/FSPI_2G...</dd>
 +
</dl>
  
:&nbsp;1G/2G/4G/FSPI_1G/FSPI_2G...
+
<p><span style="color:purple"><b>${SD_DEVICE}</b></span>&nbsp;: device name of SD card in Linux (e.g. /dev/sdf)</p>
  
<span style="color:purple">'''${SD_DEVICE}'''</span>&nbsp;: device name of SD card in Linux (e.g. /dev/sdf)
+
<p><span style="color:purple"><b>${SDCARD_IMAGE}</b></span>&nbsp;: sdcard image built by bitbake (VA0033 ~ VA0362: *.wic.bz2;&nbsp;VA0386 ~ latest version: *.sdcard)</p>
  
<span style="color:purple">'''${SDCARD_IMAGE}'''</span>&nbsp;: sdcard image built by bitbake (VA0033 ~ VA0362: *.wic.bz2;&nbsp;VA0386 ~ latest version: *.sdcard)
+
<p><span style="color:purple"><b>${WORKSPACE}</b></span>&nbsp;:&nbsp;host workspace folders</p>
  
<span style="color:purple">'''${WORKSPACE}'''</span>&nbsp;:&nbsp;host workspace folders
+
<p><span style="color:purple"><b>${UBOOT}</b></span>&nbsp;:u-boot version(e.g. 2016.03)</p>
  
<span style="color:purple">'''${UBOOT}'''</span>&nbsp;:u-boot version(e.g. 2016.03)
+
<p><span style="color:purple"><b>${KERNEL}</b></span>&nbsp;: linux kernel version(e.g. 4.14.98)</p>
  
<span style="color:purple">'''${KERNEL}'''</span>&nbsp;: linux kernel version(e.g. 4.14.98)
+
<p><span style="color:purple"><b>${TOOLCHAIN}</b></span>&nbsp;: toolchain installed directory(e.g. /opt/fsl-imx-x11/4.1.15-2.0.0)</p>
  
<span style="color:purple">'''${TOOLCHAIN}'''</span>&nbsp;: toolchain installed directory(e.g. /opt/fsl-imx-x11/4.1.15-2.0.0)
+
<p>debug console / serial console</p>
  
debug console / serial console
+
<dl>
 +
<dd>serial terminal program (e.g. minicom, putty, teraterm ...) that serial port is configured to 115200 8N1</dd>
 +
</dl>
  
:serial terminal program (e.g. minicom, putty, teraterm ...) that serial port is configured to 115200 8N1
+
<p>terminal console</p>
  
terminal console
+
<dl>
 +
<dd>terminal program (e.g. gnome-terminal, xfce4-terminal ...)</dd>
 +
</dl>
  
:terminal program (e.g. gnome-terminal, xfce4-terminal ...)
+
<h2><font color="#0070c0">Docker install and setting</font></h2>
  
== <font color="#0070c0">Docker install and setting</font> ==
+
<p><span style="font-size:larger"><b><span style="color:#0070c0">If you don&#39;t have docker in your system, then you can follow the below &nbsp;steps to install docker and run it first.</span></b></span></p>
  
<span style="font-size:larger">'''<span style="color:#0070c0">If you don't have docker in your system, then you can follow the below &nbsp;steps to install docker and run it first.</span>'''</span>
+
<h3><span style="color:#0070c0">To install Docker Engine on your platform</span></h3>
  
=== <span style="color:#0070c0">To install Docker Engine on your platform</span> ===
+
<dl>
 +
<dd>Please refer to <a alt="https://docs.docker.com/engine/installation/" href="https://docs.docker.com/engine/installation/" title="https://docs.docker.com/engine/installation/">Docker Installation Guide</a> for details</dd>
 +
</dl>
  
:Please refer to [https://docs.docker.com/engine/installation/ Docker Installation Guide] for details
+
<h3><span style="color:#0070c0">To pull <a alt="https://hub.docker.com/r/advrisc/u12.04-imx6lbv3/" href="https://hub.docker.com/r/advrisc/u12.04-imx6lbv3/" title="https://hub.docker.com/r/advrisc/u12.04-imx6lbv3/">ubuntu 18.04 image from Docker Hub</a>&nbsp;</span></h3>
  
=== <span style="color:#0070c0">To pull [https://hub.docker.com/r/advrisc/u12.04-imx6lbv3/ ubuntu 18.04 image from Docker Hub]&nbsp;</span> ===
+
<dl>
 +
<dd><code>$ docker pull advrisc/u18.04-imx8lbv1</code></dd>
 +
</dl>
  
:<code>$ docker pull advrisc/u18.04-imx8lbv1</code>  
+
<h3><span style="color:#0070c0">To create container</span></h3>
  
=== <span style="color:#0070c0">To create container</span> ===
+
<dl>
 +
<dd><code>$ docker run --privileged -it --name <b>${CONTAINER_NAME}</b>&nbsp;-v <b>${WORKSPACE}</b>:/home/adv/adv-release-bsp -v /dev:/dev -v /lib/modules:/lib/modules -v /usr/src:/usr/src&nbsp;advrisc/u18.04-imx8lbv1 /bin/bash</code></dd>
 +
</dl>
  
:<code>$ docker run --privileged -it --name '''${CONTAINER_NAME}'''&nbsp;-v '''${WORKSPACE}''':/home/adv/adv-release-bsp -v /dev:/dev -v /lib/modules:/lib/modules -v /usr/src:/usr/src&nbsp;advrisc/u18.04-imx8lbv1 /bin/bash</code>  
+
<h2><span style="color:#0070c0">Get BSP</span></h2>
  
== <span style="color:#0070c0">Get BSP</span> ==
+
<dl>
 +
<dd>You have two methods to put BSP into container created above</dd>
 +
</dl>
  
:You have two methods to put BSP into container created above
+
<p>&nbsp;</p>
  
 +
<p>&nbsp;</p>
  
 +
<h3>Download_BSP_From_GitHub</h3>
  
 +
<dl>
 +
<dd>The following example shows how to download the Advantech Yocto BSP from GitHub.</dd>
 +
</dl>
  
=== Download_BSP_From_GitHub ===
+
<dl>
 +
<dd>For this example, a directory called <b>adv-release-bsp</b> is created for the project.</dd>
 +
</dl>
  
:The following example shows how to download the Advantech Yocto BSP from GitHub.
+
<dl>
 +
<dd>Refer to&nbsp;<a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FOS%20Support%20List">IoTGateway/BSP/Linux/iMX8/OS_Support_List</a> , Official version &quot;<b>imx8LBVA0209&quot;&nbsp;</b>is taken as&nbsp;an example&nbsp;:</dd>
 +
</dl>
  
:For this example, a directory called '''adv-release-bsp''' is created for the project.
+
<pre>
 
+
$ git config --global user.name &quot;Your Name&quot;
:Refer to&nbsp;[[IoTGateway/BSP/Linux/iMX8/OS_Support_List|IoTGateway/BSP/Linux/iMX8/OS_Support_List]] , Official version "'''imx8LBVA0209"&nbsp;'''is taken as&nbsp;an example&nbsp;:
 
<pre>$ git config --global user.name "Your Name"
 
 
$ git config --global user.email you@example.com
 
$ git config --global user.email you@example.com
 
$ sudo chown adv:adv adv-release-bsp
 
$ sudo chown adv:adv adv-release-bsp
Line 133: Line 176:
 
$ repo sync</pre>
 
$ repo sync</pre>
  
:If you want to get latest bsp  
+
<dl>
 +
<dd>If you want to get latest bsp</dd>
 +
</dl>
  
$ repo init -u [git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git] <span>-b imx-linux-zeus -m </span>imx-5.4.70-2.3.0.xml  
+
<pre class="_fck_mw_lspace">
$ repo sync
+
$ repo init -u <a alt="git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git" href="git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git" title="git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git">git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git</a> <span>-b imx-linux-zeus -m </span>imx-5.4.70-2.3.0.xml  
 +
$ repo sync
 +
</pre>
  
:If you suffer "server certificate verification failed", you can use the following command to disable SSL verification in git repositories with self-signed certificates.  
+
<dl>
 +
<dd>If you suffer &quot;server certificate verification failed&quot;, you can use the following command to disable SSL verification in git repositories with self-signed certificates.</dd>
 +
</dl>
  
$ export GIT_SSL_NO_VERIFY=1
+
<pre class="_fck_mw_lspace">
 +
$ export GIT_SSL_NO_VERIFY=1
 +
</pre>
  
or
+
<p>or</p>
  
$ git config --global http.sslverify false
+
<pre class="_fck_mw_lspace">
 +
$ git config --global http.sslverify false
 +
</pre>
  
:If you get "The unauthenticated git protocol on port 9418 is no longer supported.", you can try it.  
+
<dl>
 +
<dd>If you get &quot;The unauthenticated git protocol on port 9418 is no longer supported.&quot;, you can try it.</dd>
 +
</dl>
  
$ git config --global url."https://".insteadOf git://
+
<pre class="_fck_mw_lspace">
 +
$ git config --global url.&quot;https://&quot;.insteadOf git://
 +
</pre>
  
:'''Important&nbsp;: As of March 31, 2023, all source repositories have been migrated to other platforms and the project has been shut down. ** Repo sync will be fail.'''
+
<dl>
 +
<dd><b>Important&nbsp;: As of March 31, 2023, all source repositories have been migrated to other platforms and the project has been shut down. ** Repo sync will be fail.</b></dd>
 +
</dl>
  
:Solution &nbsp;:  
+
<dl>
 +
<dd>Solution &nbsp;:</dd>
 +
</dl>
  
:(1) If you repo current xml file, repo sync is success. Example:  
+
<dl>
<pre> $ repo init -u [git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git] <span>-b imx-linux-zeus -m </span>imx-5.4.70-2.3.0.xml </pre>
+
<dd>(1) If you repo current xml file, repo sync is success. Example:</dd>
 +
</dl>
  
:(2) If you repo tag version xml file, please follow " [[Yocto3.0_Repo_Fail_SOP|Yocto3.0_Repo_Fail_SOP]] " to modify XML File.&nbsp; Example:
+
<pre>
<pre> $ repo init -u git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git -b imx-linux-zeus -m imx8LBVA0428.xml <- Tag XML</pre>
+
$ repo init -u [git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git] &lt;span&gt;-b imx-linux-zeus -m &lt;/span&gt;imx-5.4.70-2.3.0.xml </pre>
  
&nbsp;
+
<dl>
 +
<dd>(2) If you repo tag version xml file, please follow &quot; <a href="Yocto3.0%20Repo%20Fail%20SOP">Yocto3.0_Repo_Fail_SOP</a> &quot; to modify XML File.&nbsp; Example:</dd>
 +
</dl>
  
=== <span style="color:#0070c0">Copy BSP tarball to Container</span> ===
+
<pre>
 +
$ repo init -u git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git -b imx-linux-zeus -m imx8LBVA0428.xml &lt;- Tag XML</pre>
  
:If you have BSP tarball (eg. imx8LBVA0029_2019-10-23.tgz), then you have to copy it into container.
+
<p>&nbsp;</p>
  
Follow the steps below:
+
<h3><span style="color:#0070c0">Copy BSP tarball to Container</span></h3>
  
1.Exit container and back to local machine
+
<dl>
 +
<dd>If you have BSP tarball (eg. imx8LBVA0029_2019-10-23.tgz), then you have to copy it into container.</dd>
 +
</dl>
  
$ exit
+
<p>Follow the steps below:</p>
  
2.Copy BSP tarball to ${WORKSPACE} , and change owner
+
<p>1.Exit container and back to local machine</p>
  
$ cp imx8LBVA0029_2020-10-23.tgz '''${WORKSPACE}'''
+
<pre class="_fck_mw_lspace">
$ sudo chown adv:adv ${WORKSPACE}/imx8LBVA0029_2020-10-23.tgz&nbsp;
+
$ exit
 +
</pre>
  
3.Back to container
+
<p>2.Copy BSP tarball to ${WORKSPACE} , and change owner</p>
  
$ docker start '''${CONTAINER_NAME}'''
+
<pre class="_fck_mw_lspace">
$ docker attach '''${CONTAINER_NAME}'''
+
$ cp imx8LBVA0029_2020-10-23.tgz <b>${WORKSPACE}</b>
 +
$ sudo chown adv:adv ${WORKSPACE}/imx8LBVA0029_2020-10-23.tgz&nbsp;
 +
</pre>
  
4.Unpack BSP tarball
+
<p>3.Back to container</p>
  
$ tar zxvf imx8LBVA0029_2020-10-23.tgz
+
<pre class="_fck_mw_lspace">
 +
$ docker start <b>${CONTAINER_NAME}</b>
 +
$ docker attach <b>${CONTAINER_NAME}</b>
 +
</pre>
  
== <span style="color:#0070c0">Downloads tarball</span> ==
+
<p>4.Unpack BSP tarball</p>
  
:Not necessarily step
+
<pre class="_fck_mw_lspace">
 +
$ tar zxvf imx8LBVA0029_2020-10-23.tgz
 +
</pre>
  
:During building &nbsp;Yocto image , it will generate downloads folder which includes all packages we need , but it usually can't fetch normally, so we keep this downloads folder. Then we can reduce some fetch failed issue.
+
<h2><span style="color:#0070c0">Downloads tarball</span></h2>
  
:You can get Downloads tarball (downloads_imx8_5.4.24.tar.gz) or (downloads_imx8_5.4.70.tar.gz) from following URL:
+
<dl>
 +
<dd>Not necessarily step</dd>
 +
</dl>
  
:[https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.24.tar.gz [downloads_imx8_5.4.24.tar.gz]], <span style="color:#FF0000">'''md5 checksum:'''</span> <span style="color:#FF0000">'''648a6aa9d03be61ee21611b729250319'''</span>  
+
<dl>
 +
<dd>During building &nbsp;Yocto image , it will generate downloads folder which includes all packages we need , but it usually can&#39;t fetch normally, so we keep this downloads folder. Then we can reduce some fetch failed issue.</dd>
 +
</dl>
  
:[https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.70.tar.gz [downloads_imx8_5.4.70.tar.gz]], <span style="color:#FF0000">'''md5 checksum:'''</span> <span style="color:#FF0000">'''ec2a0da745e57329a73965f9bd7ff0c9'''</span>  
+
<dl>
 +
<dd>You can get Downloads tarball (downloads_imx8_5.4.24.tar.gz) or (downloads_imx8_5.4.70.tar.gz) from following URL:</dd>
 +
</dl>
  
:If you get downloads tarball, you can copy to your '''${WORKSPACE}'''
+
<dl>
 +
<dd><a alt="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&amp;preview=downloads_imx8_5.4.24.tar.gz" href="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&amp;preview=downloads_imx8_5.4.24.tar.gz" title="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&amp;preview=downloads_imx8_5.4.24.tar.gz">[downloads_imx8_5.4.24.tar.gz</a>], <span style="color:#FF0000"><b>md5 checksum:</b></span> <span style="color:#FF0000"><b>648a6aa9d03be61ee21611b729250319</b></span></dd>
 +
</dl>
  
Follow the steps below:
+
<dl>
 +
<dd><a alt="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&amp;preview=downloads_imx8_5.4.70.tar.gz" href="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&amp;preview=downloads_imx8_5.4.70.tar.gz" title="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&amp;preview=downloads_imx8_5.4.70.tar.gz">[downloads_imx8_5.4.70.tar.gz</a>], <span style="color:#FF0000"><b>md5 checksum:</b></span> <span style="color:#FF0000"><b>ec2a0da745e57329a73965f9bd7ff0c9</b></span></dd>
 +
</dl>
  
1.Exit container and back to local machine
+
<dl>
 +
<dd>If you get downloads tarball, you can copy to your <b>${WORKSPACE}</b></dd>
 +
</dl>
  
$ exit
+
<p>Follow the steps below:</p>
  
2.Copy Downloads tarball to ${WORKSPACE} , and change owner
+
<p>1.Exit container and back to local machine</p>
  
$ cp downloads_imx8_5.4.24.tar.gz '''${WORKSPACE}'''
+
<pre class="_fck_mw_lspace">
$ sudo chown adv:adv ${WORKSPACE}/downloads_imx8_5.4.24.tar.gz&nbsp;
+
$ exit
 +
</pre>
  
3.Back to container
+
<p>2.Copy Downloads tarball to ${WORKSPACE} , and change owner</p>
  
$ docker start '''${CONTAINER_NAME}'''
+
<pre class="_fck_mw_lspace">
$ docker attach '''${CONTAINER_NAME}'''
+
$ cp downloads_imx8_5.4.24.tar.gz <b>${WORKSPACE}</b>
 +
$ sudo chown adv:adv ${WORKSPACE}/downloads_imx8_5.4.24.tar.gz&nbsp;
 +
</pre>
  
4.Unpack Downloads tarball
+
<p>3.Back to container</p>
  
$ tar zxvf downloads_imx8_5.4.24.tar.gz
+
<pre class="_fck_mw_lspace">
 +
$ docker start <b>${CONTAINER_NAME}</b>
 +
$ docker attach <b>${CONTAINER_NAME}</b>
 +
</pre>
  
5.make link to downloads folder
+
<p>4.Unpack Downloads tarball</p>
  
$ cd adv-release-bsp
+
<pre class="_fck_mw_lspace">
$ ln -s ${WORKSPACE}/downloads_imx8_5.4.24 downloads
+
$ tar zxvf downloads_imx8_5.4.24.tar.gz
 +
</pre>
  
== <span style="color:#0070c0">Introducing BSP</span> ==
+
<p>5.make link to downloads folder</p>
  
:The BSP is based on Yocto Project with Freescale enhanced features for i.MX8, plus specific target board features from Advantech Inc..  
+
<pre class="_fck_mw_lspace">
:The Advantech Yocto Project BSP Release directory contains a "sources" directory, which contains the recipes used to build,
+
$ cd adv-release-bsp
 +
$ ln -s ${WORKSPACE}/downloads_imx8_5.4.24 downloads
 +
</pre>
  
one or more build directories, and a set of scripts used to set up the environment.
+
<h2><span style="color:#0070c0">Introducing BSP</span></h2>
  
:The recipes used to build the project come from both the community and Advantech. The Yocto Project layers are downloaded
+
<dl>
 +
<dd>The BSP is based on Yocto Project with Freescale enhanced features for i.MX8, plus specific target board features from Advantech Inc..</dd>
 +
<dd>The Advantech Yocto Project BSP Release directory contains a &quot;sources&quot; directory, which contains the recipes used to build,</dd>
 +
</dl>
  
to the sources directory. This sets up the recipes that are used to build the project.
+
<p>one or more build directories, and a set of scripts used to set up the environment.</p>
  
=== <span style="color:#0070c0">Naming Rule</span> ===
+
<dl>
 +
<dd>The recipes used to build the project come from both the community and Advantech. The Yocto Project layers are downloaded</dd>
 +
</dl>
  
:The tarball/prebuilt image name is consist of the model name followed by "LB" or "LI" plus version number and released date.  
+
<p>to the sources directory. This sets up the recipes that are used to build the project.</p>
  
:For example, '''BSP file name: imx8LBVA0010_2019-08-27.tgz'''
+
<h3><span style="color:#0070c0">Naming Rule</span></h3>
:which , "LB" is acronym of <span style="color:#ff0000">'''L'''</span>inux <span style="color:#ff0000">'''B'''</span>SP,
 
:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"VA0010" stands for <span style="color:#ff0000">'''V'''</span>ersion <font color="#ff0000">'''A'''</font>.<span style="color:#ff0000">'''0010'''</span> <nowiki>.</nowiki>
 
  
 +
<dl>
 +
<dd>The tarball/prebuilt image name is consist of the model name followed by &quot;LB&quot; or &quot;LI&quot; plus version number and released date.</dd>
 +
</dl>
  
&nbsp;
+
<dl>
 +
<dd>For example, <b>BSP file name: imx8LBVA0010_2019-08-27.tgz</b></dd>
 +
<dd>which , &quot;LB&quot; is acronym of <span style="color:#ff0000"><b>L</b></span>inux <span style="color:#ff0000"><b>B</b></span>SP,</dd>
 +
<dd>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;VA0010&quot; stands for <span style="color:#ff0000"><b>V</b></span>ersion <font color="#ff0000"><b>A</b></font>.<span style="color:#ff0000"><b>0010</b></span>
 +
<pre class="fck_mw_nowiki">
 +
<nowiki>.</nowiki></pre>
 +
</dd>
 +
</dl>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
&nbsp;
+
<p>&nbsp;</p>
  
:For example, '''Yocto image name: ''''''5720A1AIM20LIVA0010_iMX8M_2G_2020-08-27.img.gz'''
+
<p>&nbsp;</p>
:which "5720A1" stands for <span style="color:#ff0000">'''ROM-5720 A1'''</span>
 
:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "LI" is acronym for prebuilt <span style="color:#ff0000">'''L'''</span>inux <span style="color:#ff0000">'''I'''</span>mage
 
:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "2G" is DDR size
 
  
=== <span style="color:#0070c0">BSP Content</span> ===
+
<dl>
<div style="margin-left:0.499cm; margin-right:0cm">The description of some important folders list below:</div> <div style="margin-left:1.499cm; margin-right:0cm">'''sources/'''</div> <div style="margin-left:1.998cm; margin-right:0cm">'''meta-advantech/'''&nbsp;: meta layer by Advantech</div> <div style="margin-left:1.998cm; margin-right:0cm">'''meta-fsl-*/'''&nbsp;: meta layer by Freescale</div> <div style="margin-left:1.499cm; margin-right:0cm">'''fsl-setup-release.sh'''&nbsp;: to create one new build environment</div> <div style="margin-left:1.499cm; margin-right:0cm">'''setup-environment'''&nbsp;: to continue an exist build environment</div>  
+
<dd>For example, <b>Yocto image name: &#39;</b><i>5720A1AIM20LIVA0010_iMX8M_2G_2020-08-27.img.gz&#39;</i></dd>
== <span style="color:#0070c0">Build Instructions</span> ==
+
<dd>which &quot;5720A1&quot; stands for <span style="color:#ff0000"><b>ROM-5720 A1</b></span></dd>
 +
<dd>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;LI&quot; is acronym for prebuilt <span style="color:#ff0000"><b>L</b></span>inux <span style="color:#ff0000"><b>I</b></span>mage</dd>
 +
<dd>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;2G&quot; is DDR size</dd>
 +
</dl>
  
=== <span style="color:#0070c0">To create one new build environment</span> ===
+
<h3><span style="color:#0070c0">BSP Content</span></h3>
  
:Perform the following commands in terminal console
+
<div style="margin-left:0.499cm; margin-right:0cm">The description of some important folders list below:</div>
::<code>$ cd <span style="color:#7030a0">'''${BSP_HOME}'''</span></code>
 
::<code>$ MACHINE=<span style="color:#7030a0">'''${MC}'''</span> </code> <code>DISTRO=fsl-imx-xwayland </code><code>source imx-setup-release.sh -b <span style="color:#7030a0">'''${BDIR}'''</span></code> 
 
:We can specify u-boot default config like below  
 
::<code>$ MACHINE=<span style="color:#7030a0">'''${MC}'''</span> </code> <code>UBOOT_CONFIG=<span style="color:#7030a0">'''${UC}'''</span> </code> <code>DISTRO=fsl-imx-xwayland </code><code>source imx-setup-release.sh -b <span style="color:#7030a0">'''${BDIR}'''</span></code>
 
::<span style="color:#FF0000;">'''Example&nbsp;:&nbsp;&nbsp;MACHINE=imx8mmrsb3730a1 &nbsp;UBOOT_CONFIG=2G &nbsp;DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b 3730'''</span> 
 
:You need to read and accept the EULA.
 
:[[File:Accept EULA.png|RTENOTITLE]]
 
  
=== <span style="color:#0070c0">To continue an exist build environment</span> ===
+
<div style="margin-left:1.499cm; margin-right:0cm"><b>sources/</b></div>
  
:Perform the following commands in terminal console
+
<div style="margin-left:1.998cm; margin-right:0cm"><b>meta-advantech/</b>&nbsp;: meta layer by Advantech</div>
::<code>$ cd <span style="color:#7030a0">'''${BSP_HOME}'''</span></code>  
 
::<code>$ source setup-environment <span style="color:#7030a0">'''${BDIR}'''</span></code>  
 
  
&nbsp;
+
<div style="margin-left:1.998cm; margin-right:0cm"><b>meta-fsl-*/</b>&nbsp;: meta layer by Freescale</div>
  
=== <span style="color:#0070c0">To build sdcard image</span> ===
+
<div style="margin-left:1.499cm; margin-right:0cm"><b>fsl-setup-release.sh</b>&nbsp;: to create one new build environment</div>
  
:To create/continue a build environment
+
<div style="margin-left:1.499cm; margin-right:0cm"><b>setup-environment</b>&nbsp;: to continue an exist build environment</div>
:Perform the following command in terminal console
 
::<code>$ bitbake imx-image-full</code> 
 
:The file, imx-image-full-<span style="color:#7030a0">'''${MC}'''</span>.wic.bz2 or VA0386 ~ latest version: imx-image-full-<span style="color:#7030a0">'''${MC}'''</span>.rootfs.sdcard, will be located in directory, ./tmp/deploy/images/<span style="color:#7030a0">'''${MC}'''</span>, while building process finished successfully.
 
  
=== <span style="color:#0070c0">To build toolchain installer</span> ===
+
<h2><span style="color:#0070c0">Build Instructions</span></h2>
  
:To create/continue a build environment
+
<h3><span style="color:#0070c0">To create one new build environment</span></h3>
:Perform the following command in terminal console
 
::<code>$ bitbake meta-toolchain</code> 
 
:The below installer will be located in the directory "./tmp/deploy/sdk".
 
::<tt>fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-<span style="color:#7030a0">'''${KERNEL}'''</span>-zeus.sh</tt>  
 
  
=== <span style="color:#0070c0">To build bootloader</span> ===
+
<dl>
 +
<dd>Perform the following commands in terminal console
 +
<dl>
 +
<dd><code>$ cd <span style="color:#7030a0"><b>${BSP_HOME}</b></span></code></dd>
 +
<dd><code>$ MACHINE=<span style="color:#7030a0"><b>${MC}</b></span> </code> <code>DISTRO=fsl-imx-xwayland </code><code>source imx-setup-release.sh -b <span style="color:#7030a0"><b>${BDIR}</b></span></code></dd>
 +
</dl>
 +
</dd>
 +
<dd>We can specify u-boot default config like below
 +
<dl>
 +
<dd><code>$ MACHINE=<span style="color:#7030a0"><b>${MC}</b></span> </code> <code>UBOOT_CONFIG=<span style="color:#7030a0"><b>${UC}</b></span> </code> <code>DISTRO=fsl-imx-xwayland </code><code>source imx-setup-release.sh -b <span style="color:#7030a0"><b>${BDIR}</b></span></code></dd>
 +
<dd><span style="color:#FF0000;"><b>Example&nbsp;:&nbsp;&nbsp;MACHINE=imx8mmrsb3730a1 &nbsp;UBOOT_CONFIG=2G &nbsp;DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b 3730</b></span></dd>
 +
</dl>
 +
</dd>
 +
<dd>You need to read and accept the EULA.</dd>
 +
<dd><img _fck_mw_filename="Accept EULA.png" _fck_mw_origimgheight="29" _fck_mw_origimgwidth="444" alt="RTENOTITLE" src="/wiki/images/1/1d/Accept_EULA.png" style="vertical-align:middle;" title="RTENOTITLE" /></dd>
 +
</dl>
  
:To create/continue a build environment  
+
<h3><span style="color:#0070c0">To continue an exist build environment</span></h3>
:Perform the following command in terminal console
 
::<code>$ bitbake imx-boot</code>  
 
  
&nbsp;
+
<dl>
 +
<dd>Perform the following commands in terminal console
 +
<dl>
 +
<dd><code>$ cd <span style="color:#7030a0"><b>${BSP_HOME}</b></span></code></dd>
 +
<dd><code>$ source setup-environment <span style="color:#7030a0"><b>${BDIR}</b></span></code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
=== <span style="color:#0070c0">To build linux kernel</span> ===
+
<p>&nbsp;</p>
  
:To create/continue a build environment
+
<h3><span style="color:#0070c0">To build sdcard image</span></h3>
:If you operate on docker images, please install tmux application before running this command
 
::
 
:::<code>$ sudo apt-get install tmux</code>   
 
:Type following command to enter tmux
 
::
 
:::<code>$ tmux</code>   
 
:Perform the following command in terminal console to show up menuconfig
 
::
 
:::<code>$ bitbake linux-imx -c menuconfig</code>   
 
:After edit menuconfig, type following command to exit tmux windows
 
::
 
:::<code>$ exit</code>   
 
:to build kernel image
 
::
 
:::<code>$ bitbake linux-imx</code>   
 
:The two files, Image & Image-<span style="color:#7030a0">'''${IMX8PROC}'''</span>-<span style="color:#7030a0">'''${BOARD}'''</span>-<span style="color:#7030a0">'''${BOARD'''</span>'''<span style="color:#7030a0">_REV</span><span style="color:#7030a0">}</span>'''.dtb, will be located in the directory, ./tmp/deploy/images/<span style="color:#7030a0">'''${MC}'''</span>.
 
  
== <span style="color:#0070c0">Creating boot-up on-board flash from prebuilt image</span> ==
+
<dl>
 +
<dd>To create/continue a build environment</dd>
 +
<dd>Perform the following command in terminal console
 +
<dl>
 +
<dd><code>$ bitbake imx-image-full</code></dd>
 +
</dl>
 +
</dd>
 +
<dd>The file, imx-image-full-<span style="color:#7030a0"><b>${MC}</b></span>.wic.bz2 or VA0386 ~ latest version: imx-image-full-<span style="color:#7030a0"><b>${MC}</b></span>.rootfs.sdcard, will be located in directory, ./tmp/deploy/images/<span style="color:#7030a0"><b>${MC}</b></span>, while building process finished successfully.</dd>
 +
</dl>
  
=== <span style="color:#0070c0">To create one boot-up SD card</span> ===
+
<h3><span style="color:#0070c0">To build toolchain installer</span></h3>
  
:Perform the following command in terminal console  
+
<dl>
::<code># gunzip -c '''<span style="color:#7030a0">${PREBUILT_IMAGE</span>'''} | dd of=<span style="color:#7030a0">'''${SD_DEVICE}'''</span> bs=1M</code>  
+
<dd>To create/continue a build environment</dd>
::<code># sync</code>  
+
<dd>Perform the following command in terminal console
 +
<dl>
 +
<dd><code>$ bitbake meta-toolchain</code></dd>
 +
</dl>
 +
</dd>
 +
<dd>The below installer will be located in the directory &quot;./tmp/deploy/sdk&quot;.
 +
<dl>
 +
<dd><tt>fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-<span style="color:#7030a0"><b>${KERNEL}</b></span>-zeus.sh</tt></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
== <span style="color:#0070c0">Creating boot-up on-board flash from built sdcard image</span> ==
+
<h3><span style="color:#0070c0">To build bootloader</span></h3>
  
 +
<dl>
 +
<dd>To create/continue a build environment</dd>
 +
<dd>Perform the following command in terminal console
 +
<dl>
 +
<dd><code>$ bitbake imx-boot</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
=== <span style="color:#0070c0">To create one boot-up SD card</span> ===
+
<p>&nbsp;</p>
  
:Perform the following commands in terminal console
+
<h3><span style="color:#0070c0">To build linux kernel</span></h3>
::<code>$ pushd <span style="color:#7030a0">'''${BSP_HOME}'''</span>/<span style="color:#7030a0">'''${BDIR}'''</span>/tmp/deploy/images/<span style="color:#7030a0">'''${MC}'''</span></code>
 
::<code>$ sudo bzcat <span style="color:#7030a0">'''${SDCARD_IMAGE}'''</span> | sudo dd of=<span style="color:#7030a0">'''${SD_DEVICE}'''</span> bs=1M&nbsp;</code> (VA0033 ~ VA0362)
 
::<code>$ sudo cat <span style="color:#7030a0">'''${SDCARD_IMAGE}'''</span> | sudo dd of=<span style="color:#7030a0">'''${SD_DEVICE}'''</span> bs=1M&nbsp;</code> (VA0386 ~ latest version)
 
::<code>$ sync</code>
 
::<code>$ popd</code>
 
::<code>Note&nbsp;: ues the .sccard file.</code>
 
  
== <span style="color:#0070c0">Debug console information</span> ==
+
<dl>
 +
<dd>To create/continue a build environment</dd>
 +
<dd>If you operate on docker images, please install tmux application before running this command
 +
<dl>
 +
<dd>
 +
<dl>
 +
<dd><code>$ sudo apt-get install tmux</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
 +
</dd>
 +
<dd>Type following command to enter tmux
 +
<dl>
 +
<dd>
 +
<dl>
 +
<dd><code>$ tmux</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
 +
</dd>
 +
<dd>Perform the following command in terminal console to show up menuconfig
 +
<dl>
 +
<dd>
 +
<dl>
 +
<dd><code>$ bitbake linux-imx -c menuconfig</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
 +
</dd>
 +
<dd>After edit menuconfig, type following command to exit tmux windows
 +
<dl>
 +
<dd>
 +
<dl>
 +
<dd><code>$ exit</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
 +
</dd>
 +
<dd>to build kernel image
 +
<dl>
 +
<dd>
 +
<dl>
 +
<dd><code>$ bitbake linux-imx</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
 +
</dd>
 +
<dd>The two files, Image &amp; Image-<span style="color:#7030a0"><b>${IMX8PROC}</b></span>-<span style="color:#7030a0"><b>${BOARD}</b></span>-<span style="color:#7030a0"><b>${BOARD</b></span><b><span style="color:#7030a0">_REV</span><span style="color:#7030a0">}</span></b>.dtb, will be located in the directory, ./tmp/deploy/images/<span style="color:#7030a0"><b>${MC}</b></span>.</dd>
 +
</dl>
  
If you want to see debug message from device, you need to prepare for hardware device and software tool.
+
<h2><span style="color:#0070c0">Creating boot-up on-board flash from prebuilt image</span></h2>
  
=== <span style="color:#0070c0">Preparing for hardware device</span> ===
+
<h3><span style="color:#0070c0">To create one boot-up SD card</span></h3>
  
*The following URL provides information about the debug port slot and the debug port line for each device
+
<dl>
 +
<dd>Perform the following command in terminal console
 +
<dl>
 +
<dd><code># gunzip -c <b><span style="color:#7030a0">${PREBUILT_IMAGE</span></b>} | dd of=<span style="color:#7030a0"><b>${SD_DEVICE}</b></span> bs=1M</code></dd>
 +
<dd><code># sync</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
[[Debug_Port_Information#i.MX6|Debug Port Information]]
+
<h2><span style="color:#0070c0">Creating boot-up on-board flash from built sdcard image</span></h2>
  
=== <span style="color:#0070c0">Preparing for software tool</span> ===
+
<h3><span style="color:#0070c0">To create one boot-up SD card</span></h3>
  
*You need to prepare the debug console tool. For example: "minicom" tool or "putty" tool.  
+
<dl>
*Baud rate: 115200
+
<dd>Perform the following commands in terminal console
 +
<dl>
 +
<dd><code>$ pushd <span style="color:#7030a0"><b>${BSP_HOME}</b></span>/<span style="color:#7030a0"><b>${BDIR}</b></span>/tmp/deploy/images/<span style="color:#7030a0"><b>${MC}</b></span></code></dd>
 +
<dd><code>$ sudo bzcat <span style="color:#7030a0"><b>${SDCARD_IMAGE}</b></span> | sudo dd of=<span style="color:#7030a0"><b>${SD_DEVICE}</b></span> bs=1M&nbsp;</code> (VA0033 ~ VA0362)</dd>
 +
<dd><code>$ sudo cat <span style="color:#7030a0"><b>${SDCARD_IMAGE}</b></span> | sudo dd of=<span style="color:#7030a0"><b>${SD_DEVICE}</b></span> bs=1M&nbsp;</code> (VA0386 ~ latest version)</dd>
 +
<dd><code>$ sync</code></dd>
 +
<dd><code>$ popd</code></dd>
 +
<dd><code>Note&nbsp;: ues the .sccard file.</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
== <span style="color:#0070c0">One step build image</span> ==
+
<h2><span style="color:#0070c0">Debug console information</span></h2>
  
Our machine must be pre-installed docker
+
<p>If you want to see debug message from device, you need to prepare for hardware device and software tool.</p>
  
Download the following script can quickly build our image.
+
<h3><span style="color:#0070c0">Preparing for hardware device</span></h3>
  
$ wget [https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh]
+
<ul>
$ sudo chmod a+x adv_imx8_build.sh
+
<li>The following URL provides information about the debug port slot and the debug port line for each device</li>
 +
</ul>
  
Build image
+
<p><a href="Debug%20Port%20Information%23i.MX6">Debug Port Information</a></p>
  
$ sudo ./adv_imx8_build.sh ${BOARD}
+
<h3><span style="color:#0070c0">Preparing for software tool</span></h3>
$ sudo ./adv_imx8_build.sh rom5720
 
  
Our image will be in workspace folder.
+
<ul>
 +
<li>You need to prepare the debug console tool. For example: &quot;minicom&quot; tool or &quot;putty&quot; tool.</li>
 +
<li>Baud rate: 115200</li>
 +
</ul>
  
workspace/${BDIR}/tmp/deploy/images/${MC}
+
<h2><span style="color:#0070c0">One step build image</span></h2>
  
Then refer to [http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image Creating_boot-up_on-board_flash_from_built_sdcard_image] to build SD card.
+
<p>Our machine must be pre-installed docker</p>
  
= Customization =
+
<p>Download the following script can quickly build our image.</p>
  
== <span style="color:#0070c0">Package addition</span> ==
+
<pre class="_fck_mw_lspace">
 +
$ wget <a alt="https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh" href="https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh" title="https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh">https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh</a>
 +
$ sudo chmod a+x adv_imx8_build.sh
 +
</pre>
  
=== <span style="color:#0070c0">To add tcf-agent & openssh-sftp-server</span> ===
+
<p>Build image</p>
  
:Navigate to the directory where fsl-image-adv.inc located
+
<pre class="_fck_mw_lspace">
::<code>$ cd <span style="color:#7030a0">'''${BSP_HOME}'''</span>/sources/meta-advantech/meta-fsl-imx/recipes-fsl/images</code> 
+
$ sudo ./adv_imx8_build.sh ${BOARD}
:Add following line to fsl-image-adv.inc
+
$ sudo ./adv_imx8_build.sh rom5720
::<code>IMAGE_INSTALL += " tcf-agent openssh-sftp-server "</code>  
+
</pre>
:[[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#To_continue_an_exist_build_environment|Continue an exist build environment]] and [[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#To_build_sdcard_image|build sdcard image]]
 
  
=== <span style="color:#0070c0">To add chromium browser</span> ===
+
<p>Our image will be in workspace folder.</p>
  
:Navigate to the directory where local.conf located
+
<pre class="_fck_mw_lspace">
::<code>$ cd <span style="color:#7030a0">'''${BSP_HOME}'''</span>/<span style="color:#7030a0">'''${BDIR'''</span>'''<span style="color:#7030a0">}</span>'''/conf</code>  
+
workspace/${BDIR}/tmp/deploy/images/${MC}
 +
</pre>
  
*Method 1(Suggest): Add following one line&nbsp;to local.conf
+
<p>Then refer to <a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image">Creating_boot-up_on-board_flash_from_built_sdcard_image</a> to build SD card.</p>
  
CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland"
+
<h1>Customization</h1>
  
*Method 2: Add following two lines to local.conf
+
<h2><span style="color:#0070c0">Package addition</span></h2>
  
IMAGE_INSTALL_append = \
+
<h3><span style="color:#0070c0">To add tcf-agent &amp; openssh-sftp-server</span></h3>
    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' chromium-ozone-wayland libexif', \
 
        bb.utils.contains('DISTRO_FEATURES',    'x11', ' chromium-x11 libexif', \
 
                                                        '', d), d)}"''
 
LICENSE_FLAGS_WHITELIST = \
 
    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'commercial', \
 
        bb.utils.contains('DISTRO_FEATURES',    'x11', 'commercial', \
 
                                                        '', d),"''
 
  
:[[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#To_continue_an_exist_build_environment|Continue an exist build environment]] and [[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#To_build_sdcard_image|build sdcard image]]
+
<dl>
 +
<dd>Navigate to the directory where fsl-image-adv.inc located
 +
<dl>
 +
<dd><code>$ cd <span style="color:#7030a0"><b>${BSP_HOME}</b></span>/sources/meta-advantech/meta-fsl-imx/recipes-fsl/images</code></dd>
 +
</dl>
 +
</dd>
 +
<dd>Add following line to fsl-image-adv.inc
 +
<dl>
 +
<dd><code>IMAGE_INSTALL += &quot; tcf-agent openssh-sftp-server &quot;</code></dd>
 +
</dl>
 +
</dd>
 +
<dd><a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20continue%20an%20exist%20build%20environment">Continue an exist build environment</a> and <a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20sdcard%20image">build sdcard image</a></dd>
 +
</dl>
  
&nbsp;
+
<h3><span style="color:#0070c0">To add chromium browser</span></h3>
  
=== <span style="color:#0070c0">To add QtWebEngine</span> ===
+
<dl>
 +
<dd>Navigate to the directory where local.conf located
 +
<dl>
 +
<dd><code>$ cd <span style="color:#7030a0"><b>${BSP_HOME}</b></span>/<span style="color:#7030a0"><b>${BDIR</b></span><b><span style="color:#7030a0">}</span></b>/conf</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
:Put the following in <span style="color:#7030a0">'''${BSP_HOME}'''</span>/<span style="color:#7030a0">'''${BDIR'''</span>'''<span style="color:#7030a0">}</span>'''/conf/local.conf
+
<ul>
 +
<li>Method 1(Suggest): Add following one line&nbsp;to local.conf</li>
 +
</ul>
  
:
+
<pre class="_fck_mw_lspace">
::<code>IMAGE_INSTALL_append += "packagegroup-qt5-webengine"</code>  
+
CORE_IMAGE_EXTRA_INSTALL += &quot;chromium-ozone-wayland&quot;
 +
</pre>
  
:[[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#To_continue_an_exist_build_environment|Continue an exist build environment]] and [[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#To_build_sdcard_image|build sdcard image]]
+
<ul>
 +
<li>Method 2: Add following two lines to local.conf</li>
 +
</ul>
  
== <span style="color:#0070c0">Setting up SDK</span> ==
+
<pre class="_fck_mw_lspace">
 +
IMAGE_INSTALL_append = \
 +
  &quot;${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;wayland&#39;, &#39; chromium-ozone-wayland libexif&#39;, \
 +
      bb.utils.contains(&#39;DISTRO_FEATURES&#39;,    &#39;x11&#39;, &#39; chromium-x11 libexif&#39;, \
 +
                                                        <i>, d), d)}&quot;</i>
 +
LICENSE_FLAGS_WHITELIST = \
 +
  &quot;${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;wayland&#39;, &#39;commercial&#39;, \
 +
      bb.utils.contains(&#39;DISTRO_FEATURES&#39;,    &#39;x11&#39;, &#39;commercial&#39;, \
 +
                                                      <i>, d),&quot;</i>
 +
</pre>
  
:Please follow the section,[[IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#To_build_toolchain_installer|<span style="color:#FF0000">To build toolchain installer</span>]], to build one toolchain installer
+
<dl>
:Perform the following command in terminal console
+
<dd><a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20continue%20an%20exist%20build%20environment">Continue an exist build environment</a> and <a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20sdcard%20image">build sdcard image</a></dd>
::<code>$ cd <span style="color:#7030a0">'''${BSP_HOME}'''</span>/<span style="color:#7030a0">'''${BDIR}'''</span>/tmp/deploy/sdk</code>
+
</dl>
::<code>$ sudo ./fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-5.4-zeus.sh</code> 
 
:Enter new installed directory or just press <code>Enter</code> to use default directory.
 
:While <code>Proceed[y/n]?</code> shows up, please enter the correct one.
 
:Waiting for the SDK installed (while the following messages show up completely)
 
::[[File:Setting up sdk 3.png|RTENOTITLE]] 
 
  
== <span style="color:#0070c0">Setting up cross compiling environment</span> ==
+
<p>&nbsp;</p>
  
:SDK has been set up (ref.[[#Setting_up_SDK|<span style="color:#FF0000">Setting up SDK</span>]])
+
<h3><span style="color:#0070c0">To add QtWebEngine</span></h3>
:Perform the following command in terminal console
 
::<code>$ source <span style="color:#7030a0">'''${TOOLCHAIN}'''</span>/environment-setup-aarch64-poky-linux</code>  
 
  
== <span style="color:#0070c0">Build U-Boot in standalone environment</span> ==
+
<dl>
 +
<dd>Put the following in <span style="color:#7030a0"><b>${BSP_HOME}</b></span>/<span style="color:#7030a0"><b>${BDIR</b></span><b><span style="color:#7030a0">}</span></b>/conf/local.conf</dd>
 +
</dl>
  
==== <span style="color:#0070c0">Config u-boot</span> ====
+
<dl>
 +
<dd>
 +
<dl>
 +
<dd><code>IMAGE_INSTALL_append += &quot;packagegroup-qt5-webengine&quot;</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
make ${IMX8PROC}_${BOARD}${BOARD_REV}_${MEM_SIZE}_defconfig
+
<dl>
 +
<dd><a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20continue%20an%20exist%20build%20environment">Continue an exist build environment</a> and <a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20sdcard%20image">build sdcard image</a></dd>
 +
</dl>
  
eg.
+
<h2><span style="color:#0070c0">Setting up SDK</span></h2>
  
make imx8mm_rom5721a1_2G_defconfig
+
<dl>
 +
<dd>Please follow the section,<a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20toolchain%20installer"><span style="color:#FF0000">To build toolchain installer</span></a>, to build one toolchain installer</dd>
 +
<dd>Perform the following command in terminal console
 +
<dl>
 +
<dd><code>$ cd <span style="color:#7030a0"><b>${BSP_HOME}</b></span>/<span style="color:#7030a0"><b>${BDIR}</b></span>/tmp/deploy/sdk</code></dd>
 +
<dd><code>$ sudo ./fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-5.4-zeus.sh</code></dd>
 +
</dl>
 +
</dd>
 +
<dd>Enter new installed directory or just press <code>Enter</code> to use default directory.</dd>
 +
<dd>While <code>Proceed[y/n]?</code> shows up, please enter the correct one.</dd>
 +
<dd>Waiting for the SDK installed (while the following messages show up completely)
 +
<dl>
 +
<dd><img _fck_mw_filename="Setting up sdk 3.png" _fck_mw_origimgheight="65" _fck_mw_origimgwidth="572" alt="RTENOTITLE" src="/wiki/images/1/17/Setting_up_sdk_3.png" style="vertical-align:middle;" title="RTENOTITLE" /></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
==== <span style="color:#0070c0">Build u-boot</span> ====
+
<h2><span style="color:#0070c0">Setting up cross compiling environment</span></h2>
  
make -j4
+
<dl>
 +
<dd>SDK has been set up (ref.<a href="#Setting_up_SDK"><span style="color:#FF0000">Setting up SDK</span></a>)</dd>
 +
<dd>Perform the following command in terminal console
 +
<dl>
 +
<dd><code>$ source <span style="color:#7030a0"><b>${TOOLCHAIN}</b></span>/environment-setup-aarch64-poky-linux</code></dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
== <span style="color:#0070c0">Build imx-boot image by using imx-mkimage</span> ==
+
<h2><span style="color:#0070c0">Build U-Boot in standalone environment</span></h2>
  
Get imx-boot tarball from our server Here we take rom5721 as an example:
+
<h4><span style="color:#0070c0">Config u-boot</span></h4>
  
tar zxvf 5721A1AIM20LIVA0118_iMX8MM_imx-boot.tgz
+
<pre class="_fck_mw_lspace">
cd 5721A1AIM20LIVA0118_iMX8MM_imx-boot/  
+
make ${IMX8PROC}_${BOARD}${BOARD_REV}_${MEM_SIZE}_defconfig
 +
</pre>
  
In this folder , we have two script as below: Copy necessary files to imx-mkimage folder
+
<p>eg.</p>
  
./cp_uboot.sh ${uboot path} ${IMX8PROC}
+
<pre class="_fck_mw_lspace">
 +
make imx8mm_rom5721a1_2G_defconfig
 +
</pre>
  
Make imx-boot image
+
<h4><span style="color:#0070c0">Build u-boot</span></h4>
  
./mk_imx-boot.sh ${IMX8PROC}
+
<pre class="_fck_mw_lspace">
 +
make -j4
 +
</pre>
  
eg.
+
<h2><span style="color:#0070c0">Build imx-boot image by using imx-mkimage</span></h2>
  
./cp_uboot.sh ../uboot-imx6 '''imx8m'''
+
<p><span style="font-size:xx-large;"><span style="background-color:#f1c40f;">Get imx-boot tarball from our server Here we take rom5721 as an example:</span></span></p>
./mk_imx-boot.sh '''imx8mm'''
 
  
==== <span style="color:#0070c0">Replace imx-boot</span> ====
+
<pre class="_fck_mw_lspace">
 +
tar zxvf 5721A1AIM20LIVA0118_iMX8MM_imx-boot.tgz
 +
cd 5721A1AIM20LIVA0118_iMX8MM_imx-boot/
 +
</pre>
  
:Perform the following command to transfer to on-board flash
+
<p>In this folder , we have two script as below: Copy necessary files to imx-mkimage folder</p>
  
$ dd if=flash.bin of=/dev/mmcblk0 bs=1K seek=<offset> conv=fsync
+
<pre class="_fck_mw_lspace">
 +
./cp_uboot.sh ${uboot path} ${IMX8PROC}
 +
</pre>
  
:Where offset is:
+
<p>Make imx-boot image</p>
::33 - for i.MAX 8QuadMax A0, i.Mx 8QuadXPlus A0, i.MX 8M Quad, and i.MX 8M Mini
 
::32 - for iMX 8M PLUS, i.MAX 8QuadXPlus B0/C0 and i.Mx 8QuadMax B0
 
::&nbsp;
 
  
== <span style="color:#0070c0">Building & updating kernel/modules/dtb manually</span> ==
+
<pre class="_fck_mw_lspace">
 +
./mk_imx-boot.sh ${IMX8PROC}
 +
</pre>
  
:The cross compiling environment has been set up. (ref. [[#Setting_up_cross_compiling_environment|Setting up cross compiling environment]])
+
<p>eg.</p>
  
=== <span style="color:#0070c0">Copy BSP tarball to Container</span> ===
+
<pre class="_fck_mw_lspace">
 +
./cp_uboot.sh ../uboot-imx6 <b>imx8m</b>
 +
./mk_imx-boot.sh <b>imx8mm</b>
 +
</pre>
  
Refer to [http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#Copy_BSP_tarball_to_Container Copy_BSP_tarball_to_Container] , <span style="color:#FF0000">copy kernel tarball </span>to ${WORKSPACE} and back to container
+
<h4><span style="color:#0070c0">Replace imx-boot</span></h4>
  
change owner & unpack tarball
+
<dl>
 +
<dd>Perform the following command to transfer to on-board flash</dd>
 +
</dl>
  
$ sudo chown adv:adv imx8LBVA0029_2019-10-23_linux-imx.tgz
+
<pre class="_fck_mw_lspace">
$ tar zxvf imx8LBVA0029_2019-10-23_linux-imx.tgz
+
$ dd if=flash.bin of=/dev/mmcblk0 bs=1K seek=&lt;offset&gt; conv=fsync
 +
</pre>
  
=== <span style="color:#0070c0">Config kernel</span> ===
+
<dl>
 +
<dd>Where offset is:
 +
<dl>
 +
<dd>33 - for i.MAX 8QuadMax A0, i.Mx 8QuadXPlus A0, i.MX 8M Quad, and i.MX 8M Mini</dd>
 +
<dd>32 - for iMX 8M PLUS, i.MAX 8QuadXPlus B0/C0 and i.Mx 8QuadMax B0</dd>
 +
<dd>&nbsp;</dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
:Configure linux kernel  
+
<h2><span style="color:#0070c0">Building &amp; updating kernel/modules/dtb manually</span></h2>
  
$ cd linux-imx
+
<dl>
$ make distclean
+
<dd>The cross compiling environment has been set up. (ref. <a href="#Setting_up_cross_compiling_environment">Setting up cross compiling environment</a>)</dd>
$ make imx_v8_adv_defconfig
+
</dl>
$ make menuconfig
 
  
:Start building linux kernel
+
<h3><span style="color:#0070c0">Copy BSP tarball to Container</span></h3>
  
$ make -j4 Image
+
<p>Refer to <a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#Copy_BSP_tarball_to_Container" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#Copy_BSP_tarball_to_Container" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#Copy_BSP_tarball_to_Container">Copy_BSP_tarball_to_Container</a> , <span style="color:#FF0000">copy kernel tarball </span>to ${WORKSPACE} and back to container</p>
  
:When you get error like below
+
<p>change owner &amp; unpack tarball</p>
  
[[File:Imx8 error.jpg|RTENOTITLE]]
+
<pre class="_fck_mw_lspace">
 +
$ sudo chown adv:adv imx8LBVA0029_2019-10-23_linux-imx.tgz
 +
$ tar zxvf imx8LBVA0029_2019-10-23_linux-imx.tgz
 +
</pre>
  
:run command then rebuild
+
<h3><span style="color:#0070c0">Config kernel</span></h3>
  
$ unset LDFLAGS
+
<dl>
 +
<dd>Configure linux kernel</dd>
 +
</dl>
  
&nbsp;
+
<pre class="_fck_mw_lspace">
 +
$ cd linux-imx
 +
$ make distclean
 +
$ make imx_v8_adv_defconfig
 +
$ make menuconfig
 +
</pre>
  
:The kernel image file, Image, is located in the directory "./arch/arm64/boot/".
+
<dl>
 +
<dd>Start building linux kernel</dd>
 +
</dl>
  
:Start building kernel modules
+
<pre class="_fck_mw_lspace">
 +
$ make -j4 Image
 +
</pre>
  
$ make -j4 modules
+
<dl>
 +
<dd>When you get error like below</dd>
 +
</dl>
  
:Copy all modules to a temporary rootfs directory, "~/temp/rootfs"
+
<p><img _fck_mw_filename="Imx8 error.jpg" _fck_mw_origimgheight="226" _fck_mw_origimgwidth="819" alt="RTENOTITLE" src="/wiki/images/8/85/Imx8_error.jpg" style="vertical-align:middle;" title="RTENOTITLE" /></p>
  
$ make modules_install INSTALL_MOD_PATH=~/temp/rootfs
+
<dl>
 +
<dd>run command then rebuild</dd>
 +
</dl>
  
:Building device tree blob
+
<pre class="_fck_mw_lspace">
 +
$ unset LDFLAGS
 +
</pre>
  
$ make -j4 freescale/<span style="color:#7030a0">'''${IMX8PROC}'''</span>-<span style="color:#7030a0">'''${BOARD}'''</span>-<span style="color:#7030a0">'''${BOARD_REV}'''</span>.dtb
+
<p>&nbsp;</p>
eg.
 
$ make -j4 freescale/imx8mq-rom5720-a1.dtb
 
  
:The device tree blob, <span style="color:#7030a0">'''${IMX8PROC}'''</span>-<span style="color:#7030a0">'''${BOARD}'''</span>-<span style="color:#7030a0">'''${BOARD_REV}'''</span>.dtb, is located in the directory "./arch/arm64/boot/dts/freescale/".
+
<dl>
 +
<dd>The kernel image file, Image, is located in the directory &quot;./arch/arm64/boot/&quot;.</dd>
 +
</dl>
  
=== <span style="color:#0070c0">Replace kernel & dts</span> ===
+
<dl>
 +
<dd>Start building kernel modules</dd>
 +
</dl>
  
:Replace kernel
+
<pre class="_fck_mw_lspace">
::copy Image to SDcard or emmc 
+
$ make -j4 modules
:Replace dtb file
+
</pre>
::copy dtb file to SDcard or emmc 
 
  
== <span style="color:#0070c0">Improve boot speed</span> ==
+
<dl>
 +
<dd>Copy all modules to a temporary rootfs directory, &quot;~/temp/rootfs&quot;</dd>
 +
</dl>
  
*Bootloader
+
<pre class="_fck_mw_lspace">
 +
$ make modules_install INSTALL_MOD_PATH=~/temp/rootfs
 +
</pre>
  
1.bootdelay time
+
<dl>
 +
<dd>Building device tree blob</dd>
 +
</dl>
  
:We can cancel the bootdelay time by setting bootloader environment value.  
+
<pre class="_fck_mw_lspace">
 +
$ make -j4 freescale/<span style="color:#7030a0"><b>${IMX8PROC}</b></span>-<span style="color:#7030a0"><b>${BOARD}</b></span>-<span style="color:#7030a0"><b>${BOARD_REV}</b></span>.dtb
 +
eg.
 +
$ make -j4 freescale/imx8mq-rom5720-a1.dtb
 +
</pre>
  
setenv bootdelay 0
+
<dl>
env save
+
<dd>The device tree blob, <span style="color:#7030a0"><b>${IMX8PROC}</b></span>-<span style="color:#7030a0"><b>${BOARD}</b></span>-<span style="color:#7030a0"><b>${BOARD_REV}</b></span>.dtb, is located in the directory &quot;./arch/arm64/boot/dts/freescale/&quot;.</dd>
reset
+
</dl>
  
2.Disable console
+
<h3><span style="color:#0070c0">Replace kernel &amp; dts</span></h3>
  
:Disable debug message output can also improve boot speed
+
<dl>
 +
<dd>Replace kernel
 +
<dl>
 +
<dd>copy Image to SDcard or emmc</dd>
 +
</dl>
 +
</dd>
 +
<dd>Replace dtb file
 +
<dl>
 +
<dd>copy dtb file to SDcard or emmc</dd>
 +
</dl>
 +
</dd>
 +
</dl>
  
Disable kernel message
+
<h2><span style="color:#0070c0">Improve boot speed</span></h2>
  
setenv mmcargs setenv bootargs ${jh_clk} console=${console} modprobe.blacklist=${modprobe.blacklist} root=${mmcroot} video=HDMI-A-1:${videores} '''quiet'''
+
<ul>
env save
+
<li>Bootloader</li>
reset
+
</ul>
  
Or
+
<p>1.bootdelay time</p>
  
:Disable debug port
+
<dl>
 +
<dd>We can cancel the bootdelay time by setting bootloader environment value.</dd>
 +
</dl>
  
(1) Yocto machine setting:
+
<pre class="_fck_mw_lspace">
 +
setenv bootdelay 0
 +
env save
 +
reset
 +
</pre>
  
modify /sources/meta-advantech/meta-fsl-imx/conf/machine$/${MC}.conf
+
<p>2.Disable console</p>
  
SERIAL_CONSOLES = ";"
+
<dl>
 +
<dd>Disable debug message output can also improve boot speed</dd>
 +
</dl>
  
(2) Uboot parameter&nbsp;setting:
+
<p>Disable kernel message</p>
  
*For the imx8mq, imx8mm,&nbsp;imx8mp:  
+
<pre class="_fck_mw_lspace">
 +
setenv mmcargs setenv bootargs ${jh_clk} console=${console} modprobe.blacklist=${modprobe.blacklist} root=${mmcroot} video=HDMI-A-1:${videores} <b>quiet</b>
 +
env save
 +
reset
 +
</pre>
  
setenv console disabled
+
<p>Or</p>
env save
 
reset
 
  
*For the imx8qm, imx8qxp:
+
<dl>
 +
<dd>Disable debug port</dd>
 +
</dl>
  
setenv console disabled
+
<p>(1) Yocto machine setting:</p>
setenv earlycon disabled
 
setenv mmcargs setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} root=${mmcroot}
 
env save
 
reset
 
  
*Rootfs
+
<p>modify /sources/meta-advantech/meta-fsl-imx/conf/machine$/${MC}.conf</p>
  
:TBD
+
<pre class="_fck_mw_lspace">
 +
SERIAL_CONSOLES = &quot;;&quot;
 +
</pre>
  
*Services
+
<p>(2) Uboot parameter&nbsp;setting:</p>
  
1. Using '''systemctl disable ''' remove ,we can remove unnecessary services.
+
<ul>
 +
<li>For the imx8mq, imx8mm,&nbsp;imx8mp:</li>
 +
</ul>
  
systemctl disable <services>
+
<pre class="_fck_mw_lspace">
 +
setenv console disabled
 +
env save
 +
reset
 +
</pre>
  
eg.
+
<ul>
 +
<li>For the imx8qm, imx8qxp:</li>
 +
</ul>
  
systemctl disable boottimes
+
<pre class="_fck_mw_lspace">
 +
setenv console disabled
 +
setenv earlycon disabled
 +
setenv mmcargs setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} root=${mmcroot}
 +
env save
 +
reset
 +
</pre>
  
= System Recovery =
+
<ul>
 +
<li>Rootfs</li>
 +
</ul>
  
This section provides detail procedures of restoring the eMMC image.
+
<dl>
 +
<dd>TBD</dd>
 +
</dl>
  
If you destroy the onboard flash image by accident, you can recover a system following these steps.
+
<ul>
 +
<li>Services</li>
 +
</ul>
  
*Recovery by SD card
+
<p>1. Using <b>systemctl disable </b> remove ,we can remove unnecessary services.</p>
  
1.Copy 5720A1AIM20LIVA0022_iMX8M_flash_tool.tgz package to your desktop.
+
<pre class="_fck_mw_lspace">
 +
systemctl disable &lt;services&gt;
 +
</pre>
  
2.Insert SD card to PC
+
<p>eg.</p>
  
3.Make a bootable sd card
+
<pre class="_fck_mw_lspace">
 +
systemctl disable boottimes
 +
</pre>
  
# tar zxvf 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool.tgz
+
<h1>System Recovery</h1>
# cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
 
# sudo ./mksd-linux.sh /dev/sdg
 
  
4.Insert SD card and copy 5720A1AIM20LIVA0022_iMX8M_flash_tool to USB disk
+
<p>This section provides detail procedures of restoring the eMMC image.</p>
  
5.Insert USB disk and SD card then Boot from SD
+
<p>If you destroy the onboard flash image by accident, you can recover a system following these steps.</p>
  
6.Enter usb disk folder, make a bootable emmc
+
<ul>
 +
<li>Recovery by SD card</li>
 +
</ul>
  
# cd /run/media/sda1/
+
<p>1.Copy 5720A1AIM20LIVA0022_iMX8M_flash_tool.tgz package to your desktop.</p>
# cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
 
# sudo ./mksd-linux.sh /dev/mmcblk0
 
  
&nbsp;
+
<p>2.Insert SD card to PC</p>
  
*Recovery by UUU tool
+
<p>3.Make a bootable sd card</p>
  
1.Download uuu tool from ([https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429 https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429])
+
<pre class="_fck_mw_lspace">
 +
# tar zxvf 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool.tgz
 +
# cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
 +
# sudo ./mksd-linux.sh /dev/sdg
 +
</pre>
  
2.burn command
+
<p>4.Insert SD card and copy 5720A1AIM20LIVA0022_iMX8M_flash_tool to USB disk</p>
  
*For Linux
+
<p>5.Insert USB disk and SD card then Boot from SD</p>
  
  sudo ./uuu
+
<p>6.Enter usb disk folder, make a bootable emmc</p>
  
*For Windows
+
<pre class="_fck_mw_lspace">
 +
# cd /run/media/sda1/
 +
# cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
 +
# sudo ./mksd-linux.sh /dev/mmcblk0
 +
</pre>
  
  uuu.exe
+
<p>&nbsp;</p>
  
2.Create a folder with files as below:
+
<ul>
 +
<li>Recovery by UUU tool</li>
 +
</ul>
  
1.uuu
+
<p>1.Download uuu tool from (<a alt="https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429" href="https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429" title="https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429">https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429</a>)</p>
2.imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
 
3.fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
 
4.Image_dtb.uuu
 
5.rootfs.uuu
 
  
3.Connect otg cable from PC to device
+
<p>2.burn command</p>
  
4.Set the correct boot mode(ROM-5722/ROM5720/ROM5721/ROM5620: 1,2,3-off 4-on, ROM7720: 1,2,3,4,5,6-off or 1,2,4,5,6-off 3-on), then power on
+
<ul>
 +
<li>For Linux</li>
 +
</ul>
  
5.Perform the following command:
+
<pre class="_fck_mw_lspace">
 +
sudo ./uuu
 +
</pre>
  
'''PS.If you want to burn uboot to mmcblk0 instead of mmcblk0boot0, u-boot must be updated to version 20191101,'''
+
<ul>
 +
<li>For Windows</li>
 +
</ul>
  
1.Burn uboot to emmc
+
<pre class="_fck_mw_lspace">
    a)replace uboot in mmcblk0boot0
+
  uuu.exe
        sudo ./uuu -b '''emmc''' imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
+
</pre>
    b)replace uboot in mmcblk0
 
        sudo ./uuu -b '''emmc_adv''' imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
 
  2.Burn rootfs image to emmc
 
    a)replace uboot in mmcblk0boot0
 
        sudo ./uuu -b '''emmc_all''' imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
 
    b)replace uboot in mmcblk0
 
        sudo ./uuu -b '''emmc_all_adv''' imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
 
  
6.uuu tool will start recovery image to emmc.
+
<p>2.Create a folder with files as below:</p>
  
7.If we want to burn separately into emmc
+
<pre class="_fck_mw_lspace">
 +
1.uuu
 +
2.imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
 +
3.fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
 +
4.Image_dtb.uuu
 +
5.rootfs.uuu
 +
</pre>
  
    a)replace Image and dtb
+
<p>3.Connect otg cable from PC to device</p>
        Step 1: rename Image and dtb
 
                  _Image
 
                  _board.dtb
 
        Step 2:
 
                  sudo ./uuu Image_dtb.uuu
 
    b)replace rootfs
 
        Step 1: rename rootfs tarball
 
                  _rootfs.tar.bz2
 
        Step 2:
 
                  sudo ./uuu rootfs.uuu
 
  
8.For more usage ([https://github.com/NXPmicro/mfgtools/wiki https://github.com/NXPmicro/mfgtools/wiki])
+
<p>4.Set the correct boot mode(ROM-5722/ROM5720/ROM5721/ROM5620: 1,2,3-off 4-on, ROM7720: 1,2,3,4,5,6-off or 1,2,4,5,6-off 3-on), then power on</p>
  
&nbsp;
+
<p>5.Perform the following command:</p>
  
= Package List =
+
<p><b>PS.If you want to burn uboot to mmcblk0 instead of mmcblk0boot0, u-boot must be updated to version 20191101,</b></p>
  
'''In BSP''', list all packages which will be built in the image
+
<pre class="_fck_mw_lspace">
 +
1.Burn uboot to emmc
 +
  a)replace uboot in mmcblk0boot0
 +
      sudo ./uuu -b <b>emmc</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
 +
  b)replace uboot in mmcblk0
 +
      sudo ./uuu -b <b>emmc_adv</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
 +
2.Burn rootfs image to emmc
 +
  a)replace uboot in mmcblk0boot0
 +
      sudo ./uuu -b <b>emmc_all</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
 +
  b)replace uboot in mmcblk0
 +
      sudo ./uuu -b <b>emmc_all_adv</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
 +
</pre>
  
bitbake -g imx-image-full && cat task-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq
+
<p>6.uuu tool will start recovery image to emmc.</p>
  
:[[:File:20191025.txt|20191025 Package List]]
+
<p>7.If we want to burn separately into emmc</p>
  
Show all recipes (include non-installed packages)
+
<pre class="_fck_mw_lspace">
 +
  a)replace Image and dtb
 +
      Step 1: rename Image and dtb
 +
                _Image
 +
                _board.dtb
 +
      Step 2:
 +
                sudo ./uuu Image_dtb.uuu
 +
  b)replace rootfs
 +
      Step 1: rename rootfs tarball
 +
                _rootfs.tar.bz2
 +
      Step 2:
 +
                sudo ./uuu rootfs.uuu
 +
</pre>
  
bitbake -s
+
<p>8.For more usage (<a alt="https://github.com/NXPmicro/mfgtools/wiki" href="https://github.com/NXPmicro/mfgtools/wiki" title="https://github.com/NXPmicro/mfgtools/wiki">https://github.com/NXPmicro/mfgtools/wiki</a>)</p>
  
:[[:File:package_version_20191025.txt|20191025 Package Version List]]
+
<p>&nbsp;</p>
  
You can also check <span style="color:purple">'''${BDIR}'''</span>/tmp/deploy/images/<span style="color:purple">'''${MC}'''</span>/fsl-image-qt5-validation-imx-<span style="color:purple">'''${MC}'''</span>.manifest
+
<h1>Package List</h1>
  
It will show the same content with checking by rpm tool on target board.
+
<p><b>In BSP</b>, list all packages which will be built in the image</p>
  
'''On target board''', list all packages by rpm tool
+
<pre class="_fck_mw_lspace">
 +
bitbake -g imx-image-full &amp;&amp; cat task-depends.dot | grep -v -e &#39;-native&#39; | grep -v digraph | grep -v -e &#39;-image&#39; | awk &#39;{print $1}&#39; | sort | uniq
 +
</pre>
  
rpm -qa --root / --dbpath /var/lib/rpm | sort
+
<dl>
 +
<dd><a href=":File%3A20191025.txt">20191025 Package List</a></dd>
 +
</dl>
  
:[[:File:rpm_board_20191025.txt|20191025 RPM on Board List]]
+
<p>Show all recipes (include non-installed packages)</p>
  
= Device Tree Source file select =
+
<pre class="_fck_mw_lspace">
 +
bitbake -s
 +
</pre>
  
We can setup different dts file on bootloader to enable different devices.
+
<dl>
 +
<dd><a href=":File%3Apackage%20version%2020191025.txt">20191025 Package Version List</a></dd>
 +
</dl>
  
eg.
+
<p>You can also check <span style="color:purple"><b>${BDIR}</b></span>/tmp/deploy/images/<span style="color:purple"><b>${MC}</b></span>/fsl-image-qt5-validation-imx-<span style="color:purple"><b>${MC}</b></span>.manifest</p>
  
setenv fdt_file '''adv-imx8mm-rom5721-a1-dsi2dp'''.dtb
+
<p>It will show the same content with checking by rpm tool on target board.</p>
env save
 
boot
 
  
== ROM-5721 ==
+
<p><b>On target board</b>, list all packages by rpm tool</p>
  
*Display
+
<pre class="_fck_mw_lspace">
**DSI to LVDS
+
rpm -qa --root / --dbpath /var/lib/rpm | sort
***g070vw01
+
</pre>
****imx8mm-rom5721-a1.dtb 
 
***g150xgel05
 
****imx8mm-rom5721-a1-dsi2lvds-g150xgel05.dtb 
 
***g215hvn01
 
****imx8mm-rom5721-a1-dsi2lvds-g215hvn01.dtb   
 
**DSI to DP
 
***imx8mm-rom5721-a1-dsi2dp.dtb 
 
**DSI to HDMI
 
***imx8mm-rom5721-a1-adv7535.dtb 
 
**DSI
 
***auog101uan02
 
****imx8mm-rom5721-a1-auog101uan02.dtb     
 
*M.2 SDIO
 
**Adjust CN43~CN48
 
**imx8mm-rom5721-a1-m2-sdio.dtb 
 
  
== ROM-5720 ==
+
<dl>
 +
<dd><a href=":File%3Arpm%20board%2020191025.txt">20191025 RPM on Board List</a></dd>
 +
</dl>
  
*Display
+
<h1>Device Tree Source file select</h1>
**DSI to HDMI
 
***imx8mq-rom5720-a1-dcss-adv7535.dtb
 
***imx8mq-rom5720-a1-lcdif-adv7535.dtb
 
***For weston ui
 
****modify <!--StartFragment --><span lang="zh-tw"><font face="New MingLiu">/etc/xdg/weston/weston.ini</font></span>
 
*****<span lang="zh-tw"><font face="New MingLiu">drm-device='''card2'''</font> </span><!--EndFragment -->     
 
**DSI
 
***auog101uan02
 
****imx8mq-rom5720-a1-dcss-auog101uan02.dtb 
 
***For weston ui
 
****modify <!--StartFragment --><span lang="zh-tw"><font face="New MingLiu">/etc/xdg/weston/weston.ini</font></span>
 
*****<span lang="zh-tw"><font face="New MingLiu">drm-device='''card2'''</font> </span><!--EndFragment -->     
 
**Dual Display
 
***DSI to HDMI + HDMI
 
****imx8mq-rom5720-a1-dual-display.dtb
 
****For weston ui
 
*****modify <!--StartFragment --><span lang="zh-tw"><font face="New MingLiu">/etc/xdg/weston/weston.ini</font></span>
 
******<span lang="zh-tw"><font face="New MingLiu">drm-device='''card1'''</font></span>          
 
*M.2 SDIO
 
**Adjust CN43~CN48
 
**imx8mq-rom5720-a1-m2-sdio.dtb 
 
  
== ROM-5620 ==
+
<p>We can setup different dts file on bootloader to enable different devices.</p>
  
*Display
+
<p>eg.</p>
**LVDS
 
***g070vw01
 
****imx8mxp-rom5620-a1.dtb 
 
***g150xgel05
 
****imx8qxp-rom5620-a1-lvds-chimei.dtb 
 
***g215hvn01
 
****imx8qxp-rom5620-a1-lvds-dual.dtb   
 
**LVDS to HDMI
 
***imx8qxp-rom5620-a1-hdmi-bridge.dtb 
 
**DSI to HDMI
 
***imx8qxp-rom5620-a1-hdmi-bridge.dtb 
 
**DSI
 
***auog101uan02
 
****imx8qxp-rom5620-a1-auog101uan02.dtb     
 
*M.2 SDIO
 
**Adjust CN43~CN48
 
**imx8qxp-rom5620-a1-m2-sdio.dtb 
 
  
== ROM-7720 ==
+
<pre class="_fck_mw_lspace">
 +
setenv fdt_file <b>adv-imx8mm-rom5721-a1-dsi2dp</b>.dtb
 +
env save
 +
boot
 +
</pre>
  
*Display
+
<h2>ROM-5721</h2>
**HDMI
 
***imx8qm-rom7720-a1.dtb 
 
**LVDS
 
***g070vw01
 
****imx8qm-rom7720-a1-lvds0.dtb
 
****imx8qm-rom7720-a1-lvds1.dtb 
 
***g215hvn01
 
****imx8qm-rom7720-a1-lvds-dual.dtb   
 
**HDMI + LVDS
 
***HDMI + g070vw01
 
****imx8qm-rom7720-a1-hdmi-lvds0.dtb
 
****imx8qm-rom7720-a1-hdmi-lvds1.dtb 
 
***HDMI + g215hvn01
 
****imx8qm-rom7720-a1-hdmi-lvds-dual.dtb   
 
**LVDS to HDMI
 
***imx8qm-rom7720-a1-it6263.dtb<span style="display: none">&nbsp;</span>    
 
*Audio Codec
 
**imx8qm-rom7720-a1-sgtl5000.dtb 
 
  
== RSB-3720 ==
+
<ul>
 +
<li>Display
 +
<ul>
 +
<li>DSI to LVDS
 +
<ul>
 +
<li>g070vw01
 +
<ul>
 +
<li>imx8mm-rom5721-a1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g150xgel05
 +
<ul>
 +
<li>imx8mm-rom5721-a1-dsi2lvds-g150xgel05.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g215hvn01
 +
<ul>
 +
<li>imx8mm-rom5721-a1-dsi2lvds-g215hvn01.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>DSI to DP
 +
<ul>
 +
<li>imx8mm-rom5721-a1-dsi2dp.dtb</li>
 +
</ul>
 +
</li>
 +
<li>DSI to HDMI
 +
<ul>
 +
<li>imx8mm-rom5721-a1-adv7535.dtb</li>
 +
</ul>
 +
</li>
 +
<li>DSI
 +
<ul>
 +
<li>auog101uan02
 +
<ul>
 +
<li>imx8mm-rom5721-a1-auog101uan02.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>M.2 SDIO
 +
<ul>
 +
<li>Adjust CN43~CN48</li>
 +
<li>imx8mm-rom5721-a1-m2-sdio.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
  
*Display
+
<h2>ROM-5720</h2>
**HDMI (default)
 
***imx8mp-rsb3720-a1.dtb 
 
**LVDS
 
***g070vw01(LVDS0) + HDMI
 
****imx8mp-rsb3720-a1-lvds0-auo.dtb 
 
***g070vw01(LVDS1) + HDMI
 
****imx8mp-rsb3720-a1-lvds1-auo.dtb 
 
***g215hvn01(DUAL LVDS) + HDMI
 
****imx8mp-rsb3720-a1-lvds-dual.dtb   
 
**DSI
 
***adv7535(DSI to HDMI)&nbsp;+ HDMI
 
****imx8mp-rsb3720-a1-adv7535.dtb 
 
***auog101uan02(DSI) +&nbsp;HDMI
 
****imx8mp-rsb3720-a1-auog101uan02.dtb     
 
*Camera
 
**OV5640 (default)
 
***imx8mp-rsb3720-a1.dtb 
 
**Basler camrea
 
***imx8mp-rsb3720-a1-basler.dtb   
 
  
== ROM-5722 ==
+
<ul>
 +
<li>Display
 +
<ul>
 +
<li>DSI to HDMI
 +
<ul>
 +
<li>imx8mq-rom5720-a1-dcss-adv7535.dtb</li>
 +
<li>imx8mq-rom5720-a1-lcdif-adv7535.dtb</li>
 +
<li>For weston ui
 +
<ul>
 +
<li>modify <!--StartFragment --><span lang="zh-tw"><font face="New MingLiu">/etc/xdg/weston/weston.ini</font></span>
 +
<ul>
 +
<li><span lang="zh-tw"><font face="New MingLiu">drm-device=<b>card2</b></font> </span><!--EndFragment --></li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>DSI
 +
<ul>
 +
<li>auog101uan02
 +
<ul>
 +
<li>imx8mq-rom5720-a1-dcss-auog101uan02.dtb</li>
 +
</ul>
 +
</li>
 +
<li>For weston ui
 +
<ul>
 +
<li>modify <!--StartFragment --><span lang="zh-tw"><font face="New MingLiu">/etc/xdg/weston/weston.ini</font></span>
 +
<ul>
 +
<li><span lang="zh-tw"><font face="New MingLiu">drm-device=<b>card2</b></font> </span><!--EndFragment --></li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>Dual Display
 +
<ul>
 +
<li>DSI to HDMI + HDMI
 +
<ul>
 +
<li>imx8mq-rom5720-a1-dual-display.dtb</li>
 +
<li>For weston ui
 +
<ul>
 +
<li>modify <!--StartFragment --><span lang="zh-tw"><font face="New MingLiu">/etc/xdg/weston/weston.ini</font></span>
 +
<ul>
 +
<li><span lang="zh-tw"><font face="New MingLiu">drm-device=<b>card1</b></font></span></li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>M.2 SDIO
 +
<ul>
 +
<li>Adjust CN43~CN48</li>
 +
<li>imx8mq-rom5720-a1-m2-sdio.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
  
*Display
+
<h2>ROM-5620</h2>
**HDMI (default)
 
***imx8mp-rom5722-a1.dtb 
 
**LVDS
 
***g070vw01(LVDS0) + HDMI
 
****imx8mp-rom5722-a1-lvds0-auo.dtb 
 
***g070vw01(LVDS1) + HDMI
 
****imx8mp-rom5722-a1-lvds1-auo.dtb 
 
***g215hvn01(DUAL LVDS) + HDMI
 
****imx8mp-rom5722-a1-lvds-dual.dtb   
 
**DSI
 
***adv7535(DSI to HDMI)&nbsp;+ HDMI
 
****imx8mp-rom5722-a1-adv7535.dtb 
 
***auog101uan02(DSI) +&nbsp;HDMI
 
****imx8mp-rom5722-a1-auog101uan02.dtb     
 
*Camera
 
**OV5640 (default)
 
***imx8mp-rom5722-a1.dtb 
 
**Basler camrea
 
***imx8mp-rom5722-a1-basler.dtb   
 
  
== ROM-3620 ==
+
<ul>
 +
<li>Display
 +
<ul>
 +
<li>LVDS
 +
<ul>
 +
<li>g070vw01
 +
<ul>
 +
<li>imx8mxp-rom5620-a1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g150xgel05
 +
<ul>
 +
<li>imx8qxp-rom5620-a1-lvds-chimei.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g215hvn01
 +
<ul>
 +
<li>imx8qxp-rom5620-a1-lvds-dual.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>LVDS to HDMI
 +
<ul>
 +
<li>imx8qxp-rom5620-a1-hdmi-bridge.dtb</li>
 +
</ul>
 +
</li>
 +
<li>DSI to HDMI
 +
<ul>
 +
<li>imx8qxp-rom5620-a1-hdmi-bridge.dtb</li>
 +
</ul>
 +
</li>
 +
<li>DSI
 +
<ul>
 +
<li>auog101uan02
 +
<ul>
 +
<li>imx8qxp-rom5620-a1-auog101uan02.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>M.2 SDIO
 +
<ul>
 +
<li>Adjust CN43~CN48</li>
 +
<li>imx8qxp-rom5620-a1-m2-sdio.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
  
*Display  
+
<h2>ROM-7720</h2>
**LVDS  
+
 
***g070vw01  
+
<ul>
****imx8mxp-rom3620-a1.dtb  
+
<li>Display
***g150xgel05  
+
<ul>
****imx8qxp-rom3620-a1-lvds-chimei.dtb  
+
<li>HDMI
***g215hvn01  
+
<ul>
****imx8qxp-rom3620-a1-lvds-dual.dtb    
+
<li>imx8qm-rom7720-a1.dtb</li>
**DSI to HDMI  
+
</ul>
***imx8qxp-rom3620-a1-hdmi-bridge.dtb  
+
</li>
**DSI  
+
<li>LVDS
***auog101uan02  
+
<ul>
****imx8qxp-rom3620-a1-auog101uan02.dtb
+
<li>g070vw01
 +
<ul>
 +
<li>imx8qm-rom7720-a1-lvds0.dtb</li>
 +
<li>imx8qm-rom7720-a1-lvds1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g215hvn01
 +
<ul>
 +
<li>imx8qm-rom7720-a1-lvds-dual.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>HDMI + LVDS
 +
<ul>
 +
<li>HDMI + g070vw01
 +
<ul>
 +
<li>imx8qm-rom7720-a1-hdmi-lvds0.dtb</li>
 +
<li>imx8qm-rom7720-a1-hdmi-lvds1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>HDMI + g215hvn01
 +
<ul>
 +
<li>imx8qm-rom7720-a1-hdmi-lvds-dual.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>LVDS to HDMI
 +
<ul>
 +
<li>imx8qm-rom7720-a1-it6263.dtb<span style="display: none">&nbsp;</span></li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>Audio Codec
 +
<ul>
 +
<li>imx8qm-rom7720-a1-sgtl5000.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
 
 +
<h2>RSB-3720</h2>
 +
 
 +
<ul>
 +
<li>Display
 +
<ul>
 +
<li>HDMI (default)
 +
<ul>
 +
<li>imx8mp-rsb3720-a1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>LVDS
 +
<ul>
 +
<li>g070vw01(LVDS0) + HDMI
 +
<ul>
 +
<li>imx8mp-rsb3720-a1-lvds0-auo.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g070vw01(LVDS1) + HDMI
 +
<ul>
 +
<li>imx8mp-rsb3720-a1-lvds1-auo.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g215hvn01(DUAL LVDS) + HDMI
 +
<ul>
 +
<li>imx8mp-rsb3720-a1-lvds-dual.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>DSI
 +
<ul>
 +
<li>adv7535(DSI to HDMI)&nbsp;+ HDMI
 +
<ul>
 +
<li>imx8mp-rsb3720-a1-adv7535.dtb</li>
 +
</ul>
 +
</li>
 +
<li>auog101uan02(DSI) +&nbsp;HDMI
 +
<ul>
 +
<li>imx8mp-rsb3720-a1-auog101uan02.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>Camera
 +
<ul>
 +
<li>OV5640 (default)
 +
<ul>
 +
<li>imx8mp-rsb3720-a1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>Basler camrea
 +
<ul>
 +
<li>imx8mp-rsb3720-a1-basler.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
 
 +
<h2>ROM-5722</h2>
 +
 
 +
<ul>
 +
<li>Display
 +
<ul>
 +
<li>HDMI (default)
 +
<ul>
 +
<li>imx8mp-rom5722-a1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>LVDS
 +
<ul>
 +
<li>g070vw01(LVDS0) + HDMI
 +
<ul>
 +
<li>imx8mp-rom5722-a1-lvds0-auo.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g070vw01(LVDS1) + HDMI
 +
<ul>
 +
<li>imx8mp-rom5722-a1-lvds1-auo.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g215hvn01(DUAL LVDS) + HDMI
 +
<ul>
 +
<li>imx8mp-rom5722-a1-lvds-dual.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>DSI
 +
<ul>
 +
<li>adv7535(DSI to HDMI)&nbsp;+ HDMI
 +
<ul>
 +
<li>imx8mp-rom5722-a1-adv7535.dtb</li>
 +
</ul>
 +
</li>
 +
<li>auog101uan02(DSI) +&nbsp;HDMI
 +
<ul>
 +
<li>imx8mp-rom5722-a1-auog101uan02.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>Camera
 +
<ul>
 +
<li>OV5640 (default)
 +
<ul>
 +
<li>imx8mp-rom5722-a1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>Basler camrea
 +
<ul>
 +
<li>imx8mp-rom5722-a1-basler.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
 
 +
<h2>ROM-3620</h2>
 +
 
 +
<ul>
 +
<li>Display
 +
<ul>
 +
<li>LVDS
 +
<ul>
 +
<li>g070vw01
 +
<ul>
 +
<li>imx8mxp-rom3620-a1.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g150xgel05
 +
<ul>
 +
<li>imx8qxp-rom3620-a1-lvds-chimei.dtb</li>
 +
</ul>
 +
</li>
 +
<li>g215hvn01
 +
<ul>
 +
<li>imx8qxp-rom3620-a1-lvds-dual.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>DSI to HDMI
 +
<ul>
 +
<li>imx8qxp-rom3620-a1-hdmi-bridge.dtb</li>
 +
</ul>
 +
</li>
 +
<li>DSI
 +
<ul>
 +
<li>auog101uan02
 +
<ul>
 +
<li>imx8qxp-rom3620-a1-auog101uan02.dtb</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
 +
</li>
 +
</ul>
  
 
<h2>RSB-3730</h2>
 
<h2>RSB-3730</h2>
Line 971: Line 1,595:
 
</ul>
 
</ul>
  
= Burn-in Test =
+
<h1>Burn-in Test</h1>
  
= About bottom board setting =
+
<h1>About bottom board setting</h1>
  
== The disable pin of PCIE ==
+
<h2>The disable pin of PCIE</h2>
  
You should config disable pin follow your bottom board.
+
<p>You should config disable pin follow your bottom board.</p>
 +
 
 +
<pre class="fck_mw_syntaxhighlight">
 
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
&pcie0{
+
&amp;pcie0{
         pinctrl-names = "default";
+
         pinctrl-names = &quot;default&quot;;
         pinctrl-0 = <&pinctrl_pcie0>;
+
         pinctrl-0 = &lt;&amp;pinctrl_pcie0&gt;;
         //disable-gpio = <&tca9538 0 GPIO_ACTIVE_LOW>; <---
+
         //disable-gpio = &lt;&amp;tca9538 0 GPIO_ACTIVE_LOW&gt;; &lt;---
         reset-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
+
         reset-gpio = &lt;&amp;gpio1 13 GPIO_ACTIVE_LOW&gt;;
         ext_osc = <1>;
+
         ext_osc = &lt;1&gt;;
         status = "okay";
+
         status = &quot;okay&quot;;
 
};
 
};
</syntaxhighlight>
+
</syntaxhighlight></pre>
  
== Fix no sound issue probability when the HDMI plug in/out ==
+
<h2>Fix no sound issue probability when the HDMI plug in/out</h2>
  
You can use the following patch to fix this issue:
+
<p>You can use the following patch to fix this issue:</p>
  
[http://ess-wiki.advantech.com.tw/wiki/images/5/59/0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch [0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch]]
+
<p><a alt="http://ess-wiki.advantech.com.tw/wiki/images/5/59/0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch" href="http://ess-wiki.advantech.com.tw/wiki/images/5/59/0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch" title="http://ess-wiki.advantech.com.tw/wiki/images/5/59/0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch">[0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch</a>]</p>
  
&nbsp;
+
<p>&nbsp;</p>
 +
 
 +
<pre class="fck_mw_syntaxhighlight">
 
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
 
From 9ca13642ff1367cb32c15f82d2c077f2f7c0e8f1 Mon Sep 17 00:00:00 2001
 
From 9ca13642ff1367cb32c15f82d2c077f2f7c0e8f1 Mon Sep 17 00:00:00 2001
From: Sandor Yu <Sandor.yu@nxp.com>
+
From: Sandor Yu &lt;Sandor.yu@nxp.com&gt;
 
Date: Mon, 25 Oct 2021 16:13:37 +0800
 
Date: Mon, 25 Oct 2021 16:13:37 +0800
 
Subject: [PATCH] imx865: hdmi: enable overflow workaround for imx865 hdmi
 
Subject: [PATCH] imx865: hdmi: enable overflow workaround for imx865 hdmi
  
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
+
Signed-off-by: Sandor Yu &lt;Sandor.yu@nxp.com&gt;
 
---
 
---
 
  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 +
 
  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 +
Line 1,021: Line 1,649:
 
--  
 
--  
 
2.17.1
 
2.17.1
</syntaxhighlight>
+
</syntaxhighlight></pre>
  
= How to get the MAC, Serial Number, and Manufacture Date in the QSPI flash=
+
<h1>How to get the MAC, Serial Number, and Manufacture Date in the QSPI flash</h1>
  
MAC 0:
+
<p>MAC 0:</p>
 +
 
 +
<pre class="fck_mw_syntaxhighlight">
 
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0000)) count=6 2> /dev/null | hexdump -e '16/1 "%02x " "\n"' | sed 's/ /:/g' | cut -c 1-17`
+
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0000)) count=6 2&gt; /dev/null | hexdump -e &#39;16/1 &quot;%02x &quot; &quot;\n&quot;&#39; | sed &#39;s/ /:/g&#39; | cut -c 1-17`
 
echo $READ_DATA
 
echo $READ_DATA
</syntaxhighlight>
+
</syntaxhighlight></pre>
 +
 
 +
<p>MAC 1:</p>
  
MAC 1:
+
<pre class="fck_mw_syntaxhighlight">
 
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0400)) count=6 2> /dev/null | hexdump -e '16/1 "%02x " "\n"' | sed 's/ /:/g' | cut -c 1-17`
+
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0400)) count=6 2&gt; /dev/null | hexdump -e &#39;16/1 &quot;%02x &quot; &quot;\n&quot;&#39; | sed &#39;s/ /:/g&#39; | cut -c 1-17`
 
echo $READ_DATA
 
echo $READ_DATA
</syntaxhighlight>
+
</syntaxhighlight></pre>
 +
 
 +
<p>Serial Number:</p>
  
Serial Number:
+
<pre class="fck_mw_syntaxhighlight">
 
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0006)) count=10 2> /dev/null | cut -c 1-10`
+
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0006)) count=10 2&gt; /dev/null | cut -c 1-10`
 
echo $READ_DATA
 
echo $READ_DATA
</syntaxhighlight>
+
</syntaxhighlight></pre>
 +
 
 +
<p>Manufacture Date:</p>
  
Manufacture Date:
+
<pre class="fck_mw_syntaxhighlight">
 
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0010)) count=14 2> /dev/null | cut -c 1-14`
+
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0010)) count=14 2&gt; /dev/null | cut -c 1-14`
 
READ_DATA=`echo $READ_DATA | cut -c 1-4`-`echo $READ_DATA | cut -c 5-6`-`echo $READ_DATA | cut -c 7-8`_`echo $READ_DATA | cut -c 9-10`-`echo $READ_DATA | cut -c 11-12`-`echo $READ_DATA | cut -c 13-14`
 
READ_DATA=`echo $READ_DATA | cut -c 1-4`-`echo $READ_DATA | cut -c 5-6`-`echo $READ_DATA | cut -c 7-8`_`echo $READ_DATA | cut -c 9-10`-`echo $READ_DATA | cut -c 11-12`-`echo $READ_DATA | cut -c 13-14`
 
echo $READ_DATA
 
echo $READ_DATA
</syntaxhighlight>
+
</syntaxhighlight></pre>

Revision as of 07:29, 24 May 2024

Contents

Getting Started

Conventions

${PREBUILT_IMAGE} : compressed prebuilt image (*.img.gz)

${CONTAINER_NAME} : container name (e.g. imx8LBVA0016)

${BSP_TARBALL} : BSP tarball (*.tgz)

${BSP_HOME} : home directory of the BSP

${BDIR} : build directory (e.g. build_x11)

${MX8PROC} : i.MX8 Processor

mx8mq for iMX8M Dual Core
mx8mm for iMX8MM
mx8mp for iMX8MP
mx8qm for iMX8QM
mx8qxp for iMX8QXP
 

${IMX8PROC} : i.MX8 Processor

imx8mq / imx8mm / imx8qm /imx8qxp /imx8mp

${BOARD} : available target boards list below

rom5720
rom5721
rom7720
rom5620
rom3620
rom5722
rsb3720
epcr5710
rsb3730

${BOARD_REV} : board revision

a1

${MC} : machine code combined with ${IMX8PROC}${BOARD}${BOARD_REV}

for example,
imx8mqrom5720a1 for ROM-5720 A1
imx8qmrom7720a1 for ROM-7720 A1
imx8qxprom5620a1 for ROM-5620 A1
imx8qxprom3620a1 for ROM-3620 A1
imx8mmrom5721a1 for ROM-5721 A1
imx8mprom5722a1 for ROM-5722 A1
imx8mprsb3720a1 for RSB-3720 A1
imx8mpepcr5710a1 for EPC-R5710 A1
imx8mmrsb3730a2 for RSB-3730 A2

You can also use the command below to check supported machines on BSP
$ source setup-environment

${MEM_SIZE} : memory size

 2G/4G

${UC} : u-boot config

 1G/2G/4G/FSPI_1G/FSPI_2G...

${SD_DEVICE} : device name of SD card in Linux (e.g. /dev/sdf)

${SDCARD_IMAGE} : sdcard image built by bitbake (VA0033 ~ VA0362: *.wic.bz2; VA0386 ~ latest version: *.sdcard)

${WORKSPACE} : host workspace folders

${UBOOT} :u-boot version(e.g. 2016.03)

${KERNEL} : linux kernel version(e.g. 4.14.98)

${TOOLCHAIN} : toolchain installed directory(e.g. /opt/fsl-imx-x11/4.1.15-2.0.0)

debug console / serial console

serial terminal program (e.g. minicom, putty, teraterm ...) that serial port is configured to 115200 8N1

terminal console

terminal program (e.g. gnome-terminal, xfce4-terminal ...)

Docker install and setting

If you don't have docker in your system, then you can follow the below  steps to install docker and run it first.

To install Docker Engine on your platform

Please refer to <a alt="https://docs.docker.com/engine/installation/" href="https://docs.docker.com/engine/installation/" title="https://docs.docker.com/engine/installation/">Docker Installation Guide</a> for details

To pull <a alt="https://hub.docker.com/r/advrisc/u12.04-imx6lbv3/" href="https://hub.docker.com/r/advrisc/u12.04-imx6lbv3/" title="https://hub.docker.com/r/advrisc/u12.04-imx6lbv3/">ubuntu 18.04 image from Docker Hub</a> 

$ docker pull advrisc/u18.04-imx8lbv1

To create container

$ docker run --privileged -it --name ${CONTAINER_NAME} -v ${WORKSPACE}:/home/adv/adv-release-bsp -v /dev:/dev -v /lib/modules:/lib/modules -v /usr/src:/usr/src advrisc/u18.04-imx8lbv1 /bin/bash

Get BSP

You have two methods to put BSP into container created above

 

 

Download_BSP_From_GitHub

The following example shows how to download the Advantech Yocto BSP from GitHub.
For this example, a directory called adv-release-bsp is created for the project.
Refer to <a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FOS%20Support%20List">IoTGateway/BSP/Linux/iMX8/OS_Support_List</a> , Official version "imx8LBVA0209" is taken as an example :
$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
$ sudo chown adv:adv adv-release-bsp
$ cd adv-release-bsp
$ repo init -u git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git -b imx-linux-zeus -m imx8LBVA0428.xml 
$ repo sync
If you want to get latest bsp
$ repo init -u <a alt="git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git" href="git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git" title="git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git">git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git</a>  <span>-b imx-linux-zeus -m </span>imx-5.4.70-2.3.0.xml 
$ repo sync
If you suffer "server certificate verification failed", you can use the following command to disable SSL verification in git repositories with self-signed certificates.
$ export GIT_SSL_NO_VERIFY=1

or

$ git config --global http.sslverify false
If you get "The unauthenticated git protocol on port 9418 is no longer supported.", you can try it.
$ git config --global url."https://".insteadOf git://
Important : As of March 31, 2023, all source repositories have been migrated to other platforms and the project has been shut down. ** Repo sync will be fail.
Solution  :
(1) If you repo current xml file, repo sync is success. Example:
 $ repo init -u [git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git] <span>-b imx-linux-zeus -m </span>imx-5.4.70-2.3.0.xml 
(2) If you repo tag version xml file, please follow " <a href="Yocto3.0%20Repo%20Fail%20SOP">Yocto3.0_Repo_Fail_SOP</a> " to modify XML File.  Example:
 $ repo init -u git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git -b imx-linux-zeus -m imx8LBVA0428.xml <- Tag XML

 

Copy BSP tarball to Container

If you have BSP tarball (eg. imx8LBVA0029_2019-10-23.tgz), then you have to copy it into container.

Follow the steps below:

1.Exit container and back to local machine

$ exit

2.Copy BSP tarball to ${WORKSPACE} , and change owner

$ cp imx8LBVA0029_2020-10-23.tgz <b>${WORKSPACE}</b>
$ sudo chown adv:adv ${WORKSPACE}/imx8LBVA0029_2020-10-23.tgz 

3.Back to container

$ docker start <b>${CONTAINER_NAME}</b>
$ docker attach <b>${CONTAINER_NAME}</b>

4.Unpack BSP tarball

$ tar zxvf imx8LBVA0029_2020-10-23.tgz

Downloads tarball

Not necessarily step
During building  Yocto image , it will generate downloads folder which includes all packages we need , but it usually can't fetch normally, so we keep this downloads folder. Then we can reduce some fetch failed issue.
You can get Downloads tarball (downloads_imx8_5.4.24.tar.gz) or (downloads_imx8_5.4.70.tar.gz) from following URL:
<a alt="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.24.tar.gz" href="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.24.tar.gz" title="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.24.tar.gz">[downloads_imx8_5.4.24.tar.gz</a>], md5 checksum: 648a6aa9d03be61ee21611b729250319
<a alt="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.70.tar.gz" href="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.70.tar.gz" title="https://www.dropbox.com/sh/3z9hh9zht98mzil/AACYhzJkMQq_om6cru9mM-wha/officialbuild/imx8_yocto_bsp_3.0?dl=0&preview=downloads_imx8_5.4.70.tar.gz">[downloads_imx8_5.4.70.tar.gz</a>], md5 checksum: ec2a0da745e57329a73965f9bd7ff0c9
If you get downloads tarball, you can copy to your ${WORKSPACE}

Follow the steps below:

1.Exit container and back to local machine

$ exit

2.Copy Downloads tarball to ${WORKSPACE} , and change owner

$ cp downloads_imx8_5.4.24.tar.gz <b>${WORKSPACE}</b>
$ sudo chown adv:adv ${WORKSPACE}/downloads_imx8_5.4.24.tar.gz 

3.Back to container

$ docker start <b>${CONTAINER_NAME}</b>
$ docker attach <b>${CONTAINER_NAME}</b>

4.Unpack Downloads tarball

$ tar zxvf downloads_imx8_5.4.24.tar.gz

5.make link to downloads folder

$ cd adv-release-bsp
$ ln -s ${WORKSPACE}/downloads_imx8_5.4.24 downloads

Introducing BSP

The BSP is based on Yocto Project with Freescale enhanced features for i.MX8, plus specific target board features from Advantech Inc..
The Advantech Yocto Project BSP Release directory contains a "sources" directory, which contains the recipes used to build,

one or more build directories, and a set of scripts used to set up the environment.

The recipes used to build the project come from both the community and Advantech. The Yocto Project layers are downloaded

to the sources directory. This sets up the recipes that are used to build the project.

Naming Rule

The tarball/prebuilt image name is consist of the model name followed by "LB" or "LI" plus version number and released date.
For example, BSP file name: imx8LBVA0010_2019-08-27.tgz
which , "LB" is acronym of Linux BSP,
           "VA0010" stands for Version A.0010
.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For example, Yocto image name: '5720A1AIM20LIVA0010_iMX8M_2G_2020-08-27.img.gz'
which "5720A1" stands for ROM-5720 A1
          "LI" is acronym for prebuilt Linux Image
          "2G" is DDR size

BSP Content

The description of some important folders list below:
sources/
meta-advantech/ : meta layer by Advantech
meta-fsl-*/ : meta layer by Freescale
fsl-setup-release.sh : to create one new build environment
setup-environment : to continue an exist build environment

Build Instructions

To create one new build environment

Perform the following commands in terminal console
$ cd ${BSP_HOME}
$ MACHINE=${MC} DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b ${BDIR}

We can specify u-boot default config like below

$ MACHINE=${MC} UBOOT_CONFIG=${UC} DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b ${BDIR}
Example :  MACHINE=imx8mmrsb3730a1  UBOOT_CONFIG=2G  DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b 3730

You need to read and accept the EULA.
<img _fck_mw_filename="Accept EULA.png" _fck_mw_origimgheight="29" _fck_mw_origimgwidth="444" alt="RTENOTITLE" src="/wiki/images/1/1d/Accept_EULA.png" style="vertical-align:middle;" title="RTENOTITLE" />

To continue an exist build environment

Perform the following commands in terminal console
$ cd ${BSP_HOME}
$ source setup-environment ${BDIR}

 

To build sdcard image

To create/continue a build environment
Perform the following command in terminal console
$ bitbake imx-image-full

The file, imx-image-full-${MC}.wic.bz2 or VA0386 ~ latest version: imx-image-full-${MC}.rootfs.sdcard, will be located in directory, ./tmp/deploy/images/${MC}, while building process finished successfully.

To build toolchain installer

To create/continue a build environment
Perform the following command in terminal console
$ bitbake meta-toolchain

The below installer will be located in the directory "./tmp/deploy/sdk".

fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-${KERNEL}-zeus.sh

To build bootloader

To create/continue a build environment
Perform the following command in terminal console
$ bitbake imx-boot

 

To build linux kernel

To create/continue a build environment
If you operate on docker images, please install tmux application before running this command
$ sudo apt-get install tmux

Type following command to enter tmux

$ tmux

Perform the following command in terminal console to show up menuconfig

$ bitbake linux-imx -c menuconfig

After edit menuconfig, type following command to exit tmux windows

$ exit

to build kernel image

$ bitbake linux-imx

The two files, Image & Image-${IMX8PROC}-${BOARD}-${BOARD_REV}.dtb, will be located in the directory, ./tmp/deploy/images/${MC}.

Creating boot-up on-board flash from prebuilt image

To create one boot-up SD card

Perform the following command in terminal console
# gunzip -c ${PREBUILT_IMAGE} | dd of=${SD_DEVICE} bs=1M
# sync

Creating boot-up on-board flash from built sdcard image

To create one boot-up SD card

Perform the following commands in terminal console
$ pushd ${BSP_HOME}/${BDIR}/tmp/deploy/images/${MC}
$ sudo bzcat ${SDCARD_IMAGE} | sudo dd of=${SD_DEVICE} bs=1M  (VA0033 ~ VA0362)
$ sudo cat ${SDCARD_IMAGE} | sudo dd of=${SD_DEVICE} bs=1M  (VA0386 ~ latest version)
$ sync
$ popd
Note : ues the .sccard file.

Debug console information

If you want to see debug message from device, you need to prepare for hardware device and software tool.

Preparing for hardware device

  • The following URL provides information about the debug port slot and the debug port line for each device

<a href="Debug%20Port%20Information%23i.MX6">Debug Port Information</a>

Preparing for software tool

  • You need to prepare the debug console tool. For example: "minicom" tool or "putty" tool.
  • Baud rate: 115200

One step build image

Our machine must be pre-installed docker

Download the following script can quickly build our image.

$ wget <a alt="https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh" href="https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh" title="https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh">https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh</a>
$ sudo chmod a+x adv_imx8_build.sh

Build image

$ sudo ./adv_imx8_build.sh ${BOARD}
$ sudo ./adv_imx8_build.sh rom5720

Our image will be in workspace folder.

workspace/${BDIR}/tmp/deploy/images/${MC}

Then refer to <a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image">Creating_boot-up_on-board_flash_from_built_sdcard_image</a> to build SD card.

Customization

Package addition

To add tcf-agent & openssh-sftp-server

Navigate to the directory where fsl-image-adv.inc located
$ cd ${BSP_HOME}/sources/meta-advantech/meta-fsl-imx/recipes-fsl/images

Add following line to fsl-image-adv.inc

IMAGE_INSTALL += " tcf-agent openssh-sftp-server "

<a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20continue%20an%20exist%20build%20environment">Continue an exist build environment</a> and <a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20sdcard%20image">build sdcard image</a>

To add chromium browser

Navigate to the directory where local.conf located
$ cd ${BSP_HOME}/${BDIR}/conf

  • Method 1(Suggest): Add following one line to local.conf
CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland"
  • Method 2: Add following two lines to local.conf
IMAGE_INSTALL_append = \
   "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' chromium-ozone-wayland libexif', \
       bb.utils.contains('DISTRO_FEATURES',     'x11', ' chromium-x11 libexif', \
                                                        <i>, d), d)}"</i>
LICENSE_FLAGS_WHITELIST = \
   "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'commercial', \
       bb.utils.contains('DISTRO_FEATURES',     'x11', 'commercial', \
                                                       <i>, d),"</i>
<a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20continue%20an%20exist%20build%20environment">Continue an exist build environment</a> and <a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20sdcard%20image">build sdcard image</a>

 

To add QtWebEngine

Put the following in ${BSP_HOME}/${BDIR}/conf/local.conf
IMAGE_INSTALL_append += "packagegroup-qt5-webengine"

<a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20continue%20an%20exist%20build%20environment">Continue an exist build environment</a> and <a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20sdcard%20image">build sdcard image</a>

Setting up SDK

Please follow the section,<a href="IoTGateway%2FBSP%2FLinux%2FiMX8%2FYocto%20LBV9%20User%20Guide%23To%20build%20toolchain%20installer">To build toolchain installer</a>, to build one toolchain installer
Perform the following command in terminal console
$ cd ${BSP_HOME}/${BDIR}/tmp/deploy/sdk
$ sudo ./fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-5.4-zeus.sh

Enter new installed directory or just press Enter to use default directory.
While Proceed[y/n]? shows up, please enter the correct one.
Waiting for the SDK installed (while the following messages show up completely)

<img _fck_mw_filename="Setting up sdk 3.png" _fck_mw_origimgheight="65" _fck_mw_origimgwidth="572" alt="RTENOTITLE" src="/wiki/images/1/17/Setting_up_sdk_3.png" style="vertical-align:middle;" title="RTENOTITLE" />

Setting up cross compiling environment

SDK has been set up (ref.<a href="#Setting_up_SDK">Setting up SDK</a>)
Perform the following command in terminal console
$ source ${TOOLCHAIN}/environment-setup-aarch64-poky-linux

Build U-Boot in standalone environment

Config u-boot

make ${IMX8PROC}_${BOARD}${BOARD_REV}_${MEM_SIZE}_defconfig

eg.

make imx8mm_rom5721a1_2G_defconfig

Build u-boot

make -j4

Build imx-boot image by using imx-mkimage

Get imx-boot tarball from our server Here we take rom5721 as an example:

tar zxvf 5721A1AIM20LIVA0118_iMX8MM_imx-boot.tgz 
cd 5721A1AIM20LIVA0118_iMX8MM_imx-boot/ 

In this folder , we have two script as below: Copy necessary files to imx-mkimage folder

./cp_uboot.sh ${uboot path} ${IMX8PROC}

Make imx-boot image

./mk_imx-boot.sh ${IMX8PROC}

eg.

./cp_uboot.sh ../uboot-imx6 <b>imx8m</b>
./mk_imx-boot.sh <b>imx8mm</b>

Replace imx-boot

Perform the following command to transfer to on-board flash
$ dd if=flash.bin of=/dev/mmcblk0 bs=1K seek=<offset> conv=fsync
Where offset is:
33 - for i.MAX 8QuadMax A0, i.Mx 8QuadXPlus A0, i.MX 8M Quad, and i.MX 8M Mini
32 - for iMX 8M PLUS, i.MAX 8QuadXPlus B0/C0 and i.Mx 8QuadMax B0
 

Building & updating kernel/modules/dtb manually

The cross compiling environment has been set up. (ref. <a href="#Setting_up_cross_compiling_environment">Setting up cross compiling environment</a>)

Copy BSP tarball to Container

Refer to <a alt="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#Copy_BSP_tarball_to_Container" href="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#Copy_BSP_tarball_to_Container" title="http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBV9_User_Guide#Copy_BSP_tarball_to_Container">Copy_BSP_tarball_to_Container</a> , copy kernel tarball to ${WORKSPACE} and back to container

change owner & unpack tarball

$ sudo chown adv:adv imx8LBVA0029_2019-10-23_linux-imx.tgz
$ tar zxvf imx8LBVA0029_2019-10-23_linux-imx.tgz

Config kernel

Configure linux kernel
$ cd linux-imx
$ make distclean
$ make imx_v8_adv_defconfig
$ make menuconfig
Start building linux kernel
$ make -j4 Image
When you get error like below

<img _fck_mw_filename="Imx8 error.jpg" _fck_mw_origimgheight="226" _fck_mw_origimgwidth="819" alt="RTENOTITLE" src="/wiki/images/8/85/Imx8_error.jpg" style="vertical-align:middle;" title="RTENOTITLE" />

run command then rebuild
$ unset LDFLAGS 

 

The kernel image file, Image, is located in the directory "./arch/arm64/boot/".
Start building kernel modules
$ make -j4 modules
Copy all modules to a temporary rootfs directory, "~/temp/rootfs"
$ make modules_install INSTALL_MOD_PATH=~/temp/rootfs
Building device tree blob
$ make -j4 freescale/<span style="color:#7030a0"><b>${IMX8PROC}</b></span>-<span style="color:#7030a0"><b>${BOARD}</b></span>-<span style="color:#7030a0"><b>${BOARD_REV}</b></span>.dtb
eg.
$ make -j4 freescale/imx8mq-rom5720-a1.dtb
The device tree blob, ${IMX8PROC}-${BOARD}-${BOARD_REV}.dtb, is located in the directory "./arch/arm64/boot/dts/freescale/".

Replace kernel & dts

Replace kernel
copy Image to SDcard or emmc

Replace dtb file

copy dtb file to SDcard or emmc

Improve boot speed

  • Bootloader

1.bootdelay time

We can cancel the bootdelay time by setting bootloader environment value.
setenv bootdelay 0
env save
reset

2.Disable console

Disable debug message output can also improve boot speed

Disable kernel message

setenv mmcargs setenv bootargs ${jh_clk} console=${console} modprobe.blacklist=${modprobe.blacklist} root=${mmcroot} video=HDMI-A-1:${videores} <b>quiet</b>
env save
reset

Or

Disable debug port

(1) Yocto machine setting:

modify /sources/meta-advantech/meta-fsl-imx/conf/machine$/${MC}.conf

SERIAL_CONSOLES = ";"

(2) Uboot parameter setting:

  • For the imx8mq, imx8mm, imx8mp:
setenv console disabled
env save
reset
  • For the imx8qm, imx8qxp:
setenv console disabled
setenv earlycon disabled
setenv mmcargs setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} root=${mmcroot}
env save
reset
  • Rootfs
TBD
  • Services

1. Using systemctl disable remove ,we can remove unnecessary services.

systemctl disable <services>

eg.

systemctl disable boottimes

System Recovery

This section provides detail procedures of restoring the eMMC image.

If you destroy the onboard flash image by accident, you can recover a system following these steps.

  • Recovery by SD card

1.Copy 5720A1AIM20LIVA0022_iMX8M_flash_tool.tgz package to your desktop.

2.Insert SD card to PC

3.Make a bootable sd card

# tar zxvf 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool.tgz
# cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
# sudo ./mksd-linux.sh /dev/sdg

4.Insert SD card and copy 5720A1AIM20LIVA0022_iMX8M_flash_tool to USB disk

5.Insert USB disk and SD card then Boot from SD

6.Enter usb disk folder, make a bootable emmc

# cd /run/media/sda1/
# cd 5720A1AIM20LIVA0022_iMX8M_2G_flash_tool/mk_inand/
# sudo ./mksd-linux.sh /dev/mmcblk0

 

  • Recovery by UUU tool

1.Download uuu tool from (<a alt="https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429" href="https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429" title="https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429">https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429</a>)

2.burn command

  • For Linux
 sudo ./uuu
  • For Windows
 uuu.exe 

2.Create a folder with files as below:

1.uuu
2.imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
3.fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
4.Image_dtb.uuu
5.rootfs.uuu

3.Connect otg cable from PC to device

4.Set the correct boot mode(ROM-5722/ROM5720/ROM5721/ROM5620: 1,2,3-off 4-on, ROM7720: 1,2,3,4,5,6-off or 1,2,4,5,6-off 3-on), then power on

5.Perform the following command:

PS.If you want to burn uboot to mmcblk0 instead of mmcblk0boot0, u-boot must be updated to version 20191101,

1.Burn uboot to emmc
   a)replace uboot in mmcblk0boot0
       sudo ./uuu -b <b>emmc</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
   b)replace uboot in mmcblk0
       sudo ./uuu -b <b>emmc_adv</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
2.Burn rootfs image to emmc
   a)replace uboot in mmcblk0boot0
       sudo ./uuu -b <b>emmc_all</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard
   b)replace uboot in mmcblk0
       sudo ./uuu -b <b>emmc_all_adv</b> imx-boot-imx8mqrom5720a1-sd.bin-flash_evk fsl-image-validation-imx-imx8mqrom5720a1-20190917152605.rootfs.sdcard

6.uuu tool will start recovery image to emmc.

7.If we want to burn separately into emmc

   a)replace Image and dtb
       Step 1: rename Image and dtb 
                 _Image
                 _board.dtb
       Step 2: 
                 sudo ./uuu Image_dtb.uuu
   b)replace rootfs
       Step 1: rename rootfs tarball
                 _rootfs.tar.bz2
       Step 2: 
                 sudo ./uuu rootfs.uuu

8.For more usage (<a alt="https://github.com/NXPmicro/mfgtools/wiki" href="https://github.com/NXPmicro/mfgtools/wiki" title="https://github.com/NXPmicro/mfgtools/wiki">https://github.com/NXPmicro/mfgtools/wiki</a>)

 

Package List

In BSP, list all packages which will be built in the image

bitbake -g imx-image-full && cat task-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq
<a href=":File%3A20191025.txt">20191025 Package List</a>

Show all recipes (include non-installed packages)

bitbake -s
<a href=":File%3Apackage%20version%2020191025.txt">20191025 Package Version List</a>

You can also check ${BDIR}/tmp/deploy/images/${MC}/fsl-image-qt5-validation-imx-${MC}.manifest

It will show the same content with checking by rpm tool on target board.

On target board, list all packages by rpm tool

rpm -qa --root / --dbpath /var/lib/rpm | sort
<a href=":File%3Arpm%20board%2020191025.txt">20191025 RPM on Board List</a>

Device Tree Source file select

We can setup different dts file on bootloader to enable different devices.

eg.

setenv fdt_file <b>adv-imx8mm-rom5721-a1-dsi2dp</b>.dtb
env save
boot 

ROM-5721

  • Display
    • DSI to LVDS
      • g070vw01
        • imx8mm-rom5721-a1.dtb
      • g150xgel05
        • imx8mm-rom5721-a1-dsi2lvds-g150xgel05.dtb
      • g215hvn01
        • imx8mm-rom5721-a1-dsi2lvds-g215hvn01.dtb
    • DSI to DP
      • imx8mm-rom5721-a1-dsi2dp.dtb
    • DSI to HDMI
      • imx8mm-rom5721-a1-adv7535.dtb
    • DSI
      • auog101uan02
        • imx8mm-rom5721-a1-auog101uan02.dtb
  • M.2 SDIO
    • Adjust CN43~CN48
    • imx8mm-rom5721-a1-m2-sdio.dtb

ROM-5720

  • Display
    • DSI to HDMI
      • imx8mq-rom5720-a1-dcss-adv7535.dtb
      • imx8mq-rom5720-a1-lcdif-adv7535.dtb
      • For weston ui
        • modify /etc/xdg/weston/weston.ini
          • drm-device=card2
    • DSI
      • auog101uan02
        • imx8mq-rom5720-a1-dcss-auog101uan02.dtb
      • For weston ui
        • modify /etc/xdg/weston/weston.ini
          • drm-device=card2
    • Dual Display
      • DSI to HDMI + HDMI
        • imx8mq-rom5720-a1-dual-display.dtb
        • For weston ui
          • modify /etc/xdg/weston/weston.ini
            • drm-device=card1
  • M.2 SDIO
    • Adjust CN43~CN48
    • imx8mq-rom5720-a1-m2-sdio.dtb

ROM-5620

  • Display
    • LVDS
      • g070vw01
        • imx8mxp-rom5620-a1.dtb
      • g150xgel05
        • imx8qxp-rom5620-a1-lvds-chimei.dtb
      • g215hvn01
        • imx8qxp-rom5620-a1-lvds-dual.dtb
    • LVDS to HDMI
      • imx8qxp-rom5620-a1-hdmi-bridge.dtb
    • DSI to HDMI
      • imx8qxp-rom5620-a1-hdmi-bridge.dtb
    • DSI
      • auog101uan02
        • imx8qxp-rom5620-a1-auog101uan02.dtb
  • M.2 SDIO
    • Adjust CN43~CN48
    • imx8qxp-rom5620-a1-m2-sdio.dtb

ROM-7720

  • Display
    • HDMI
      • imx8qm-rom7720-a1.dtb
    • LVDS
      • g070vw01
        • imx8qm-rom7720-a1-lvds0.dtb
        • imx8qm-rom7720-a1-lvds1.dtb
      • g215hvn01
        • imx8qm-rom7720-a1-lvds-dual.dtb
    • HDMI + LVDS
      • HDMI + g070vw01
        • imx8qm-rom7720-a1-hdmi-lvds0.dtb
        • imx8qm-rom7720-a1-hdmi-lvds1.dtb
      • HDMI + g215hvn01
        • imx8qm-rom7720-a1-hdmi-lvds-dual.dtb
    • LVDS to HDMI
      • imx8qm-rom7720-a1-it6263.dtb 
  • Audio Codec
    • imx8qm-rom7720-a1-sgtl5000.dtb

RSB-3720

  • Display
    • HDMI (default)
      • imx8mp-rsb3720-a1.dtb
    • LVDS
      • g070vw01(LVDS0) + HDMI
        • imx8mp-rsb3720-a1-lvds0-auo.dtb
      • g070vw01(LVDS1) + HDMI
        • imx8mp-rsb3720-a1-lvds1-auo.dtb
      • g215hvn01(DUAL LVDS) + HDMI
        • imx8mp-rsb3720-a1-lvds-dual.dtb
    • DSI
      • adv7535(DSI to HDMI) + HDMI
        • imx8mp-rsb3720-a1-adv7535.dtb
      • auog101uan02(DSI) + HDMI
        • imx8mp-rsb3720-a1-auog101uan02.dtb
  • Camera
    • OV5640 (default)
      • imx8mp-rsb3720-a1.dtb
    • Basler camrea
      • imx8mp-rsb3720-a1-basler.dtb

ROM-5722

  • Display
    • HDMI (default)
      • imx8mp-rom5722-a1.dtb
    • LVDS
      • g070vw01(LVDS0) + HDMI
        • imx8mp-rom5722-a1-lvds0-auo.dtb
      • g070vw01(LVDS1) + HDMI
        • imx8mp-rom5722-a1-lvds1-auo.dtb
      • g215hvn01(DUAL LVDS) + HDMI
        • imx8mp-rom5722-a1-lvds-dual.dtb
    • DSI
      • adv7535(DSI to HDMI) + HDMI
        • imx8mp-rom5722-a1-adv7535.dtb
      • auog101uan02(DSI) + HDMI
        • imx8mp-rom5722-a1-auog101uan02.dtb
  • Camera
    • OV5640 (default)
      • imx8mp-rom5722-a1.dtb
    • Basler camrea
      • imx8mp-rom5722-a1-basler.dtb

ROM-3620

  • Display
    • LVDS
      • g070vw01
        • imx8mxp-rom3620-a1.dtb
      • g150xgel05
        • imx8qxp-rom3620-a1-lvds-chimei.dtb
      • g215hvn01
        • imx8qxp-rom3620-a1-lvds-dual.dtb
    • DSI to HDMI
      • imx8qxp-rom3620-a1-hdmi-bridge.dtb
    • DSI
      • auog101uan02
        • imx8qxp-rom3620-a1-auog101uan02.dtb

RSB-3730

  • Display
    • HDMI
      • imx8mm-rsb3730-a2.dtb
    • LVDS
      • g070vw01
        • imx8mm-rsb3730-a2-dsi2lvds-800x480.dtb
      • g215hv01
        • imx8mm-rsb3730-a2-dsi2lvds-1920x1080.dtb
    • DSI
      • g101uan2.0
        • imx8mm-rsb3730-a2-dsi-auog101uan02.dtb

Burn-in Test

About bottom board setting

The disable pin of PCIE

You should config disable pin follow your bottom board.

<syntaxhighlight lang="c">
&pcie0{
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pcie0>;
        //disable-gpio = <&tca9538 0 GPIO_ACTIVE_LOW>; <---
        reset-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
        ext_osc = <1>;
        status = "okay";
};
</syntaxhighlight>

Fix no sound issue probability when the HDMI plug in/out

You can use the following patch to fix this issue:

<a alt="http://ess-wiki.advantech.com.tw/wiki/images/5/59/0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch" href="http://ess-wiki.advantech.com.tw/wiki/images/5/59/0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch" title="http://ess-wiki.advantech.com.tw/wiki/images/5/59/0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch">[0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch</a>]

 

<syntaxhighlight lang="c">
From 9ca13642ff1367cb32c15f82d2c077f2f7c0e8f1 Mon Sep 17 00:00:00 2001
From: Sandor Yu <Sandor.yu@nxp.com>
Date: Mon, 25 Oct 2021 16:13:37 +0800
Subject: [PATCH] imx865: hdmi: enable overflow workaround for imx865 hdmi

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index b48cdaa493b7..b53e2efed3bf 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2220,6 +2220,7 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
 	case 0x201a:
 	case 0x211a:
 	case 0x212a:
+	case 0x213a:
 		count = 1;
 		break;
 	default:
-- 
2.17.1
</syntaxhighlight>

How to get the MAC, Serial Number, and Manufacture Date in the QSPI flash

MAC 0:

<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0000)) count=6 2> /dev/null | hexdump -e '16/1 "%02x " "\n"' | sed 's/ /:/g' | cut -c 1-17`
echo $READ_DATA
</syntaxhighlight>

MAC 1:

<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0400)) count=6 2> /dev/null | hexdump -e '16/1 "%02x " "\n"' | sed 's/ /:/g' | cut -c 1-17`
echo $READ_DATA
</syntaxhighlight>

Serial Number:

<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0006)) count=10 2> /dev/null | cut -c 1-10`
echo $READ_DATA
</syntaxhighlight>

Manufacture Date:

<syntaxhighlight lang="c">
READ_DATA=`dd if=/dev/mtdblock0 bs=1 skip=$((0xd0010)) count=14 2> /dev/null | cut -c 1-14`
READ_DATA=`echo $READ_DATA | cut -c 1-4`-`echo $READ_DATA | cut -c 5-6`-`echo $READ_DATA | cut -c 7-8`_`echo $READ_DATA | cut -c 9-10`-`echo $READ_DATA | cut -c 11-12`-`echo $READ_DATA | cut -c 13-14`
echo $READ_DATA
</syntaxhighlight>