diff options
author | Shan Hai <shan.hai@windriver.com> | 2014-07-18 13:21:37 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-19 00:08:47 +0100 |
commit | adac8c63a0eefd3ce118f8964b05a952e629da38 (patch) | |
tree | c40d58af3c2048adda763241f6da92581232be63 /meta/recipes-bsp | |
parent | b1811c07589a3eff5702d435f8feface63f1c39e (diff) | |
download | openembedded-core-adac8c63a0eefd3ce118f8964b05a952e629da38.tar.gz openembedded-core-adac8c63a0eefd3ce118f8964b05a952e629da38.tar.bz2 openembedded-core-adac8c63a0eefd3ce118f8964b05a952e629da38.zip |
grub-core: fix endianness problem
Fix tftp stalls on loading files bigger than ~32k bug by cherry picking
a patch from grub upstream.
Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r-- | meta/recipes-bsp/grub/grub-2.00/fix-endianness-problem.patch | 44 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub_2.00.bb | 1 |
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 @@ +grub-core/net/tftp.c: fix endianness problem. + + * grub-core/net/tftp.c (ack): Fix endianness problem. + (tftp_receive): Likewise. + Reported by: Michael Davidsaver. + +Upstream-Status: Backport + +diff --git a/ChangeLog b/ChangeLog +index 81bdae9..c2f42d5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,9 @@ ++2012-07-02 Vladimir Serbinenko <phcoder@gmail.com> ++ ++ * grub-core/net/tftp.c (ack): Fix endianness problem. ++ (tftp_receive): Likewise. ++ Reported by: Michael Davidsaver. ++ + 2012-06-27 Vladimir Serbinenko <phcoder@gmail.com> + + * configure.ac: Bump version to 2.00. +diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c +index 9c70efb..d0f39ea 100644 +--- a/grub-core/net/tftp.c ++++ b/grub-core/net/tftp.c +@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block) + + tftph_ack = (struct tftphdr *) nb_ack.data; + tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK); +- tftph_ack->u.ack.block = block; ++ tftph_ack->u.ack.block = grub_cpu_to_be16 (block); + + err = grub_net_send_udp_packet (data->sock, &nb_ack); + if (err) +@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)), + grub_priority_queue_pop (data->pq); + + if (file->device->net->packs.count < 50) +- err = ack (data, tftph->u.data.block); ++ err = ack (data, data->block + 1); + else + { + 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 \ file://check-if-liblzma-is-disabled.patch \ file://fix-issue-with-flex-2.5.37.patch \ file://grub-2.00-add-oe-kernel.patch \ + file://fix-endianness-problem.patch \ " SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" |