aboutsummaryrefslogtreecommitdiffstats
path: root/sys-boot/grub/files/grub-2.06-magic-number.patch
blob: c43e7711233286ced8303065705af0fed6d1d680 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff -Naur grub-2.06~rc1/include/grub/riscv32/linux.h grub-2.06~rc1-mod/include/grub/riscv32/linux.h
--- grub-2.06~rc1/include/grub/riscv32/linux.h	2019-04-23 10:54:47.000000000 +0200
+++ grub-2.06~rc1-mod/include/grub/riscv32/linux.h	2021-07-02 07:33:27.504051015 +0200
@@ -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 /* little endian, 'RSC\x05' */
 
 /* From linux/Documentation/riscv/booting.txt */
 struct linux_riscv_kernel_header
@@ -32,7 +32,7 @@
   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 -Naur grub-2.06~rc1/include/grub/riscv64/linux.h grub-2.06~rc1-mod/include/grub/riscv64/linux.h
--- grub-2.06~rc1/include/grub/riscv64/linux.h	2019-04-23 10:54:47.000000000 +0200
+++ grub-2.06~rc1-mod/include/grub/riscv64/linux.h	2021-07-02 07:35:33.173217754 +0200
@@ -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 /* little endian, 'RSC\x05' */
 
 #define GRUB_EFI_PE_MAGIC	0x5A4D
 
@@ -34,7 +34,7 @@
   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 */
 };