clean up a few things in image build makefiles and fix unnecessary grub rebuilds

SVN-Revision: 6360
This commit is contained in:
Felix Fietkau 2007-02-25 18:20:34 +00:00
parent 738ca6f657
commit 653f61fb3e
6 changed files with 18 additions and 43 deletions

View file

@ -20,7 +20,7 @@ IMAGE_DIR:=linux/$(BOARD)-$(KERNEL)/image
download: $(patsubst %,%-download,$(TARGETS-y)) download: $(patsubst %,%-download,$(TARGETS-y))
prepare: linux-prepare prepare: linux-prepare
compile: linux-compile image_compile compile: linux-compile image_compile
install: image_clean linux-install image_install install: linux-install image_install
ifeq ($(CONFIG_SDK),y) ifeq ($(CONFIG_SDK),y)
install: sdk_install install: sdk_install

View file

@ -7,21 +7,18 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk include $(INCLUDE_DIR)/image.mk
define Build/Compile
rm -f $(KDIR)/loader.gz
$(MAKE) -C lzma-loader \
BUILD_DIR="$(KDIR)" \
TARGET="$(KDIR)" \
install
echo -ne "\\x00" >> $(KDIR)/loader.gz
endef
define Build/Clean define Build/Clean
$(MAKE) -C lzma-loader clean $(MAKE) -C lzma-loader clean
endef endef
define Image/Prepare define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
rm -f $(KDIR)/loader.gz
$(MAKE) -C lzma-loader \
BUILD_DIR="$(KDIR)" \
TARGET="$(KDIR)" \
clean install
echo -ne "\\x00" >> $(KDIR)/loader.gz
endef endef
ifneq ($(KERNEL),2.4) ifneq ($(KERNEL),2.4)

View file

@ -23,7 +23,7 @@ endef
define Image/Prepare define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
$(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) compile $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
endef endef
define Image/Build define Image/Build

View file

@ -7,9 +7,6 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk include $(INCLUDE_DIR)/image.mk
define Build/Clean
endef
define Image/Prepare define Image/Prepare
cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(KDIR)/uImage cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(KDIR)/uImage
endef endef

View file

@ -7,9 +7,6 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk include $(INCLUDE_DIR)/image.mk
define Build/Clean
endef
define Image/Prepare define Image/Prepare
$(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage
endef endef

View file

@ -23,34 +23,19 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/grub-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
ifeq ($(HOST_ARCH),x86_64) ifeq ($(HOST_ARCH),x86_64)
define Build/Configure CONFIGURE_FLAGS:= \
(cd $(PKG_BUILD_DIR); \ --target=$(GNU_TARGET_NAME) \
LDFLAGS="-static" \ --host=$(GNU_TARGET_NAME) \
./configure \ --build=$(GNU_HOST_NAME)
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--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 \
)
endef
else else
define Build/Configure CONFIGURE_FLAGS:=
endif
define Build/Configure
(cd $(PKG_BUILD_DIR); \ (cd $(PKG_BUILD_DIR); \
LDFLAGS="-static" \ LDFLAGS="-static" \
./configure \ ./configure \
$(CONFIGURE_FLAGS) \
--program-prefix="" \ --program-prefix="" \
--program-suffix="" \ --program-suffix="" \
--prefix=/usr \ --prefix=/usr \
@ -66,8 +51,7 @@ else
$(DISABLE_NLS) \ $(DISABLE_NLS) \
--disable-auto-linux-mem-opt \ --disable-auto-linux-mem-opt \
) )
endef endef
endif
# #
# ./configure detects whether the host compiler supports # ./configure detects whether the host compiler supports