Skip to content

Commit

Permalink
base: u-boot-ostree-scr-fit: move boot-common-imx to bsp
Browse files Browse the repository at this point in the history
Move i.MX-specific boot-common-imx.cmd.in to bsp sublayer.

Signed-off-by: Igor Opaniuk <[email protected]>
  • Loading branch information
igoropaniuk committed Dec 2, 2022
1 parent 9e042f9 commit 04ac5af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 5 additions & 3 deletions meta-lmp-base/recipes-bsp/u-boot/u-boot-ostree-scr-fit.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ DEPENDS = "dtc-native u-boot-mkimage-native"

SRC_URI = "file://boot.cmd \
file://boot-common.cmd.in \
file://boot-common-imx.cmd.in \
file://boot-common-alternative.cmd.in \
file://boot.its.in \
"
Expand All @@ -27,8 +26,11 @@ inherit deploy
do_configure[noexec] = "1"

do_compile() {
sed -e '/@@INCLUDE_COMMON_IMX@@/ {' -e 'r ${S}/boot-common-imx.cmd.in' -e 'd' -e '}' \
"${S}/boot.cmd" > boot.cmd.in
# Handle a case where there is no BSP modification and
# the original boot.cmd is used
if [ ! -f boot.cmd.in ]; then
cp "${S}/boot.cmd" boot.cmd.in
fi
sed -i -e '/@@INCLUDE_COMMON@@/ {' -e 'r ${S}/boot-common.cmd.in' -e 'd' -e '}' \
boot.cmd.in
sed -i -e '/@@INCLUDE_COMMON_ALTERNATIVE@@/ {' -e 'r ${S}/boot-common-alternative.cmd.in' -e 'd' -e '}' \
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI:append:imx-generic-bsp = " \
file://boot-common-imx.cmd.in \
"

do_compile:prepend:imx-generic-bsp() {
sed -e '/@@INCLUDE_COMMON_IMX@@/ {' -e 'r ${S}/boot-common-imx.cmd.in' -e 'd' -e '}' \
"${S}/boot.cmd" > boot.cmd.in
}

0 comments on commit 04ac5af

Please sign in to comment.