Re: A thread on grub-bug could need attention

2018-02-01 Thread Michel Bouissou
Hi, Le 01/02/2018 à 01:02, Thomas Schmitt a écrit : > Michel - on his way to India - could zeroize 512-byte block 1 of the > Debian Live ISO and then try to boot it from USB stick > > dd if=/dev/zero conv=notrunc bs=512 seek=1 count=1 of=...image.or.stick... > > where "...image.or.stick..."

[PATCH 09/10] commands/file: use definitions from arm/linux.h

2018-02-01 Thread Leif Lindholm
Clean up code for matching IS_ARM slightly by making use of struct linux_arm_kernel_header and GRUB_LINUX_ARM_MAGIC_SIGNATURE. Signed-off-by: Leif Lindholm --- grub-core/commands/file.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git

[PATCH 07/10] arm: switch linux loader to linux_arm_kernel_header struct

2018-02-01 Thread Leif Lindholm
Use kernel header struct and magic definition to align (and coexist) with i386/arm64 ports. Signed-off-by: Leif Lindholm --- grub-core/loader/arm/linux.c | 11 +-- include/grub/arm/linux.h | 15 --- 2 files changed, 17 insertions(+), 9

[PATCH 05/10] arm64: align linux kernel header struct naming with i386

2018-02-01 Thread Leif Lindholm
Rename struct grub_arm64_linux_kernel_header -> linux_arm64_kernel_header. Signed-off-by: Leif Lindholm --- grub-core/loader/arm64/linux.c| 4 ++-- grub-core/loader/arm64/xen_boot.c | 4 ++-- include/grub/arm64/linux.h| 5 ++--- 3 files changed, 6

[PATCH 10/10] commands/file: use definitions from arm64/linux.h

2018-02-01 Thread Leif Lindholm
Clean up code for matching IS_ARM64 slightly by making use of struct linux_arm_kernel_header and GRUB_LINUX_ARM64_MAGIC_SIGNATURE. Signed-off-by: Leif Lindholm --- grub-core/commands/file.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH 06/10] arm64: align linux kernel magic macro naming with i386

2018-02-01 Thread Leif Lindholm
Change GRUB_ARM64_LINUX_MAGIC to GRUB_LINUX_ARM64_MAGIC_SIGNATURE. Signed-off-by: Leif Lindholm --- grub-core/loader/arm64/linux.c | 2 +- include/grub/arm64/linux.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 03/10] make GRUB_LINUX_MAGIC_SIGNATURE architecture-specific

2018-02-01 Thread Leif Lindholm
Rename GRUB_LINUX_MAGIC_SIGNATURE GRUB_LINUX_I386_MAGIC_SIGNATURE, to be usable in code that supports more than one image type. Signed-off-by: Leif Lindholm --- grub-core/commands/file.c| 4 ++-- grub-core/loader/i386/linux.c| 2 +-

[PATCH 08/10] arm: make linux.h safe to include for non-native builds

2018-02-01 Thread Leif Lindholm
(for machine arm/efi) and (for machine arm/coreboot) will not always resolve (and will likely not be valid to) if pulled in when building non-native commands, such as host tools or the "file" command. So explicitly include them with their expanded pathnames. Signed-off-by: Leif Lindholm

[PATCH 04/10] i386: make struct linux_kernel_header architecture specific

2018-02-01 Thread Leif Lindholm
struct linux_kernel_header -> struct linux_i386_kernel_header Signed-off-by: Leif Lindholm --- grub-core/commands/file.c| 2 +- grub-core/loader/i386/linux.c| 2 +- grub-core/loader/i386/pc/linux.c | 6 +++--- grub-core/loader/i386/xen_file.c | 2 +-

[PATCH 01/10] arm64/efi: move EFI_PAGE definitions to efi/memory.h

2018-02-01 Thread Leif Lindholm
The EFI page definitions and macros are generic and should not be confined to arm64 headers - so move to efi/memory.h. Also add EFI_PAGE_SIZE macro. Update loader sources to reflect new header location. Signed-off-by: Leif Lindholm --- grub-core/loader/arm64/linux.c

[PATCH 02/10] Make arch-specific linux.h include guards architecture unique

2018-02-01 Thread Leif Lindholm
Replace uses of GRUB_LINUX_MACHINE_HEADER and GRUB_LINUX_CPU_HEADER with GRUB__LINUX_HEADER include guards to prevent issues when including more than one of them. Signed-off-by: Leif Lindholm --- include/grub/arm/linux.h | 6 +++--- include/grub/arm64/linux.h | 6

[PATCH 00/10] various cleanup

2018-02-01 Thread Leif Lindholm
So, sorry I dropped the ball on this last year. This series contains what I would hope to be non-contentious cleanup in preparation for the functional changes (/fixes) for the arm64 linux loader and its reuse in the arm-efi port. 1/10 Simply moves the EFI_PAGE definition to . 2-7/10 Cleans

[PATCH] chainloader: patch in BPB's sectors_per_track and num_heads

2018-02-01 Thread C. Masloch
These fields must reflect the ROM-BIOS's geometry for CHS-based loaders to correctly load their next stage. Most loaders do not query the ROM-BIOS (Int13.08), relying on the BPB fields to hold the correct values already. Tested with lDebug booted in qemu via grub2's FreeDOS direct loading