summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch44
-rw-r--r--meta/recipes-bsp/grub/grub_2.00.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch b/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch
new file mode 100644
index 0000000000..079992afba
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch
@@ -0,0 +1,44 @@
1grub-core/net/tftp.c: fix endianness problem.
2
3 * grub-core/net/tftp.c (ack): Fix endianness problem.
4 (tftp_receive): Likewise.
5 Reported by: Michael Davidsaver.
6
7Upstream-Status: Backport
8
9diff --git a/ChangeLog b/ChangeLog
10index 81bdae9..c2f42d5 100644
11--- a/ChangeLog
12+++ b/ChangeLog
13@@ -1,3 +1,9 @@
14+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
15+
16+ * grub-core/net/tftp.c (ack): Fix endianness problem.
17+ (tftp_receive): Likewise.
18+ Reported by: Michael Davidsaver.
19+
20 2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
21
22 * configure.ac: Bump version to 2.00.
23diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
24index 9c70efb..d0f39ea 100644
25--- a/grub-core/net/tftp.c
26+++ b/grub-core/net/tftp.c
27@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
28
29 tftph_ack = (struct tftphdr *) nb_ack.data;
30 tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
31- tftph_ack->u.ack.block = block;
32+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
33
34 err = grub_net_send_udp_packet (data->sock, &nb_ack);
35 if (err)
36@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
37 grub_priority_queue_pop (data->pq);
38
39 if (file->device->net->packs.count < 50)
40- err = ack (data, tftph->u.data.block);
41+ err = ack (data, data->block + 1);
42 else
43 {
44 file->device->net->stall = 1;
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb
index ce2d680eec..3c1ec0b651 100644
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/meta/recipes-bsp/grub/grub_2.00.bb
@@ -22,6 +22,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
22 file://check-if-liblzma-is-disabled.patch \ 22 file://check-if-liblzma-is-disabled.patch \
23 file://fix-issue-with-flex-2.5.37.patch \ 23 file://fix-issue-with-flex-2.5.37.patch \
24 file://grub-2.00-add-oe-kernel.patch \ 24 file://grub-2.00-add-oe-kernel.patch \
25 file://fix-endianness-problem.patch \
25 " 26 "
26 27
27SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" 28SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"