meta-somdevices: Added u-boot-somdevices necessary changes:
authorJosep Orga <jorga@somdevices.com>
Mon, 15 Nov 2021 12:30:08 +0000 (13:30 +0100)
committerJosep Orga <jorga@somdevices.com>
Mon, 15 Nov 2021 12:30:08 +0000 (13:30 +0100)
ยท imx-boot bbappend to link device tree file.

Signed-off-by: Josep Orga <jorga@somdevices.com>
recipes-bsp/imx-boot/imx-boot_%.bbappend [new file with mode: 0644]
recipes-bsp/u-boot/u-boot-common.inc [new file with mode: 0644]
recipes-bsp/u-boot/u-boot-somdevices_2021.04.bb [new file with mode: 0644]

diff --git a/recipes-bsp/imx-boot/imx-boot_%.bbappend b/recipes-bsp/imx-boot/imx-boot_%.bbappend
new file mode 100644 (file)
index 0000000..8a9d294
--- /dev/null
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+PR = "somdevices.0"
+MAINTAINER = "SomDevices <somdevices@somdevices.com>"
+
+compile_mx8m_append () {
+    ln -sf ${BOOT_STAGING}/${UBOOT_DTB_NAME}   ${BOOT_STAGING}/imx8mm-evk.dtb
+}
diff --git a/recipes-bsp/u-boot/u-boot-common.inc b/recipes-bsp/u-boot/u-boot-common.inc
new file mode 100644 (file)
index 0000000..a0212e1
--- /dev/null
@@ -0,0 +1,15 @@
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+DEPENDS += "flex-native bison-native"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"
+PE = "1"
+
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "3c99166441bf3ea325af2da83cfe65430b49c066"
+
+SRC_URI = "git://git.denx.de/u-boot.git"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-bsp/u-boot/u-boot-somdevices_2021.04.bb b/recipes-bsp/u-boot/u-boot-somdevices_2021.04.bb
new file mode 100644 (file)
index 0000000..5711b77
--- /dev/null
@@ -0,0 +1,55 @@
+DESCRIPTION = "i.MX U-Boot suppporting SOMDEVICES boards."
+require u-boot-common.inc
+require recipes-bsp/u-boot/u-boot.inc
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PROVIDES += "u-boot"
+DEPENDS_append = " dtc-native"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+UBOOT_SRC ?= "git://gitolite3@git.somdevices.com/u-boot.git;protocol=ssh"
+SRCBRANCH = "imx_v2021.04_5.10.35_2.0.0-somdevices.y"
+SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH} \
+"
+SRCREV = "c94ef7ea604393f614f64ad896d970e01aec8770"
+PR = "somdevices.0"
+
+S = "${WORKDIR}/git"
+
+inherit fsl-u-boot-localversion
+
+LOCALVERSION ?= "-5.10.35-2.0.0"
+
+BOOT_TOOLS = "imx-boot-tools"
+
+do_deploy_append_mx8m () {
+    # Deploy u-boot-nodtb.bin and fsl-imx8mq-XX.dtb, to be packaged in boot binary by imx-boot
+    if [ -n "${UBOOT_CONFIG}" ]
+    then
+        for config in ${UBOOT_MACHINE}; do
+            i=$(expr $i + 1);
+            for type in ${UBOOT_CONFIG}; do
+                j=$(expr $j + 1);
+                if [ $j -eq $i ]
+                then
+                    install -d ${DEPLOYDIR}/${BOOT_TOOLS}
+                    install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME}  ${DEPLOYDIR}/${BOOT_TOOLS}
+                    install -m 0777 ${B}/${config}/u-boot-nodtb.bin  ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type}
+                fi
+            done
+            unset  j
+        done
+        unset  i
+    fi
+
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
+
+UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
+UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
+UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"