Skip to content

Commit

Permalink
bsp: meta-freescale: Convert to the new override subsystem
Browse files Browse the repository at this point in the history
[1] updated the override subsystem used in meta-freescale, and now it includes
the BSP, with 3 options:

  imx*-generic-bsp
  imx*-nxp-bsp
  imx*-mainline-bsp

Generic options (machine specific, not BSP) were updated to
imx-generic-bsp, while options specific to the NXP BSP (e.g. kernel,
wireless driver, etc) were updated to use the respective imx*-nxp-bsp
overrides.

[1] Freescale/meta-freescale@30f5ce1

Signed-off-by: Daiane Angolini <[email protected]>
Signed-off-by: Ricardo Salveti <[email protected]>
  • Loading branch information
angolini authored and ricardosalveti committed May 27, 2022
1 parent 5e6ff01 commit 2aa3b9a
Show file tree
Hide file tree
Showing 13 changed files with 201 additions and 197 deletions.
266 changes: 135 additions & 131 deletions meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions meta-lmp-bsp/conf/machine/include/lmp-mfgtool-machine-custom.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,51 @@ KERNEL_IMAGETYPE:imx7ulpea-ucom = "fitImage"
KERNEL_CLASSES:imx7ulpea-ucom = " kernel-lmp-fitimage "

# iMX6UL
UBOOT_SIGN_ENABLE:mx6ul = "1"
PREFERRED_PROVIDER_virtual/kernel:mx6ul = "linux-lmp-dev-mfgtool"
IMX_DEFAULT_BOOTLOADER:mx6ul ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx6ul = "u-boot-ostree-scr-fit"
UBOOT_CLASSES:mx6ul = "uboot-fitimage"
IMAGE_BOOT_FILES:remove:mx6ul = "boot.scr uEnv.txt zImage"
IMAGE_BOOT_FILES:append:mx6ul = " boot.itb SPL u-boot.itb"
KERNEL_IMAGETYPE:mx6ul = "fitImage"
KERNEL_CLASSES:mx6ul = " kernel-lmp-fitimage "
UBOOT_SIGN_ENABLE:mx6ul-generic-bsp = "1"
PREFERRED_PROVIDER_virtual/kernel:mx6ul-nxp-bsp = "linux-lmp-dev-mfgtool"
IMX_DEFAULT_BOOTLOADER:mx6ul-generic-bsp ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx6ul-generic-bsp = "u-boot-ostree-scr-fit"
UBOOT_CLASSES:mx6ul-generic-bsp = "uboot-fitimage"
IMAGE_BOOT_FILES:remove:mx6ul-generic-bsp = "boot.scr uEnv.txt zImage"
IMAGE_BOOT_FILES:append:mx6ul-generic-bsp = " boot.itb SPL u-boot.itb"
KERNEL_IMAGETYPE:mx6ul-generic-bsp = "fitImage"
KERNEL_CLASSES:mx6ul-generic-bsp = " kernel-lmp-fitimage "

# iMX6ULL
UBOOT_SIGN_ENABLE:mx6ull = "1"
PREFERRED_PROVIDER_virtual/kernel:mx6ull = "linux-lmp-dev-mfgtool"
IMX_DEFAULT_BOOTLOADER:mx6ull ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx6ull = "u-boot-ostree-scr-fit"
UBOOT_CLASSES:mx6ull = "uboot-fitimage"
IMAGE_BOOT_FILES:remove:mx6ull = "boot.scr uEnv.txt zImage"
IMAGE_BOOT_FILES:append:mx6ull = " boot.itb SPL u-boot.itb"
KERNEL_IMAGETYPE:mx6ull = "fitImage"
KERNEL_CLASSES:mx6ull = " kernel-lmp-fitimage "
UBOOT_SIGN_ENABLE:mx6ull-generic-bsp = "1"
PREFERRED_PROVIDER_virtual/kernel:mx6ull-nxp-bsp = "linux-lmp-dev-mfgtool"
IMX_DEFAULT_BOOTLOADER:mx6ull-generic-bsp ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx6ull-generic-bsp = "u-boot-ostree-scr-fit"
UBOOT_CLASSES:mx6ull-generic-bsp = "uboot-fitimage"
IMAGE_BOOT_FILES:remove:mx6ull-generic-bsp = "boot.scr uEnv.txt zImage"
IMAGE_BOOT_FILES:append:mx6ull-generic-bsp = " boot.itb SPL u-boot.itb"
KERNEL_IMAGETYPE:mx6ull-generic-bsp = "fitImage"
KERNEL_CLASSES:mx6ull-generic-bsp = " kernel-lmp-fitimage "

# iMX8MQ
UBOOT_SIGN_ENABLE:mx8mq = "1"
PREFERRED_PROVIDER_virtual/kernel:mx8mq = "linux-lmp-dev-mfgtool"
IMX_DEFAULT_BOOTLOADER:mx8mq ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8mq = "u-boot-ostree-scr-fit"
IMAGE_BOOT_FILES:mx8mq = "imx-boot u-boot.itb boot.itb"
KERNEL_IMAGETYPE:mx8mq = "fitImage"
KERNEL_CLASSES:mx8mq = " kernel-lmp-fitimage "
UBOOT_SIGN_ENABLE:mx8mq-generic-bsp = "1"
PREFERRED_PROVIDER_virtual/kernel:mx8mq-nxp-bsp = "linux-lmp-dev-mfgtool"
IMX_DEFAULT_BOOTLOADER:mx8mq-generic-bsp ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8mq-generic-bsp = "u-boot-ostree-scr-fit"
IMAGE_BOOT_FILES:mx8mq-nxp-bsp = "imx-boot u-boot.itb boot.itb"
KERNEL_IMAGETYPE:mx8mq-generic-bsp = "fitImage"
KERNEL_CLASSES:mx8mq-generic-bsp = " kernel-lmp-fitimage "

# iMX8MPEVK
UBOOT_SIGN_ENABLE:mx8mp = "1"
IMX_DEFAULT_BOOTLOADER:mx8mp ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8mp = "u-boot-ostree-scr"
IMAGE_BOOT_FILES:mx8mp = "imx-boot u-boot.itb boot.itb"
KERNEL_IMAGETYPE:mx8mp = "fitImage"
KERNEL_CLASSES:mx8mp = " kernel-lmp-fitimage "
UBOOT_SIGN_ENABLE:mx8mp-generic-bsp = "1"
IMX_DEFAULT_BOOTLOADER:mx8mp-generic-bsp ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8mp-generic-bsp = "u-boot-ostree-scr"
IMAGE_BOOT_FILES:mx8mp-nxp-bsp = "imx-boot u-boot.itb boot.itb"
KERNEL_IMAGETYPE:mx8mp-generic-bsp = "fitImage"
KERNEL_CLASSES:mx8mp-generic-bsp = " kernel-lmp-fitimage "

# iMX8MM
UBOOT_SIGN_ENABLE:mx8mm = "1"
IMX_DEFAULT_BOOTLOADER:mx8mm ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8mm = "u-boot-ostree-scr"
IMAGE_BOOT_FILES:mx8mm = "imx-boot u-boot.itb boot.itb"
KERNEL_IMAGETYPE:mx8mm = "fitImage"
KERNEL_CLASSES:mx8mm = " kernel-lmp-fitimage "
UBOOT_SIGN_ENABLE:mx8mm-generic-bsp = "1"
IMX_DEFAULT_BOOTLOADER:mx8mm-generic-bsp ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8mm-generic-bsp = "u-boot-ostree-scr"
IMAGE_BOOT_FILES:mx8mm-nxp-bsp = "imx-boot u-boot.itb boot.itb"
KERNEL_IMAGETYPE:mx8mm-generic-bsp = "fitImage"
KERNEL_CLASSES:mx8mm-generic-bsp = " kernel-lmp-fitimage "

# Apalis-iMX6
UBOOT_SIGN_ENABLE:apalis-imx6 = "1"
Expand All @@ -71,10 +71,10 @@ KERNEL_IMAGETYPE:apalis-imx6 = "fitImage"
KERNEL_CLASSES:apalis-imx6 = " kernel-lmp-fitimage "

# iMX8QM-MEK and Apalis-iMX8
IMX_DEFAULT_BOOTLOADER:mx8qm ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8qm = "u-boot-ostree-scr-fit"
KERNEL_IMAGETYPE:mx8qm = "fitImage"
KERNEL_CLASSES:mx8qm = " kernel-lmp-fitimage "
UBOOT_SIGN_ENABLE:mx8qm = "1"
UBOOT_CLASSES:mx8qm = "uboot-fitimage"
IMAGE_BOOT_FILES:mx8qm = "imx-boot u-boot.itb boot.itb"
IMX_DEFAULT_BOOTLOADER:mx8qm-generic-bsp ?= "u-boot-fio-mfgtool"
PREFERRED_PROVIDER_u-boot-default-script:mx8qm-generic-bsp = "u-boot-ostree-scr-fit"
KERNEL_IMAGETYPE:mx8qm-generic-bsp = "fitImage"
KERNEL_CLASSES:mx8qm-generic-bsp = " kernel-lmp-fitimage "
UBOOT_SIGN_ENABLE:mx8qm-generic-bsp = "1"
UBOOT_CLASSES:mx8qm-generic-bsp = "uboot-fitimage"
IMAGE_BOOT_FILES:mx8qm-nxp-bsp = "imx-boot u-boot.itb boot.itb"
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SRC_URI:append:toradex = " \
file://0001-Revert-Add-NXP-s-SoCs-partition-reboot-support.patch \
"

do_deploy:append:mx8() {
do_deploy:append:mx8-nxp-bsp() {
install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/arm-trusted-firmware.bin
install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31/bl31.elf ${DEPLOYDIR}/arm-trusted-firmware.elf
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ DEPENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'virtual/optee-os'

SRC_URI:remove = " file://0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch"

SRC_URI:append:mx8m = " \
SRC_URI:append:mx8m-nxp-bsp = " \
file://0002-iMX8M-add-SPL-only-build.patch \
file://0003-iMX8M-add-support-for-packing-HDMI-fw-in-SPL-only-bo.patch \
file://0004-iMX8M-also-create-nohdmi-boot-image.patch \
file://0001-iMX8M-change-DDR-DMEM-padding.patch \
"

SRC_URI:append:mx8qm = " \
SRC_URI:append:mx8qm-nxp-bsp = " \
file://0001-iMX8QM-add-SPL-only-build.patch \
"

Expand All @@ -23,7 +23,7 @@ do_compile[depends] = " \
${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'virtual/optee-os:do_deploy', '', d)} \
"

do_compile:prepend:mx8() {
do_compile:prepend:mx8-nxp-bsp() {
for target in ${IMXBOOT_TARGETS}; do
if [ "${target}" = "flash_evk_spl" ]; then
# copy u-boot-spl-nodtb instead of u-boot-spl.bin as we need to have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ RPROVIDES:${PN} = "imx-sc-firmware"
RCONFLICTS:${PN} = "imx-sc-firmware"

BOARD_TYPE ?= "unknown"
SC_FIRMWARE_NAME:mx8qm = "mx8qm-${BOARD_TYPE}-scfw-tcm.bin"
SC_FIRMWARE_NAME:mx8qxp = "mx8qx-${BOARD_TYPE}-scfw-tcm.bin"
SC_FIRMWARE_NAME:mx8qm-nxp-bsp = "mx8qm-${BOARD_TYPE}-scfw-tcm.bin"
SC_FIRMWARE_NAME:mx8qxp-nxp-bsp = "mx8qx-${BOARD_TYPE}-scfw-tcm.bin"
symlink_name = "scfw_tcm.bin"

BOOT_TOOLS = "imx-boot-tools"
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-mfgtool_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

BOOT_TOOLS:mx8 = "imx-boot-tools"
BOOT_TOOLS:mx8-nxp-bsp = "imx-boot-tools"

# From u-boot-imx/meta-freescale
do_deploy:append:mx8() {
do_deploy:append:mx8-nxp-bsp() {
# Deploy u-boot-nodtb.bin and XX.dtb for mkimage to generate boot binary
if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
Expand Down Expand Up @@ -42,4 +42,4 @@ do_deploy:append:mx8() {
}

# disable branch protection to fix SPL size overrun issue
TOOLCHAIN_OPTIONS:append:mx8mp = ' -mbranch-protection=none'
TOOLCHAIN_OPTIONS:append:mx8mp-nxp-bsp = ' -mbranch-protection=none'
4 changes: 2 additions & 2 deletions meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

BOOT_TOOLS:mx8 = "imx-boot-tools"
BOOT_TOOLS:mx8-nxp-bsp = "imx-boot-tools"

# From u-boot-imx/meta-freescale
do_deploy:append:mx8() {
do_deploy:append:mx8-nxp-bsp() {
# Deploy u-boot-nodtb.bin and XX.dtb for mkimage to generate boot binary
if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
Expand Down
2 changes: 1 addition & 1 deletion meta-lmp-bsp/recipes-graphics/wayland/weston-init.bbappend
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# imx weston-init tries to uncomment [shell] for some machines
# this is already uncommented for lmp-wayland weston.ini so remove here
INI_UNCOMMENT_ASSIGNMENTS:remove:imx = "\\[shell\\]"
INI_UNCOMMENT_ASSIGNMENTS:remove:imx-nxp-bsp = "\\[shell\\]"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SRC_URI:append = "\
SRCREV_TIInit_11.8.32 ?= "31a43dc1248a6c19bb886006f8c167e2fd21cb78"

IMX_FIRMWARE_BRANCH ?= "lf-5.10.52_2.1.0"
SRC_URI:append:imx = "\
SRC_URI:append:imx-nxp-bsp = "\
git://github.com/NXP/imx-firmware.git;protocol=https;branch=${IMX_FIRMWARE_BRANCH};destsuffix=imx-firmware;name=imx-firmware; \
"
SRCREV_imx-firmware ?= "6d7f77b83164b08334806c4aa2034bc1f7da7b7d"
Expand All @@ -40,7 +40,7 @@ do_install:append:beaglebone-yocto() {
cp ${WORKDIR}/wl18xx-conf.bin ${D}${nonarch_base_libdir}/firmware/ti-connectivity/
}

do_install:append:imx () {
do_install:append:imx-nxp-bsp () {
# Install NXP Connectivity
install -d ${D}${nonarch_base_libdir}/firmware/nxp
install -m 0644 ${WORKDIR}/imx-firmware/nxp/wifi_mod_para.conf ${D}${nonarch_base_libdir}/firmware/nxp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ OPTEEMACHINE:imx8mq-evk = "imx-mx8mqevk"
OPTEEMACHINE:imx8qm-mek = "imx-mx8qmmek"

# SoC Settings
EXTRA_OEMAKE:append:mx8m = " \
EXTRA_OEMAKE:append:mx8m-nxp-bsp = " \
CFG_NXP_CAAM=y CFG_NXP_CAAM_RNG_DRV=y \
CFG_WITH_SOFTWARE_PRNG=n CFG_CRYPTO_DRIVER=y CFG_RNG_PTA=y \
CFG_DT=y CFG_EXTERNAL_DTB_OVERLAY=y CFG_DT_ADDR=0x43200000 \
"
EXTRA_OEMAKE:append:mx8qm = " \
EXTRA_OEMAKE:append:mx8qm-nxp-bsp = " \
CFG_DT=y CFG_EXTERNAL_DTB_OVERLAY=y CFG_DT_ADDR=0x83200000 \
"

Expand Down
4 changes: 2 additions & 2 deletions meta-lmp-bsp/recipes-security/optee/optee-os-fio-bsp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ OPTEEMACHINE:qemuarm64 = "vexpress-qemu_armv8a"
OPTEEMACHINE:zynqmp = "zynqmp-zcu102"

# SoC Settings
EXTRA_OEMAKE:append:mx8m = " \
EXTRA_OEMAKE:append:mx8m-nxp-bsp = " \
CFG_NXP_CAAM=y CFG_NXP_CAAM_RNG_DRV=y \
CFG_WITH_SOFTWARE_PRNG=n CFG_CRYPTO_DRIVER=y CFG_RNG_PTA=y \
CFG_DT=y CFG_EXTERNAL_DTB_OVERLAY=y CFG_DT_ADDR=0x43200000 \
"
EXTRA_OEMAKE:append:mx8qm = " \
EXTRA_OEMAKE:append:mx8qm-nxp-bsp = " \
CFG_DT=y CFG_EXTERNAL_DTB_OVERLAY=y CFG_DT_ADDR=0x83200000 \
"
EXTRA_OEMAKE:append:zynqmp = " \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ SRC_URI:append:imx8mp-lpddr4-evk-sec = " \

# Machine specific dependencies
def get_do_deploy_depends(d):
imxboot_families = ['mx8']
imxboot_families = ['mx8-nxp-bsp']
cur_families = (d.getVar('MACHINEOVERRIDES') or '').split(':')
if any(map(lambda x: x in cur_families, imxboot_families)):
return "imx-boot:do_deploy"
return ""

do_deploy[depends] += "${@get_do_deploy_depends(d)}"

do_deploy:prepend:mx8() {
do_deploy:prepend:mx8-nxp-bsp() {
install -d ${DEPLOYDIR}/${PN}
install -m 0644 ${DEPLOY_DIR_IMAGE}/imx-boot ${DEPLOYDIR}/${PN}/imx-boot-mfgtool
install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot.itb ${DEPLOYDIR}/${PN}/u-boot-mfgtool.itb
Expand All @@ -54,13 +54,13 @@ do_deploy:prepend:imx7ulpea-ucom() {
install -m 0644 ${DEPLOY_DIR_IMAGE}/fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE} ${DEPLOYDIR}/${PN}/fitImage-${MACHINE}-mfgtool
}

do_deploy:prepend:mx6ul() {
do_deploy:prepend:mx6ul-nxp-bsp() {
install -d ${DEPLOYDIR}/${PN}
install -m 0644 ${DEPLOY_DIR_IMAGE}/SPL ${DEPLOYDIR}/${PN}/SPL-mfgtool
install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot.itb ${DEPLOYDIR}/${PN}/u-boot-mfgtool.itb
}

do_deploy:prepend:mx6ull() {
do_deploy:prepend:mx6ull-nxp-bsp() {
install -d ${DEPLOYDIR}/${PN}
install -m 0644 ${DEPLOY_DIR_IMAGE}/SPL ${DEPLOYDIR}/${PN}/SPL-mfgtool
install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot.itb ${DEPLOYDIR}/${PN}/u-boot-mfgtool.itb
Expand Down

0 comments on commit 2aa3b9a

Please sign in to comment.