From: Jan Kiszka <[email protected]>

Add the machine, multiconfig and wks file, extend the images.list.

The image is assembled very similarly to Raspbian, just focusing on the
support for the model 4. It is using the Raspberry bootloader to start
Linux directly but pulls in ATF before that. This implies that Linux
kernel updates on a target would need another manual step to update also
kernel.img in the boot partition.

Signed-off-by: Jan Kiszka <[email protected]>
---
 conf/machine/rpi4.conf                    | 35 +++++++++++++++++++++++++++++++
 conf/multiconfig/rpi4-jailhouse-demo.conf | 14 +++++++++++++
 images.list                               |  1 +
 wic/rpi4.wks                              | 14 +++++++++++++
 4 files changed, 64 insertions(+)
 create mode 100644 conf/machine/rpi4.conf
 create mode 100644 conf/multiconfig/rpi4-jailhouse-demo.conf
 create mode 100644 wic/rpi4.wks

diff --git a/conf/machine/rpi4.conf b/conf/machine/rpi4.conf
new file mode 100644
index 0000000..8038c1c
--- /dev/null
+++ b/conf/machine/rpi4.conf
@@ -0,0 +1,35 @@
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+DISTRO_ARCH = "arm64"
+
+IMAGE_TYPE = "wic-img"
+IMAGER_BUILD_DEPS = "rpi-firmware arm-trusted-firmware-rpi4 
linux-image-${KERNEL_NAME}"
+IMAGER_INSTALL += "${IMAGER_BUILD_DEPS}"
+
+IMAGE_BOOT_FILES = " \
+    /usr/lib/rpi-firmware/bootcode.bin;bootcode.bin \
+    /usr/lib/rpi-firmware/cmdline.txt;cmdline.txt \
+    /usr/lib/rpi-firmware/config.txt;config.txt \
+    /usr/lib/rpi-firmware/fixup4.dat;fixup4.dat \
+    /usr/lib/rpi-firmware/fixup4x.dat;fixup4x.dat \
+    /usr/lib/rpi-firmware/start4.elf;start4.elf \
+    /usr/lib/rpi-firmware/start4x.elf;start4x.elf \
+    /usr/lib/rpi-firmware/bcm2711-rpi-4-b.dtb;bcm2711-rpi-4-b.dtb \
+    /usr/lib/rpi-firmware/overlays/*;overlays/ \
+    /usr/lib/arm-trusted-firmware/rpi4/bl31.bin;bl31.bin \
+    /vmlinuz;kernel.img \
+    "
+
+KERNEL_NAME ?= "jailhouse-rpi"
+
+IMAGE_PREINSTALL_append = " firmware-brcm80211"
+IMAGE_INSTALL_append = " rpi-firmware-brcm80211"
diff --git a/conf/multiconfig/rpi4-jailhouse-demo.conf 
b/conf/multiconfig/rpi4-jailhouse-demo.conf
new file mode 100644
index 0000000..be37063
--- /dev/null
+++ b/conf/multiconfig/rpi4-jailhouse-demo.conf
@@ -0,0 +1,14 @@
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+MACHINE = "rpi4"
+
+DISTRO = "jailhouse-demo"
diff --git a/images.list b/images.list
index 8dfeca8..26a802d 100644
--- a/images.list
+++ b/images.list
@@ -6,3 +6,4 @@ espressobin     Marvell ESPRESSObin (1 GB edition)
 macchiatobin   Marvell MACCHIATObin
 hikey620       LeMaker HiKey (Kirin 620 SoC, 2 GB edition)
 ultra96                Avnet Ultra96
+rpi4           Raspberry Pi 4 (1 GB edition)
diff --git a/wic/rpi4.wks b/wic/rpi4.wks
new file mode 100644
index 0000000..12a8509
--- /dev/null
+++ b/wic/rpi4.wks
@@ -0,0 +1,14 @@
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+part --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot 
--align 1 --size 32 --overhead-factor 1 --extra-space 0
+
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label platform --align 
1024 --active
-- 
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/d1428ee6d639e5183002f3f13b5f948bb92337d2.1579170887.git.jan.kiszka%40siemens.com.

Reply via email to