Skip to content

Commit

Permalink
base/bsp: linux-lmp*: switch 32-bit dtb logic to new solution
Browse files Browse the repository at this point in the history
Use backported compatibility logic for 32-bit dtb for boards with arm
architecture. This enables one to use new linux kernel versions.

Signed-off-by: Oleksandr Suvorov <[email protected]>
  • Loading branch information
MrCry0 committed Jun 25, 2024
1 parent 7ca8a26 commit 1030d39
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
7 changes: 0 additions & 7 deletions meta-lmp-base/classes/lmp-staging.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,9 @@ LMPSTAGING_INHERIT_KERNEL_MODSIGN = ""

LMPSTAGING_LOCK_TO_AVOID_OOM = "clang-native rust-native rust-llvm-native"

LMPSTAGING_KERN_ADD_ST_SUBDIR = ""

python __anonymous() {
pn = d.getVar('PN')

if pn == "linux-lmp" or pn == "linux-lmp-rt":
(major_ver, minor_ver, rest) = d.getVar('LINUX_VERSION').split(".")
if int(major_ver) > 6 or (int(major_ver) == 6 and int(minor_ver) >= 4):
d.setVar('LMPSTAGING_KERN_ADD_ST_SUBDIR', 'st/')

if bb.data.inherits_class('module', d):
d.appendVar('DEPENDS', ' virtual/kernel')
if 'modsign' in d.getVar('DISTRO_FEATURES'):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ SUMMARY = "Produces a Manufacturing Tool compatible Linux Kernel"
DESCRIPTION = "Linux Kernel recipe that produces a Manufacturing Tool \
compatible Linux Kernel to be used in updater environment"

KERNEL_DEVICETREE_32BIT_COMPATIBILITY_UPDATE = "1"

# Use Freescale kernel by default
KERNEL_REPO ?= "git://github.com/Freescale/linux-fslc.git"
KERNEL_REPO_PROTOCOL ?= "https"
Expand Down
2 changes: 2 additions & 0 deletions meta-lmp-base/recipes-kernel/linux/linux-lmp-rt_6.1.bb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include kmeta-linux-lmp-6.1.y.inc

KERNEL_DEVICETREE_32BIT_COMPATIBILITY_UPDATE = "1"

LINUX_VERSION ?= "6.1.90"
KBRANCH = "linux-v6.1.y-rt"
SRCREV_machine = "2c3f38782b565814ef32e585ce978327ff3dd96d"
Expand Down
2 changes: 2 additions & 0 deletions meta-lmp-base/recipes-kernel/linux/linux-lmp_6.1.bb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include kmeta-linux-lmp-6.1.y.inc

KERNEL_DEVICETREE_32BIT_COMPATIBILITY_UPDATE = "1"

LINUX_VERSION ?= "6.1.90"
KBRANCH = "linux-v6.1.y"
SRCREV_machine = "c505f2906af8638a5117f640e934f5f0de121c4b"
Expand Down
10 changes: 5 additions & 5 deletions meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WKS_FILE_DEPENDS:append:beaglebone-yocto = " u-boot-default-script"
PREFERRED_PROVIDER_u-boot-default-script:beaglebone-yocto = "u-boot-ostree-scr-fit"
SOTA_CLIENT_FEATURES:append:beaglebone-yocto = " ubootenv"
OSTREE_KERNEL_ARGS:beaglebone-yocto ?= "console=ttyS0,115200n8 ${OSTREE_KERNEL_ARGS_COMMON}"
KERNEL_DEVICETREE:append:beaglebone-yocto = " am335x-boneblack-wireless.dtb"
KERNEL_DEVICETREE:append:beaglebone-yocto = " ti/omap/am335x-boneblack-wireless.dtb"
IMAGE_BOOT_FILES:beaglebone-yocto = "u-boot.img MLO boot.itb"
KERNEL_IMAGETYPE:beaglebone-yocto = "fitImage"
KERNEL_CLASSES:beaglebone-yocto = " kernel-lmp-fitimage "
Expand Down Expand Up @@ -193,7 +193,7 @@ PREFERRED_VERSION_u-boot-fio:mx6ul-nxp-bsp ?= "imx-2023.04"
# iMX6UL EVK
UBOOT_SIGN_ENABLE:sota:imx6ulevk ?= "1"
SOTA_CLIENT_FEATURES:append:imx6ulevk = " ubootenv"
KERNEL_DEVICETREE:imx6ulevk = "imx6ul-14x14-evk.dtb"
KERNEL_DEVICETREE:imx6ulevk = "nxp/imx/imx6ul-14x14-evk.dtb"
BOOTSCR_LOAD_ADDR:imx6ulevk = "0x85000000"

# iMX6ULL
Expand Down Expand Up @@ -221,7 +221,7 @@ PREFERRED_VERSION_u-boot-fio:mx6ull-nxp-bsp ?= "imx-2023.04"
# iMX6ULL EVK
UBOOT_SIGN_ENABLE:sota:imx6ullevk ?= "1"
SOTA_CLIENT_FEATURES:append:imx6ullevk = " ubootenv"
KERNEL_DEVICETREE:imx6ullevk = "imx6ull-14x14-evk.dtb"
KERNEL_DEVICETREE:imx6ullevk = "nxp/imx/imx6ull-14x14-evk.dtb"
BOOTSCR_LOAD_ADDR:imx6ullevk = "0x85000000"

# iMX8QM
Expand Down Expand Up @@ -637,7 +637,7 @@ LMP_FLASHLAYOUT_BOARD_NAME:stm32mp15-eval = "stm32mp157c-ev1"
LMP_BOOT_FIRMWARE_FILES:stm32mp15-eval = "arm-trusted-firmware/tf-a-stm32mp157c-ev1-emmc.stm32 fip/fip-stm32mp157c-ev1-optee.bin"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append:stm32mp15-eval = " kernel kernel-devicetree u-boot-default-script"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS:remove:sota:stm32mp15-eval = "kernel kernel-devicetree u-boot-default-script"
KERNEL_DEVICETREE:stm32mp15-eval = "${LMPSTAGING_KERN_ADD_ST_SUBDIR}stm32mp157c-ev1-scmi.dtb"
KERNEL_DEVICETREE:stm32mp15-eval = "st/stm32mp157c-ev1-scmi.dtb"
## stm32mp15-disco
TF_A_SIGN_ENABLE:sota:stm32mp15-disco = "1"
UBOOT_SIGN_ENABLE:sota:stm32mp15-disco = "1"
Expand All @@ -659,7 +659,7 @@ WKS_FILE_DEPENDS:remove:stm32mp15-disco = "st-image-bootfs st-image-userfs"
WKS_FILE:stm32mp15-disco = "sdimage-stm32mp157c-dk2-optee.wks.in"
WKS_FILE:sota:stm32mp15-disco = "sdimage-stm32mp157c-dk2-optee-sota.wks.in"
LMP_BOOT_FIRMWARE_FILES:stm32mp15-disco = "arm-trusted-firmware/tf-a-stm32mp157c-dk2-sdcard.stm32 fip/fip-stm32mp157c-dk2-optee.bin"
KERNEL_DEVICETREE:stm32mp15-disco = "${LMPSTAGING_KERN_ADD_ST_SUBDIR}stm32mp157c-dk2-scmi.dtb"
KERNEL_DEVICETREE:stm32mp15-disco = "st/stm32mp157c-dk2-scmi.dtb"
## stm32mp15-eval-sec
SOTA_CLIENT_FEATURES:remove:sota:stm32mp15-eval-sec = "ubootenv"

Expand Down
2 changes: 2 additions & 0 deletions meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx_6.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# recipe available in -rt recipe.
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

KERNEL_DEVICETREE_32BIT_COMPATIBILITY_UPDATE = "1"

include recipes-kernel/linux/linux-lmp-fslc-imx.inc

include recipes-kernel/linux/kmeta-linux-lmp-6.1.y.inc
Expand Down

0 comments on commit 1030d39

Please sign in to comment.