diff options
author | Leon Anavi <leon.anavi@konsulko.com> | 2019-08-06 15:28:01 +0300 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-08-13 15:37:37 +0000 |
commit | 87104912d96366b44ee6e0ad11cb3fc2bde8369c (patch) | |
tree | 47300457879919ec82d5429744c1c02fdeb5a65f /meta-agl-bsp/meta-raspberrypi/recipes-kernel | |
parent | b278ddfbb42187ae9db0ec1910a3d17bebff18a9 (diff) |
create-combined-dtb: Check if DTB files exist
Check if files exist before creating and deploying DTB. In some
cases, for example with AGL SOTA, the DTB and DTBO files might
not exist and without checks the recipe will fail.
Bug-AGL: SPEC-2729, SPEC-1775
Change-Id: Id96e0c56989569feead076406534334766604cfd
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
(cherry picked from commit 6e89e0296dd28b0c0e9f0f0693f096c281b9d908)
Diffstat (limited to 'meta-agl-bsp/meta-raspberrypi/recipes-kernel')
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb index 7cc76c06e..6b20f1f89 100644 --- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb +++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb @@ -16,20 +16,32 @@ do_compile[depends] += "virtual/kernel:do_deploy" do_compile () { # Official touchscreen setup (rpi3b/rpi3b dtb, vc4-kms-v3d and ft5406) - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fi # HDMI screen setup (rpi3b/rpi3b dtb and vc4-kms-v3d) - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fi } do_deploy () { install -d ${DEPLOY_DIR_IMAGE} - install -m 0644 ${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} - install -m 0644 ${S}/bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} - install -m 0644 ${S}/bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE} - install -m 0644 ${S}/bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE} + if [ -f "${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} + fi + if [ -f "${S}/bcm2710-rpi-3+vc4+ft5406.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} + fi + if [ -f "${S}/bcm2710-rpi-3-b+vc4.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE} + fi + if [ -f "${S}/bcm2710-rpi-3+vc4.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE} + fi } addtask deploy after do_install |