From ee843c14de8a549850908ec2274d26b3266f4c20 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 10 Feb 2023 10:41:52 +0000 Subject: [PATCH 1/3] RISC-V: rename cmdline.cfg to 10_cmdline.cfg Using numbered configuration fragments makes the order of application easier to track Signed-off-by: Heinrich Schuchardt --- live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 2 +- .../hooks.d/base/riscv64/grub/{cmdline.cfg => 10_cmdline.cfg} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/{cmdline.cfg => 10_cmdline.cfg} (100%) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index 8ef4fca6..b1bf2472 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -243,7 +243,7 @@ install_grub() { local my_d=$(dirname $(readlink -f ${0})) echo "Adjusting GRUB defaults for ${ARCH}" mkdir -p mountpoint/etc/default/grub.d/ - cp ${my_d}/riscv64/grub/cmdline.cfg mountpoint/etc/default/grub.d/ + cp ${my_d}/riscv64/grub/10_cmdline.cfg mountpoint/etc/default/grub.d/ case "${SUBARCH}" in "icicle") echo "Installing GRUB for ${SUBARCH} board" diff --git a/live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/cmdline.cfg b/live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/10_cmdline.cfg similarity index 100% rename from live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/cmdline.cfg rename to live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/10_cmdline.cfg From 0924d50aeed3004fcfdff78d412856c301b1ee3c Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 10 Feb 2023 10:53:00 +0000 Subject: [PATCH 2/3] RISC-V: avoid soft lockup Radeon GPUs with GRUB With Radeon GPUs and kernel 5.19 a soft lockup was observed. Increase the watchdog threshold. Signed-off-by: Heinrich Schuchardt --- live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 2 ++ .../hooks.d/base/riscv64/grub/90_watchdog-thresh.cfg | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/90_watchdog-thresh.cfg diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index b1bf2472..4c1341d4 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -247,6 +247,7 @@ install_grub() { case "${SUBARCH}" in "icicle") echo "Installing GRUB for ${SUBARCH} board" + 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. @@ -367,6 +368,7 @@ EOF setup_cinocloud mountpoint ;; *) + cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/ chroot mountpoint apt-get install -qqy u-boot-menu #grub-efi-riscv64 efi_target=riscv64-efi chroot mountpoint u-boot-update diff --git a/live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/90_watchdog-thresh.cfg b/live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/90_watchdog-thresh.cfg new file mode 100644 index 00000000..e9988e50 --- /dev/null +++ b/live-build/ubuntu-cpc/hooks.d/base/riscv64/grub/90_watchdog-thresh.cfg @@ -0,0 +1,3 @@ +# When booting with Radeon GPUs a soft lockup was observed. Increase the +# watchdog threshhold. +GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT sysctl.kernel.watchdog_thresh=60" From eea1308301ba09898c1474e21ad44a11b2d5b91c Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 10 Feb 2023 11:00:47 +0000 Subject: [PATCH 3/3] RISC-V: avoid soft lockup Radeon GPUs with u-boot-menu For the SiFive HiFive Unmatched board we create a pre-installed image using u-boot-menu. Increase the watchdog threshold in this case too. Signed-off-by: Heinrich Schuchardt --- live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 2 ++ .../hooks.d/base/riscv64/u-boot-menu/10_cmdline.conf | 1 + .../hooks.d/base/riscv64/u-boot-menu/90_watchdog-thresh.conf | 3 +++ 3 files changed, 6 insertions(+) create mode 100644 live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/10_cmdline.conf create mode 100644 live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/90_watchdog-thresh.conf diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index 4c1341d4..5bf703c9 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -370,6 +370,8 @@ EOF *) cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/ chroot mountpoint apt-get install -qqy u-boot-menu #grub-efi-riscv64 + mkdir -p mountpoint/etc/u-boot-menu/conf.d/ + cp ${my_d}/riscv64/u-boot-menu/*.conf mountpoint/etc/u-boot-menu/conf.d/ efi_target=riscv64-efi chroot mountpoint u-boot-update u_boot_arch="${SUBARCH}" diff --git a/live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/10_cmdline.conf b/live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/10_cmdline.conf new file mode 100644 index 00000000..380be66e --- /dev/null +++ b/live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/10_cmdline.conf @@ -0,0 +1 @@ +U_BOOT_PARAMETERS="ro efi=debug earlycon" diff --git a/live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/90_watchdog-thresh.conf b/live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/90_watchdog-thresh.conf new file mode 100644 index 00000000..d6340d33 --- /dev/null +++ b/live-build/ubuntu-cpc/hooks.d/base/riscv64/u-boot-menu/90_watchdog-thresh.conf @@ -0,0 +1,3 @@ +# When booting with Radeon GPUs a soft lockup was observed. Increase the +# watchdog threshhold. +U_BOOT_PARAMETERS="$U_BOOT_PARAMETERS sysctl.kernel.watchdog_thresh=60"