summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/files
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-12 23:43:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-30 11:36:58 +0000
commit047ad2c81a7ec0d59d5fb1ddf52668c29a1119c9 (patch)
tree87cbebb1238a9d20c8346b78cd6021567cd4bbfc /meta/recipes-bsp/grub/files
parent956be0c858b55f34e666ad2a00bd07ae61e36ae1 (diff)
downloadpoky-047ad2c81a7ec0d59d5fb1ddf52668c29a1119c9.tar.gz
grub: Backport fix for largefile detection/use
This is inspired by musl porting, where grub's configure is enabling largefile support based on glibc versions, instead an upstream patch turns it into autoconf check Update git version recipe arm platforms use this recipe to provide grub and it needed fixes from upstream so upgrade to latest tip of git and forward port patches as well as drop the ones already applied upstream (From OE-Core rev: a290429c8415042cb8c2f4258e76a3cc6815a172) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub/files')
-rw-r--r--meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch b/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
new file mode 100644
index 0000000000..9eabce977b
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
@@ -0,0 +1,81 @@
1From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001
2From: Felix Janda <felix.janda@posteo.de>
3Date: Thu, 22 Jan 2015 19:54:36 +0100
4Subject: [PATCH] Remove direct _llseek code and require long filesystem libc.
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Backport
9 configure.ac | 8 ++++++++
10 grub-core/osdep/unix/hostdisk.c | 24 ------------------------
11 4 files changed, 13 insertions(+), 24 deletions(-)
12
13Index: grub-2.00/configure.ac
14===================================================================
15--- grub-2.00.orig/configure.ac
16+++ grub-2.00/configure.ac
17@@ -306,6 +306,14 @@ if test x$grub_cv_apple_cc = xyes ; then
18 HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute"
19 fi
20
21+case "$host_os" in
22+ cygwin | windows* | mingw32* | aros*)
23+ ;;
24+ *)
25+ AC_CHECK_SIZEOF(off_t)
26+ test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
27+esac
28+
29 if test x$USE_NLS = xno; then
30 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
31 fi
32Index: grub-2.00/grub-core/kern/emu/hostdisk.c
33===================================================================
34--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c
35+++ grub-2.00/grub-core/kern/emu/hostdisk.c
36@@ -44,11 +44,6 @@
37 #ifdef __linux__
38 # include <sys/ioctl.h> /* ioctl */
39 # include <sys/mount.h>
40-# if !defined(__GLIBC__) || \
41- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
42-/* Maybe libc doesn't have large file support. */
43-# include <linux/unistd.h> /* _llseek */
44-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
45 # ifndef BLKFLSBUF
46 # define BLKFLSBUF _IO (0x12,97) /* flush buffer cache */
47 # endif /* ! BLKFLSBUF */
48@@ -761,25 +756,6 @@ linux_find_partition (char *dev, grub_di
49 }
50 #endif /* __linux__ */
51
52-#if defined(__linux__) && (!defined(__GLIBC__) || \
53- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
54- /* Maybe libc doesn't have large file support. */
55-grub_err_t
56-grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
57-{
58- loff_t offset, result;
59- static int _llseek (uint filedes, ulong hi, ulong lo,
60- loff_t *res, uint wh);
61- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
62- loff_t *, res, uint, wh);
63-
64- offset = (loff_t) off;
65- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
66- return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
67- name, strerror (errno));
68- return GRUB_ERR_NONE;
69-}
70-#else
71 grub_err_t
72 grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
73 {
74@@ -790,7 +766,6 @@ grub_util_fd_seek (int fd, const char *n
75 name, strerror (errno));
76 return 0;
77 }
78-#endif
79
80 static void
81 flush_initial_buffer (const char *os_dev __attribute__ ((unused)))