Adjust the image hedaers based on the current definition in RISC-V LINUX. Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/riscv/include/asm/image.h
Signed-off-by: Chester Lin <c...@suse.com> --- include/grub/riscv32/linux.h | 4 ++-- include/grub/riscv64/linux.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/grub/riscv32/linux.h b/include/grub/riscv32/linux.h index 512b777c8..4bb831e52 100644 --- a/include/grub/riscv32/linux.h +++ b/include/grub/riscv32/linux.h @@ -19,7 +19,7 @@ #ifndef GRUB_RISCV32_LINUX_HEADER #define GRUB_RISCV32_LINUX_HEADER 1 -#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x52534356 /* 'RSCV' */ +#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x05435352 /* 'RSC\x5' */ /* From linux/Documentation/riscv/booting.txt */ struct linux_riscv_kernel_header @@ -32,7 +32,7 @@ struct linux_riscv_kernel_header grub_uint64_t res2; /* reserved */ grub_uint64_t res3; /* reserved */ grub_uint64_t res4; /* reserved */ - grub_uint32_t magic; /* Magic number, little endian, "RSCV" */ + grub_uint32_t magic; /* Magic number, little endian, "RSC\x05" */ grub_uint32_t hdr_offset; /* Offset of PE/COFF header */ }; diff --git a/include/grub/riscv64/linux.h b/include/grub/riscv64/linux.h index 3630c30fb..e4676cf5f 100644 --- a/include/grub/riscv64/linux.h +++ b/include/grub/riscv64/linux.h @@ -19,7 +19,7 @@ #ifndef GRUB_RISCV64_LINUX_HEADER #define GRUB_RISCV64_LINUX_HEADER 1 -#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x52534356 /* 'RSCV' */ +#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x05435352 /* 'RSC\x5' */ #define GRUB_EFI_PE_MAGIC 0x5A4D @@ -32,9 +32,9 @@ struct linux_riscv_kernel_header grub_uint64_t res0; /* reserved */ grub_uint64_t res1; /* reserved */ grub_uint64_t res2; /* reserved */ - grub_uint64_t res3; /* reserved */ + grub_uint64_t res3; /* reserved */ grub_uint64_t res4; /* reserved */ - grub_uint32_t magic; /* Magic number, little endian, "RSCV" */ + grub_uint32_t magic; /* Magic number, little endian, "RSC\x05" */ grub_uint32_t hdr_offset; /* Offset of PE/COFF header */ }; -- 2.24.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel