[coreboot] [PATCH] mkelfImage: set kernel_alignment so 2.6.31+ work
Stefan Reinauer
stefan.reinauer at coresystems.de
Wed May 19 15:17:24 CEST 2010
Awesome!
Acked-by: Stefan Reinauer <stepan at coresystems.de>
On 19.05.2010, at 13:42, ebiederm at xmission.com (Eric W. Biederman)
wrote:
>
> The kernel initialization code as of boot protocol 2.10 is now
> reading the
> kernel_alignment field. With the field left the kernel attempts to
> align
> things to 4GB which is unlikely to work, so change the alignment to
> the
> kernels normal value of 16MB so newer kernels process by mkelfImage
> will
> boot.
>
> Signed-off-by: "Eric W. Biederman" <ebiederm at xmission.com>
>
> Index: mkelfImage-2.7/linux-i386/convert_params.c
> ===================================================================
> --- mkelfImage-2.7.orig/linux-i386/convert_params.c
> +++ mkelfImage-2.7/linux-i386/convert_params.c
> @@ -178,7 +178,10 @@ struct parameters {
> uint32_t cmd_line_ptr; /* 0x228 */
> /* 2.03+ */
> uint32_t initrd_addr_max; /* 0x22c */
> - uint8_t reserved15[0x2d0 - 0x230]; /* 0x230 */
> + /* 2.05+ */
> + uint32_t kernel_alignment; /* 0x230 */
> + uint8_t relocateable_kernel; /* 0x234 */
> + uint8_t reserved15[0x2d0 - 0x235]; /* 0x235 */
>
> struct e820entry e820_map[E820MAX]; /* 0x2d0 */
> uint8_t reserved16[688]; /* 0x550 */
> @@ -1503,6 +1506,9 @@ void initialize_linux_params(struct para
>
> /* No loader flags */
> info->real_mode->loader_flags = 0;
> +
> + /* Set it to 16M instead of 4G */
> + info->real_mode->kernel_alignment = 16*1024*1024;
>
> /* Ramdisk address and size ... */
> info->real_mode->initrd_start = 0;
>
> --
> coreboot mailing list: coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
>
More information about the coreboot
mailing list