From 748e544fd0eb5fb618c4613f69612bc8c2eb65b6 Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Tue, 29 Jan 2019 09:09:45 +0100 Subject: [PATCH] arm: Move initrd upper to leave more space for kernel This patch allows to have bigger kernels. If the kernel grows, then it will overwrite the initrd when it is extracted. Signed-off-by: Guillaume GARDET Acked-by: Alexander Graf Reviewed-by: Daniel Kiper --- grub-core/loader/arm/linux.c | 2 +- include/grub/arm/linux.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c index 67ed79359..51684914c 100644 --- a/grub-core/loader/arm/linux.c +++ b/grub-core/loader/arm/linux.c @@ -48,7 +48,7 @@ static const void *current_fdt; typedef void (*kernel_entry_t) (int, unsigned long, void *); #define LINUX_PHYS_OFFSET (0x00008000) -#define LINUX_INITRD_PHYS_OFFSET (LINUX_PHYS_OFFSET + 0x02000000) +#define LINUX_INITRD_PHYS_OFFSET (LINUX_PHYS_OFFSET + 0x03000000) #define LINUX_FDT_PHYS_OFFSET (LINUX_INITRD_PHYS_OFFSET - 0x10000) static grub_size_t diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h index 712ba17b9..d0b24d474 100644 --- a/include/grub/arm/linux.h +++ b/include/grub/arm/linux.h @@ -42,7 +42,7 @@ struct linux_arm_kernel_header { #if defined GRUB_MACHINE_UBOOT # include # define LINUX_ADDRESS (start_of_ram + 0x8000) -# define LINUX_INITRD_ADDRESS (start_of_ram + 0x02000000) +# define LINUX_INITRD_ADDRESS (start_of_ram + 0x03000000) # define LINUX_FDT_ADDRESS (LINUX_INITRD_ADDRESS - 0x10000) # define grub_arm_firmware_get_boot_data grub_uboot_get_boot_data # define grub_arm_firmware_get_machine_type grub_uboot_get_machine_type @@ -50,7 +50,7 @@ struct linux_arm_kernel_header { #include #include # define LINUX_ADDRESS (start_of_ram + 0x8000) -# define LINUX_INITRD_ADDRESS (start_of_ram + 0x02000000) +# define LINUX_INITRD_ADDRESS (start_of_ram + 0x03000000) # define LINUX_FDT_ADDRESS (LINUX_INITRD_ADDRESS - 0x10000) static inline const void * grub_arm_firmware_get_boot_data (void)