Skip to content
Snippets Groups Projects
Commit f79fbee6 authored by Tobias Kahlki's avatar Tobias Kahlki
Browse files

fng-install: Fixed post-install for fngsystem

The post-install for fngsystem is running in a temp directory.
This directory was missing the new artifacts (devicetree and overlays)
to properly run.
Further, the combine step of kernel + devicetree was failing for
fngsystem, because the fngsystem partition is too small (at least for
i.MX8 devices). To work around this, the post-install scripts checks
for a "combine_kernel" file in the boot partition and only combines
the kernel and the devicetree if the file is present.

Cherry-pick from 4c3847e5
parent 63eb17b2
No related branches found
No related tags found
1 merge request!268kernel:config: Enabled additional dmabuf drivers/frameworks
Pipeline #28953 passed with stage
in 7 seconds
......@@ -80,6 +80,14 @@ KERNEL_IMAGETYPE = "Image"
# Seems not to get set for i.MX8. So far, no idea how this is going to work... PIC?
LOADADDR = ""
IMAGE_BOOT_FILES:append = " \
devicetree \
"
IMAGE_BOOT_FILES:remove = " \
combine_kernel \
"
# @NOTE: The configuration of the WIC image is outdated.
# Since we don't use WIC images in general, we disable the
# creation for now.
......
......@@ -49,6 +49,7 @@ MACHINE_FEATURES = " \
IMAGE_BOOT_FILES:append = " \
${@' '.join([ dtb.split('/')[-1] for dtb in d.getVar('KERNEL_DEVICETREE').split() ] )} \
combine_kernel \
"
# Take the first devicetree from KERNEL_DEVICETREE as DEFAULT_DEVICETREE
......
......@@ -9,13 +9,19 @@ inherit deploy
RPROVIDES:${PN} += " boot-alt.cfg "
PROVIDES += " boot-alt.cfg "
RPROVIDES:${PN}:append:mx6 = " combine_kernel "
PROVIDES:append:mx6 = " combine_kernel "
RPROVIDES:${PN}:append:mx8 = " devicetree "
PROVIDES:append:mx8 = " devicetree "
SRC_URI = " \
file://boot-alt.cfg \
"
S = "${WORKDIR}"
RAMDISK_OFFSET="0x2C00000"
RAMDISK_OFFSET = "0x2C00000"
do_configure() {
# Insert the correct load address for the target platform
......@@ -24,6 +30,14 @@ do_configure() {
sed -i boot-alt.cfg -e "s|devicetree=.*|devicetree=${DEFAULT_DEVICETREE}|"
}
do_install:append:mx6() {
touch ${D}/boot/combine_kernel
}
do_install:append:mx8() {
echo ${DEFAULT_DEVICETREE} >> ${D}/boot/devicetree
}
do_install() {
install -d ${D}/boot
install -m 0644 ${S}/boot-alt.cfg ${D}/boot/boot-alt.cfg
......@@ -33,6 +47,17 @@ do_deploy() {
install ${S}/boot-alt.cfg ${DEPLOYDIR}/boot-alt.cfg
}
do_deploy:append:mx6() {
install ${D}/boot/combine_kernel ${DEPLOYDIR}/combine_kernel
}
do_deploy:append:mx8() {
install ${D}/boot/devicetree ${DEPLOYDIR}/devicetree
}
FILES:${PN} = "boot/boot-alt.cfg"
FILES:${PN}:append:mx6 = " boot/combine_kernel "
FILES:${PN}:append:mx8 = " boot/devicetree "
addtask do_deploy after do_install
do_deploy[cleandirs] = "${DEPLOYDIR}"
......@@ -9,6 +9,9 @@ inherit deploy
RPROVIDES:${PN} += " boot.cfg "
PROVIDES += " boot.cfg "
RPROVIDES:${PN}:append:mx6 = " combine_kernel "
PROVIDES:append:mx6 = " combine_kernel "
RPROVIDES:${PN}:append:mx8 = " devicetree "
PROVIDES:append:mx8 = " devicetree "
......@@ -22,6 +25,10 @@ do_configure() {
sed -i boot.cfg -e "s|devicetree=.*|devicetree=${DEFAULT_DEVICETREE}|"
}
do_install:append:mx6() {
touch ${D}/boot/combine_kernel
}
do_install() {
install -d ${D}/boot
install -m 0644 ${S}/boot.cfg ${D}/boot/boot.cfg
......@@ -32,4 +39,5 @@ do_install:append:mx8() {
}
FILES:${PN} = "boot/boot.cfg"
FILES:${PN}:append:mx6 = " boot/combine_kernel "
FILES:${PN}:append:mx8 = " boot/devicetree "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment