From 1da6867784da3c499b2758691cce95e28bf492e8 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 8 Jul 2024 17:45:31 +0200 Subject: [PATCH] riscv64: preinstalled server image for Microchip PIC64GX Curiosity Kit Signed-off-by: Heinrich Schuchardt --- debian/changelog | 7 +++++++ live-build/auto/config | 5 +++-- .../hooks.d/base/disk-image-uefi-non-cloud.binary | 13 ++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 759f9984..d45b4f5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (24.04.74) UNRELEASED; urgency=medium + + * riscv64: preinstalled server image for Microchip PIC64GX Curiosity Kit + (LP: #2072956) + + -- Heinrich Schuchardt Mon, 08 Jul 2024 17:51:25 +0200 + livecd-rootfs (24.04.73) noble; urgency=medium * Build qcow2 images for ubuntu-core LXD support (LP: #2072759). diff --git a/live-build/auto/config b/live-build/auto/config index 5b0512e5..e30fd6b4 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -9,8 +9,8 @@ case $ARCH:$SUBARCH in i386:|\ ppc64el:|\ riscv64:|riscv64:generic|riscv64:icicle|riscv64:licheerv|\ - riscv64:milkvmars|riscv64:nezha|riscv64:unmatched|riscv64:visionfive|\ - riscv64:visionfive2|\ + riscv64:milkvmars|riscv64:nezha|riscv64:pic64gx|riscv64:unmatched|\ + riscv64:visionfive|riscv64:visionfive2|\ s390x:|\ *appliance*) ;; @@ -396,6 +396,7 @@ if [ "$IMAGEFORMAT" = "ext4" ] && [ "$PROJECT" = "ubuntu-cpc" ]; then riscv64:licheerv | \ riscv64:milkvmars | \ riscv64:nezha | \ + riscv64:pic64gx | \ riscv64:unmatched | \ riscv64:visionfive | \ riscv64:visionfive2 | \ diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary index 44d2e4cf..7e84fc4a 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary @@ -105,7 +105,7 @@ create_partitions() { --change-name=12:CIDATA \ --new=1:: \ --attributes=1:set:2 - elif [ "${SUBARCH:-}" = "icicle" ]; then + elif [ "${SUBARCH:-}" = "icicle" ] || [ "${SUBARCH:-}" = "pic64gx" ]; then # Microchip Icicle Kit sgdisk "${disk_image}" \ --set-alignment=2 \ @@ -328,6 +328,17 @@ install_grub() { loader1="${loop_device}p13" dd if=mountpoint/usr/lib/u-boot/${SUBARCH}/u-boot-sunxi-with-spl.bin of=$loader1 ;; + "pic64gx") + cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/ + # flash-kernel is needed to install the dtb for update-grub: it uses the + # /proc/device-tree/model value to pick the correct dtb and as we are in a chroot, + # the model value is wrong and we need to use /etc/flash-kernel/machine instead. + chroot mountpoint bash -c "echo 'Microchip PIC64GX Curiosity Kit' > /etc/flash-kernel/machine" + # u-boot-pic64gx contains the vendor U-Boot + chroot mountpoint apt-get install -qqy u-boot-pic64gx + loader="${loop_device}p13" + dd if=mountpoint/usr/lib/u-boot-pic64gx/u-boot.payload of=$loader + ;; "visionfive") # flash-kernel is needed to install the dtb for update-grub: it uses the # /proc/device-tree/model value to pick the correct dtb and as we are in a chroot,