summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/grub')
-rw-r--r--meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch36
-rw-r--r--meta/recipes-bsp/grub/files/0002-i386-x86_64-ppc-fix-switch-fallthrough-cases-with-GC.patch248
-rw-r--r--meta/recipes-bsp/grub/files/0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch38
-rw-r--r--meta/recipes-bsp/grub/files/0004-Fix-remaining-cases-of-gcc-7-fallthrough-warning.patch175
-rw-r--r--meta/recipes-bsp/grub/grub2.inc4
5 files changed, 501 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch b/meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch
new file mode 100644
index 0000000000..217a775609
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch
@@ -0,0 +1,36 @@
1From 6cef7f6079550af3bf91dbff824398eaef08c3c5 Mon Sep 17 00:00:00 2001
2From: Andrei Borzenkov <arvidjaar@gmail.com>
3Date: Tue, 4 Apr 2017 19:22:32 +0300
4Subject: [PATCH 1/4] btrfs: avoid "used uninitialized" error with GCC7
5
6sblock was local and so considered new variable on every loop
7iteration.
8
9Closes: 50597
10---
11Upstream-Status: Backport
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14 grub-core/fs/btrfs.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
18index 9cffa91..4849c1c 100644
19--- a/grub-core/fs/btrfs.c
20+++ b/grub-core/fs/btrfs.c
21@@ -227,11 +227,11 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
22 static grub_err_t
23 read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb)
24 {
25+ struct grub_btrfs_superblock sblock;
26 unsigned i;
27 grub_err_t err = GRUB_ERR_NONE;
28 for (i = 0; i < ARRAY_SIZE (superblock_sectors); i++)
29 {
30- struct grub_btrfs_superblock sblock;
31 /* Don't try additional superblocks beyond device size. */
32 if (i && (grub_le_to_cpu64 (sblock.this_device.size)
33 >> GRUB_DISK_SECTOR_BITS) <= superblock_sectors[i])
34--
351.9.1
36
diff --git a/meta/recipes-bsp/grub/files/0002-i386-x86_64-ppc-fix-switch-fallthrough-cases-with-GC.patch b/meta/recipes-bsp/grub/files/0002-i386-x86_64-ppc-fix-switch-fallthrough-cases-with-GC.patch
new file mode 100644
index 0000000000..94f048c28b
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0002-i386-x86_64-ppc-fix-switch-fallthrough-cases-with-GC.patch
@@ -0,0 +1,248 @@
1From 4bd4a88725604471fdbd86316c91967a7f4dba5a Mon Sep 17 00:00:00 2001
2From: Andrei Borzenkov <arvidjaar@gmail.com>
3Date: Tue, 4 Apr 2017 19:23:55 +0300
4Subject: [PATCH 2/4] i386, x86_64, ppc: fix switch fallthrough cases with GCC7
5
6In util/getroot and efidisk slightly modify exitsing comment to mostly
7retain it but still make GCC7 compliant with respect to fall through
8annotation.
9
10In grub-core/lib/xzembed/xz_dec_lzma2.c it adds same comments as
11upstream.
12
13In grub-core/tests/setjmp_tets.c declare functions as "noreturn" to
14suppress GCC7 warning.
15
16In grub-core/gnulib/regexec.c use new __attribute__, because existing
17annotation is not recognized by GCC7 parser (which requires that comment
18immediately precedes case statement).
19
20Otherwise add FALLTHROUGH comment.
21
22Closes: 50598
23---
24Upstream-Status: Backport
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26
27 grub-core/commands/hdparm.c | 1 +
28 grub-core/commands/nativedisk.c | 1 +
29 grub-core/disk/cryptodisk.c | 1 +
30 grub-core/disk/efi/efidisk.c | 2 +-
31 grub-core/efiemu/mm.c | 1 +
32 grub-core/gdb/cstub.c | 1 +
33 grub-core/gnulib/regexec.c | 3 +++
34 grub-core/lib/xzembed/xz_dec_lzma2.c | 4 ++++
35 grub-core/lib/xzembed/xz_dec_stream.c | 6 ++++++
36 grub-core/loader/i386/linux.c | 3 +++
37 grub-core/tests/setjmp_test.c | 5 ++++-
38 grub-core/video/ieee1275.c | 1 +
39 grub-core/video/readers/jpeg.c | 1 +
40 util/getroot.c | 2 +-
41 util/grub-install.c | 1 +
42 util/grub-mkimagexx.c | 1 +
43 util/grub-mount.c | 1 +
44 17 files changed, 32 insertions(+), 3 deletions(-)
45
46Index: grub-2.00/grub-core/commands/hdparm.c
47===================================================================
48--- grub-2.00.orig/grub-core/commands/hdparm.c
49+++ grub-2.00/grub-core/commands/hdparm.c
50@@ -328,6 +328,7 @@ grub_cmd_hdparm (grub_extcmd_context_t c
51 ata = ((struct grub_scsi *) disk->data)->data;
52 break;
53 }
54+ /* FALLTHROUGH */
55 default:
56 return grub_error (GRUB_ERR_IO, "not an ATA device");
57 }
58Index: grub-2.00/grub-core/disk/cryptodisk.c
59===================================================================
60--- grub-2.00.orig/grub-core/disk/cryptodisk.c
61+++ grub-2.00/grub-core/disk/cryptodisk.c
62@@ -268,6 +268,7 @@ grub_cryptodisk_endecrypt (struct grub_c
63 break;
64 case GRUB_CRYPTODISK_MODE_IV_PLAIN64:
65 iv[1] = grub_cpu_to_le32 (sector >> 32);
66+ /* FALLTHROUGH */
67 case GRUB_CRYPTODISK_MODE_IV_PLAIN:
68 iv[0] = grub_cpu_to_le32 (sector & 0xFFFFFFFF);
69 break;
70Index: grub-2.00/grub-core/disk/efi/efidisk.c
71===================================================================
72--- grub-2.00.orig/grub-core/disk/efi/efidisk.c
73+++ grub-2.00/grub-core/disk/efi/efidisk.c
74@@ -262,7 +262,7 @@ name_devices (struct grub_efidisk_data *
75 {
76 case GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE:
77 is_hard_drive = 1;
78- /* Fall through by intention. */
79+ /* Intentionally fall through. */
80 case GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE:
81 {
82 struct grub_efidisk_data *parent, *parent2;
83Index: grub-2.00/grub-core/efiemu/mm.c
84===================================================================
85--- grub-2.00.orig/grub-core/efiemu/mm.c
86+++ grub-2.00/grub-core/efiemu/mm.c
87@@ -410,6 +410,7 @@ grub_efiemu_mmap_fill (void)
88 default:
89 grub_dprintf ("efiemu",
90 "Unknown memory type %d. Assuming unusable\n", type);
91+ /* FALLTHROUGH */
92 case GRUB_MEMORY_RESERVED:
93 return grub_efiemu_add_to_mmap (addr, size,
94 GRUB_EFI_UNUSABLE_MEMORY);
95Index: grub-2.00/grub-core/gdb/cstub.c
96===================================================================
97--- grub-2.00.orig/grub-core/gdb/cstub.c
98+++ grub-2.00/grub-core/gdb/cstub.c
99@@ -336,6 +336,7 @@ grub_gdb_trap (int trap_no)
100 /* sAA..AA: Step one instruction from AA..AA(optional). */
101 case 's':
102 stepping = 1;
103+ /* FALLTHROUGH */
104
105 /* cAA..AA: Continue at address AA..AA(optional). */
106 case 'c':
107Index: grub-2.00/grub-core/gnulib/regexec.c
108===================================================================
109--- grub-2.00.orig/grub-core/gnulib/regexec.c
110+++ grub-2.00/grub-core/gnulib/regexec.c
111@@ -4104,6 +4104,9 @@ check_node_accept (const re_match_contex
112 case OP_UTF8_PERIOD:
113 if (ch >= ASCII_CHARS)
114 return false;
115+#if defined __GNUC__ && __GNUC__ >= 7
116+ __attribute__ ((fallthrough));
117+#endif
118 /* FALLTHROUGH */
119 #endif
120 case OP_PERIOD:
121Index: grub-2.00/grub-core/lib/xzembed/xz_dec_lzma2.c
122===================================================================
123--- grub-2.00.orig/grub-core/lib/xzembed/xz_dec_lzma2.c
124+++ grub-2.00/grub-core/lib/xzembed/xz_dec_lzma2.c
125@@ -1042,6 +1042,8 @@ enum xz_ret xz_dec_lzma2_run(
126
127 s->lzma2.sequence = SEQ_LZMA_PREPARE;
128
129+ /* Fall through */
130+
131 case SEQ_LZMA_PREPARE:
132 if (s->lzma2.compressed < RC_INIT_BYTES)
133 return XZ_DATA_ERROR;
134@@ -1052,6 +1054,8 @@ enum xz_ret xz_dec_lzma2_run(
135 s->lzma2.compressed -= RC_INIT_BYTES;
136 s->lzma2.sequence = SEQ_LZMA_RUN;
137
138+ /* Fall through */
139+
140 case SEQ_LZMA_RUN:
141 /*
142 * Set dictionary limit to indicate how much we want
143Index: grub-2.00/grub-core/lib/xzembed/xz_dec_stream.c
144===================================================================
145--- grub-2.00.orig/grub-core/lib/xzembed/xz_dec_stream.c
146+++ grub-2.00/grub-core/lib/xzembed/xz_dec_stream.c
147@@ -749,6 +749,7 @@ static enum xz_ret dec_main(struct xz_de
148
149 s->sequence = SEQ_BLOCK_START;
150
151+ /* FALLTHROUGH */
152 case SEQ_BLOCK_START:
153 /* We need one byte of input to continue. */
154 if (b->in_pos == b->in_size)
155@@ -772,6 +773,7 @@ static enum xz_ret dec_main(struct xz_de
156 s->temp.pos = 0;
157 s->sequence = SEQ_BLOCK_HEADER;
158
159+ /* FALLTHROUGH */
160 case SEQ_BLOCK_HEADER:
161 if (!fill_temp(s, b))
162 return XZ_OK;
163@@ -782,6 +784,7 @@ static enum xz_ret dec_main(struct xz_de
164
165 s->sequence = SEQ_BLOCK_UNCOMPRESS;
166
167+ /* FALLTHROUGH */
168 case SEQ_BLOCK_UNCOMPRESS:
169 ret = dec_block(s, b);
170 if (ret != XZ_STREAM_END)
171@@ -809,6 +812,7 @@ static enum xz_ret dec_main(struct xz_de
172
173 s->sequence = SEQ_BLOCK_CHECK;
174
175+ /* FALLTHROUGH */
176 case SEQ_BLOCK_CHECK:
177 ret = hash_validate(s, b, 0);
178 if (ret != XZ_STREAM_END)
179@@ -863,6 +867,7 @@ static enum xz_ret dec_main(struct xz_de
180
181 s->sequence = SEQ_INDEX_CRC32;
182
183+ /* FALLTHROUGH */
184 case SEQ_INDEX_CRC32:
185 ret = hash_validate(s, b, 1);
186 if (ret != XZ_STREAM_END)
187@@ -871,6 +876,7 @@ static enum xz_ret dec_main(struct xz_de
188 s->temp.size = STREAM_HEADER_SIZE;
189 s->sequence = SEQ_STREAM_FOOTER;
190
191+ /* FALLTHROUGH */
192 case SEQ_STREAM_FOOTER:
193 if (!fill_temp(s, b))
194 return XZ_OK;
195Index: grub-2.00/grub-core/loader/i386/linux.c
196===================================================================
197--- grub-2.00.orig/grub-core/loader/i386/linux.c
198+++ grub-2.00/grub-core/loader/i386/linux.c
199@@ -977,10 +977,13 @@ grub_cmd_linux (grub_command_t cmd __att
200 {
201 case 'g':
202 shift += 10;
203+ /* FALLTHROUGH */
204 case 'm':
205 shift += 10;
206+ /* FALLTHROUGH */
207 case 'k':
208 shift += 10;
209+ /* FALLTHROUGH */
210 default:
211 break;
212 }
213Index: grub-2.00/grub-core/video/readers/jpeg.c
214===================================================================
215--- grub-2.00.orig/grub-core/video/readers/jpeg.c
216+++ grub-2.00/grub-core/video/readers/jpeg.c
217@@ -701,6 +701,7 @@ grub_jpeg_decode_jpeg (struct grub_jpeg_
218 case JPEG_MARKER_SOS: /* Start Of Scan. */
219 if (grub_jpeg_decode_sos (data))
220 break;
221+ /* FALLTHROUGH */
222 case JPEG_MARKER_RST0: /* Restart. */
223 case JPEG_MARKER_RST1:
224 case JPEG_MARKER_RST2:
225Index: grub-2.00/util/grub-mkimagexx.c
226===================================================================
227--- grub-2.00.orig/util/grub-mkimagexx.c
228+++ grub-2.00/util/grub-mkimagexx.c
229@@ -485,6 +485,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e
230 + sym->st_value
231 - image_target->vaddr_offset));
232 }
233+ /* FALLTHROUGH */
234 case R_IA64_LTOFF_FPTR22:
235 *gpptr = grub_host_to_target64 (addend + sym_addr);
236 add_value_to_slot_21 ((grub_addr_t) target,
237Index: grub-2.00/util/grub-mount.c
238===================================================================
239--- grub-2.00.orig/util/grub-mount.c
240+++ grub-2.00/util/grub-mount.c
241@@ -487,6 +487,7 @@ argp_parser (int key, char *arg, struct
242 if (arg[0] != '-')
243 break;
244
245+ /* FALLTHROUGH */
246 default:
247 if (!arg)
248 return 0;
diff --git a/meta/recipes-bsp/grub/files/0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch b/meta/recipes-bsp/grub/files/0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch
new file mode 100644
index 0000000000..fcfbf5cdf6
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch
@@ -0,0 +1,38 @@
1From 007f0b407f72314ec832d77e15b83ea40b160037 Mon Sep 17 00:00:00 2001
2From: Andrei Borzenkov <arvidjaar@gmail.com>
3Date: Tue, 4 Apr 2017 19:37:47 +0300
4Subject: [PATCH 3/4] Add gnulib-fix-gcc7-fallthrough.diff
5
6As long as the code is not upstream, add it as explicit patch for the
7case of gnulib refresh.
8---
9Upstream-Status: Backport
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12 grub-core/gnulib-fix-gcc7-fallthrough.diff | 14 ++++++++++++++
13 1 file changed, 14 insertions(+)
14 create mode 100644 grub-core/gnulib-fix-gcc7-fallthrough.diff
15
16diff --git a/grub-core/gnulib-fix-gcc7-fallthrough.diff b/grub-core/gnulib-fix-gcc7-fallthrough.diff
17new file mode 100644
18index 0000000..9802e2d
19--- /dev/null
20+++ b/grub-core/gnulib-fix-gcc7-fallthrough.diff
21@@ -0,0 +1,14 @@
22+diff --git grub-core/gnulib/regexec.c grub-core/gnulib/regexec.c
23+index f632cd4..a7776f0 100644
24+--- grub-core/gnulib/regexec.c
25++++ grub-core/gnulib/regexec.c
26+@@ -4099,6 +4099,9 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
27+ case OP_UTF8_PERIOD:
28+ if (ch >= ASCII_CHARS)
29+ return false;
30++#if defined __GNUC__ && __GNUC__ >= 7
31++ __attribute__ ((fallthrough));
32++#endif
33+ /* FALLTHROUGH */
34+ #endif
35+ case OP_PERIOD:
36--
371.9.1
38
diff --git a/meta/recipes-bsp/grub/files/0004-Fix-remaining-cases-of-gcc-7-fallthrough-warning.patch b/meta/recipes-bsp/grub/files/0004-Fix-remaining-cases-of-gcc-7-fallthrough-warning.patch
new file mode 100644
index 0000000000..78a70a2dab
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0004-Fix-remaining-cases-of-gcc-7-fallthrough-warning.patch
@@ -0,0 +1,175 @@
1From d454509bb866d4eaefbb558d94dd0ef0228830eb Mon Sep 17 00:00:00 2001
2From: Vladimir Serbinenko <phcoder@gmail.com>
3Date: Wed, 12 Apr 2017 01:42:38 +0000
4Subject: [PATCH 4/4] Fix remaining cases of gcc 7 fallthrough warning.
5
6They are all intended, so just add the relevant comment.
7---
8Upstream-Status: Backport
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11 grub-core/kern/ia64/dl.c | 1 +
12 grub-core/kern/mips/dl.c | 1 +
13 grub-core/kern/sparc64/dl.c | 1 +
14 grub-core/loader/i386/coreboot/chainloader.c | 1 +
15 4 files changed, 4 insertions(+)
16
17Index: grub-2.00/grub-core/kern/ia64/dl.c
18===================================================================
19--- grub-2.00.orig/grub-core/kern/ia64/dl.c
20+++ grub-2.00/grub-core/kern/ia64/dl.c
21@@ -257,6 +257,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t
22 case R_IA64_LTOFF22:
23 if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
24 value = *(grub_uint64_t *) sym->st_value + rel->r_addend;
25+ /* Fallthrough. */
26 case R_IA64_LTOFF_FPTR22:
27 *gpptr = value;
28 add_value_to_slot_21 (addr, (grub_addr_t) gpptr - (grub_addr_t) gp);
29Index: grub-2.00/grub-core/disk/diskfilter.c
30===================================================================
31--- grub-2.00.orig/grub-core/disk/diskfilter.c
32+++ grub-2.00/grub-core/disk/diskfilter.c
33@@ -71,10 +71,12 @@ is_lv_readable (struct grub_diskfilter_l
34 case GRUB_DISKFILTER_RAID6:
35 if (!easily)
36 need--;
37+ /* Fallthrough. */
38 case GRUB_DISKFILTER_RAID4:
39 case GRUB_DISKFILTER_RAID5:
40 if (!easily)
41 need--;
42+ /* Fallthrough. */
43 case GRUB_DISKFILTER_STRIPED:
44 break;
45
46@@ -507,6 +509,7 @@ read_segment (struct grub_diskfilter_seg
47 if (seg->node_count == 1)
48 return grub_diskfilter_read_node (&seg->nodes[0],
49 sector, size, buf);
50+ /* Fallthrough. */
51 case GRUB_DISKFILTER_MIRROR:
52 case GRUB_DISKFILTER_RAID10:
53 {
54Index: grub-2.00/grub-core/font/font.c
55===================================================================
56--- grub-2.00.orig/grub-core/font/font.c
57+++ grub-2.00/grub-core/font/font.c
58@@ -1297,6 +1297,7 @@ blit_comb (const struct grub_unicode_gly
59 - grub_font_get_xheight (combining_glyphs[i]->font) - 1;
60 if (space <= 0)
61 space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
62+ /* Fallthrough. */
63
64 case GRUB_UNICODE_STACK_ATTACHED_ABOVE:
65 do_blit (combining_glyphs[i], targetx,
66@@ -1338,6 +1339,7 @@ blit_comb (const struct grub_unicode_gly
67 + combining_glyphs[i]->height);
68 if (space <= 0)
69 space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
70+ /* Fallthrough. */
71
72 case GRUB_UNICODE_STACK_ATTACHED_BELOW:
73 do_blit (combining_glyphs[i], targetx, -(bounds.y - space));
74Index: grub-2.00/grub-core/fs/udf.c
75===================================================================
76--- grub-2.00.orig/grub-core/fs/udf.c
77+++ grub-2.00/grub-core/fs/udf.c
78@@ -970,6 +970,7 @@ grub_udf_read_symlink (grub_fshelp_node_
79 case 1:
80 if (ptr[1])
81 goto fail;
82+ break;
83 case 2:
84 /* in 4 bytes. out: 1 byte. */
85 optr = out;
86Index: grub-2.00/grub-core/lib/legacy_parse.c
87===================================================================
88--- grub-2.00.orig/grub-core/lib/legacy_parse.c
89+++ grub-2.00/grub-core/lib/legacy_parse.c
90@@ -626,6 +626,7 @@ grub_legacy_parse (const char *buf, char
91 {
92 case TYPE_FILE_NO_CONSUME:
93 hold_arg = 1;
94+ /* Fallthrough. */
95 case TYPE_PARTITION:
96 case TYPE_FILE:
97 args[i] = adjust_file (curarg, curarglen);
98Index: grub-2.00/grub-core/lib/libgcrypt-grub/cipher/rijndael.c
99===================================================================
100--- grub-2.00.orig/grub-core/lib/libgcrypt-grub/cipher/rijndael.c
101+++ grub-2.00/grub-core/lib/libgcrypt-grub/cipher/rijndael.c
102@@ -96,7 +96,8 @@ do_setkey (RIJNDAEL_context *ctx, const
103 static int initialized = 0;
104 static const char *selftest_failed=0;
105 int ROUNDS;
106- int i,j, r, t, rconpointer = 0;
107+ unsigned int i, t, rconpointer = 0;
108+ int j, r;
109 int KC;
110 union
111 {
112Index: grub-2.00/grub-core/mmap/efi/mmap.c
113===================================================================
114--- grub-2.00.orig/grub-core/mmap/efi/mmap.c
115+++ grub-2.00/grub-core/mmap/efi/mmap.c
116@@ -72,6 +72,7 @@ grub_efi_mmap_iterate (grub_memory_hook_
117 GRUB_MEMORY_AVAILABLE);
118 break;
119 }
120+ /* Fallthrough. */
121 case GRUB_EFI_RUNTIME_SERVICES_CODE:
122 hook (desc->physical_start, desc->num_pages * 4096,
123 GRUB_MEMORY_CODE);
124@@ -86,6 +87,7 @@ grub_efi_mmap_iterate (grub_memory_hook_
125 grub_printf ("Unknown memory type %d, considering reserved\n",
126 desc->type);
127
128+ /* Fallthrough. */
129 case GRUB_EFI_BOOT_SERVICES_DATA:
130 if (!avoid_efi_boot_services)
131 {
132@@ -93,6 +95,7 @@ grub_efi_mmap_iterate (grub_memory_hook_
133 GRUB_MEMORY_AVAILABLE);
134 break;
135 }
136+ /* Fallthrough. */
137 case GRUB_EFI_RESERVED_MEMORY_TYPE:
138 case GRUB_EFI_RUNTIME_SERVICES_DATA:
139 case GRUB_EFI_MEMORY_MAPPED_IO:
140Index: grub-2.00/grub-core/normal/charset.c
141===================================================================
142--- grub-2.00.orig/grub-core/normal/charset.c
143+++ grub-2.00/grub-core/normal/charset.c
144@@ -858,6 +858,7 @@ grub_bidi_line_logical_to_visual (const
145 case GRUB_BIDI_TYPE_R:
146 case GRUB_BIDI_TYPE_AL:
147 bidi_needed = 1;
148+ /* Fallthrough. */
149 default:
150 {
151 if (join_state == JOIN_FORCE)
152Index: grub-2.00/grub-core/video/bochs.c
153===================================================================
154--- grub-2.00.orig/grub-core/video/bochs.c
155+++ grub-2.00/grub-core/video/bochs.c
156@@ -351,6 +351,7 @@ grub_video_bochs_setup (unsigned int wid
157 case 32:
158 framebuffer.mode_info.reserved_mask_size = 8;
159 framebuffer.mode_info.reserved_field_pos = 24;
160+ /* Fallthrough. */
161
162 case 24:
163 framebuffer.mode_info.red_mask_size = 8;
164Index: grub-2.00/grub-core/video/cirrus.c
165===================================================================
166--- grub-2.00.orig/grub-core/video/cirrus.c
167+++ grub-2.00/grub-core/video/cirrus.c
168@@ -431,6 +431,7 @@ grub_video_cirrus_setup (unsigned int wi
169 case 32:
170 framebuffer.mode_info.reserved_mask_size = 8;
171 framebuffer.mode_info.reserved_field_pos = 24;
172+ /* Fallthrough. */
173
174 case 24:
175 framebuffer.mode_info.red_mask_size = 8;
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index ef893b327f..a93c99e6c9 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -36,6 +36,10 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
36 file://0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch \ 36 file://0001-grub-core-kern-efi-mm.c-grub_efi_finish_boot_service.patch \
37 file://0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch \ 37 file://0002-grub-core-kern-efi-mm.c-grub_efi_get_memory_map-Neve.patch \
38 file://0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch \ 38 file://0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch \
39 file://0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch \
40 file://0002-i386-x86_64-ppc-fix-switch-fallthrough-cases-with-GC.patch \
41 file://0003-Add-gnulib-fix-gcc7-fallthrough.diff.patch \
42 file://0004-Fix-remaining-cases-of-gcc-7-fallthrough-warning.patch \
39 " 43 "
40 44
41DEPENDS = "flex-native bison-native autogen-native" 45DEPENDS = "flex-native bison-native autogen-native"