# Make sure screen is not glitched set gfxpayload=HEIGHTxWEIGHT export gfxpayload # Make sure video is working insmod all_video # Set the operating-system name set SOURCE_NAME="DarkMatter-Exo4.7" # Set the timeout for the submenu set timeout=3 # Set the default variable to the submenu entry you prefer set default=0 # Blind savelast function to workaround grub2win bug with it function savelast { return 0 } function stack_menu_opt { set TITLE="$1" shift 1 menuentry "$TITLE" "$@" --class other --class icon-asg { shift 1 #set DEFAULT_ARGS="" #set CUSTOM_ARGS="$@" search --set=root --file /$SOURCE_NAME/findme linux /$SOURCE_NAME/kernel $@ root=/dev/ram0 androidboot.selinux=permissive acpi_sleep=s3_bios,s4_mode SRC=/$SOURCE_NAME initrd /$SOURCE_NAME/initrd.img } } ## START general menu options stack_menu_opt "Boot normally" quiet NORECOVERY=1 stack_menu_opt "Startup repair mode" quiet FIXFS=1 NORECOVERY=1 stack_menu_opt "Boot into Recovery-Mode" quiet ALWAYSRECOVERY=1 stack_menu_opt "Boot with experimental kernel performance flags" quiet NORECOVERY=1 noibrs noibpb nopti nospectre_v2 \ nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off intel_pstate=disable ## END general menu options ## START advanced submenu options submenu 'Advanced options ->' --class submenu --class icon-asg { stack_menu_opt "Boot into Recovery-Mode with NOGFX flag" quiet NOGFX=1 ALWAYSRECOVERY=1 stack_menu_opt "Boot with DEBUG=1 flag" NORECOVERY=1 DEBUG=1 stack_menu_opt "Boot with legacy(auto) modprobe mode" NORECOVERY=1 AUTO_LOAD=old stack_menu_opt "Boot with VULKAN=1 flag" NORECOVERY=1 VULKAN=1 stack_menu_opt "Boot with VULKAN=1 flag and old modprobe mode" VULKAN=1 AUTO_LOAD=old NORECOVERY=1 stack_menu_opt "Boot with No-Setup-Wizard mode" NORECOVERY=1 SETUPWIZARD=0 stack_menu_opt "Boot with No-Hardware-Acceleration" NORECOVERY=1 nomodeset HWACCEL=0 submenu 'More debug options ->' --class submenu --class icon-asg { stack_menu_opt "Boot with gralloc.gbm debug flags" DEBUG=2 GRALLOC=gbm NORECOVERY=1 stack_menu_opt "Boot with drmfb-composer debug flags" DEBUG=2 HWC=drmfb GRALLOC=gbm NORECOVERY=1 stack_menu_opt "Boot with hwcomposer.drm debug flags" DEBUG=2 HWC=drm GRALLOC=gbm NORECOVERY=1 stack_menu_opt "Boot with gralloc.minigbm debug flags" DEBUG=2 GRALLOC=minigbm NORECOVERY=1 stack_menu_opt "Boot with hwcomposer.drm_minigbm debug flags" DEBUG=2 HWC=drm_minigbm GRALLOC=minigbm NORECOVERY=1 stack_menu_opt "Boot with hwcomposer.intel debug flags" DEBUG=2 HWC=intel GRALLOC=intel NORECOVERY=1 } } ## END advanced submenu options