@ -1,5 +1,5 @@
#
#
# Copyright (C) 2006-2009 OpenWrt.org
# Copyright (C) 2006-201 0 OpenWrt.org
#
#
# This is free software, licensed under the GNU General Public License v2.
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# See /LICENSE for more information.
@ -10,71 +10,62 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME := grub
PKG_NAME := grub
PKG_VERSION := 0.97
PKG_VERSION := 0.97
PKG_RELEASE := 2
PKG_RELEASE := 3
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE_URL := ftp://alpha.gnu.org/gnu/grub
PKG_SOURCE_URL := ftp://alpha.gnu.org/gnu/grub
PKG_MD5SUM := cd3f3eb54446be6003156158d51f4884
PKG_MD5SUM := cd3f3eb54446be6003156158d51f4884
PKG_BUILD_DIR := $( KERNEL_BUILD_DIR) /grub-$( PKG_VERSION)
PKG_BUILD_DEPENDS := grub/host
PKG_TARGETS := bin
PKG_INSTALL := 1
i n c l u d e $( INCLUDE_DIR ) / h o s t - b u i l d . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
export grub_cv_prog_objcopy_absolute = yes
d e f i n e P a c k a g e / g r u b
d e f i n e P a c k a g e / g r u b
SECTION:= boot
SUBMENU:= Boot Loaders
DEPENDS:= @TARGET_x86
CATEGORY:= Utilities
CATEGORY:= Boot Loader s
SECTION:= util s
TITLE:= GRand Unified Bootloader
TITLE:= GRand Unified Bootloader
URL:= http://www.gnu.org/software/grub/
URL:= http://www.gnu.org/software/grub/
DEPENDS:= @TARGET_x86
e n d e f
e n d e f
CONFIGURE_FLAGS :=
i f n e q ( $( HOST_OS ) , D a r w i n )
d e f i n e B u i l d / C o n f i g u r e
( cd $( PKG_BUILD_DIR) ; \
CFLAGS = "-march=i486 -m32" \
LDFLAGS = "-static" \
./configure \
$( CONFIGURE_FLAGS) \
--build= i386-linux-gnu \
--host= i386-linux-gnu \
--program-prefix= "" \
--program-suffix= "" \
--prefix= /usr \
--exec-prefix= /usr \
--bindir= /usr/bin \
--sbindir= /usr/sbin \
--libexecdir= /usr/lib \
--sysconfdir= /etc \
--datadir= /usr/share \
--localstatedir= /var \
--mandir= /usr/man \
--infodir= /usr/info \
$( DISABLE_NLS) \
--disable-auto-linux-mem-opt \
)
e n d e f
#
MY_CONFIGURE_ARGS += \
# ./configure detects whether the host compiler supports
--disable-auto-linux-mem-opt \
# -fno-stack-protector but only sets STAGE2_CFLAGS accordingly
--disable-graphics \
#
--disable-hercules \
d e f i n e B u i l d / C o m p i l e
--without-curses \
$( MAKE) -C $( PKG_BUILD_DIR) \
GRUB_CFLAGS = " \$ $$ $( STAGE2_CFLAGS) " \
MY_CONFIGURE_VARS += \
STAGE1_CFLAGS = " \$ $$ $( STAGE2_CFLAGS) "
grub_cv_prog_objcopy_absolute = yes \
e n d e f
CONFIGURE_ARGS += $( MY_CONFIGURE_ARGS)
CONFIGURE_VARS += $( MY_CONFIGURE_VARS)
HOST_CFLAGS += $( call host-cc-option,-fno-stack-protector)
HOST_CFLAGS += $( call host-cc-option,-U_FORTIFY_SOURCE)
HOST_CONFIGURE_ARGS += $( MY_CONFIGURE_ARGS) \
--sbindir= " $( STAGING_DIR_HOST) /bin " \
HOST_CONFIGURE_VARS += $( MY_CONFIGURE_VARS)
d e f i n e B u i l d / I n s t a l l D e v
d e f i n e B u i l d / I n s t a l l D e v
$( MAKE) -C $( PKG_BUILD_DIR) \
$( INSTALL_DIR) $( 1) /usr/lib
DESTDIR = " $( STAGING_DIR_HOST) " \
$( CP) $( PKG_INSTALL_DIR) /usr/lib/grub $( 1) /usr/lib/
install
e n d e f
mv $( STAGING_DIR_HOST) /usr/sbin/grub $( STAGING_DIR_HOST) /bin
d e f i n e P a c k a g e / g r u b / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/bin
$( CP) $( PKG_INSTALL_DIR) /usr/bin/* $( 1) /usr/bin/
$( INSTALL_DIR) $( 1) /usr/lib
$( CP) $( PKG_INSTALL_DIR) /usr/lib/* $( 1) /usr/lib/
$( INSTALL_DIR) $( 1) /usr/sbin
$( CP) $( PKG_INSTALL_DIR) /usr/sbin/* $( 1) /usr/sbin/
e n d e f
e n d e f
e n d i f
$( eval $ ( call HostBuild ) )
$( eval $ ( call BuildPackage ,grub ) )
$( eval $ ( call BuildPackage ,grub ) )