Date:2010-05-05 04:15:29 (13 years 7 months ago)
Author:nico
Commit:d142e71778afdd71ab9030c711f60fbc58bb320c
Message:[backfire] merge r21305 & r21353

git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21366 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: package/grub/Makefile (2 diffs)
target/linux/x86/image/Makefile (3 diffs)

Change Details

package/grub/Makefile
11#
2# Copyright (C) 2006-2009 OpenWrt.org
2# Copyright (C) 2006-2010 OpenWrt.org
33#
44# This is free software, licensed under the GNU General Public License v2.
55# See /LICENSE for more information.
...... 
1010
1111PKG_NAME:=grub
1212PKG_VERSION:=0.97
13PKG_RELEASE:=2
13PKG_RELEASE:=3
1414
1515PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
1616PKG_SOURCE_URL:=ftp://alpha.gnu.org/gnu/grub
1717PKG_MD5SUM:=cd3f3eb54446be6003156158d51f4884
1818
19PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/grub-$(PKG_VERSION)
20PKG_TARGETS:=bin
19PKG_BUILD_DEPENDS:= grub/host
20PKG_INSTALL:=1
2121
22include $(INCLUDE_DIR)/host-build.mk
2223include $(INCLUDE_DIR)/package.mk
2324
24export grub_cv_prog_objcopy_absolute=yes
25
2625define Package/grub
27  SECTION:=boot
28  DEPENDS:=@TARGET_x86
29  CATEGORY:=Boot Loaders
26  SUBMENU:=Boot Loaders
27  CATEGORY:=Utilities
28  SECTION:=utils
3029  TITLE:=GRand Unified Bootloader
3130  URL:=http://www.gnu.org/software/grub/
31  DEPENDS:=@TARGET_x86
3232endef
3333
34CONFIGURE_FLAGS:= \
35    --target=$(GNU_TARGET_NAME) \
36    --host=$(GNU_TARGET_NAME) \
37    --build=$(GNU_HOST_NAME)
38
39ifneq ($(HOST_OS),Darwin)
40define Build/Configure
41    (cd $(PKG_BUILD_DIR); \
42        LDFLAGS="-static" \
43        ./configure \
44        $(CONFIGURE_FLAGS) \
45        --program-prefix="" \
46        --program-suffix="" \
47        --prefix=/usr \
48        --exec-prefix=/usr \
49        --bindir=/usr/bin \
50        --sbindir=/usr/sbin \
51        --libexecdir=/usr/lib \
52        --sysconfdir=/etc \
53        --datadir=/usr/share \
54        --localstatedir=/var \
55        --mandir=/usr/man \
56        --infodir=/usr/info \
57        $(DISABLE_NLS) \
58        --disable-auto-linux-mem-opt \
59    )
60endef
34MY_CONFIGURE_ARGS += \
35    --disable-auto-linux-mem-opt \
36    --disable-hercules \
6137
62#
63# ./configure detects whether the host compiler supports
64# -fno-stack-protector but only sets STAGE2_CFLAGS accordingly
65#
66define Build/Compile
67    $(MAKE) -C $(PKG_BUILD_DIR) \
68        GRUB_CFLAGS="\$$$$(STAGE2_CFLAGS)" \
69        STAGE1_CFLAGS="\$$$$(STAGE2_CFLAGS)"
70endef
38MY_CONFIGURE_VARS += \
39    grub_cv_prog_objcopy_absolute=yes \
40
41CONFIGURE_ARGS += $(MY_CONFIGURE_ARGS)
42
43CONFIGURE_VARS += $(MY_CONFIGURE_VARS)
44
45HOST_CFLAGS += $(call host-cc-option,-fno-stack-protector)
46HOST_CFLAGS += $(call host-cc-option,-U_FORTIFY_SOURCE)
47
48HOST_CONFIGURE_ARGS += $(MY_CONFIGURE_ARGS) \
49    --sbindir="$(STAGING_DIR_HOST)/bin" \
50    --disable-graphics \
51
52HOST_CONFIGURE_VARS += $(MY_CONFIGURE_VARS)
7153
7254define Build/InstallDev
73    $(MAKE) -C $(PKG_BUILD_DIR) \
74        DESTDIR="$(STAGING_DIR_HOST)" \
75        install
76    mv $(STAGING_DIR_HOST)/usr/sbin/grub $(STAGING_DIR_HOST)/bin
55    $(INSTALL_DIR) $(1)/usr/lib
56    $(CP) $(PKG_INSTALL_DIR)/usr/lib/grub $(1)/usr/lib/
57endef
58
59define Package/grub/install
60    $(INSTALL_DIR) $(1)/usr/bin
61    $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
62    $(INSTALL_DIR) $(1)/usr/lib
63    $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
64    $(INSTALL_DIR) $(1)/usr/sbin
65    $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
7766endef
78endif
7967
68$(eval $(call HostBuild))
8069$(eval $(call BuildPackage,grub))
target/linux/x86/image/Makefile
5656    # left here because the image builder doesnt need these
5757    $(INSTALL_DIR) $(KDIR)/root.grub/boot/grub
5858    $(CP) \
59        $(KDIR)/*stage* \
59        $(KDIR)/stage1 \
60        $(KDIR)/stage2 \
61        $(KDIR)/e2fs_stage1_5 \
6062        $(KDIR)/root.grub/boot/grub/
6163    $(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz
6264    sed \
...... 
7476  define Image/Prepare/grub
7577    # for the image builder
7678    $(CP) \
77        $(STAGING_DIR_HOST)/usr/lib/grub/i386-*/stage1 \
78        $(STAGING_DIR_HOST)/usr/lib/grub/i386-*/stage2 \
79        $(STAGING_DIR_HOST)/usr/lib/grub/i386-*/e2fs_stage1_5 \
79        $(STAGING_DIR)/usr/lib/grub/i386-openwrt/stage1 \
80        $(STAGING_DIR)/usr/lib/grub/i386-openwrt/stage2 \
81        $(STAGING_DIR)/usr/lib/grub/i386-openwrt/stage2_eltorito \
82        $(STAGING_DIR)/usr/lib/grub/i386-openwrt/e2fs_stage1_5 \
8083        $(KDIR)/
8184  endef
8285
...... 
135138define Image/Build/iso
136139    $(INSTALL_DIR) $(KDIR)/root.grub/boot/grub
137140    $(CP) \
138        $(STAGING_DIR_HOST)/usr/lib/grub/i386-openwrt/stage2_eltorito \
139        $(KDIR)/root.grub/boot/grub/stage2_eltorito
141        $(KDIR)/stage2_eltorito \
142        $(KDIR)/root.grub/boot/grub/
140143    sed \
141144        -e 's#@SERIAL_CONFIG@#$(strip $(GRUB_SERIAL_CONFIG))#g' \
142145        -e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \

Archive Download the corresponding diff file



interactive