summaryrefslogtreecommitdiff
path: root/package/grub
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-04-06 20:52:19 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-04-06 20:52:19 +0200
commitfcb8e56cdc4864aa55ae3f377f94f9be3a9fe7c9 (patch)
treea897975298585f7c813e957ddb8ab9f0590260f2 /package/grub
parent3491bf306b439d2acc9dcde8eb23e82482c59c4d (diff)
update to 2.00
Diffstat (limited to 'package/grub')
-rw-r--r--package/grub/Makefile33
-rw-r--r--package/grub/patches/patch-conf_common_mk11
-rw-r--r--package/grub/patches/patch-configure11
-rw-r--r--package/grub/patches/patch-grub-core_gnulib_stdio_in_h14
-rw-r--r--package/grub/patches/patch-grub-core_kern_emu_hostdisk_c36
-rw-r--r--package/grub/patches/patch-include_grub_i18n_h11
-rw-r--r--package/grub/patches/patch-include_grub_misc_h17
-rw-r--r--package/grub/patches/patch-kern_misc_c54
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c29
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c29
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c20
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c38
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c53
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c20
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c11
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c20
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c11
-rw-r--r--package/grub/patches/patch-util_grub-install_in11
-rw-r--r--package/grub/patches/patch-util_grub-mkconfig_lib_in11
-rw-r--r--package/grub/patches/patch-util_grub_d_10_linux_in20
27 files changed, 84 insertions, 453 deletions
diff --git a/package/grub/Makefile b/package/grub/Makefile
index cfe17a227..eeab31dab 100644
--- a/package/grub/Makefile
+++ b/package/grub/Makefile
@@ -4,37 +4,50 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= grub
-PKG_VERSION:= 1.98
+PKG_VERSION:= 2.00
PKG_RELEASE:= 1
-PKG_MD5SUM:= c0bcf60e524739bb64e3a2d4e3732a59
+PKG_MD5SUM:= e927540b6eda8b024fb0391eeaa4091c
PKG_DESCR:= GRUB2 bootloader (source package)
PKG_SECTION:= boot
+PKG_BUILDDEP:= bison-host
PKG_URL:= http://www.gnu.org/software/grub
-PKG_SITES:= ftp://alpha.gnu.org/gnu/grub/
+PKG_SITES:= ftp://ftp.gnu.org/gnu/grub/
PKG_HOST_DEPENDS:= linux
-PKG_ARCH_DEPENDS:= x86 x86_64
+PKG_ARCH_DEPENDS:= x86 x86_64 mips
PKG_NOPARALLEL:= 1
+PKG_CHOICES_GRUB:= PC EFI
+PKGCD_PC:= build for PC BIOS
+PKGCD_EFI:= build for EFI
+
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,GRUB,grub,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+ifeq ($(ADK_PACKAGE_GRUB_PC),y)
+GRUB_ARCH:= i386-pc
+CONFIGURE_ARGS+= --with-platform=pc
+endif
+ifeq ($(ADK_PACKAGE_GRUB_EFI),y)
+GRUB_ARCH:= x86_64-efi
+CONFIGURE_ARGS+= --with-platform=efi
+endif
+
ifeq ($(ADK_STATIC),y)
TARGET_CFLAGS+= -static
TARGET_LDFLAGS+= -static
endif
-XAKE_FLAGS+= GCC_HONOUR_COPTS=s CPPFLAGS_FOR_BUILD="-I./include"
-CONFIGURE_ARGS+= --disable-efiemu \
- --disable-grub-mkfont \
- --disable-grub-fstest
+XAKE_FLAGS+= GCC_HONOUR_COPTS=s
grub-install:
- ${INSTALL_DIR} $(IDIR_GRUB)/usr/{sbin,lib,bin}
+ ${INSTALL_DIR} $(IDIR_GRUB)/usr/{sbin,bin}
+ ${INSTALL_DIR} $(IDIR_GRUB)/usr/lib/grub/${GRUB_ARCH}/
${INSTALL_DIR} $(IDIR_GRUB)/etc
${CP} ${WRKINST}/etc/grub.d $(IDIR_GRUB)/etc
- ${CP} ${WRKINST}/usr/lib/* $(IDIR_GRUB)/usr/lib
+ ${CP} ${WRKINST}/usr/lib/grub/${GRUB_ARCH}/*{mod,lst,img} \
+ $(IDIR_GRUB)/usr/lib/grub/${GRUB_ARCH}/
${INSTALL_BIN} ${WRKINST}/usr/bin/* $(IDIR_GRUB)/usr/bin
${INSTALL_BIN} ${WRKINST}/usr/sbin/* $(IDIR_GRUB)/usr/sbin
diff --git a/package/grub/patches/patch-conf_common_mk b/package/grub/patches/patch-conf_common_mk
deleted file mode 100644
index fec7cd1dd..000000000
--- a/package/grub/patches/patch-conf_common_mk
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/conf/common.mk 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/conf/common.mk 2012-02-22 13:20:42.022360300 +0100
-@@ -11159,7 +11159,7 @@ trigtables.c: gentrigtables
- ./gentrigtables > $@
- DISTCLEANFILES += trigtables.c
- gentrigtables: gentrigtables.c
-- $(CC) -o $@ $^ $(CPPFLAGS) -lm
-+ $(CC_FOR_BUILD) -o $@ $^ $(CPPFLAGS_FOR_BUILD) -lm
- DISTCLEANFILES += gentrigtables
-
- pkglib_MODULES += setjmp.mod
diff --git a/package/grub/patches/patch-configure b/package/grub/patches/patch-configure
new file mode 100644
index 000000000..a3920a1c1
--- /dev/null
+++ b/package/grub/patches/patch-configure
@@ -0,0 +1,11 @@
+--- grub-2.00.orig/configure 2012-06-26 13:59:16.000000000 +0200
++++ grub-2.00/configure 2014-04-06 20:34:33.000000000 +0200
+@@ -3880,7 +3882,7 @@ TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(t
+
+ case "$target_cpu" in
+ i[3456]86) target_cpu=i386 ;;
+- amd64) target_cpu=x86_64 ;;
++ amd64|x86_64) target_cpu=x86_64 ;;
+ sparc) target_cpu=sparc64 ;;
+ mipsel|mips64el)
+ target_cpu=mipsel;
diff --git a/package/grub/patches/patch-grub-core_gnulib_stdio_in_h b/package/grub/patches/patch-grub-core_gnulib_stdio_in_h
new file mode 100644
index 000000000..79ab772ad
--- /dev/null
+++ b/package/grub/patches/patch-grub-core_gnulib_stdio_in_h
@@ -0,0 +1,14 @@
+--- grub-2.00.orig/grub-core/gnulib/stdio.in.h 2010-12-01 15:45:43.000000000 +0100
++++ grub-2.00/grub-core/gnulib/stdio.in.h 2014-04-05 10:02:52.000000000 +0200
+@@ -137,11 +137,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+ "use gnulib module fflush for portable POSIX compliance");
+ #endif
+
+-/* It is very rare that the developer ever has full control of stdin,
+- so any use of gets warrants an unconditional warning. Assume it is
+- always declared, since it is required by C89. */
+-#undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/package/grub/patches/patch-grub-core_kern_emu_hostdisk_c b/package/grub/patches/patch-grub-core_kern_emu_hostdisk_c
new file mode 100644
index 000000000..e238bb7fd
--- /dev/null
+++ b/package/grub/patches/patch-grub-core_kern_emu_hostdisk_c
@@ -0,0 +1,36 @@
+--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c 2012-06-25 10:32:04.000000000 +0200
++++ grub-2.00/grub-core/kern/emu/hostdisk.c 2014-04-06 13:14:06.000000000 +0200
+@@ -761,25 +761,6 @@ linux_find_partition (char *dev, grub_di
+ }
+ #endif /* __linux__ */
+
+-#if defined(__linux__) && (!defined(__GLIBC__) || \
+- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+- /* Maybe libc doesn't have large file support. */
+-grub_err_t
+-grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+-{
+- loff_t offset, result;
+- static int _llseek (uint filedes, ulong hi, ulong lo,
+- loff_t *res, uint wh);
+- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
+- loff_t *, res, uint, wh);
+-
+- offset = (loff_t) off;
+- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
+- return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
+- name, strerror (errno));
+- return GRUB_ERR_NONE;
+-}
+-#else
+ grub_err_t
+ grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+ {
+@@ -790,7 +771,6 @@ grub_util_fd_seek (int fd, const char *n
+ name, strerror (errno));
+ return 0;
+ }
+-#endif
+
+ static void
+ flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
diff --git a/package/grub/patches/patch-include_grub_i18n_h b/package/grub/patches/patch-include_grub_i18n_h
deleted file mode 100644
index 41151f706..000000000
--- a/package/grub/patches/patch-include_grub_i18n_h
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/include/grub/i18n.h 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/include/grub/i18n.h 2010-06-26 15:31:22.860562533 +0200
-@@ -25,7 +25,7 @@
- extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
-
- /* NLS can be disabled through the configure --disable-nls option. */
--#if ENABLE_NLS
-+#if defined(ENABLE_NLS)
-
- # ifdef GRUB_UTIL
-
diff --git a/package/grub/patches/patch-include_grub_misc_h b/package/grub/patches/patch-include_grub_misc_h
deleted file mode 100644
index fb3e46108..000000000
--- a/package/grub/patches/patch-include_grub_misc_h
+++ /dev/null
@@ -1,17 +0,0 @@
---- grub-1.98.orig/include/grub/misc.h 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/include/grub/misc.h 2010-06-26 18:54:44.075171713 +0200
-@@ -91,14 +91,6 @@ grub_strncat (char *dest, const char *sr
- return dest;
- }
-
--/* Prototypes for aliases. */
--#ifndef GRUB_UTIL
--int EXPORT_FUNC(memcmp) (const void *s1, const void *s2, grub_size_t n);
--void *EXPORT_FUNC(memmove) (void *dest, const void *src, grub_size_t n);
--void *EXPORT_FUNC(memcpy) (void *dest, const void *src, grub_size_t n);
--void *EXPORT_FUNC(memset) (void *s, int c, grub_size_t n);
--#endif
--
- int EXPORT_FUNC(grub_memcmp) (const void *s1, const void *s2, grub_size_t n);
- int EXPORT_FUNC(grub_strcmp) (const char *s1, const char *s2);
- int EXPORT_FUNC(grub_strncmp) (const char *s1, const char *s2, grub_size_t n);
diff --git a/package/grub/patches/patch-kern_misc_c b/package/grub/patches/patch-kern_misc_c
deleted file mode 100644
index 2912e2564..000000000
--- a/package/grub/patches/patch-kern_misc_c
+++ /dev/null
@@ -1,54 +0,0 @@
---- grub-1.98.orig/kern/misc.c 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/kern/misc.c 2010-06-26 20:12:26.711214130 +0200
-@@ -64,23 +64,6 @@ grub_memmove (void *dest, const void *sr
- return dest;
- }
-
--#ifndef APPLE_CC
--void *memmove (void *dest, const void *src, grub_size_t n)
-- __attribute__ ((alias ("grub_memmove")));
--/* GCC emits references to memcpy() for struct copies etc. */
--void *memcpy (void *dest, const void *src, grub_size_t n)
-- __attribute__ ((alias ("grub_memmove")));
--#else
--void *memcpy (void *dest, const void *src, grub_size_t n)
--{
-- return grub_memmove (dest, src, n);
--}
--void *memmove (void *dest, const void *src, grub_size_t n)
--{
-- return grub_memmove (dest, src, n);
--}
--#endif
--
- char *
- grub_strcpy (char *dest, const char *src)
- {
-@@ -516,15 +499,6 @@ grub_memset (void *s, int c, grub_size_t
-
- return s;
- }
--#ifndef APPLE_CC
--void *memset (void *s, int c, grub_size_t n)
-- __attribute__ ((alias ("grub_memset")));
--#else
--void *memset (void *s, int c, grub_size_t n)
--{
-- return grub_memset (s, c, n);
--}
--#endif
-
- grub_size_t
- grub_strlen (const char *s)
-@@ -1053,11 +1027,6 @@ grub_abort (void)
- grub_exit ();
- }
-
--#ifndef APPLE_CC
--/* GCC emits references to abort(). */
--void abort (void) __attribute__ ((alias ("grub_abort")));
--#endif
--
- #ifdef NEED_ENABLE_EXECUTE_STACK
- /* Some gcc versions generate a call to this function
- in trampolines for nested functions. */
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c
deleted file mode 100644
index 8b3594525..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_camellia_c
+++ /dev/null
@@ -1,29 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/camellia.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/camellia.c 2010-06-26 20:49:20.915278106 +0200
-@@ -26,6 +26,7 @@
- */
-
-
-+#include <grub/misc.h>
- #include "camellia.h"
-
- /* u32 must be 32bit word */
-@@ -946,13 +947,13 @@ void camellia_setup192(const unsigned ch
- unsigned char kk[32];
- u32 krll, krlr, krrl,krrr;
-
-- memcpy(kk, key, 24);
-- memcpy((unsigned char *)&krll, key+16,4);
-- memcpy((unsigned char *)&krlr, key+20,4);
-+ grub_memcpy(kk, key, 24);
-+ grub_memcpy((unsigned char *)&krll, key+16,4);
-+ grub_memcpy((unsigned char *)&krlr, key+20,4);
- krrl = ~krll;
- krrr = ~krlr;
-- memcpy(kk+24, (unsigned char *)&krrl, 4);
-- memcpy(kk+28, (unsigned char *)&krrr, 4);
-+ grub_memcpy(kk+24, (unsigned char *)&krrl, 4);
-+ grub_memcpy(kk+28, (unsigned char *)&krrr, 4);
- camellia_setup256(kk, subkey);
- return;
- }
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c
deleted file mode 100644
index c2c93be5a..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_des_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/des.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/des.c 2010-06-26 20:35:49.335279651 +0200
-@@ -119,7 +119,7 @@
- #include "cipher.h"
-
- #if defined(__GNUC__) && defined(__GNU_LIBRARY__)
--#define working_memcmp memcmp
-+#define working_memcmp grub_memcmp
- #else
- /*
- * According to the SunOS man page, memcmp returns indeterminate sign
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c
deleted file mode 100644
index 91b467779..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c
+++ /dev/null
@@ -1,29 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/dsa.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/dsa.c 2010-06-26 20:41:13.511279436 +0200
-@@ -157,7 +157,7 @@ gen_k( gcry_mpi_t q )
- to get_random_bytes() and use this the here maybe it is
- easier to do this directly in random.c. */
- char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
-- memcpy( rndbuf,pp, 4 );
-+ grub_memcpy( rndbuf,pp, 4 );
- gcry_free(pp);
- }
- _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
-@@ -337,7 +337,7 @@ generate (DSA_secret_key *sk, unsigned i
- else
- { /* Change only some of the higher bits (= 2 bytes)*/
- char *r = gcry_random_bytes_secure (2, random_level);
-- memcpy(rndbuf, r, 2 );
-+ grub_memcpy(rndbuf, r, 2 );
- gcry_free(r);
- }
-
-@@ -713,7 +713,7 @@ dsa_generate_ext (int algo, unsigned int
- gcry_sexp_release (l1);
- return GPG_ERR_INV_OBJ; /* No value or value too large. */
- }
-- memcpy (buf, s, n);
-+ grub_memcpy (buf, s, n);
- buf[n] = 0;
- qbits = (unsigned int)strtoul (buf, NULL, 0);
- gcry_sexp_release (l1);
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c
deleted file mode 100644
index 5cd42146e..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_elgamal_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/elgamal.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/elgamal.c 2010-06-26 20:40:56.115156639 +0200
-@@ -212,7 +212,7 @@ gen_k( gcry_mpi_t p, int small_k )
- easier to do this directly in random.c Anyway, it is
- highly inlikely that we will ever reach this code. */
- char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
-- memcpy( rndbuf, pp, 4 );
-+ grub_memcpy( rndbuf, pp, 4 );
- gcry_free(pp);
- }
- _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
-@@ -308,7 +308,7 @@ generate ( ELG_secret_key *sk, unsigned
- {
- char *r = gcry_random_bytes_secure( 2,
- GCRY_VERY_STRONG_RANDOM );
-- memcpy(rndbuf, r, 2 );
-+ grub_memcpy(rndbuf, r, 2 );
- gcry_free(r);
- }
- }
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c
deleted file mode 100644
index 8bbe886a7..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md4_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/md4.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/md4.c 2010-06-26 20:24:28.691278909 +0200
-@@ -109,7 +109,7 @@ transform ( MD4_CONTEXT *ctx, const unsi
- }
- }
- #else
-- memcpy (in, data, 64);
-+ grub_memcpy (in, data, 64);
- #endif
-
- /* Round 1. */
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c
deleted file mode 100644
index 53aa3e69f..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_md5_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/md5.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/md5.c 2010-06-26 20:24:19.631157281 +0200
-@@ -100,7 +100,7 @@ transform ( MD5_CONTEXT *ctx, const unsi
- }
- }
- #else
-- memcpy( correct_words, data, 64 );
-+ grub_memcpy( correct_words, data, 64 );
- #endif
-
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
deleted file mode 100644
index c97d88c1d..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
+++ /dev/null
@@ -1,38 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/primegen.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/primegen.c 2010-06-26 20:42:06.831276628 +0200
-@@ -1478,7 +1478,7 @@ _gcry_generate_fips186_2_prime (unsigned
- }
-
- /* Step 2: U = sha1(seed) ^ sha1((seed+1) mod 2^{qbits}) */
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- for (i=seedlen-1; i >= 0; i--)
- {
- seed_plus[i]++;
-@@ -1596,7 +1596,7 @@ _gcry_generate_fips186_2_prime (unsigned
- *r_counter = counter;
- if (r_seed && r_seedlen)
- {
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- *r_seed = seed_plus;
- seed_plus = NULL;
- *r_seedlen = seedlen;
-@@ -1751,7 +1751,7 @@ _gcry_generate_fips186_3_prime (unsigned
-
- /* Step 11. Note that we do no use an explicit offset but increment
- SEED_PLUS accordingly. */
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- counter = 0;
-
- /* Generate P. */
-@@ -1838,7 +1838,7 @@ _gcry_generate_fips186_3_prime (unsigned
- *r_counter = counter;
- if (r_seed && r_seedlen)
- {
-- memcpy (seed_plus, seed, seedlen);
-+ grub_memcpy (seed_plus, seed, seedlen);
- *r_seed = seed_plus;
- seed_plus = NULL;
- *r_seedlen = seedlen;
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c
deleted file mode 100644
index 056abefa3..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rijndael_c
+++ /dev/null
@@ -1,53 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/rijndael.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/rijndael.c 2010-06-26 20:23:29.463277513 +0200
-@@ -139,7 +139,7 @@ do_setkey (RIJNDAEL_context *ctx, const
- if ((_gcry_get_hw_features () & HWF_PADLOCK_AES))
- {
- ctx->use_padlock = 1;
-- memcpy (ctx->padlock_key, key, keylen);
-+ grub_memcpy (ctx->padlock_key, key, keylen);
- }
- #endif
- }
-@@ -411,9 +411,9 @@ do_encrypt (const RIJNDAEL_context *ctx,
- byte b[16];
- } b;
-
-- memcpy (a.a, ax, 16);
-+ grub_memcpy (a.a, ax, 16);
- do_encrypt_aligned (ctx, b.b, a.a);
-- memcpy (bx, b.b, 16);
-+ grub_memcpy (bx, b.b, 16);
- }
-
-
-@@ -440,7 +440,7 @@ do_padlock (const RIJNDAEL_context *ctx,
- if (decrypt_flag)
- cword[0] |= 0x00000200;
-
-- memcpy (a, ax, 16);
-+ grub_memcpy (a, ax, 16);
-
- asm volatile
- ("pushfl\n\t" /* Force key reload. */
-@@ -454,7 +454,7 @@ do_padlock (const RIJNDAEL_context *ctx,
- : "%ecx", "cc", "memory"
- );
-
-- memcpy (bx, b, 16);
-+ grub_memcpy (bx, b, 16);
-
- }
- #endif /*USE_PADLOCK*/
-@@ -609,9 +609,9 @@ do_decrypt (RIJNDAEL_context *ctx, byte
- ctx->decryption_prepared = 1;
- }
-
-- memcpy (a.a, ax, 16);
-+ grub_memcpy (a.a, ax, 16);
- do_decrypt_aligned (ctx, b.b, a.a);
-- memcpy (bx, b.b, 16);
-+ grub_memcpy (bx, b.b, 16);
- #undef rk
- }
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c
deleted file mode 100644
index fb818bd51..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_rmd160_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/rmd160.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/rmd160.c 2010-06-26 20:23:39.319276778 +0200
-@@ -185,7 +185,7 @@ transform ( RMD160_CONTEXT *hd, const un
- * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
- * [measured with a 4MB data and "gpgm --print-md rmd160"] */
- u32 x[16];
-- memcpy( x, data, 64 );
-+ grub_memcpy( x, data, 64 );
- #endif
-
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c
deleted file mode 100644
index 7c99e23ad..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_serpent_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/serpent.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/serpent.c 2010-06-26 20:29:51.523275940 +0200
-@@ -917,7 +917,7 @@ serpent_test (void)
- (const u32 *) test_data[i].text_plain,
- (u32 *) scratch);
-
-- if (memcmp (scratch, test_data[i].text_cipher, sizeof (serpent_block_t)))
-+ if (grub_memcmp (scratch, test_data[i].text_cipher, sizeof (serpent_block_t)))
- switch (test_data[i].key_length)
- {
- case 16:
-@@ -931,7 +931,7 @@ serpent_test (void)
- serpent_decrypt_internal (&context,
- (const u32 *) test_data[i].text_cipher,
- (u32 *) scratch);
-- if (memcmp (scratch, test_data[i].text_plain, sizeof (serpent_block_t)))
-+ if (grub_memcmp (scratch, test_data[i].text_plain, sizeof (serpent_block_t)))
- switch (test_data[i].key_length)
- {
- case 16:
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c
deleted file mode 100644
index b04764bb8..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha1_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/sha1.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/sha1.c 2010-06-26 20:23:50.135168960 +0200
-@@ -114,7 +114,7 @@ transform (SHA1_CONTEXT *hd, const unsig
- for ( ;nblocks; nblocks--)
- {
- #ifdef WORDS_BIGENDIAN
-- memcpy (x, data, 64);
-+ grub_memcpy (x, data, 64);
- data += 64;
- #else
- {
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c
deleted file mode 100644
index f9676e392..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha256_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/sha256.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/sha256.c 2010-06-26 20:24:00.135274844 +0200
-@@ -150,7 +150,7 @@ transform (SHA256_CONTEXT *hd, const uns
- h = hd->h7;
-
- #ifdef WORDS_BIGENDIAN
-- memcpy (x, data, 64);
-+ grub_memcpy (x, data, 64);
- #else
- {
- byte *p2;
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c
deleted file mode 100644
index 070a15dff..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_sha512_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/sha512.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/sha512.c 2010-06-26 20:24:09.235288423 +0200
-@@ -162,7 +162,7 @@ transform (SHA512_CONTEXT *hd, const uns
- h = hd->h7;
-
- #ifdef WORDS_BIGENDIAN
-- memcpy (w, data, 128);
-+ grub_memcpy (w, data, 128);
- #else
- {
- int i;
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c
deleted file mode 100644
index a039004a2..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_tiger_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/tiger.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/tiger.c 2010-06-26 20:22:45.507277255 +0200
-@@ -685,7 +685,7 @@ transform ( TIGER_CONTEXT *hd, const uns
- x[7] = MKWORD(data, 7);
- #undef MKWORD
- #else
-- memcpy( &x[0], data, 64 );
-+ grub_memcpy( &x[0], data, 64 );
- #endif
-
- /* save */
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c
deleted file mode 100644
index 88e9e761c..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_twofish_c
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/twofish.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/twofish.c 2010-06-26 20:30:05.671278033 +0200
-@@ -932,7 +932,7 @@ main()
- twofish_encrypt (&ctx, buffer[1], buffer[1]);
- }
- }
-- encrypt_msg = memcmp (buffer, test_encrypt, sizeof (test_encrypt)) ?
-+ encrypt_msg = grub_memcmp (buffer, test_encrypt, sizeof (test_encrypt)) ?
- "encryption failure!\n" : "encryption OK!\n";
-
- /* Decryption test. */
-@@ -954,7 +954,7 @@ main()
- /* Stop the timer, and print results. */
- timer = clock () - timer;
- printf (encrypt_msg);
-- printf (memcmp (buffer, test_decrypt, sizeof (test_decrypt)) ?
-+ printf (grub_memcmp (buffer, test_decrypt, sizeof (test_decrypt)) ?
- "decryption failure!\n" : "decryption OK!\n");
- printf ("elapsed time: %.1f s.\n", (float) timer / CLOCKS_PER_SEC);
-
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c
deleted file mode 100644
index a92518354..000000000
--- a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_whirlpool_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/lib/libgcrypt-grub/cipher/whirlpool.c 2010-03-06 21:52:26.000000000 +0100
-+++ grub-1.98/lib/libgcrypt-grub/cipher/whirlpool.c 2010-06-26 20:17:35.043170089 +0200
-@@ -1381,7 +1381,7 @@ whirlpool_final (void *ctx)
- context->buffer[context->count++] = 0;
-
- /* Add length of message. */
-- memcpy (context->buffer + context->count, context->length, 32);
-+ grub_memcpy (context->buffer + context->count, context->length, 32);
- context->count += 32;
- whirlpool_add (context, NULL, 0);
-
diff --git a/package/grub/patches/patch-util_grub-install_in b/package/grub/patches/patch-util_grub-install_in
deleted file mode 100644
index 6cbc9fbc3..000000000
--- a/package/grub/patches/patch-util_grub-install_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/util/grub-install.in 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/util/grub-install.in 2010-06-26 21:16:50.031158562 +0200
-@@ -306,7 +306,7 @@ config_opt=
-
- if [ "x${devabstraction_module}" = "x" ] ; then
- if [ x"${install_device}" != x ]; then
-- if echo "${install_device}" | grep -qx "(.*)" ; then
-+ if echo "${install_device}" | grep -q "(.*)" ; then
- install_drive="${install_device}"
- else
- install_drive="`$grub_probe --target=drive --device ${install_device}`"
diff --git a/package/grub/patches/patch-util_grub-mkconfig_lib_in b/package/grub/patches/patch-util_grub-mkconfig_lib_in
deleted file mode 100644
index a51e3ec53..000000000
--- a/package/grub/patches/patch-util_grub-mkconfig_lib_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-1.98.orig/util/grub-mkconfig_lib.in 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/util/grub-mkconfig_lib.in 2010-06-26 21:17:19.399157123 +0200
-@@ -154,7 +154,7 @@ version_test_numeric ()
- a=$b
- b=$c
- fi
-- if (echo $a ; echo $b) | sort -n | head -n 1 | grep -qx $b ; then
-+ if (echo $a ; echo $b) | sort -n | head -n 1 | grep -q $b ; then
- return 0
- else
- return 1
diff --git a/package/grub/patches/patch-util_grub_d_10_linux_in b/package/grub/patches/patch-util_grub_d_10_linux_in
deleted file mode 100644
index b84b3e3ca..000000000
--- a/package/grub/patches/patch-util_grub_d_10_linux_in
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-1.98.orig/util/grub.d/10_linux.in 2010-03-06 21:51:37.000000000 +0100
-+++ grub-1.98/util/grub.d/10_linux.in 2010-06-26 21:18:10.803156350 +0200
-@@ -66,8 +66,8 @@ linux_entry ()
- # Use ELILO's generic "efifb" when it's known to be available.
- # FIXME: We need an interface to select vesafb in case efifb can't be used.
- if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
-- if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
-- && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
-+ if grep -q "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
-+ && grep -q "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
- cat << EOF
- set gfxpayload=keep
- EOF
-@@ -135,5 +135,5 @@ while [ "x$list" != "x" ] ; do
- "single ${GRUB_CMDLINE_LINUX}"
- fi
-
-- list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
-+ list=`echo $list | tr ' ' '\n' | grep -v $linux | tr '\n' ' '`
- done