aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-12 15:01:01 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-12 15:01:01 +0000
commit44d04757af71659d7e795ef12d17801fc2c97d4e (patch)
tree892f5b20a54f514925bc2dc2424ae5e666191159 /include
parentf13581168706b296b38cc56b20573ded2cc40201 (diff)
downloadupstream-44d04757af71659d7e795ef12d17801fc2c97d4e.tar.gz
upstream-44d04757af71659d7e795ef12d17801fc2c97d4e.tar.bz2
upstream-44d04757af71659d7e795ef12d17801fc2c97d4e.zip
image.mk: parallelize cpio.gz and tar.gz filesystem build
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42880
Diffstat (limited to 'include')
-rw-r--r--include/image.mk22
1 files changed, 9 insertions, 13 deletions
diff --git a/include/image.mk b/include/image.mk
index 21acbee9e9..67c9a2f663 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -70,6 +70,9 @@ fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix jffs2-nand-,$(NAND_BL
fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
+fs-subtypes-$(CONFIG_TARGET_ROOTFS_CPIOGZ) += cpiogz
+fs-subtypes-$(CONFIG_TARGET_ROOTFS_TARGZ) += targz
+
TARGET_FILESYSTEMS := $(fs-types-y)
define add_jffs2_mark
@@ -198,18 +201,13 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
endef
endif
-ifneq ($(CONFIG_TARGET_ROOTFS_CPIOGZ),)
- define Image/mkfs/cpiogz
- ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
- endef
-endif
+define Image/mkfs/cpiogz
+ ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
+endef
-ifneq ($(CONFIG_TARGET_ROOTFS_TARGZ),)
- define Image/mkfs/targz
- # Preserve permissions (-p) when building as non-root user
- $(TAR) -czpf $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE),-$(PROFILE))-rootfs.tar.gz --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
- endef
-endif
+define Image/mkfs/targz
+ $(TAR) -czpf $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE),-$(PROFILE))-rootfs.tar.gz --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
+endef
E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024/$(CONFIG_TARGET_EXT4_BLOCKSIZE))))
@@ -282,8 +280,6 @@ define BuildImage
$(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(call BuildImage/mkfs,$(fs)))
install: kernel_prepare install-targets
- $(call Image/mkfs/cpiogz)
- $(call Image/mkfs/targz)
$(foreach fs,$(TARGET_FILESYSTEMS),
pre { line-height: 125%; margin: 0; } td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; } td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #ffffff; } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Copyright (C) 2006-2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

mainmenu "OpenWrt Configuration"

config HAVE_DOT_CONFIG
	bool
	default y

source "target/Config.in"

menu "Target Images"
	config TARGET_ROOTFS_INITRAMFS
		bool "ramdisk"
		default y if USES_INITRAMFS
		depends LINUX_2_6
		help
		  Embed the rootfs into the kernel (initramfs)

	config TARGET_ROOTFS_JFFS2
		bool "jffs2"
		default y if USES_JFFS2
		depends !TARGET_ROOTFS_INITRAMFS
		help
		  Build a jffs2 root filesystem

	config TARGET_ROOTFS_SQUASHFS
		bool "squashfs"
		default y if USES_SQUASHFS
		depends !TARGET_ROOTFS_INITRAMFS
		help
		  Build a squashfs-lzma root filesystem

	config TARGET_ROOTFS_TGZ
		bool "tgz"
		default y if USES_TGZ
		depends !TARGET_ROOTFS_INITRAMFS
		help
		  Build a compressed tar archive of the the root filesystem
		  
	config TARGET_ROOTFS_CPIOGZ
		bool "cpiogz"
		default y if USES_CPIOGZ
		depends !TARGET_ROOTFS_INITRAMFS
		help
		  Build a compressed cpio archive of the the root filesystem
		  
	config TARGET_ROOTFS_EXT2FS
		bool "ext2"
		default y if USES_EXT2
		depends !TARGET_ROOTFS_INITRAMFS
		help
		  Ext2 file system with some free space for uml images

	config TARGET_ROOTFS_ISO 
		bool "iso" 
		default n 
		depends TARGET_ROOTFS_INITRAMFS && TARGET_x86 
		help 
		  Create some bootable ISO image 

comment "Image Options"

source "target/linux/*/image/Config.in"

    config TARGET_ROOTFS_FSPART
        int "Filesystem part size (in MB)"
        depends X86_GRUB_IMAGES || TARGET_ROOTFS_EXT2FS || TARGET_rb532 || TARGET_olpc
        default 48
        help
            Allows you to change the filesystem partition size

    config TARGET_ROOTFS_MAXINODE
        int "Maximum number of inodes in filesystem"
        depends TARGET_ROOTFS_EXT2FS
        default 6000
        help
            Allows you to change the maximum number of inodes in the filesystem

endmenu

menu "Global build settings"

config ALL
	bool "Select all packages by default"
	default n

comment "Features"

config CLEAN_IPKG
	bool
	prompt "Disable ipkg/opkg installation on the target"
	default n
	help
		This removes all ipkg data from the target directory before building the root fs

comment "Package build options"

config DEBUG
	bool
	prompt "Compile packages with debugging info"
	default n
	help
		Disables stripping and adds -g3 to the CFLAGS

config DEBUG_DIR
	bool "Install debugging binaries into a staging directory"
	default n
	help
		This will install all compiled package binaries into build_dir/target-*/debug-*/,
		useful for cross-debugging via gdb/gdbserver

config NO_STRIP
	bool "Install unstripped binary on the target (useful for native compiling/debugging)"
	default n

comment "Kernel build options"

config KERNEL_KALLSYMS
	bool "Compile the kernel with symbol table information"
	default n
	help
		This will give you more information in stack traces from kernel oopses
config KERNEL_PROFILING
	bool "Compile the kernel with profiling enabled"
	default n
	help
		Enable the extended profiling support mechanisms used by profilers such
		as OProfile.

endmenu

menuconfig DEVEL
	bool "Advanced configuration options (for developers)"
	default n
	select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN

config BROKEN
	bool
	prompt "Show broken platforms / packages" if DEVEL
	default n

config DOWNLOAD_FOLDER
	string
	prompt "Download folder" if DEVEL
	default ""

config LOCALMIRROR
	string
	prompt "Local mirror for source packages" if DEVEL

config AUTOREBUILD
	bool
	prompt "Automatic rebuild of packages" if DEVEL
	default y
	help
		Automatically rebuild packages when their files change

config BUILD_SUFFIX
	string
	prompt "Build suffix to append to the BUILD_DIR variable" if DEVEL
	default ""
	help
		Build suffix to append to the BUILD_DIR variable, i.e: build_dir_suffix

config TARGET_ROOTFS_DIR
	string
	prompt "Override the default TARGET_ROOTFS_DIR variable" if DEVEL
	default ""
	help
		Override the default TARGET_ROOTFS_DIR variable content $(BUILD_DIR) with custom path.
		Use this option to re-define the location of the target root file system directory.

config CCACHE
	bool
	prompt "Use ccache" if DEVEL
	default n
	help
		Compiler cache; see http://ccache.samba.org/

config EXTERNAL_KERNEL_TREE
	string
	prompt "Use external kernel tree" if DEVEL
	default ""

config KERNEL_GIT_CLONE_URI
	string
	prompt "Enter git repository to clone" if DEVEL
	default ""
	help
		Enter the full git repository path i.e.:
		git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
		This will create a git clone of the kernel in your build
		directory.

config KERNEL_GIT_LOCAL_REPOSITORY
	string
	prompt "Enter path to local reference repository" if DEVEL
	default ""
	help
		Enter a full pathname to a local reference git repository.
		In this instance, the --refererence option of git clone will
		be used thus creating a quick local clone of your repo.

source "toolchain/Config.in"

source "target/imagebuilder/Config.in"
source "target/sdk/Config.in"

source "tmp/.config-package.in"