Difference between revisions of "Recipe for building Yocto3.0 Linux for NX8MM-35"
From ICOP tech wiki
Line 1: | Line 1: | ||
− | |||
<br /> | <br /> | ||
− | '''Recipe for building Yocto Linux for | + | =Recipe for building Yocto 3.0 Linux for EBOX-IMX8MM= |
+ | <br /> | ||
+ | '''Recipe for building Yocto Linux for EBOX-IMX8MM''' | ||
− | + | *https://ftp.icop.com.tw/share/m3LwCPT9 | |
− | |||
'''Check the compiling method on the open document form NXP:''' | '''Check the compiling method on the open document form NXP:''' | ||
− | https://www.nxp.com/docs/en/user-guide/IMXLXYOCTOUG.pdf | + | *https://www.nxp.com/docs/en/user-guide/IMXLXYOCTOUG.pdf <br /> <br /> |
− | <br /> | ||
− | <br /> | ||
<big>'''Suggest O/S''':Ubuntu 18.04 or later.</big> | <big>'''Suggest O/S''':Ubuntu 18.04 or later.</big> | ||
Line 65: | Line 63: | ||
$ mkdir imx-yocto-bsp | $ mkdir imx-yocto-bsp | ||
$ cd imx-yocto-bsp | $ cd imx-yocto-bsp | ||
− | $ repo init -u | + | $ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -b imx-linux-zeus -m imx-5.4.70-2.3.0.xml |
$ repo sync | $ repo sync | ||
</pre> | </pre> | ||
− | '''Step 6.''' Unzip the Recipe for building Yocto Linux for | + | '''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) | '''Step 7.''' Create the setup environment by command below (You could change the file name as you want) | ||
<pre> | <pre> | ||
− | $ DISTRO=fsl-imx-xwayland MACHINE= | + | $ DISTRO=fsl-imx-xwayland MACHINE=dm395e source imx-setup-release.sh -b build-dmp |
</pre> | </pre> | ||
Line 86: | Line 84: | ||
IMAGE_INSTALL_append += " \ | IMAGE_INSTALL_append += " \ | ||
− | |||
− | |||
− | |||
− | |||
expand-rootfs \ | expand-rootfs \ | ||
− | + | linux-firmware \ | |
− | |||
− | |||
" | " | ||
</pre> | </pre> | ||
Line 112: | Line 104: | ||
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 imx-image-full, it will generate an image file and be stored in the file under build-dmp/tmp/deploy/images/dm395e. | ||
+ | In the build-dmp/tmp/deploy/images/dm395e file, we’ll need the file below for the image restoration.<pre> | ||
+ | 1. imx-image-full-dm395e.wic | ||
+ | 2. imx-boot-dm395e-sd.bin-flash_evk | ||
+ | </pre> | ||
+ | Input command to get the image file - imx-image-full-dm395e.wic (In this file, there are packaged kernel and rootfs):<pre> | ||
+ | $ bzip2 -d imx-image-full-dm395e.wic</pre>Download the UUU.auto sample:https://ftp.icop.com.tw/share/-yRsWOss | ||
+ | <br>UUU application under Linux:https://github.com/NXPmicro/mfgtools/releases<br /><pre> | ||
− | + | SDP: boot -f imx-boot-dm395e-sd.bin-flash_evk | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | #This command will be run when use SPL | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
SDPU: delay 1000 | SDPU: delay 1000 | ||
− | SDPU: write -f imx-boot- | + | SDPU: write -f imx-boot-dm395e-sd.bin-flash_evk -offset 0x57c00 |
SDPU: jump | SDPU: jump | ||
− | # This command will be run when ROM support stream mode | + | |
− | SDPS: boot -f imx-boot- | + | #This command will be run when ROM support stream mode |
− | # These commands will be run when use SPL and will be skipped if no spl | + | |
− | # if (SPL support SDPV) | + | SDPS: boot -f imx-boot-dm395e-sd.bin-flash_evk |
+ | |||
+ | #These commands will be run when use SPL and will be skipped if no spl | ||
+ | #if (SPL support SDPV) | ||
+ | |||
SDPV: delay 1000 | SDPV: delay 1000 | ||
− | SDPV: write -f imx-boot- | + | SDPV: write -f imx-boot-dm395e-sd.bin-flash_evk -skipspl |
SDPV: jump | SDPV: jump | ||
Line 147: | Line 137: | ||
FB: ucmd setenv mmcdev 2 | FB: ucmd setenv mmcdev 2 | ||
FB: ucmd mmc dev 2 0 | FB: ucmd mmc dev 2 0 | ||
− | FB: flash -raw2sparse all imx-image-full- | + | FB: flash -raw2sparse all imx-image-full-dm395e.wic |
− | FB: flash bootloader imx-boot- | + | FB: flash bootloader imx-boot-dm395e-sd.bin-flash_evk |
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi; | FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi; | ||
FB: ucmd mmc partconf 2 ${emmc_ack} 1 0 | FB: ucmd mmc partconf 2 ${emmc_ack} 1 0 | ||
FB: done | FB: done | ||
− | |||
</pre>After you have set your own file name, you could input the command below to install the Yocto Linux<pre> | </pre>After you have set your own file name, you could input the command below to install the Yocto Linux<pre> | ||
uuu uuu.auto | uuu uuu.auto | ||
</pre> | </pre> |
Revision as of 11:30, 13 May 2022
Recipe for building Yocto 3.0 Linux for EBOX-IMX8MM
Recipe for building Yocto Linux for EBOX-IMX8MM
Check the compiling method on the open document form NXP:
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 300GB 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://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -b imx-linux-zeus -m imx-5.4.70-2.3.0.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=dm395e source imx-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 += " \ expand-rootfs \ linux-firmware \ "
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 imx-image-full
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 imx-image-full, it will generate an image file and be stored in the file under build-dmp/tmp/deploy/images/dm395e.
In the build-dmp/tmp/deploy/images/dm395e file, we’ll need the file below for the image restoration.
1. imx-image-full-dm395e.wic 2. imx-boot-dm395e-sd.bin-flash_evk
Input command to get the image file - imx-image-full-dm395e.wic (In this file, there are packaged kernel and rootfs):
$ bzip2 -d imx-image-full-dm395e.wic
Download the UUU.auto sample:https://ftp.icop.com.tw/share/-yRsWOss
UUU application under Linux:https://github.com/NXPmicro/mfgtools/releases
SDP: boot -f imx-boot-dm395e-sd.bin-flash_evk #This command will be run when use SPL SDPU: delay 1000 SDPU: write -f imx-boot-dm395e-sd.bin-flash_evk -offset 0x57c00 SDPU: jump #This command will be run when ROM support stream mode SDPS: boot -f imx-boot-dm395e-sd.bin-flash_evk #These commands will be run when use SPL and will be skipped if no spl #if (SPL support SDPV) SDPV: delay 1000 SDPV: write -f imx-boot-dm395e-sd.bin-flash_evk -skipspl SDPV: jump FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev 2 FB: ucmd mmc dev 2 0 FB: flash -raw2sparse all imx-image-full-dm395e.wic FB: flash bootloader imx-boot-dm395e-sd.bin-flash_evk FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi; FB: ucmd mmc partconf 2 ${emmc_ack} 1 0 FB: done
After you have set your own file name, you could input the command below to install the Yocto Linux
uuu uuu.auto