summaryrefslogtreecommitdiffstats
path: root/meta-agl-jailhouse/dynamic-layers
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-jailhouse/dynamic-layers')
-rw-r--r--meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend27
-rw-r--r--meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend21
-rw-r--r--meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-extended/jailhouse/jailhouse_%.bbappend2
-rw-r--r--meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend2
-rw-r--r--meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4%.bbappend4
5 files changed, 56 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
+}
+
diff --git a/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-extended/jailhouse/jailhouse_%.bbappend b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-extended/jailhouse/jailhouse_%.bbappend
new file mode 100644
index 00000000..1d8ea6b7
--- /dev/null
+++ b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-extended/jailhouse/jailhouse_%.bbappend
@@ -0,0 +1,2 @@
+DEPENDS_append_raspberrypi4 = " trusted-firmware-a"
+
diff --git a/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
new file mode 100644
index 00000000..0616c06e
--- /dev/null
+++ b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -0,0 +1,2 @@
+# required for Jailhouse to work with the supplied cell confiugrations
+CMDLINE_append = " mem=768M" \ No newline at end of file
diff --git a/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4%.bbappend b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4%.bbappend
new file mode 100644
index 00000000..7e37d21b
--- /dev/null
+++ b/meta-agl-jailhouse/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4%.bbappend
@@ -0,0 +1,4 @@
+LINUX_VERSION = "5.4.51"
+SRCREV = "2c8ec3bb4403a7c76c22ec6d3d5fc4b2a366024e"
+
+require recipes-kernel/linux/linux-jailhouse-5.4.inc