diff options
Diffstat (limited to 'meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp')
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend new file mode 100644 index 00000000..178c982a --- /dev/null +++ b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend @@ -0,0 +1,27 @@ + +do_deploy_append_raspberrypi4() { + # if ARMSTUB is set, it should be set in config.txt by earlier recipes, so replace it + if [ -n "${ARMSTUB}" ]; then + sed -i 's/^armstub=.*/armstub=bl31.bin/' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + + if ! grep '^enable_gic' config.txt; then + sed -i 's/^enable_gic=.*/enable_gic=1/' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + else + echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + + # otherwise, set it + else + echo "# ARM stub configuration" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "armstub=bl31.bin" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + + sed -i -e "s#dtoverlay=mcp2515.*##g" ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable CAN (Waveshare RS485 CAN HAT)" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + + +} + + diff --git a/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend new file mode 100644 index 00000000..158eb6e8 --- /dev/null +++ b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -0,0 +1,21 @@ +COMPATIBLE_MACHINE = "raspberrypi4" +TFA_BUILD_TARGET = "bl31" +TFA_PLATFORM = "rpi4" + +# Skip installing the binary into /lib/firmware. We only need it on the boot +# partition that is generated from the files in DEPLOYDIR +do_install[noexec] = "1" + +FILES_${PN} = "" + +do_deploy() { + if ${@"true" if d.getVar('TFA_DEBUG') == '1' else "false"}; then + BUILD_PLAT=${B}/${BUILD_DIR}/debug/ + else + BUILD_PLAT=${B}/${BUILD_DIR}/release/ + fi + + install -d ${DEPLOYDIR}/bcm2835-bootfiles + cp ${BUILD_PLAT}/bl31.bin ${DEPLOYDIR}/bcm2835-bootfiles/bl31.bin +} + |