Personal tools

Difference between revisions of "Recipe for building Yocto4.0 Linux for PN8M-090T"

From ICOP tech wiki

Jump to: navigation, search
(Created page with "<br /> =Recipe for building Yocto 4.0 Linux for NX8MM-35= '''Recipe for building Yocto Linux for NX8MM-35''' *https://ftp.icop.com.tw/share/c1K4Ccfx '''Check the compiling...")
 
Line 3: Line 3:
 
'''Recipe for building Yocto Linux for NX8MM-35'''
 
'''Recipe for building Yocto Linux for NX8MM-35'''
  
*https://ftp.icop.com.tw/share/c1K4Ccfx
+
*For PN8M-B (WM8960): https://ftp.icop.com.tw/share/zAIDvtSY
 +
*For PN8M-C (WM8962): https://ftp.icop.com.tw/share/FYtqsTfk
  
 
'''Check the compiling method on the open document form NXP:'''
 
'''Check the compiling method on the open document form NXP:'''
Line 21: Line 22:
  
 
Essential Yocto Project host packages:<pre>
 
Essential Yocto Project host packages:<pre>
$ sudo apt-get install gawk wget git-core diffstat \
+
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
unzip texinfo gcc-multilib build-essential chrpath socat cpio \
+
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
python python3 python3-pip python3-pexpect xz-utils debianutils \
+
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \ pylint3 xterm
+
libsdl1.2-dev pylint3 xterm rsync curl zstd lz4c lz4 libssl-dev
 
</pre>
 
</pre>
  
Line 43: Line 44:
 
$ mkdir imx-yocto-bsp  
 
$ mkdir imx-yocto-bsp  
 
$ cd imx-yocto-bsp  
 
$ cd imx-yocto-bsp  
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-kirkstone -m imx-5.15.71-2.2.0.xm
+
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-kirkstone -m imx-5.15.71-2.2.0.xml
 
$ repo sync
 
$ repo sync
 
</pre>'''Step 6.''' Unzip the Recipe for building Yocto Linux for NX8MM-35 to the file ‘imx-yocto-bsp”
 
</pre>'''Step 6.''' Unzip the Recipe for building Yocto Linux for NX8MM-35 to the file ‘imx-yocto-bsp”
  
 
'''Step 7.''' Create the setup environment by command below (You could change the file name as you want)<pre>
 
'''Step 7.''' Create the setup environment by command below (You could change the file name as you want)<pre>
$ DISTRO=fsl-imx-xwayland MACHINE=dm446 source imx-setup-release.sh -b build-dmp
+
$ DISTRO=fsl-imx-xwayland MACHINE=dm421 source imx-setup-release.sh -b build-dmp
 
</pre>Please input “y” when the EULA confirmation pop out.
 
</pre>Please input “y” when the EULA confirmation pop out.
  
Line 66: Line 67:
 
</pre>The system will start to download and install source code, patch file, and compilation
 
</pre>The system will start to download and install source code, patch file, and compilation
 
=How to install the image file by UUU.=
 
=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.
+
After implemented bitbake imx-image-full, it will generate an image file and be stored in the file under build-dmp/tmp/deploy/images/dm421
  
In the build-dmp/tmp/deploy/images/dm395e file, we’ll need the file below for the image restoration.<pre>
+
In the build-dmp/tmp/deploy/images/dm421 file, we’ll need the file below for the image restoration.<pre>
 
1. imx-image-multimedia-dm446-20230923220316.rootfs.wic.zst
 
1. imx-image-multimedia-dm446-20230923220316.rootfs.wic.zst
 
2. imx-boot-dm446-sd.bin-flash_evk
 
2. imx-boot-dm446-sd.bin-flash_evk
Line 75: Line 76:
  
 
UUU application under Linux:https://github.com/NXPmicro/mfgtools/releases<pre>
 
UUU application under Linux:https://github.com/NXPmicro/mfgtools/releases<pre>
SDP: boot -f imx-boot-dm446-sd.bin-flash_evk
+
SDP: boot -f dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.bin-flash_evk
 
# This command will be run when use SPL
 
# This command will be run when use SPL
 
SDPU: delay 1000
 
SDPU: delay 1000
SDPU: write -f imx-boot-dm446-sd.bin-flash_evk -offset 0x57c00
+
SDPU: write -f dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.bin-flash_evk -offset 0x57c00
 
SDPU: jump
 
SDPU: jump
 
# This command will be run when ROM support stream mode
 
# This command will be run when ROM support stream mode
SDPS: boot -f imx-boot-dm446-sd.bin-flash_evk
+
SDPS: boot -f dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.bin-flash_evk
 
# These commands will be run when use SPL and will be skipped if no spl
 
# These commands will be run when use SPL and will be skipped if no spl
 
# if (SPL support SDPV)
 
# if (SPL support SDPV)
 
SDPV: delay 1000
 
SDPV: delay 1000
SDPV: write -f imx-boot-dm446-sd.bin-flash_evk -skipspl
+
SDPV: write -f dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.bin-flash_evk -skipspl
 
SDPV: jump
 
SDPV: jump
  
Line 91: Line 92:
 
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-multimedia-dm446-xxxxxxxxx.rootfs.wic.zst
+
FB: flash -raw2sparse all dm421-231108.wic
FB: flash bootloader imx-boot-dm446-sd.bin-flash_evk
+
FB: flash bootloader dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.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

Revision as of 13:56, 30 November 2023


Recipe for building Yocto 4.0 Linux for NX8MM-35

Recipe for building Yocto Linux for NX8MM-35

Check the compiling method on the open document form NXP:

Suggest O/S:Ubuntu 20.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 cpio python python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
libsdl1.2-dev pylint3 xterm rsync curl zstd lz4c lz4 libssl-dev


Step 2. Insalling the repo utility:

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-kirkstone -m imx-5.15.71-2.2.0.xml $ repo sync

Step 6. Unzip the Recipe for building Yocto Linux for NX8MM-35 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=dm421 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 \
    Pulseaudio \
"

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/dm421

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

1. imx-image-multimedia-dm446-20230923220316.rootfs.wic.zst
2. imx-boot-dm446-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):

$ tar -I zstd -xvf imx-image-multimedia-dm446-xxxxxxxxx.rootfs.wic.zst

Download the UUU.auto sample:https://ftp.icop.com.tw/share/6oK-EhMl UUU application under Linux:https://github.com/NXPmicro/mfgtools/releases

SDP: boot -f dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.bin-flash_evk
# This command will be run when use SPL
SDPU: delay 1000
SDPU: write -f dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.bin-flash_evk -offset 0x57c00
SDPU: jump
# This command will be run when ROM support stream mode
SDPS: boot -f dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.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 dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.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 dm421-231108.wic
FB: flash bootloader dm421-231017-wm8960.bin-flash_evk or dm421-231017-wm8962.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