Personal tools

Difference between revisions of "Recipe for building Yocto Linux for EBOX-IMX8MMINI"

From ICOP tech wiki

Jump to: navigation, search
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!--
+
=Recipe for building Yocto Linux for EBOX-IMX8MM=
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_MORTY_V1.0_DART-6UL}}}} <!--
+
__FORCETOC__
--> {{PageHeader|Recipe for building Yocto Linux for EBOX-IMX8MM}} {{DocImage|category1={{#var:HARDWARE_NAME}}|category2=Yocto|}}
 
  
 +
<br />
 +
'''Recipe for building Yocto Linux for EBOX-IMX8MM:'''
  
Recipe for building Yocto Linux for EBOX-IMX8MM:
+
https://ftp.icop.com.tw/share/sHDb9k1X
  
Ftp://sbc:sbc@ftp.icop.com.tw/iMX8/OS/Yocto/Recipe/EBOX-IMX8MM%20Yocto%20Recipe.zip
 
  
 +
'''Check the compiling method on the open document form NXP:'''
  
Check the compiling method on the open document form NXP:
+
https://ftp.icop.com.tw/share/2sMizj-p<br />
 +
<br />
  
https://www.nxp.com/docs/en/user-guide/IMXLXYOCTOUG.pdf
+
<big>'''Suggest O/S''':Ubuntu 18.04 or later.</big>
  
<br />
+
Please comment out content to the local.conf to avoid the error during building the SDL.
 
 
====<big>'''Suggest O/S''':Ubuntu 18.04 or later.</big>====
 
For Ubuntu 16.04 user, please add the content to the local.conf to avoid the error during building the SDL.
 
 
<pre>
 
<pre>
 
#PACKAGECONFIG_append_pn-qemu-native = " sdl"
 
#PACKAGECONFIG_append_pn-qemu-native = " sdl"
 
#PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
 
#PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
</pre>
+
</pre><big>'''Storage:''' Please make sure the capacity of your storage has 120GB or bigger space</big>
 
+
<big>'''RAM:''' Please make sure the physical memory + swap has 16GB or bigger capacity.</big><br />
====<big>'''Storage:''' Please make sure the capacity of your storage has 120GB or bigger space</big>====
+
==<big>Procedure</big>==
 
 
 
 
 
'''Step 1.''' Install Host packages:
 
'''Step 1.''' Install Host packages:
  
 
Essential Yocto Project host packages:
 
Essential Yocto Project host packages:
 
<pre>
 
<pre>
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat libsdl1.2-dev
+
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \  
 +
build-essential chrpath socat libsdl1.2-dev
 
</pre>
 
</pre>
 
   
 
   
 
i.MX layers host packages for a Ubuntu 12.04 or 14.04 host setup are:<pre>
 
i.MX layers host packages for a Ubuntu 12.04 or 14.04 host setup are:<pre>
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \ docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \ libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc
+
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \
 +
docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \  
 +
libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc
 
</pre>
 
</pre>
  
Line 45: Line 45:
 
$ chmod a+x ~/bin/repo
 
$ chmod a+x ~/bin/repo
 
</pre>
 
</pre>
 +
  
 
'''Step 3.''' Add the following line to the .bashrc file to make sure the ~/bin folder is in the PATH.
 
'''Step 3.''' Add the following line to the .bashrc file to make sure the ~/bin folder is in the PATH.
Line 50: Line 51:
 
export PATH=~/bin:$PATH
 
export PATH=~/bin:$PATH
 
</pre>
 
</pre>
 +
  
 
'''Step 4.''' Ensure the git is properly set up by commands below:
 
'''Step 4.''' Ensure the git is properly set up by commands below:
Line 55: Line 57:
 
$ git config --global user.name "Your Name"  
 
$ git config --global user.name "Your Name"  
 
$ git config --global user.email "Your Email"  
 
$ git config --global user.email "Your Email"  
$ git config –list
+
$ git config --list
 
</pre>
 
</pre>
 +
  
 
'''Step 5.''' Download the i.MX Yocto Project Community BSP recipe layers:
 
'''Step 5.''' Download the i.MX Yocto Project Community BSP recipe layers:
Line 62: Line 65:
 
$ mkdir imx-yocto-bsp  
 
$ mkdir imx-yocto-bsp  
 
$ cd imx-yocto-bsp  
 
$ cd imx-yocto-bsp  
$ repo init -u <nowiki>https://source.codeaurora.org/external/imx/imx-manifest</nowiki> -b imx-linux-sumo - m imx-4.14.98-2.0.0_ga.xml
+
$ repo init -u https://github.com/nxp-imx/imx-manifest -b \
 +
imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml
 
$ repo sync
 
$ repo sync
 
</pre>
 
</pre>
 +
  
 
'''Step 6.''' Unzip the Recipe for building Yocto Linux for EBOX-IMX8MM to the file ‘imx-yocto-bsp”
 
'''Step 6.''' Unzip the Recipe for building Yocto Linux for EBOX-IMX8MM to the file ‘imx-yocto-bsp”
Line 71: Line 76:
 
'''Step 7.''' Create the setup environment by command below (You could change the file name as you want)
 
'''Step 7.''' Create the setup environment by command below (You could change the file name as you want)
 
<pre>
 
<pre>
$ source setup-environment build-filename
+
$ DISTRO=fsl-imx-xwayland MACHINE=dm395b source fsl-setup-release.sh -b \
 +
build-dmp
 
</pre>
 
</pre>
  
'''Step 8.''' Run the command below.
+
Please input “y” when the EULA confirmation pop out.
 +
 
 +
 
 +
'''Step 8.''' Edit conf/local.conf file and add the content below at the bottom:
 
<pre>
 
<pre>
$ bitbake fsl-image-qt5-validation-imx”
+
CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland"
 +
IMAGE_INSTALL_append += " \
 +
    openssh-sftp-server \
 +
    ppp \
 +
    rng-tools \
 +
    glibc-gconv-utf-16 \
 +
    expand-rootfs \
 +
"
 
</pre>
 
</pre>
 +
 +
 +
'''Step 9.''' Edit conf/bblayers.conf file and add the content below at the bottom:
 +
<pre>
 +
BBLAYERS += " ${BSPDIR}/sources/meta-custom-dmp "
 +
</pre>
 +
 +
 +
'''Step 10.''' Run the command below.
 +
<pre>
 +
$ bitbake fsl-image-qt5-validation-imx
 +
</pre>
 +
  
 
The system will start to download and install source code, patch file, and compilation.
 
The system will start to download and install source code, patch file, and compilation.
 +
 +
=How to install the image file by UUU.=
 +
After implemented bitbake fsl-image-qt5-validation-imx, it will generate an image file and be stored in the file under build-dmp/tmp/deploy/images/dm395b.
 +
 +
<br />In the build-dmp/tmp/deploy/images/dm395b file, we’ll need the file below for the image restoration.
 +
<pre>
 +
1. fsl-mage-qt5-validation-imx-dm395b.sdcard.bz2
 +
2. imx-boot-dm395b-sd.bin-flash_evk
 +
</pre>
 +
 +
 +
Input command to get the image file - fsl-mage-qt5-validation-imx-dm395b.sdcard
 +
 +
(In this file, there are packaged kernel and rootfs):<pre>
 +
$ bzip2 -d fsl-mage-qt5-validation-imx-dm395b.sdcard.bz2
 +
</pre>Download the UUU.auto sample: https://ftp.icop.com.tw/share/B0eWDCzR
 +
 +
 +
 +
If you have requirement to change the file name, please follow the steps below to change your file name (You could choose not changing the file name.)<pre>
 +
SDP: boot -f XXX.bin-flash_evk
 +
SDPU: write -f XXX.bin-flash_evk -offset 0x57c00
 +
SDPS: boot -f XXX.bin-flash_evk
 +
SDPV write -f XXX.bin-flash_evk -skipspl
 +
FB: flash bootloader XXX.bin-flash_evk
 +
XXX.bin-flash_evk = imx-boot-dm395b-sd.bin-flash_evk 
 +
 +
FB: flash -raw2sparse all XXX.image 
 +
XXX.image = fsl-mage-qt5-validation-imx-dm395b.sdcard
 +
</pre>After you have set your own file name, you could input the command below to install the Yocto Linux<pre>
 +
uuu uuu.auto
 +
</pre>

Latest revision as of 10:47, 24 May 2023

Recipe for building Yocto Linux for EBOX-IMX8MM


Recipe for building Yocto Linux for EBOX-IMX8MM:

https://ftp.icop.com.tw/share/sHDb9k1X


Check the compiling method on the open document form NXP:

https://ftp.icop.com.tw/share/2sMizj-p

Suggest O/S:Ubuntu 18.04 or later.

Please comment out content to the local.conf to avoid the error during building the SDL.

#PACKAGECONFIG_append_pn-qemu-native = " sdl"
#PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"

Storage: Please make sure the capacity of your storage has 120GB or bigger space

RAM: Please make sure the physical memory + swap has 16GB or bigger capacity.

Procedure

Step 1. Install Host packages:

Essential Yocto Project host packages:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ 
build-essential chrpath socat libsdl1.2-dev

i.MX layers host packages for a Ubuntu 12.04 or 14.04 host setup are:

$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \
docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \ 
libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc


Step 2. Insalling the repo utility:

Create the bin folder in the home directory:

$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo 
$ chmod a+x ~/bin/repo


Step 3. Add the following line to the .bashrc file to make sure the ~/bin folder is in the PATH.

export PATH=~/bin:$PATH


Step 4. Ensure the git is properly set up by commands below:

$ git config --global user.name "Your Name" 
$ git config --global user.email "Your Email" 
$ git config --list


Step 5. Download the i.MX Yocto Project Community BSP recipe layers:

$ mkdir imx-yocto-bsp 
$ cd imx-yocto-bsp 
$ repo init -u https://github.com/nxp-imx/imx-manifest -b \
imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml
$ repo sync


Step 6. Unzip the Recipe for building Yocto Linux for EBOX-IMX8MM to the file ‘imx-yocto-bsp”


Step 7. Create the setup environment by command below (You could change the file name as you want)

$ DISTRO=fsl-imx-xwayland MACHINE=dm395b source fsl-setup-release.sh -b \ 
build-dmp

Please input “y” when the EULA confirmation pop out.


Step 8. Edit conf/local.conf file and add the content below at the bottom:

CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland"
IMAGE_INSTALL_append += " \
    openssh-sftp-server \
    ppp \
    rng-tools \
    glibc-gconv-utf-16 \
    expand-rootfs \
"


Step 9. Edit conf/bblayers.conf file and add the content below at the bottom:

BBLAYERS += " ${BSPDIR}/sources/meta-custom-dmp "


Step 10. Run the command below.

$ bitbake fsl-image-qt5-validation-imx


The system will start to download and install source code, patch file, and compilation.

How to install the image file by UUU.

After implemented bitbake fsl-image-qt5-validation-imx, it will generate an image file and be stored in the file under build-dmp/tmp/deploy/images/dm395b.


In the build-dmp/tmp/deploy/images/dm395b file, we’ll need the file below for the image restoration.

1. fsl-mage-qt5-validation-imx-dm395b.sdcard.bz2
2. imx-boot-dm395b-sd.bin-flash_evk


Input command to get the image file - fsl-mage-qt5-validation-imx-dm395b.sdcard

(In this file, there are packaged kernel and rootfs):

$ bzip2 -d fsl-mage-qt5-validation-imx-dm395b.sdcard.bz2 

Download the UUU.auto sample: https://ftp.icop.com.tw/share/B0eWDCzR


If you have requirement to change the file name, please follow the steps below to change your file name (You could choose not changing the file name.)

SDP: boot -f XXX.bin-flash_evk
SDPU: write -f XXX.bin-flash_evk -offset 0x57c00
SDPS: boot -f XXX.bin-flash_evk
SDPV write -f XXX.bin-flash_evk -skipspl
FB: flash bootloader XXX.bin-flash_evk 
XXX.bin-flash_evk = imx-boot-dm395b-sd.bin-flash_evk  

FB: flash -raw2sparse all XXX.image  
XXX.image = fsl-mage-qt5-validation-imx-dm395b.sdcard 

After you have set your own file name, you could input the command below to install the Yocto Linux

uuu uuu.auto