From 205dd11af593c2e5a1c116a20a44527e8ea74bf2 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 12 Nov 2023 02:21:51 +0100 Subject: [PATCH] extensions: `grub-with-dtb`: add UMS menu entry to GRUB if initramfs ums hook is detected - this allows user to enter UMS mode from GRUB - for usage with the `initramfs-usb-gadget-ums` extension - has no effect unless `initramfs-usb-gadget-ums` extension is enabled together with `grub-with-dtb` --- packages/blobs/grub/09_linux_with_dtb.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/blobs/grub/09_linux_with_dtb.sh b/packages/blobs/grub/09_linux_with_dtb.sh index 51ab7cd97..3fcd7b6e9 100644 --- a/packages/blobs/grub/09_linux_with_dtb.sh +++ b/packages/blobs/grub/09_linux_with_dtb.sh @@ -503,6 +503,10 @@ while [ "x$list" != "x" ]; do "${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}" fi + if [ -f /etc/initramfs-tools/scripts/init-premount/usb-gadget-ums.sh ]; then + linux_entry "${OS}" "${version}" init-ums "initrd=ums ums=yes ${GRUB_CMDLINE_LINUX}" + fi + list=$(echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' ') done