Browse Source

add grub source package and update grub-bin

Waldemar Brodkorb 14 years ago
parent
commit
de381e1a5b

+ 1 - 0
package/Config.in

@@ -16,6 +16,7 @@ source "package/glibc/Config.in"
 source "package/eglibc/Config.in"
 source "package/libc/Config.in"
 source "package/rpm/Config.in"
+source "package/grub/Config.in"
 source "package/grub-bin/Config.in"
 endmenu
 

+ 1 - 0
package/Makefile

@@ -135,6 +135,7 @@ package-$(ADK_PACKAGE_GPERF) += gperf
 package-$(ADK_PACKAGE_GPG) += gpg
 package-$(ADK_PACKAGE_GPM) += gpm
 package-$(ADK_PACKAGE_GPSD) += gpsd
+package-$(ADK_PACKAGE_GRUB) += grub
 package-$(ADK_PACKAGE_GRUB_BIN) += grub-bin
 package-$(ADK_COMPILE_GSM) += gsm
 package-$(ADK_PACKAGE_HASERL) += haserl

+ 4 - 2
package/grub-bin/Makefile

@@ -3,10 +3,12 @@
 
 include ${TOPDIR}/rules.mk
 
+# compiled with i486 toolchain, statically linked with uClibc
+# cross-compile on amd64 does not work, so provide a binary package
 PKG_NAME:=		grub-bin
-PKG_VERSION:=		1.97
+PKG_VERSION:=		1.97.1
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		db8dff73e119b51529d2a087c9d7d527
+PKG_MD5SUM:=		99ddead9dcb689a7ec2431c1e6b3cf0d
 PKG_DESCR:=		GRUB bootloader
 PKG_SECTION:=		sys
 PKG_SITES:=		http://openadk.org/distfiles/

+ 6 - 0
package/grub/Config.in

@@ -0,0 +1,6 @@
+config ADK_PACKAGE_GRUB
+	prompt "grub................................. GRUB"
+	tristate
+	default n
+	help
+	  http://www.grub.org

+ 35 - 0
package/grub/Makefile

@@ -0,0 +1,35 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		grub
+PKG_VERSION:=		1.97.1
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		66fe18cd9318e3d67a34d7b7a8e7b1f6
+PKG_DESCR:=		GRand Unified Bootloader
+PKG_SECTION:=		base
+PKG_URL:=		http://www.gnu.org/software/grub
+PKG_SITES:=		ftp://alpha.gnu.org/gnu/grub/
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,GRUB,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_STYLE:=	gnu
+CONFIGURE_ARGS+=	--disable-grub-emu \
+			--disable-efiemu \
+			--disable-grub-mkfont \
+			--disable-grub-fstest
+BUILD_STYLE:=		auto
+INSTALL_STYLE:=		auto
+
+post-install:
+	${INSTALL_DIR} $(IDIR_GRUB)/usr/{sbin,lib,bin} 
+	${INSTALL_DIR} $(IDIR_GRUB)/etc
+	${CP} ${WRKINST}/etc/grub.d $(IDIR_GRUB)/etc
+	${CP} ${WRKINST}/usr/lib/* $(IDIR_GRUB)/usr/lib
+	${INSTALL_BIN} ${WRKINST}/usr/bin/* $(IDIR_GRUB)/usr/bin
+	${INSTALL_BIN} ${WRKINST}/usr/sbin/* $(IDIR_GRUB)/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 17 - 0
package/grub/patches/patch-include_grub_misc_h

@@ -0,0 +1,17 @@
+--- grub-1.97.1.orig/include/grub/misc.h	2009-11-09 16:48:16.000000000 +0100
++++ grub-1.97.1/include/grub/misc.h	2009-11-29 12:07:10.920475755 +0100
+@@ -74,14 +74,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);

+ 60 - 0
package/grub/patches/patch-kern_misc_c

@@ -0,0 +1,60 @@
+--- grub-1.97.1.orig/kern/misc.c	2009-11-09 16:48:16.000000000 +0100
++++ grub-1.97.1/kern/misc.c	2009-11-29 11:48:55.492463135 +0100
+@@ -51,23 +51,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)
+ {
+@@ -182,10 +165,6 @@ grub_memcmp (const void *s1, const void 
+ 
+   return 0;
+ }
+-#ifndef APPLE_CC
+-int memcmp (const void *s1, const void *s2, grub_size_t n)
+-  __attribute__ ((alias ("grub_memcmp")));
+-#endif
+ 
+ int
+ grub_strcmp (const char *s1, const char *s2)
+@@ -467,10 +446,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")));
+-#endif
+ 
+ grub_size_t
+ grub_strlen (const char *s)
+@@ -1002,11 +977,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.  */