mirror of https://github.com/ventoy/Ventoy.git
Optimization for Linux vDisk boot in Legacy BIOS mode
This commit is contained in:
parent
9ddee7394d
commit
40fdfa66b9
|
@ -1046,7 +1046,7 @@ function vtoyboot_common_func {
|
||||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||||
if [ "$grub_platform" = "pc" ]; then
|
if [ "$grub_platform" = "pc" ]; then
|
||||||
vt_acpi_param ${vtoy_chain_mem_addr} 512
|
vt_acpi_param ${vtoy_chain_mem_addr} 512
|
||||||
linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} sector512 mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} bios80 sector512 mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||||
boot
|
boot
|
||||||
else
|
else
|
||||||
ventoy_acpi_param ${vtoy_chain_mem_addr} 512
|
ventoy_acpi_param ${vtoy_chain_mem_addr} 512
|
||||||
|
|
|
@ -26,6 +26,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||||
|
|
||||||
int g_debug = 0;
|
int g_debug = 0;
|
||||||
int g_hddmode = 0;
|
int g_hddmode = 0;
|
||||||
|
int g_bios_disk80 = 0;
|
||||||
char *g_cmdline_copy;
|
char *g_cmdline_copy;
|
||||||
void *g_initrd_addr;
|
void *g_initrd_addr;
|
||||||
size_t g_initrd_len;
|
size_t g_initrd_len;
|
||||||
|
@ -697,6 +698,11 @@ int ventoy_boot_vdisk(void *data)
|
||||||
{
|
{
|
||||||
g_hddmode = 1;
|
g_hddmode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strstr(g_cmdline_copy, "bios80"))
|
||||||
|
{
|
||||||
|
g_bios_disk80 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
g_chain = (ventoy_chain_head *)g_initrd_addr;
|
g_chain = (ventoy_chain_head *)g_initrd_addr;
|
||||||
g_chunk = (ventoy_img_chunk *)((char *)g_chain + g_chain->img_chunk_offset);
|
g_chunk = (ventoy_img_chunk *)((char *)g_chain + g_chain->img_chunk_offset);
|
||||||
|
|
|
@ -1425,7 +1425,7 @@ unsigned int ventoy_int13_hook (ventoy_chain_head *chain)
|
||||||
|
|
||||||
if (g_hddmode)
|
if (g_hddmode)
|
||||||
{
|
{
|
||||||
natural_drive = num_drives | 0x80;
|
natural_drive = g_bios_disk80 ? 0x80 : (num_drives | 0x80);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -187,6 +187,7 @@ typedef struct ventoy_sector_flag
|
||||||
|
|
||||||
extern int g_debug;
|
extern int g_debug;
|
||||||
extern int g_hddmode;
|
extern int g_hddmode;
|
||||||
|
extern int g_bios_disk80;
|
||||||
extern char *g_cmdline_copy;
|
extern char *g_cmdline_copy;
|
||||||
extern void *g_initrd_addr;
|
extern void *g_initrd_addr;
|
||||||
extern size_t g_initrd_len;
|
extern size_t g_initrd_len;
|
||||||
|
|
Loading…
Reference in New Issue