mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-12-12 21:05:40 +07:00
354f92dd91
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
169 lines
3.9 KiB
INI
169 lines
3.9 KiB
INI
insmod search
|
|
insmod echo
|
|
insmod terminal
|
|
insmod test
|
|
insmod font
|
|
insmod loadenv
|
|
insmod serial
|
|
insmod usb_keyboard
|
|
insmod linux
|
|
insmod gzio
|
|
insmod fat
|
|
insmod ext2
|
|
insmod png
|
|
|
|
set default="boot"
|
|
set timeout="5"
|
|
set timeout_style="menu"
|
|
set vesa_mode=1
|
|
|
|
if [ -s $prefix/grubenv ]; then
|
|
load_env
|
|
fi
|
|
if [ "${next_entry}" ]; then
|
|
set default="${next_entry}"
|
|
unset next_entry
|
|
save_env next_entry
|
|
fi
|
|
if [ "${vesa_mode}" ]; then
|
|
set vesa_mode=${vesa_mode}
|
|
fi
|
|
|
|
function load_video {
|
|
if [ x$feature_all_video_module = xy ]; then
|
|
insmod all_video
|
|
else
|
|
insmod efi_gop
|
|
insmod efi_uga
|
|
insmod ieee1275_fb
|
|
insmod vbe
|
|
insmod vga
|
|
insmod video_bochs
|
|
insmod video_cirrus
|
|
fi
|
|
}
|
|
|
|
load_video
|
|
if loadfont unicode; then
|
|
if keystatus --shift; then true ; else
|
|
insmod gfxterm
|
|
set gfxmode=1024x768
|
|
set gfxpayload=auto
|
|
terminal_output gfxterm
|
|
if terminal_output gfxterm; then true ; else
|
|
terminal gfxterm
|
|
fi
|
|
insmod gfxmenu
|
|
loadfont ${prefix}/theme/dejavu_bold_14.pf2
|
|
loadfont ${prefix}/theme/dejavu_mono_12.pf2
|
|
insmod png
|
|
set theme=${prefix}/theme/theme.txt
|
|
export theme
|
|
fi
|
|
fi
|
|
|
|
if serial --unit=0 --speed=115200; then
|
|
terminal_input --append serial_com0
|
|
terminal_output --append serial_com0
|
|
fi
|
|
|
|
function set_gfxpayload {
|
|
if [ ${vesa_mode} -eq 1 ]; then
|
|
set gfxpayload=keep
|
|
else
|
|
set gfxpayload=text
|
|
fi
|
|
}
|
|
|
|
set menu_color_normal=white/black
|
|
set menu_color_highlight=white/red
|
|
set color_normal=white/black
|
|
|
|
set ARC_CMDLINE="earlyprintk earlycon=ttyS0,115200 console=ttyS0,115200 root=/dev/ram rootwait pcie_aspm=off net.ifnames=0 ipv6.disable=1"
|
|
|
|
search --set=root --label "ARC3"
|
|
if [ -e /automated ]; then
|
|
menuentry 'Arc Automated Config Mode' --id automated {
|
|
set_gfxpayload
|
|
echo "Loading Arc Kernel..."
|
|
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} automated_arc
|
|
echo "Loading Arc Initramfs..."
|
|
initrd /initrd-arc
|
|
echo "Booting..."
|
|
}
|
|
fi
|
|
|
|
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
|
if [ "${default}" = "direct" ]; then
|
|
set timeout="1"
|
|
menuentry 'DSM Direct Mode' --id direct {
|
|
set_gfxpayload
|
|
echo "Loading DSM Kernel..."
|
|
linux /zImage-dsm ${dsm_cmdline}
|
|
echo "Loading DSM Initramfs..."
|
|
initrd /initrd-dsm
|
|
echo "Booting..."
|
|
echo "Access http://find.synology.com/ to connect the DSM via web."
|
|
}
|
|
fi
|
|
menuentry 'Arc DSM Mode' --id boot {
|
|
set_gfxpayload
|
|
echo "Loading Arc Kernel..."
|
|
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline}
|
|
echo "Loading Arc Initramfs..."
|
|
initrd /initrd-arc
|
|
echo "Booting..."
|
|
}
|
|
fi
|
|
|
|
menuentry 'Arc Config Mode' --id config {
|
|
set_gfxpayload
|
|
echo "Loading Arc Kernel..."
|
|
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} force_arc
|
|
echo "Loading Arc Initramfs..."
|
|
initrd /initrd-arc
|
|
echo "Booting..."
|
|
}
|
|
|
|
menuentry 'Arc Update Mode' --id update {
|
|
set_gfxpayload
|
|
echo "Loading Arc Kernel..."
|
|
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} update_arc
|
|
echo "Loading Arc Initramfs..."
|
|
initrd /initrd-arc
|
|
echo "Booting..."
|
|
}
|
|
|
|
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
|
menuentry 'DSM Recovery Mode' --id recovery {
|
|
set_gfxpayload
|
|
echo "Loading Arc Kernel..."
|
|
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} recovery
|
|
echo "Loading Arc Initramfs..."
|
|
initrd /initrd-arc
|
|
echo "Booting..."
|
|
}
|
|
menuentry 'DSM Reinstall Mode' --id junior {
|
|
set_gfxpayload
|
|
echo "Loading Arc Kernel..."
|
|
linux /bzImage-arc ${ARC_CMDLINE} ${arc_cmdline} force_junior
|
|
echo "Loading Arc Initramfs..."
|
|
initrd /initrd-arc
|
|
echo "Booting..."
|
|
}
|
|
fi
|
|
|
|
if [ ${vesa_mode} = 1 ]; then
|
|
menuentry 'Change Vesa to Text Output' --id videomode {
|
|
set vesa_mode=0
|
|
save_env vesa_mode
|
|
configfile ${prefix}/grub.cfg
|
|
}
|
|
else
|
|
menuentry 'Change Text to Vesa Output' --id videomode {
|
|
set vesa_mode=1
|
|
save_env vesa_mode
|
|
reboot
|
|
configfile ${prefix}/grub.cfg
|
|
}
|
|
fi |