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

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

Latest revision as of 01:42, 13 June 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 Docker Installation Guide for details

To pull ubuntu 18.04 image from Docker Hub 

$ 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 IoTGateway/BSP/Linux/iMX8/OS_Support_List , 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 git://github.com/ADVANTECH-Corp/adv-arm-yocto-bsp.git  -b imx-linux-zeus -m 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 " Yocto3.0_Repo_Fail_SOP " 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 ${WORKSPACE}
$ sudo chown adv:adv ${WORKSPACE}/imx8LBVA0029_2020-10-23.tgz 

3.Back to container

$ docker start ${CONTAINER_NAME}
$ docker attach ${CONTAINER_NAME}

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:
[downloads_imx8_5.4.24.tar.gz], md5 checksum: 648a6aa9d03be61ee21611b729250319
[downloads_imx8_5.4.70.tar.gz], 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 ${WORKSPACE}
$ sudo chown adv:adv ${WORKSPACE}/downloads_imx8_5.4.24.tar.gz 

3.Back to container

$ docker start ${CONTAINER_NAME}
$ docker attach ${CONTAINER_NAME}

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

Debug Port Information

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 https://raw.githubusercontent.com/ADVANTECH-Corp/RISC_tools_scripts/zeus/imx8/adv_imx8_build.sh
$ 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 Creating_boot-up_on-board_flash_from_built_sdcard_image 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 "
Continue an exist build environment and build sdcard image

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', \
                                                        , d), d)}"
LICENSE_FLAGS_WHITELIST = \
   "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'commercial', \
       bb.utils.contains('DISTRO_FEATURES',     'x11', 'commercial', \
                                                       , d),"
Continue an exist build environment and build sdcard image

 

To add QtWebEngine

Put the following in ${BSP_HOME}/${BDIR}/conf/local.conf
IMAGE_INSTALL_append += "packagegroup-qt5-webengine"
Continue an exist build environment and build sdcard image

Setting up SDK

Please follow the section,To build toolchain installer, 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)
RTENOTITLE

Setting up cross compiling environment

SDK has been set up (ref.Setting up SDK)
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 imx8m
./mk_imx-boot.sh imx8mm

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. Setting up cross compiling environment)

Copy BSP tarball to Container

Refer to Copy_BSP_tarball_to_Container , 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

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/${IMX8PROC}-${BOARD}-${BOARD_REV}.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} quiet
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 (https://github.com/ADVANTECH-Corp/uuu/releases/tag/v20210429)

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 emmc imx-boot-imx8mqrom5720a1-sd.bin-flash_evk
   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.

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 (https://github.com/NXPmicro/mfgtools/wiki)

 

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
20191025 Package List

Show all recipes (include non-installed packages)

bitbake -s
20191025 Package Version List

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
20191025 RPM on Board List

Device Tree Source file select

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

eg.

setenv fdt_file adv-imx8mm-rom5721-a1-dsi2dp.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.

&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";
};

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

You can use the following patch to fix this issue:

[0001-imx865-hdmi-enable-overflow-workaround-for-imx865-hd.patch]

 

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

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

MAC 0:

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

MAC 1:

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

Serial Number:

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

Manufacture Date:

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