Skip to content

Instantly share code, notes, and snippets.

@JollyWizard
Created March 4, 2024 05:41
Show Gist options
  • Save JollyWizard/833cd08c24bc2a1b8d70e90b0c9d3258 to your computer and use it in GitHub Desktop.
Save JollyWizard/833cd08c24bc2a1b8d70e90b0c9d3258 to your computer and use it in GitHub Desktop.
Grub4dos Changelog UEFI (2024-02-26)
Update instructions:
2024-02-26 (yaya)
Improve uuid/vol function to support more than 10 partitions.
2023-11-27 (yaya)
Fixed fragment slot calculation.
Improve pxe.
2023-10-14 (yaya)
Fixed the problem introduced by adding variable menu_tab_ext.
Fix font function.
2023-09-22 (yaya)
Fixed the problem of blurred screen when switching resolution.
Added method to start from entry point.
Add the variable menu_tab_ext to avoid repeatedly setting the graphics mode, loading the background image and font library when re-entering the main menu.
For example: calc *0x8312&1 > nul || graphicsmode -1 800
calc *0x8312&2 > nul || splashimage /boot/grub/lt.jpg
calc *0x8312&4 > nul || font /boot/grub/unifont.hex.gz
2023-08-18 (yaya)
Improve the search partition order of the find function to 0,1,2....
Improved the problem that some UEFI firmware returned unrecognizable uppercase letters. issues #423
2023-07-15 (yaya)
External commands can continue compressed files
2023-07-08 (yaya)
Fix missing MBR logical partition disk ID
2023-07-01 (yaya)
Fixed missing GPT disk GUID
2023-06-23 (yaya)
Fixed configfile function file name overflow.
Number of fragments increased from 39 to 126.
Fixed partition signature loss.
Fixed the problem of being unable to enter the menu and restarting when BOOTIA32.EFI is started.
Improve the color function help information. issues #414
Avoid partition entry holes. issues #416
2023-06-06 (yaya)
Adapt to gcc-11 higher version compilation.
2023-05-10 (yaya)
Fixed the problem of failure to load UDF disc into memory above 2Gb.
Make sure the boot drive is always 0x80.
Supports USB logical unit devices.
The kernel function adds the --handover and --loadfile2 parameters to force the use of the EFI Handover Protocol or LoadFile2 protocol.
Added an internal function for printing paths for use by devices that do not support the device path to text protocol.
Improved device startup. issues #404, issues #405
2023-03-29 (yaya)
Improve the external command progress bar.
Improved ISO booting.
Fix splashimage function. issues #401
Fix partnew function. issues #402
Correct the unmap function of map function. issues #403
2023-03-19 (a1ive)
Support multi-line initrd command
Support cpio newc initrd
2023-03-14 (a1ive)
Fixed setkey function.
The chainloader and kernel command lines support non-ASCII characters.
2023-03-11 (a1ive)
Abandon using the EFI Handover Protocol to start Linux and use LoadFile2 to provide the initrd loading function.
Linux 6.2 makes the deprecated EFI Handover Protocol optional:
https://github.com/torvalds/linux/commit/cc3fdda2876e58a7e83e558ab51853cf106afb6a
Booting a 32-bit kernel under x64 UEFI (or vice versa) is no longer supported.
The ntloader v1 version is no longer supported, please use the ntloader v2 version.
2023-02-23 (yaya)
Add external timer. (One of the applications, external command progress bar ProgressBar).
Fixed an issue where the last line of the menu was missing without a newline character.
Fixed an issue where the menu box for switching video modes failed.
Fixed text mode menu display.
The graphicsmode function adds parameter test.
Example: graphicsmode --test horizontal pixels vertical pixels
Return: The resolution exists and returns the mode number, otherwise 0 is returned.
2022-12-27 (yaya)
Supports differential VHD. (If using svbus, please load into memory)
2022-12-22 (yaya)
Undo the patch for issues #384. This will cause the external command SISO and RUN to list files, and only the first two extensions will be displayed.
Fix parttype function. issues #389
The graphicsmode function adds the '--info' parameter to display the currently supported graphics mode information.
2022-11-28 (yaya)
Fixed animation function of splashimage function. issues #387
Correct the graphics function to avoid scrolling in the command line in graphics mode and line 24 being cleared by spaces with other attributes.
Eliminate extra space characters at the end of echo @%*@. issues #384
Avoid echo$[0xf0] outputting 00 characters. issues #385
2022-10-27 (yaya)
The calc function supports 64-bit division. Add variable @retval64 to return the 64-bit calculated value of the calc function.
The [-P:XXYY] function of the echo function allows XX (YY) to be a hexadecimal value.
Fixed an issue where the game would crash in console setting mode 3.
Display memory information on startup.
2022-09-15 (yaya)
The partnew function adds the '--force' parameter to allow overwriting independent partitions.
2022-03-26 (yaya)
Improve startup functionality.
Fixed ext4 read function.
Fixed buffer overflow when mounting external commands.
2022-01-18 (yaya)
Works with svbus that supports fragmentation.
Speed ​​up the actual machine command line scrolling speed.
Undo absorbs trailing spaces on the command line.
Cancel the use of device path utility protocol (not supported by lower versions of UEFI firmware).
Add variable: current horizontal pixel (0x834c).
Add parameters to the map function: --no-hook (do not mount).
Allows multiple virtual disks to be mounted.
2021-11-05 (yaya)
Fixed the problem that when the pipe character '|' is followed by a call (or goto) label, a space must be added. issues #341
Migrate the buggy ISO disc image.
2021-10-13 (yaya)
Enhanced text color functionality for menu items, item comments, and menu strings. For example:
title boot $[0xff00ff]Windows $[]10x64
Fixed write operation error when NTFS has offset.
Fixed an error in the dd function when moving backward in the same file.
Absorb trailing spaces on the command line.
Added map --unmap= actual function, which can uninstall mapped drives.
Fixed bug with unloading debris slots.
Improve startup functionality.
2021-08-18 (yaya)
Install virtual partitions and no longer occupy mapped slots.
Improved booting existing disks.
2021-08-17 (yaya)
Add the ctrl-c-trap= parameter to the debug function. When zero, batch ctrl+c keystrokes are not detected.
Lift the security restrictions on the dd and write functions.
Corrected errnum serial number misalignment.
2021-07-23 (a1ive)
Add beep command.
2021-07-22 (a1ive)
Add parttype command.
2021-06-19 (yaya)
Increase ADDR_RET_STR for use by external commands.
2021-06-02 (a1ive)
Supports embedded fonts and modules (.mod files).
mkimage.exe -d directory -p /efi/grub -o BOOTX64.EFI -O x86_64-efi -c embedded menu -f embedded font -m embedded module
mkimage.exe -d directory -p /efi/grub -o BOOTIA32.EFI -O i386-efi -c embed menu -f embed font -m embed module
2021-05-28 (yaya)
Improved hotkeys. Any English letters in the menu items can be used as hot keys.
Add parameters: setmenu --hotkey-color=COLOR to set hotkey color.
For example:
setmenu --hotkey-color=0xffff
hotkey -A [F3] "reboot" [Ctrl+d] "commandline"
title [F4] Boot Win
title Boot ^Win 10
2021-05-19 (yaya)
Hotkey functions are external.
Usage: hotkey parameter
2021-05-01 (yaya)
Fixed the problem of being unable to read and write ud hidden partitions.
2021-04-24 (yaya)
1. Support embedded menu. Put kernel.img and grub-mkimage.exe in the same directory.
grub-mkimage.exe -d directory -p /efi/grub -o BOOTX64.EFI -O x86_64-efi -c embedded menu
grub-mkimage.exe -d directory -p /efi/grub -o BOOTIA32.EFI -O i386-efi -c embedded menu
2. Improve batch debugging, use line numbers as breakpoints, and 10 breakpoints can be used.
debug batch file name parameter
b Set breakpoints (10). For example: b 45 (current batch, line 45); b p2,134 (batch No. 2, line 134)
bl displays breakpoints (breakpoint number, batch number, batch line number)
bc clears breakpoints. For example: c2 (clears breakpoint No. 2); c (clears all breakpoints)
n run to breakpoint
c Enter the command line and press the 'ESC' key to return to batch debugging
s skip this line
e Run the batch to the end
q exit batch processing
p Single step execution (across subroutines)
Other single-step execution (entering when encountering a subroutine)
3. Built-in 0x20-0x7f, 0x2191, 0x2193 unicode 16*16 dot matrix characters.
2021-02-10 (a1ive)
Prioritize ACPI shutdown.
2021-01-31 (yaya)
Supports starting one-level differential VHD image.
2021-01-12 (a1ive)
Supports loading multiple initrd files.
2021-01-12 (yaya)
Add variable @uefi. The value is 64/32, which is used to determine whether the UEFI system is 64/32 bit. 00 is the BIOS system.
Fix external commands.
2021-01-09 (yaya)
Start bootmgfw.efi.
Fixed graphicsmode, displaymem functions.
New internal variable: 0x8272 (1 byte) UEFI boot environment (32/64 bit).
2020-12-15 (a1ive)
Added load command to load EFI driver.
2020-12-14 (yaya)
Compile 32-bit and 64-bit versions in one go.
2020-12-10 (yaya)
Use "./build i386" to compile BOOTIA32.EFI.
You can use the parameter "--top" to force the image to be loaded into more than 4Gb of memory.
Corrected string color display, corrected mapped disk reading and writing.
2020-11-26 (yaya)
Merge i386 and x86_64 source code.
Fixed hotkey and exit_g4d functions.
2020-11-19 (a1ive)
Supports starting the Linux kernel using the kernel and initrd commands.
2020-11-18 (yaya)
1. Change the menu directory to: /efi/grub/menu.lst
2. Supports booting from physical CDs and hard drives.
3. When there are multiple CDs, the startup CD is adjusted to the first CD to adapt to Windows.
4. Add exit_g4d function to exit GRUB4DOS.
5. Batch processing changes:
The function subscript remains unchanged, and the parameters are changed from 32 bits to 64 bits. (Fn. Subscript parameter 1 parameter 2...)
The variable address is changed from 0x8304 to 0x8308, and from 32 bits to 64 bits.
call Fn function, if you use variables 0x8200-0x8400 (exclusive), you need to add g4e in front, such as g4e0x8217.
Add else function to batch processing. Added {scriptset} notation.
like:
if condition
{
script set
if condition {
Script Set }
else {
Script Set }
}
else if condition
{
script set
}
else
{
script set
}
Notice:
1. The brace must be the end of a line.
2. The script set can be written in multiple lines.
3. Braces can be nested inside.
2020-10-29 (yaya)
GRUB4DOS for UEFI environments.
This is a huge project, and almost all the code has been reviewed. Modified console keyboard input and output, console screen output, memory control,
Drive control, obtaining date and time, pause control, graphics mode and Unicode font implementation, PXE network boot, etc.
During the development process, the GRUB2 source code was referred to. For mapping, refer to the source code of wintoflash.
1. You can start the efi file.
2. Can start iso and img files.
Differences from older versions:
1. You can check the graphics modes supported by the system through the graphicsmode command.
2. Mount after the map function is executed. There is no need to execute the --hook command.
3. Cancel the --hook, --unhook, --rehook, --unmap=, --floppies=, --harddrives= commands.
4. In the UEFI environment, you can boot from disks other than 0x80, so there is no need to swap disk operations, such as map (hd0) (hd1).
5. Cancel the disk deletion function, such as map (hd1) (hd1).
6. Currently, PXE network boot only supports tftp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment