mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-29 17:28:54 +00:00
55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
|
diff -u --recursive ../../clean/linux-4.14.62/arch/x86/boot/compressed/eboot.c linux-4.14.62/arch/x86/boot/compressed/eboot.c
|
||
|
--- ../../clean/linux-4.14.62/arch/x86/boot/compressed/eboot.c 2018-08-09 06:16:40.000000000 -0400
|
||
|
+++ linux-4.14.62/arch/x86/boot/compressed/eboot.c 2018-08-09 10:13:11.801000000 -0400
|
||
|
@@ -390,8 +390,8 @@
|
||
|
int options_size = 0;
|
||
|
efi_status_t status;
|
||
|
char *cmdline_ptr;
|
||
|
- unsigned long ramdisk_addr;
|
||
|
- unsigned long ramdisk_size;
|
||
|
+ unsigned long ramdisk_addr = 0;
|
||
|
+ unsigned long ramdisk_size = 0;
|
||
|
|
||
|
efi_early = c;
|
||
|
sys_table = (efi_system_table_t *)(unsigned long)efi_early->table;
|
||
|
@@ -447,9 +447,6 @@
|
||
|
/* Fill in upper bits of command line address, NOP on 32 bit */
|
||
|
boot_params->ext_cmd_line_ptr = (u64)(unsigned long)cmdline_ptr >> 32;
|
||
|
|
||
|
- hdr->ramdisk_image = 0;
|
||
|
- hdr->ramdisk_size = 0;
|
||
|
-
|
||
|
/* Clear APM BIOS info */
|
||
|
memset(bi, 0, sizeof(*bi));
|
||
|
|
||
|
@@ -476,10 +473,16 @@
|
||
|
|
||
|
if (status != EFI_SUCCESS)
|
||
|
goto fail2;
|
||
|
- hdr->ramdisk_image = ramdisk_addr & 0xffffffff;
|
||
|
- hdr->ramdisk_size = ramdisk_size & 0xffffffff;
|
||
|
- boot_params->ext_ramdisk_image = (u64)ramdisk_addr >> 32;
|
||
|
- boot_params->ext_ramdisk_size = (u64)ramdisk_size >> 32;
|
||
|
+
|
||
|
+ // don't overwrite the bzImage or loader provided ramdisk pointer
|
||
|
+ // unless the kernel command line specified a different one.
|
||
|
+ if (ramdisk_addr != 0)
|
||
|
+ {
|
||
|
+ hdr->ramdisk_image = ramdisk_addr & 0xffffffff;
|
||
|
+ hdr->ramdisk_size = ramdisk_size & 0xffffffff;
|
||
|
+ boot_params->ext_ramdisk_image = (u64)ramdisk_addr >> 32;
|
||
|
+ boot_params->ext_ramdisk_size = (u64)ramdisk_size >> 32;
|
||
|
+ }
|
||
|
|
||
|
return boot_params;
|
||
|
fail2:
|
||
|
--- clean/linux-4.14.62/arch/x86/boot/compressed/early_serial_console.c 2018-08-09 12:16:40.000000000 +0200
|
||
|
+++ linux-4.14.62/arch/x86/boot/compressed/early_serial_console.c 2018-09-28 11:59:36.824015244 +0200
|
||
|
@@ -1,5 +1,5 @@
|
||
|
#include "misc.h"
|
||
|
|
||
|
-int early_serial_base;
|
||
|
+int early_serial_base = 0x3f8;
|
||
|
|
||
|
#include "../early_serial_console.c"
|