Skip to content

Commit 4803603

Browse files
committed
Add the override task for u-boot-imx just for portenta-x8 MACHINE
1 parent 41fb346 commit 4803603

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

meta-arduino-bsp/recipes-bsp/u-boot/u-boot-imx_%.bbappend

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
22

3+
SRC_URI:append:portenta-x8 = " \
4+
file://Makefile \
5+
file://imx8mm_evk_defconfig \
6+
file://imx8mm-evk.dts \
7+
file://imx8mm-evk.dtsi \
8+
file://imx8mm-evk-u-boot.dtsi \
9+
file://imx8mm_evk.h \
10+
file://imx8mm_evk.c \
11+
file://spl.c \
12+
file://lpddr4_timing.c \
13+
"
14+
15+
do_override_files_portenta_x8 () {
16+
bbwarn Overriding files for ${MACHINE}
17+
18+
# Override Makefile
19+
cp ${WORKDIR}/Makefile ${S}/arch/arm/dts/Makefile
20+
21+
# @TODO: inspect UBOOT_CONFIG_BASENAME for defconfig in use
22+
cp ${WORKDIR}/imx8mm_evk_defconfig ${S}/configs/imx8mm_evk_defconfig
23+
24+
cp ${WORKDIR}/imx8mm-evk.dts ${S}/arch/arm/dts/imx8mm-evk.dts
25+
cp ${WORKDIR}/imx8mm-evk.dtsi ${S}/arch/arm/dts/imx8mm-evk.dtsi
26+
27+
# @TODO: u-boot auto-includes the *-u-boot.dtsi prepending MACHINE to the board devicetree
28+
# see scripts/Makefile.lib, so should never be included directly from board devicetree
29+
cp ${WORKDIR}/imx8mm-evk-u-boot.dtsi ${S}/arch/arm/dts/imx8mm-evk-u-boot.dtsi
30+
31+
cp ${WORKDIR}/imx8mm_evk.c ${S}/board/freescale/imx8mm_evk/imx8mm_evk.c
32+
cp ${WORKDIR}/lpddr4_timing.c ${S}/board/freescale/imx8mm_evk/lpddr4_timing.c
33+
cp ${WORKDIR}/spl.c ${S}/board/freescale/imx8mm_evk/spl.c
34+
35+
cp ${WORKDIR}/imx8mm_evk.h ${S}/include/configs/imx8mm_evk.h
36+
}
37+
338
SRC_URI:append:portenta-x8 = " \
439
file://board/anx7625.c \
540
file://board/anx7625.h \
@@ -91,7 +126,8 @@ SRC_URI:append:imx8mp-astrial = " \
91126
"
92127

93128
do_override_files_imx8mp_astrial () {
94-
bbwarn Overriding files for imx8mp-evk
129+
bbwarn Overriding files for ${MACHINE}
130+
95131
# Override Makefile
96132
cp ${WORKDIR}/Makefile ${S}/arch/arm/dts/Makefile
97133

@@ -117,7 +153,7 @@ do_override_files_imx8mp_astrial () {
117153

118154
python () {
119155
if d.getVar('MACHINE') == 'portenta-x8':
120-
bb.build.addtask('do_create_machine_portenta_x8', 'do_configure', 'do_patch', d)
156+
bb.build.addtask('do_override_files_portenta_x8', 'do_configure', 'do_patch', d)
121157
elif d.getVar('MACHINE') == 'portenta-x9':
122158
bb.build.addtask('do_override_files_portenta_x9', 'do_configure', 'do_patch', d)
123159
elif d.getVar('MACHINE') == 'imx8mp-astrial':

0 commit comments

Comments
 (0)