@@ -2112,6 +2112,7 @@ N: Laurent Vivier <laurent@vivier.eu>
F: package/petitboot/
N: Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>
+F: package/freescale-imx/imx-oei/
F: package/freescale-imx/imx-sm/
N: Lee Jones <lee.jones@linaro.org>
@@ -208,6 +208,7 @@ source "package/freescale-imx/imx-codec/Config.in"
source "package/freescale-imx/imx-kobs/Config.in"
source "package/freescale-imx/imx-lib/Config.in"
source "package/freescale-imx/imx-m4fwloader/Config.in"
+source "package/freescale-imx/imx-oei/Config.in"
source "package/freescale-imx/imx-parser/Config.in"
source "package/freescale-imx/imx-uuc/Config.in"
source "package/freescale-imx/imx-vpu/Config.in"
new file mode 100644
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_IMX_OEI
+ bool "imx-oei"
+ help
+ imx-oei contains the source code for the Optional Executable
+ Image (OEI), which is a piece of code executed by the boot CPU
+ that initializes various aspects of the hardware
+ (i.e. DDR, TCM).
+
+ https://github.com/nxp-imx/imx-oei
+
+if BR2_PACKAGE_IMX_OEI
+config BR2_PACKAGE_IMX_OEI_TARGET_BOARD
+ string "Target board"
+ default "mx95lp5"
+ help
+ Which board to build the OEI for.
+
+config BR2_PACKAGE_IMX_OEI_TARGET_REV
+ string
+ default "b0" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX95B0
+endif # BR2_PACKAGE_IMX_OEI
new file mode 100644
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256 83e28f7e02321ed0ca6d0c4a83c85f8dbef564325b6232fcc9fa609bfdc45903 imx-oei-lf-6.12.49-2.2.0.tar.gz
+sha256 38e5f362f6141e65856fbfd9f3e0a1b75c897e58f08050186c6af0f6b23f6a3f LICENSE.txt
+sha256 4f20bab3e1176bddb4ce8494fa3a12301fa243db755a549443fbbfd979a237e3 SCR.txt
new file mode 100644
@@ -0,0 +1,29 @@
+################################################################################
+#
+# imx-oei
+#
+################################################################################
+
+IMX_OEI_VERSION = lf-6.12.49-2.2.0
+IMX_OEI_SITE = $(call github,nxp-imx,imx-oei,$(IMX_OEI_VERSION))
+IMX_OEI_LICENSE = BSD-3-Clause
+IMX_OEI_LICENSE_FILES = LICENSE.txt SCR.txt
+
+IMX_OEI_DEPENDENCIES += host-arm-gnu-toolchain
+
+# TODO: for now we only support OEI for DDR intialization
+IMX_OEI_OUTPUT_BIN = oei-m33-ddr.bin
+
+# no TOOLS variable - see rationale from imx-sm package
+IMX_OEI_MAKE_OPTS = \
+ OEI_CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi-
+
+define IMX_OEI_BUILD_CMDS
+ $(IMX_OEI_MAKE_OPTS) $(MAKE) -C $(@D) oei=ddr board=$(BR2_PACKAGE_IMX_OEI_TARGET_BOARD) r=$(BR2_PACKAGE_IMX_OEI_TARGET_REV)
+endef
+
+define IMX_OEI_INSTALL_TARGET_CMDS
+ cp $(@D)/build/$(BR2_PACKAGE_IMX_OEI_TARGET_BOARD)/ddr/$(IMX_OEI_OUTPUT_BIN) $(BINARIES_DIR)/$(IMX_OEI_OUTPUT_BIN)
+endef
+
+$(eval $(generic-package))