2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=ftp
://alpha.gnu.org
/gnu
/grub
17 PKG_MD5SUM
:=cd3f3eb54446be6003156158d51f4884
19 PKG_BUILD_DEPENDS
:= grub
/host
22 include $(INCLUDE_DIR
)/host-build.mk
23 include $(INCLUDE_DIR
)/package.mk
29 TITLE
:=GRand Unified Bootloader
30 URL
:=http
://www.gnu.org
/software
/grub
/
35 MY_CONFIGURE_ARGS
+= \
36 --disable-auto-linux-mem-opt \
41 MY_CONFIGURE_VARS
+= \
42 grub_cv_prog_objcopy_absolute
=yes \
44 CONFIGURE_ARGS
+= $(MY_CONFIGURE_ARGS
)
46 CONFIGURE_VARS
+= $(MY_CONFIGURE_VARS
)
48 HOST_CFLAGS
+= $(call host-cc-option
,-fno-stack-protector
)
49 HOST_CFLAGS
+= $(call host-cc-option
,-U_FORTIFY_SOURCE
)
51 HOST_CONFIGURE_ARGS
+= $(MY_CONFIGURE_ARGS
) \
52 --sbindir
="$(STAGING_DIR_HOST)/bin" \
54 HOST_CONFIGURE_VARS
+= $(MY_CONFIGURE_VARS
)
56 define Build
/InstallDev
57 $(INSTALL_DIR
) $(1)/usr
/lib
58 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/grub
$(1)/usr
/lib
/
61 define Package
/grub
/install
62 $(INSTALL_DIR
) $(1)/usr
/bin
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
64 $(INSTALL_DIR
) $(1)/usr
/lib
65 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
66 $(INSTALL_DIR
) $(1)/usr
/sbin
67 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/* $(1)/usr
/sbin
/
70 $(eval
$(call HostBuild
))
71 $(eval
$(call BuildPackage
,grub
))