Skip to main content

Introduction

How to compile Yocto 5.1 on the new Advantech NXP BSP? Based on NXP Yocto 5.1-6.12.3 version + Advantech Meta Layer

Step 1: Initialize Yocto Environment

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

$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
-----------------------------------------------------
### If you suffer "server certificate verification failed", you can use the following command to disable SSL verification in git repositories with self-signed certificates
### If you get "The unauthenticated git protocol on port 9418 is no longer supported.", you can try "git config --global url."https://".insteadOf git://"
-----------------------------------------------------
$ export GIT_SSL_NO_VERIFY=1
$ git config --global http.sslverify false
$ git config --global url."https://".insteadOf git://
-----------------------------------------------------
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-styhead -m imx-6.12.3-1.0.0.xml
$ repo sync

Check sources folders:

sources/
├── base
├── meta-arm
├── meta-browser
├── meta-clang
├── meta-freescale
├── meta-freescale-3rdparty
├── meta-freescale-distro
├── meta-imx
├── meta-nxp-connectivity
├── meta-nxp-demo-experience
├── meta-openembedded
├── meta-qt6
├── meta-security
├── meta-timesys
├── meta-virtualization
└── poky

Step 2: Get Advantech Meta Layer

$ cd sources
$ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/meta-advantech-nxp/_git/meta-advantech-nxp -b styhead-6.12.3
$ mv meta-advantech-nxp meta-advantech

Updated sources folder:

sources/
├── base
├── meta-advantech
├── meta-arm
├── meta-browser
├── meta-clang
├── meta-freescale
├── meta-freescale-3rdparty
├── meta-freescale-distro
├── meta-imx
├── meta-nxp-connectivity
├── meta-nxp-demo-experience
├── meta-openembedded
├── meta-qt6
├── meta-security
├── meta-timesys
├── meta-virtualization
└── poky

Step 3: Compile Yocto

Example for XWayland and imx8mprsb3720a2 board:

$ MACHINE=imx8mprsb3720a2 DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b rsb3720

Enabling the Advantech BSP Layer

To enable the layer, add the following line to the end of conf/bblayers.conf:

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

Then start the build:

$ bitbake imx-image-core

The Advantech Meta Layer Tree Structure

meta-advantech-nxp/
├── conf
│   ├── layer.conf
│   └── machine
│   ├── imx8mprom5722a2.conf
│   ├── imx8mprsb3720a2.conf
│   ├── imx8ulprom2620a1.conf
│   ├── imx93afee420a1.conf
│   └── imx93rom2820a1.conf
├── README.md
├── recipes-bsp
│   └── u-boot
│   ├── u-boot-imx
│   │   ├── board
│   │   │   ├── 0001-change-debug-port-uart3.patch
│   │   │   ├── 0001-support_eth0_eth1_MAC_address_from_spi.patch
│   │   │   ├── change_debug_port_uart3.inc
│   │   │   └── support_ethernet_MAC_address.inc
│   │   ├── drivers
│   │   │   └── spi
│   │   │   ├── 0001-spi_controller_not_support_advanced_features.patch
│   │   │   └── spi_controller_not_support_advanced_features.inc
│   │   ├── imx8mprom5722a2
│   │   │   └── imx8mprom5722a2.inc
│   │   ├── imx8mprsb3720a2
│   │   │   ├── imx8mp-rsb3720-a2.dts
│   │   │   ├── imx8mprsb3720a2.inc
│   │   │   ├── imx8mp-rsb3720-a2-u-boot.dtsi
│   │   │   └── lpddr4_timing_rsb3720a2_6G.c
│   │   ├── imx8ulprom2620a1
│   │   │   ├── 0001-modify-dts.patch
│   │   │   ├── imx8ulprom2620a1.inc
│   │   │   └── lpddr4_timing_rom2620a1_1G.c
│   │   ├── imx93afee420a1
│   │   │   ├── imx93-afee420-a1.dts
│   │   │   ├── imx93afee420a1.inc
│   │   │   ├── imx93-afee420-a1-u-boot.dtsi
│   │   │   └── lpddr4x_timing_afee420a1.c
│   │   └── imx93rom2820a1
│   │   └── imx93rom2820a1.inc
│   └── u-boot-imx_2024.04.bbappend
└── recipes-kernel
└── linux
├── linux-imx
│   ├── drivers
│   │   ├── 0001-ewm-c109f601e_3g_module.patch
│   │   ├── enable_sysfs_gpio.inc
│   │   ├── ewm-c109f601e_3g_module.inc
│   │   ├── GPIO
│   │   │   ├── 0001-gpio-enable_sysfs.cfg
│   │   │   └── 0001-gpio-remove_sysfs_expert_condition.patch
│   │   ├── watchdog_advantech.c
│   │   └── watchdog_advantech.inc
│   ├── imx8mprom5722a2
│   │   ├── imx8mp-rom5722-a2.dts
│   │   ├── imx8mp-rom5722-a2.inc
│   │   └── rtc-support.cfg
│   ├── imx8mprsb3720a2
│   │   ├── imx8mp-rsb3720-a2.dts
│   │   ├── imx8mprsb3720a2.inc
│   │   └── rtc-support.cfg
│   ├── imx8ulprom2620a1
│   │   ├── imx8ulp-rom2620-a1.dts
│   │   ├── imx8ulprom2620a1.inc
│   │   ├── lt9211-driver-fixup.patch
│   │   └── lvds-support.cfg
│   ├── imx93afee420a1
│   │   ├── 01-rtc-rx8900.cfg
│   │   ├── 02-freescale-flexcan-support.cfg
│   │   ├── 03-acodec-sgtl5000-support.cfg
│   │   ├── 04-rtl8723bs-wlan-support.cfg
│   │   ├── 05-realtek-bt-protocol-support.cfg
│   │   ├── 06-ppp-support.cfg
│   │   ├── 07-usbserial-netcdc-support.cfg
│   │   ├── imx93-afee420-a1.dts
│   │   └── imx93afee420a1.inc
│   └── imx93rom2820a1
│   ├── imx93-rom2820-a1.dts
│   └── imx93rom2820a1.inc
└── linux-imx_6.%.bbappend