Make gzipping of images configurable via menuconfig
SVN-Revision: 30587
This commit is contained in:
parent
fa227cef4d
commit
b4f51343c6
2 changed files with 23 additions and 5 deletions
|
@ -80,6 +80,10 @@ config TARGET_IMAGES_PAD
|
||||||
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
|
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
config TARGET_IMAGES_GZIP
|
||||||
|
bool "GZip images"
|
||||||
|
default y
|
||||||
|
|
||||||
config TARGET_KERNEL_PARTSIZE
|
config TARGET_KERNEL_PARTSIZE
|
||||||
int "Kernel partition size (in MB)"
|
int "Kernel partition size (in MB)"
|
||||||
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
|
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2010 OpenWrt.org
|
# Copyright (C) 2006-2012 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.
|
||||||
|
@ -167,6 +167,23 @@ ifneq ($(CONFIG_X86_VMDK_IMAGES),)
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
define Image/Build/gzip
|
||||||
|
gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
|
||||||
|
gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
|
||||||
|
define Image/Build/gzip/ext4
|
||||||
|
$(call Image/Build/gzip,ext4)
|
||||||
|
endef
|
||||||
|
define Image/Build/gzip/jffs2-64k
|
||||||
|
$(call Image/Build/gzip,jffs2-64k)
|
||||||
|
endef
|
||||||
|
define Image/Build/gzip/jffs2-128k
|
||||||
|
$(call Image/Build/gzip,jffs2-128k)
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
define Image/BuildKernel
|
define Image/BuildKernel
|
||||||
$(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
|
$(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
|
||||||
ifneq ($(CONFIG_X86_ETHERBOOT_IMAGES),)
|
ifneq ($(CONFIG_X86_ETHERBOOT_IMAGES),)
|
||||||
|
@ -194,10 +211,7 @@ define Image/Build
|
||||||
endif
|
endif
|
||||||
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
||||||
$(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
|
$(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
|
||||||
ifneq (,$findstring($(1),ext4 jffs2))
|
$(call Image/Build/gzip/$(1))
|
||||||
gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
|
|
||||||
gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
|
|
||||||
endif
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildImage))
|
$(eval $(call BuildImage))
|
||||||
|
|
Loading…
Reference in a new issue