Re: [v2 PATCH] RISC-V: Add a PE/COFF compliant Image header.
From: Paul Walmsley
Date: Fri May 17 2019 - 13:41:42 EST
On Wed, 1 May 2019, Atish Patra wrote:
> Currently, last stage boot loaders such as U-Boot can accept only
> uImage which is an unnecessary additional step in automating boot flows.
>
> Add a PE/COFF compliant image header that boot loaders can parse and
> directly load kernel flat Image. The existing booting methods will continue
> to work as it is.
One other thought: as I think you or someone else may have pointed out,
this isn't the PE/COFF header itself, but rather an ersatz DOS stub
header, that is apparently quite close to what some EFI bootloaders
require. So from that point of view, it's probably best to just write in
the patch description that the idea is to add something that resembles an
MS-DOS stub header, and that the motivations are that:
1. it resembles what ARM64 is doing, and there's not much point in
inventing another boot header format that's completely different
2. it can be easily converted into an MS-DOS header that some EFI
bootloaders apparently require, by tweaking a few bytes at the beginning
- Paul