Skip to content

Commit f56d220

Browse files
authored
Merge pull request #2406 from tq-steina/backport-2402-to-walnascar
imx-oei: split recipe
2 parents 23fe595 + 06833fb commit f56d220

File tree

2 files changed

+63
-56
lines changed

2 files changed

+63
-56
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
INHIBIT_DEFAULT_DEPS = "1"
2+
DEPENDS = "gcc-arm-none-eabi-native"
3+
4+
S = "${WORKDIR}/git"
5+
6+
inherit deploy
7+
8+
PACKAGE_ARCH = "${MACHINE_ARCH}"
9+
10+
OEI_CONFIGS ?= "UNDEFINED"
11+
OEI_CORE ?= "UNDEFINED"
12+
OEI_SOC ?= "UNDEFINED"
13+
OEI_BOARD ?= "UNDEFINED"
14+
OEI_DDRCONFIG ?= ""
15+
16+
LDFLAGS[unexport] = "1"
17+
18+
EXTRA_OEMAKE = "\
19+
board=${OEI_BOARD} \
20+
DEBUG=1 \
21+
OEI_CROSS_COMPILE=arm-none-eabi-"
22+
23+
EXTRA_OEMAKE:append:mx95-generic-bsp = " r=${IMX_SOC_REV}"
24+
EXTRA_OEMAKE:append = " ${@' DDR_CONFIG=${OEI_DDRCONFIG}' if d.getVar('OEI_DDRCONFIG') else ''}"
25+
26+
do_configure() {
27+
for oei_config in ${OEI_CONFIGS}; do
28+
oe_runmake clean oei=$oei_config
29+
done
30+
}
31+
32+
do_compile() {
33+
for oei_config in ${OEI_CONFIGS}; do
34+
oe_runmake oei=$oei_config
35+
done
36+
}
37+
38+
do_install() {
39+
install -d ${D}/firmware
40+
for oei_config in ${OEI_CONFIGS}; do
41+
install -m 0644 ${B}/build/${OEI_BOARD}/$oei_config/oei-*.bin ${D}/firmware
42+
done
43+
}
44+
45+
addtask deploy after do_install
46+
do_deploy() {
47+
cp -rf ${D}/firmware/* ${DEPLOYDIR}/
48+
}
49+
50+
FILES:${PN} = "/firmware"
51+
SYSROOT_DIRS += "/firmware"
52+
53+
PROVIDES += "virtual/imx-oei"
54+
55+
COMPATIBLE_MACHINE = "(mx95-generic-bsp)"
Lines changed: 8 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,17 @@
11
SUMMARY = "i.MX Optional Execution Image"
2-
2+
DESCRIPTION = "\
3+
The Optional Executable Image (OEI) is an optional plugin loaded and executed \
4+
by Cortex-M processor ROM on many NXP i.MX processors. The Cortex-M is the \
5+
boot core, runs the boot ROM which loads the OEI, and then branches to the \
6+
OEI. The OEI then configures some aspects of the hardware such as DDR config, \
7+
init TCM ECC, etc. There could be multiple OEI images in the boot container. \
8+
After execution of OEI, the processor returns to ROM execution."
39
LICENSE = "BSD-3-Clause"
410
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b66f32a90f9577a5a3255c21d79bc619"
511

6-
INHIBIT_DEFAULT_DEPS = "1"
7-
DEPENDS = "gcc-arm-none-eabi-native"
8-
912
SRC_URI = "${IMX_OEI_SRC};branch=${SRCBRANCH}"
1013
IMX_OEI_SRC ?= "git://github.com/nxp-imx/imx-oei.git;protocol=https"
1114
SRCBRANCH = "master"
1215
SRCREV = "ca91ce798b2f3a2a0bab8c0f835f4bea88c9b080"
1316

14-
S = "${WORKDIR}/git"
15-
16-
inherit deploy
17-
18-
PACKAGE_ARCH = "${MACHINE_ARCH}"
19-
20-
OEI_CONFIGS ?= "UNDEFINED"
21-
OEI_CORE ?= "UNDEFINED"
22-
OEI_SOC ?= "UNDEFINED"
23-
OEI_BOARD ?= "UNDEFINED"
24-
OEI_DDRCONFIG ?= ""
25-
26-
LDFLAGS[unexport] = "1"
27-
28-
EXTRA_OEMAKE = "\
29-
board=${OEI_BOARD} \
30-
DEBUG=1 \
31-
OEI_CROSS_COMPILE=arm-none-eabi-"
32-
33-
EXTRA_OEMAKE:append:mx95-generic-bsp = " r=${IMX_SOC_REV}"
34-
EXTRA_OEMAKE:append = " ${@' DDR_CONFIG=${OEI_DDRCONFIG}' if d.getVar('OEI_DDRCONFIG') else ''}"
35-
36-
do_configure() {
37-
for oei_config in ${OEI_CONFIGS}; do
38-
oe_runmake clean oei=$oei_config
39-
done
40-
}
41-
42-
do_compile() {
43-
for oei_config in ${OEI_CONFIGS}; do
44-
oe_runmake oei=$oei_config
45-
done
46-
}
47-
48-
do_install() {
49-
install -d ${D}/firmware
50-
for oei_config in ${OEI_CONFIGS}; do
51-
install -m 0644 ${B}/build/${OEI_BOARD}/$oei_config/oei-*.bin ${D}/firmware
52-
done
53-
}
54-
55-
addtask deploy after do_install
56-
do_deploy() {
57-
cp -rf ${D}/firmware/* ${DEPLOYDIR}/
58-
}
59-
60-
FILES:${PN} = "/firmware"
61-
SYSROOT_DIRS += "/firmware"
62-
63-
PROVIDES += "virtual/imx-oei"
64-
65-
COMPATIBLE_MACHINE = "(mx95-generic-bsp)"
17+
require imx-oei.inc

0 commit comments

Comments
 (0)