Changeset 30587


Ignore:
Timestamp:
2012-02-16T18:53:57+01:00 (6 years ago)
Author:
acinonyx
Message:

[x86] Make gzipping of images configurable via menuconfig

Location:
trunk/target/linux/x86/image
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/x86/image/Config.in

    r29786 r30587  
    8181        default y 
    8282 
     83config TARGET_IMAGES_GZIP 
     84        bool "GZip images" 
     85        default y 
     86 
    8387config TARGET_KERNEL_PARTSIZE 
    8488        int "Kernel partition size (in MB)" 
  • trunk/target/linux/x86/image/Makefile

    r29786 r30587  
    11#  
    2 # Copyright (C) 2006-2010 OpenWrt.org 
     2# Copyright (C) 2006-2012 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    168168endif 
    169169 
     170define Image/Build/gzip 
     171        gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img 
     172        gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img 
     173endef 
     174 
     175ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) 
     176  define Image/Build/gzip/ext4 
     177        $(call Image/Build/gzip,ext4) 
     178  endef 
     179  define Image/Build/gzip/jffs2-64k 
     180        $(call Image/Build/gzip,jffs2-64k) 
     181  endef 
     182  define Image/Build/gzip/jffs2-128k 
     183        $(call Image/Build/gzip,jffs2-128k) 
     184  endef 
     185endif 
     186 
    170187define Image/BuildKernel 
    171188        $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz 
     
    195212        $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img 
    196213        $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz 
    197   ifneq (,$findstring($(1),ext4 jffs2)) 
    198         gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img 
    199         gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img 
    200   endif 
     214        $(call Image/Build/gzip/$(1)) 
    201215endef 
    202216 
Note: See TracChangeset for help on using the changeset viewer.