Recipe for building Yocto5.0 Linux for EBOX-IMX8MMINI
From ICOP tech wiki
Recipe for building Yocto 5.0 Linux for EBOX-IMX8MMINI
Recipe for building Yocto Linux for EBOX-IMX8MMINI
- For EBOX-IMX8MMINI (F version): https://ftp.icop.com.tw/share/83BXyu0v
Check the compiling method on the open document form NXP:
Suggest O/S:Ubuntu 20.04 or later.
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 install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file locales libacl1
Step 2. Change the python version under \user\bin\python and Insall the repo utility:
Change the shortcut under /usr/bin to python 3.8. or later
$ sudo ln -sf /usr/bin/python3.8 /usr/bin/python Use $ ls -l python to check the python status: Python -> python3.8
Create the bin folder in the home directory and dowlonad Freescale Community BSP
mkdir ~/bin sudo apt --yes install curl 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-scarthgap -m imx-6.6.36-2.1.0.xml $ repo sync
Step 6. Create the setup environment by command below
DISTRO=fsl-imx-xwayland MACHINE=dm395 source imx-setup-release.sh -b build-dmp
Please input “y” when the EULA confirmation pop out.
Step 7. Unzip the Recipe for building Yocto Linux for EBOX-IMX8MMINI to the file ‘imx-yocto-bsp”
(Merge and replaced the same file in the source and build-dmp folder)
Step 8. 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-boot-dm395.bin-flash_evk 2. imx-image-full-dm395-xxxxxxxx.wic.zst
Input command to get the image file - imx-image-full-dm395e.wic (In this file, there are packaged kernel and rootfs):
$ zstd -d imx-image-full-dm395-xxxxxxxx.wic.zst
Download the UUU.auto sample:https://ftp.icop.com.tw/share/6oK-EhMl UUU application under Linux:https://github.com/nxp-imx/mfgtools/releases
1. dm395-241121.bin 2. dm395-241121.wic
If we name the file in the image file like above, we could make a auto file like below:
uuu_version 1.0.1
SDP: boot -f dm395-241121.bin SDPU: delay 1000 SDPU: write -f dm395-241121.bin -offset 0x57c00 SDPU: jump SDPS: boot -f dm395-241121.bin SDPV: delay 1000 SDPV: write -f dm395-241121.bin -skipspl SDPV: jump
FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev 2 FB: ucmd mmc dev 2 0 FB: flash -raw2sparse all dm395-241121.wic FB: flash bootloader dm395-241121.bin 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