aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorVasilis Tsiligiannis <b_tsiligiannis@silverton.gr>2012-02-16 17:53:57 +0000
committerVasilis Tsiligiannis <b_tsiligiannis@silverton.gr>2012-02-16 17:53:57 +0000
commit7cb3f70eeaf55de8af1b5c8995d0bdbce65232b7 (patch)
tree14335782c691529cb206e5ea8bcfe8fb50ac3da9 /target
parent056c8e4a92a7e2bc7e3c1130b1cfcf793a072ae0 (diff)
downloadmaster-187ad058-7cb3f70eeaf55de8af1b5c8995d0bdbce65232b7.tar.gz
master-187ad058-7cb3f70eeaf55de8af1b5c8995d0bdbce65232b7.tar.bz2
master-187ad058-7cb3f70eeaf55de8af1b5c8995d0bdbce65232b7.zip
[x86] Make gzipping of images configurable via menuconfig
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30587 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/x86/image/Config.in4
-rw-r--r--target/linux/x86/image/Makefile24
2 files changed, 23 insertions, 5 deletions
diff --git a/target/linux/x86/image/Config.in b/target/linux/x86/image/Config.in
index b60baeabb9..ea3a13460a 100644
--- a/target/linux/x86/image/Config.in
+++ b/target/linux/x86/image/Config.in
@@ -80,6 +80,10 @@ config TARGET_IMAGES_PAD
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
default y
+config TARGET_IMAGES_GZIP
+ bool "GZip images"
+ default y
+
config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MB)"
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index 185da1096c..e52c74919d 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -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.
# See /LICENSE for more information.
@@ -167,6 +167,23 @@ ifneq ($(CONFIG_X86_VMDK_IMAGES),)
endef
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
$(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
ifneq ($(CONFIG_X86_ETHERBOOT_IMAGES),)
@@ -194,10 +211,7 @@ define Image/Build
endif
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
$(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
- ifneq (,$findstring($(1),ext4 jffs2))
- gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
- gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
- endif
+ $(call Image/Build/gzip/$(1))
endef
$(eval $(call BuildImage))