[syslinux] Discard .note.gnu.property section to fix build failure (patch)

Ady Ady ady-sf at hotmail.com
Fri Nov 30 02:20:07 PST 2018


> It's source code looks like a BIOS MBR program which shall search
> the "active" partition in GPT rather than in the MBR partition table.
> See comments about "EBIOS" detection and "CHS" addresses in
>   https://github.com/geneC/syslinux/blob/master/mbr/gptmbr.S
> 
> "Active" partitn would be the one which has bit 2 set in the Attributes
> field (byte offset 48 to 55) of its GPT entry: "Legacy BIOS Bootable".
 
 
That's the main goal of gptmbr.bin: to be able to boot a GPT scheme in 
_BIOS_ mode.


> So indeed, EFI on hard disk does not need more of an MBR than the magic
> number at bytes 510, 511 and an MBR partition entry of type 0xEE or
> 0xEF.
 
 
Well, for booting in UEFI mode, the (0xEE and/or 0xEF and/or any other) 
"legacy" partition(s) in the so-called "msdos partition table scheme" 
(aka "protective MBR partition table) in the first sector is/are not 
really essential but rather a UEFI "feature"; its main objective is to 
prevent, from a potential BIOS-mode boot (or from some GPT-unaware 
tool), screwing up the GPT structures. IOW, the "Protective MBR 
partition table" (and its "constraints") for UEFI is not really a 
requirement for booting in UEFI mode itself, and it is _not_ an 
"impartial standard" within the UEFI specs.


> > > and I'm looking at why utils/ depends on mbr/ 
>  
> > isohybrid(.pl) and mkdiskimage come to mind here?
> 
> The isohybrid programs each contain six copies of MBR binaries.
> See variable ISOHDPFX in
>   https://github.com/geneC/syslinux/blob/master/utils/Makefile
> 
> The same file has mkdiskimage including a hex version of mbr/mbr.bin.
 
 
As it is set right now, on one hand the "*mbr*.bin" files are repeated 
3 times (for bios, efi32, efi64). OTOH, when someone wants to build 
only one of the platforms (say, efi64), the files are still 
provided/generated.

If these "*mbr*.bin" files were not generated when building the efi* 
platforms, then:

 * it would mean less repetitions (less duplication) of files (and, I 
would guess, a faster build),

 * but it would also mean that someone _not_ building the bios platform 
would not have the *mbr*.bin files and then the bios platform would 
need to be built just for these files, in case they are needed (for 
whichever purpose).

In a certain way, this situation would be similar (but not as bad) to 
how the Syslinux packages for Debian have been arranged for years now; 
e.g. the "syslinux-efi" package includes "syslinux.efi", but not 
"ldlinux.e{32,64}", so you also need to retrieve the whole (big) 
"syslinux-common" package just for the relevant "ldlinux.*" file (which 
is/are essential). The same goes for the "isolinux" package and for the 
"pxelinux" package. This makes no sense whatsoever for Debian users.

Let's reduce redundancy and useless files in the official Syslinux 
archives, but not more than the minimum needed / recommended (which is, 
most probably, not completely objective).

Just to be clear, I am not sure whether the "*mbr*.bin" files are worth 
building 3 times (or not), and I don't really know whether these files 
are the (only) reason for the dependencies we are talking about.

Regards,
Ady.




More information about the Syslinux mailing list