1# 2# Copyright (C) 2006-2015 OpenWrt.org 3# 4# This is free software, licensed under the GNU General Public License v2. 5# See /LICENSE for more information. 6# 7 8include $(TOPDIR)/rules.mk 9include $(INCLUDE_DIR)/kernel.mk 10 11PKG_NAME:=grub 12PKG_VERSION:=2.02~beta2 13PKG_RELEASE:=1 14 15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz 16PKG_SOURCE_URL:=http://alpha.gnu.org/gnu/grub \ 17 http://gnualpha.uib.no/grub/ \ 18 http://mirrors.fe.up.pt/pub/gnu-alpha/grub/ \ 19 http://www.nic.funet.fi/pub/gnu/alpha/gnu/grub/ 20PKG_MD5SUM:=be62932eade308a364ea4bbc91295930 21 22HOST_BUILD_PARALLEL:=1 23PKG_BUILD_DEPENDS:=grub2/host 24 25PKG_SSP:=0 26 27include $(INCLUDE_DIR)/host-build.mk 28include $(INCLUDE_DIR)/package.mk 29 30define Package/grub2 31 SUBMENU:=Boot Loaders 32 CATEGORY:=Utilities 33 SECTION:=utils 34 TITLE:=GRand Unified Bootloader 35 URL:=http://www.gnu.org/software/grub/ 36 DEPENDS:=@TARGET_x86||TARGET_x86_64 37endef 38 39define Package/grub2-editenv 40 CATEGORY:=Utilities 41 SECTION:=utils 42 TITLE:=Grub2 Environment editor 43 URL:=http://www.gnu.org/software/grub/ 44 DEPENDS:=@TARGET_x86||TARGET_x86_64 45endef 46 47define Package/grub2-editenv/description 48 Edit grub2 environment files. 49endef 50 51HOST_BUILD_PREFIX := $(STAGING_DIR_HOST) 52 53CONFIGURE_ARGS += \ 54 --target=$(REAL_GNU_TARGET_NAME) \ 55 --disable-werror \ 56 --disable-nls \ 57 --disable-device-mapper \ 58 --disable-libzfs \ 59 --disable-grub-mkfont 60 61HOST_CONFIGURE_ARGS += \ 62 --target=$(REAL_GNU_TARGET_NAME) \ 63 --sbindir="$(STAGING_DIR_HOST)/bin" \ 64 --disable-werror \ 65 --disable-libzfs \ 66 --disable-nls 67 68HOST_MAKE_FLAGS += \ 69 TARGET_RANLIB=$(TARGET_RANLIB) \ 70 LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a 71 72define Host/Configure 73 $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in 74 $(Host/Configure/Default) 75endef 76 77define Package/grub2-editenv/install 78 $(INSTALL_DIR) $(1)/usr/sbin 79 $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/ 80endef 81 82$(eval $(call HostBuild)) 83$(eval $(call BuildPackage,grub2)) 84$(eval $(call BuildPackage,grub2-editenv)) 85