Added function to boot directly to DSM from Grub

This commit is contained in:
Fabio Belavenuto
2022-10-13 13:45:09 -03:00
parent 98c7c67b23
commit c1920c76ab
11 changed files with 39 additions and 16 deletions

View File

@@ -5,16 +5,18 @@ insmod test
terminal_input console
terminal_output console
set default="0"
set default="boot"
set timeout="5"
set timeout_style="menu"
insmod loadenv
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
if [ "${default}" ]; then
set default="${default}"
fi
if [ "${next_entry}" ]; then
set default="${next_entry}"
set next_entry=
save_env next_entry
@@ -36,14 +38,6 @@ else
insmod vga
fi
insmod font
if loadfont ${prefix}/fonts/unicode.pf2; then
insmod gfxterm
set gfxmode=auto
set gfxpayload=keep
terminal_output gfxterm
fi
insmod serial
if serial --unit=0 --speed=115200; then
terminal_input --append serial_com0
@@ -53,6 +47,16 @@ fi
insmod search
search --set=root --label "ARPL3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
if [ "${default}" = "direct" ]; then
set timeout="1"
menuentry 'Boot DSM kernel directly' --id direct {
echo "Loading DSM kernel..."
linux /zImage-dsm ${dsm_cmdline}
echo "Loading DSM initramfs..."
initrd /initrd-dsm
echo "Booting..."
}
fi
menuentry 'Boot DSM' --id boot {
echo "Loading kernel..."
linux /bzImage-arpl console=ttyS0,115200n8 quiet net.ifnames=0 biosdevname=0