Move all filesystem generation code to fs/
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 10 Mar 2010 21:30:06 +0000 (22:30 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 9 Apr 2010 09:04:36 +0000 (11:04 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
55 files changed:
Config.in
Makefile
fs/Config.in [new file with mode: 0644]
fs/cloop/Config.in [new file with mode: 0644]
fs/cloop/cloop.mk [new file with mode: 0644]
fs/common.mk [new file with mode: 0644]
fs/cpio/Config.in [new file with mode: 0644]
fs/cpio/cpioroot.mk [new file with mode: 0644]
fs/cramfs/Config.in [new file with mode: 0644]
fs/cramfs/cramfs.mk [new file with mode: 0644]
fs/ext2/Config.in [new file with mode: 0644]
fs/ext2/ext2root.mk [new file with mode: 0644]
fs/initramfs/Config.in [new file with mode: 0644]
fs/initramfs/gen_initramfs_list.sh [new file with mode: 0644]
fs/initramfs/initramfs.mk [new file with mode: 0644]
fs/iso9660/Config.in [new file with mode: 0644]
fs/iso9660/iso9660.mk [new file with mode: 0644]
fs/iso9660/menu.lst [new file with mode: 0644]
fs/jffs2/Config.in [new file with mode: 0644]
fs/jffs2/jffs2root.mk [new file with mode: 0644]
fs/romfs/Config.in [new file with mode: 0644]
fs/romfs/romfs.mk [new file with mode: 0644]
fs/squashfs/Config.in [new file with mode: 0644]
fs/squashfs/squashfsroot.mk [new file with mode: 0644]
fs/tar/Config.in [new file with mode: 0644]
fs/tar/tarroot.mk [new file with mode: 0644]
fs/ubifs/Config.in [new file with mode: 0644]
fs/ubifs/ubifsroot.mk [new file with mode: 0644]
target/Config.in
target/Makefile.in
target/cloop/Config.in [deleted file]
target/cloop/cloop.mk [deleted file]
target/common.mk [deleted file]
target/cpio/Config.in [deleted file]
target/cpio/cpioroot.mk [deleted file]
target/cramfs/Config.in [deleted file]
target/cramfs/cramfs.mk [deleted file]
target/ext2/Config.in [deleted file]
target/ext2/ext2root.mk [deleted file]
target/initramfs/Config.in [deleted file]
target/initramfs/gen_initramfs_list.sh [deleted file]
target/initramfs/initramfs.mk [deleted file]
target/iso9660/Config.in [deleted file]
target/iso9660/iso9660.mk [deleted file]
target/iso9660/menu.lst [deleted file]
target/jffs2/Config.in [deleted file]
target/jffs2/jffs2root.mk [deleted file]
target/romfs/Config.in [deleted file]
target/romfs/romfs.mk [deleted file]
target/squashfs/Config.in [deleted file]
target/squashfs/squashfsroot.mk [deleted file]
target/tar/Config.in [deleted file]
target/tar/tarroot.mk [deleted file]
target/ubifs/Config.in [deleted file]
target/ubifs/ubifsroot.mk [deleted file]

index 4f567d00786a445d35ca0af21c3bd73977200fdd..224a44ae2ff0a5f8d4299bff30758ded66514466 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -346,4 +346,6 @@ source "toolchain/Config.in"
 
 source "package/Config.in"
 
+source "fs/Config.in"
+
 source "target/Config.in"
index b47c0b0dd4f5c6352f0837f4a028bb29878c8489..ce6bf3d4cf9ff414c89f1f4b4b21cdf0189b7ca0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -323,6 +323,8 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
 TARGETS+=target-purgelocales
 endif
 
+include fs/common.mk
+
 # target stuff is last so it can override anything else
 include target/Makefile.in
 
diff --git a/fs/Config.in b/fs/Config.in
new file mode 100644 (file)
index 0000000..f885c52
--- /dev/null
@@ -0,0 +1,30 @@
+menu "Target filesystem options"
+
+config BR2_ROOTFS_POST_BUILD_SCRIPT
+       string "Custom script to run before packing files"
+       default ""
+       help
+         Specify a script to be run after the build has finished and before
+         the BR2 starts packing the files into selected packages.
+
+         This gives users the oportunity to do board-specific cleanups,
+         add-ons and the like, so the generated files can be used directly
+         without further processing.
+
+         The script is called with the target directory name as first and
+         only argument. Make sure the exit code of that script is 0,
+         otherwise make will stop after calling it.
+
+source "fs/cramfs/Config.in"
+source "fs/cloop/Config.in"
+source "fs/ext2/Config.in"
+source "fs/jffs2/Config.in"
+source "fs/ubifs/Config.in"
+source "fs/squashfs/Config.in"
+source "fs/tar/Config.in"
+source "fs/cpio/Config.in"
+source "fs/iso9660/Config.in"
+source "fs/initramfs/Config.in"
+source "fs/romfs/Config.in"
+
+endmenu
diff --git a/fs/cloop/Config.in b/fs/cloop/Config.in
new file mode 100644 (file)
index 0000000..3e01067
--- /dev/null
@@ -0,0 +1,10 @@
+config BR2_TARGET_ROOTFS_CLOOP
+       bool "cloop root filesystem for the target device"
+       help
+         Build a cloop root filesystem
+
+         cloop is a Linux kernel module that enables compressed
+         loopback filesystem support. With it you can mount a
+         compressed filesystem like a block device and seamlessly
+         decompress its data while accessing it.  The majority of the
+         software on an LNX-BBC is accessed in this fashion.
diff --git a/fs/cloop/cloop.mk b/fs/cloop/cloop.mk
new file mode 100644 (file)
index 0000000..c1d6abb
--- /dev/null
@@ -0,0 +1,13 @@
+#############################################################
+#
+# Build the compressed loop root filesystem image
+#
+#############################################################
+
+ROOTFS_CLOOP_DEPENDENCIES = host-cloop host-cdrkit
+
+define ROOTFS_CLOOP_CMD
+       $(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $$@
+endef
+
+$(eval $(call ROOTFS_TARGET,cloop))
\ No newline at end of file
diff --git a/fs/common.mk b/fs/common.mk
new file mode 100644 (file)
index 0000000..fa6afd9
--- /dev/null
@@ -0,0 +1,70 @@
+#
+# Macro that builds the needed Makefile target to create a root
+# filesystem image.
+#
+# The following variable must be defined before calling this macro
+#
+#  ROOTFS_$(FSTYPE)_CMD, the command that generates the root
+#  filesystem image. A single command is allowed. The filename of the
+#  filesystem image that it must generate is $$@.
+#
+# The following variables can optionaly be defined
+#
+#  ROOTFS_$(FSTYPE)_DEPENDENCIES, the list of dependencies needed to
+#  build the root filesystem (usually host tools)
+#
+#  ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before
+#  generating the filesystem image
+#
+#  ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after
+#  generating the filesystem image
+#
+# In terms of configuration option, this macro assumes that the
+# BR2_TARGET_ROOTFS_$(FSTYPE) config option allows to enable/disable
+# the generation of a filesystem image of a particular type. If
+# configura options BR2_TARGET_ROOTFS_$(FSTYPE)_GZIP,
+# BR2_TARGET_ROOTFS_$(FSTYPE)_BZIP2 or
+# BR2_TARGET_ROOTFS_$(FSTYPE)_LZMA exist and are enabled, then the
+# macro will automatically generate a compressed filesystem image.
+
+FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
+
+define ROOTFS_TARGET_INTERNAL
+
+$(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES) host-fakeroot makedevs $(if $(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
+       @$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
+       $(foreach hook,$(ROOTFS_$(2)_PRE_GEN_HOOKS),$(call $(hook))$(sep))
+       rm -f $(FAKEROOT_SCRIPT)
+       touch $(BUILD_DIR)/.fakeroot.00000
+       cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT)
+       echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
+ifneq ($(TARGET_DEVICE_TABLE),)
+       echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
+endif
+       echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT)
+       chmod a+x $(FAKEROOT_SCRIPT)
+       $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT)
+       -@rm -f $(FAKEROOT_SCRIPT)
+       $(foreach hook,$(ROOTFS_$(2)_POST_GEN_HOOKS),$(call $(hook))$(sep))
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
+       gzip -9 -c $$@ > $$@.gz
+endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y)
+       bzip2 -9 -c $$@ > $$@.bz2
+endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
+       $(LZMA) -9 -c $$@ > $$@.lzma
+endif
+
+$(1)-root: $(BINARIES_DIR)/rootfs.$(1)
+
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y)
+TARGETS += $(1)-root
+endif
+endef
+
+define ROOTFS_TARGET
+$(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1)))
+endef
+
+include fs/*/*.mk
diff --git a/fs/cpio/Config.in b/fs/cpio/Config.in
new file mode 100644 (file)
index 0000000..02fd00d
--- /dev/null
@@ -0,0 +1,40 @@
+config BR2_TARGET_ROOTFS_CPIO
+       bool "cpio the root filesystem"
+       help
+         Build a cpio archive of the root filesystem
+
+choice
+        prompt "Compression method"
+        default BR2_TARGET_ROOTFS_CPIO_NONE
+        depends on BR2_TARGET_ROOTFS_CPIO
+        help
+          Select compressor for cpio filesystem of the root filesystem
+
+config BR2_TARGET_ROOTFS_CPIO_NONE
+        bool "no compression"
+        help
+         Do not compress the cpio filesystem.
+
+config BR2_TARGET_ROOTFS_CPIO_GZIP
+        bool "gzip"
+        help
+         Do compress the cpio filesystem with gzip.
+         Note that you either have to have gzip installed on your host
+         or select to build a gzip for your host. See the packages submenu.
+
+config BR2_TARGET_ROOTFS_CPIO_BZIP2
+        bool "bzip2"
+        help
+         Do compress the cpio filesystem with bzip2.
+         Note that you either have to have bzip2 installed on your host
+         or select to build a bzip2 for your host. See the packages submenu.
+
+config BR2_TARGET_ROOTFS_CPIO_LZMA
+        bool "lzma"
+        help
+         Do compress the cpio filesystem with lzma.
+         Note that you either have to have lzma installed on your host
+         or select to build a lzma for your host. See the packages submenu.
+
+endchoice
+
diff --git a/fs/cpio/cpioroot.mk b/fs/cpio/cpioroot.mk
new file mode 100644 (file)
index 0000000..ab7d546
--- /dev/null
@@ -0,0 +1,18 @@
+#############################################################
+#
+# cpio to archive target filesystem
+#
+#############################################################
+
+define ROOTFS_CPIO_INIT_SYMLINK
+       rm -f $(TARGET_DIR)/init
+       ln -s sbin/init $(TARGET_DIR)/init
+endef
+
+ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_INIT_SYMLINK
+
+define ROOTFS_CPIO_CMD
+       cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $$@
+endef
+
+$(eval $(call ROOTFS_TARGET,cpio))
\ No newline at end of file
diff --git a/fs/cramfs/Config.in b/fs/cramfs/Config.in
new file mode 100644 (file)
index 0000000..1a4e326
--- /dev/null
@@ -0,0 +1,6 @@
+config BR2_TARGET_ROOTFS_CRAMFS
+       bool "cramfs root filesystem"
+       help
+         Build a cramfs root filesystem
+
+         http://sourceforge.net/projects/cramfs/
diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk
new file mode 100644 (file)
index 0000000..ccd316f
--- /dev/null
@@ -0,0 +1,22 @@
+#############################################################
+#
+# Build the cramfs root filesystem image
+#
+#############################################################
+ifeq ($(BR2_ENDIAN),"BIG")
+CRAMFS_OPTS=-b
+else
+CRAMFS_OPTS=-l
+endif
+
+ifneq ($(TARGET_DEVICE_TABLE),)
+CRAMFS_OPTS += -D $(TARGET_DEVICE_TABLE)
+endif
+
+define ROOTFS_CRAMFS_CMD
+ $(HOST_DIR)/usr/bin/mkcramfs -q $(CRAMFS_OPTS) $(TARGET_DIR) $$@
+endef
+
+ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
+
+$(eval $(call ROOTFS_TARGET,cramfs))
\ No newline at end of file
diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in
new file mode 100644 (file)
index 0000000..02ec18f
--- /dev/null
@@ -0,0 +1,61 @@
+config BR2_TARGET_ROOTFS_EXT2
+       bool "ext2 root filesystem"
+       default y
+       help
+         Build an ext2 root filesystem
+
+config BR2_TARGET_ROOTFS_EXT2_BLOCKS
+       int "size in blocks (leave at 0 for auto calculation)"
+       depends on BR2_TARGET_ROOTFS_EXT2
+       default 0
+
+config BR2_TARGET_ROOTFS_EXT2_INODES
+       int "inodes (leave at 0 for auto calculation)"
+       depends on BR2_TARGET_ROOTFS_EXT2
+       default 0
+
+config BR2_TARGET_ROOTFS_EXT2_RESBLKS
+       int "reserved blocks percentage"
+       depends on BR2_TARGET_ROOTFS_EXT2
+       default 0
+
+config BR2_TARGET_ROOTFS_EXT2_SQUASH
+       bool "Make all files be owned by root"
+       depends on  BR2_TARGET_ROOTFS_EXT2
+       default y
+
+choice
+       prompt "Compression method"
+       default BR2_TARGET_ROOTFS_EXT2_NONE
+       depends on BR2_TARGET_ROOTFS_EXT2
+       help
+         Select compressor for ext2 filesystem of the root filesystem
+
+config BR2_TARGET_ROOTFS_EXT2_NONE
+       bool "no compression"
+       help
+         Do not compress the ext2 filesystem.
+
+config BR2_TARGET_ROOTFS_EXT2_GZIP
+       bool "gzip"
+       help
+         Do compress the ext2 filesystem with gzip.
+         Note that you either have to have gzip installed on your host
+         or select to build a gzip for your host. See the packages submenu.
+
+config BR2_TARGET_ROOTFS_EXT2_BZIP2
+       bool "bzip2"
+       help
+         Do compress the ext2 filesystem with bzip2.
+         Note that you either have to have bzip2 installed on your host
+         or select to build a bzip2 for your host. See the packages submenu.
+
+config BR2_TARGET_ROOTFS_EXT2_LZMA
+       bool "lzma"
+       help
+         Do compress the ext2 filesystem with lzma.
+         Note that you either have to have lzma installed on your host
+         or select to build a lzma for your host. See the packages submenu.
+
+endchoice
+
diff --git a/fs/ext2/ext2root.mk b/fs/ext2/ext2root.mk
new file mode 100644 (file)
index 0000000..68b3b81
--- /dev/null
@@ -0,0 +1,40 @@
+#############################################################
+#
+# Build the ext2 root filesystem image
+#
+#############################################################
+
+EXT2_OPTS :=
+
+ifeq ($(BR2_TARGET_ROOTFS_EXT2_SQUASH),y)
+EXT2_OPTS += -U
+endif
+
+ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
+EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
+endif
+
+ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
+EXT2_OPTS += -N $(BR2_TARGET_ROOTFS_EXT2_INODES)
+endif
+
+ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),)
+EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
+endif
+
+ROOTFS_EXT2_DEPENDENCIES = host-genext2fs
+
+ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
+GENEXT2_REALSIZE=$(shell LC_ALL=C du -s -c -k $(TARGET_DIR) | grep total | sed -e "s/total//")
+GENEXT2_ADDTOROOTSIZE=$(shell if [ $(GENEXT2_REALSIZE) -ge 20000 ]; then echo 16384; else echo 2400; fi)
+GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE))
+GENEXT2_ADDTOINODESIZE=$(shell find $(TARGET_DIR) | wc -l)
+GENEXT2_INODES=$(shell expr $(GENEXT2_ADDTOINODESIZE) + 400)
+EXT2_OPTS += -b $(GENEXT2_SIZE) -N $(GENEXT2_INODES)
+endif
+
+define ROOTFS_EXT2_CMD
+       $(HOST_DIR)/usr/bin/genext2fs -d $(TARGET_DIR) $(EXT2_OPTS) $$@
+endef
+
+$(eval $(call ROOTFS_TARGET,ext2))
\ No newline at end of file
diff --git a/fs/initramfs/Config.in b/fs/initramfs/Config.in
new file mode 100644 (file)
index 0000000..d53982c
--- /dev/null
@@ -0,0 +1,15 @@
+config BR2_TARGET_ROOTFS_INITRAMFS
+       bool "initramfs for initial ramdisk of linux kernel"
+       help
+         Build a file which is usable for the gen_init_cpio tool
+         at linux kernel build.
+         This file is normally called initramfs_list and can be
+         generated with gen_initramfs_list.sh script from the root
+         directory structure.
+         The file is then used in the kernel build process to generate
+         the cpio filesystem for the initial ramdisk. Make sure that
+         you configure this file in kernel build configuration.
+         The location in the kernel build configuration menu is
+         Device Drivers -> Block devices -> Initramfs source file(s).
+         The configuration variable is CONFIG_INITRAMFS_SOURCE
+
diff --git a/fs/initramfs/gen_initramfs_list.sh b/fs/initramfs/gen_initramfs_list.sh
new file mode 100644 (file)
index 0000000..26252b6
--- /dev/null
@@ -0,0 +1,203 @@
+#!/bin/sh
+# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
+# Released under the terms of the GNU GPL
+#
+# Generate a newline separated list of entries from the file/directory
+# supplied as an argument.
+#
+# If a file/directory is not supplied then generate a small dummy file.
+#
+# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c.
+#
+
+default_initramfs() {
+       cat <<-EOF
+               # This is a very simple, default initramfs
+
+               dir /dev 0755 0 0
+               nod /dev/console 0600 0 0 c 5 1
+               dir /root 0700 0 0
+       EOF
+}
+
+filetype() {
+       local argv1="$1"
+
+       # symlink test must come before file test
+       if [ -L "$argv1" ]; then
+               echo "slink"
+       elif [ -f "$argv1" ]; then
+               echo "file"
+       elif [ -d "$argv1" ]; then
+               echo "dir"
+       elif [ -b "$argv1" -o -c "$argv1" ]; then
+               echo "nod"
+       elif [ -p "$argv1" ]; then
+               echo "pipe"
+       elif [ -S "$argv1" ]; then
+               echo "sock"
+       else
+               echo "invalid"
+       fi
+       return 0
+}
+
+print_mtime() {
+       local argv1="$1"
+       local mymtime="0"
+
+       if [ -e "$argv1" ]; then
+               mymtime=$(find "$argv1" -printf "%T@\n" | sort -r | head -n 1)
+       fi
+       
+       echo "# Last modified: $mymtime"
+       echo
+}
+
+parse() {
+       local location="$1"
+       local name=$(echo "$location" | sed -e "s,$srcdir,,")
+       # change '//' into '/'
+       name=$(echo $name | sed -e 's,/[/]*,/,g')
+       local mode="$2"
+       local uid="$3"
+       local gid="$4"
+       local ftype=$(filetype "$location")
+       # remap uid/gid to 0 if necessary
+       [ "x$uid" != "x" ] && [ $uid -eq $root_uid ] && uid=0
+       [ "x$gid" != "x" ] && [ $gid -eq $root_gid ] && gid=0
+       local str="$mode $uid $gid"
+
+       [ "$ftype" = "invalid" ] && return 0
+       [ "$location" = "$srcdir" ] && return 0
+
+       case "$ftype" in
+               "file")
+                       str="$ftype $name $location $str"
+                       ;;
+               "nod")
+                       local devtype=
+                       local maj=$(LC_ALL=C ls -l "$location" | \
+                                       awk '{sub(/,/, "", $5); print $5}')
+                       local min=$(LC_ALL=C ls -l "$location" | \
+                                       awk '{print $6}')
+
+                       if [ -b "$location" ]; then
+                               devtype="b"
+                       else
+                               devtype="c"
+                       fi
+                       str="$ftype $name $str $devtype $maj $min"
+                       ;;
+               "slink")
+                       local target=$(LC_ALL=C ls -l "$location" | \
+                                       awk '{print $11}')
+                       str="$ftype $name $target $str"
+                       ;;
+               *)
+                       str="$ftype $name $str"
+                       ;;
+       esac
+
+       echo "$str"
+
+       return 0
+}
+
+usage() {
+       printf    "Usage:\n"
+       printf    "$0 [ [-u <root_uid>] [-g <root_gid>] [-d | <cpio_source>] ] . . .\n"
+       printf    "\n"
+       printf -- "-u <root_uid>  User ID to map to user ID 0 (root).\n"
+       printf    "               <root_uid> is only meaningful if <cpio_source>\n"
+       printf    "               is a directory.\n"
+       printf -- "-g <root_gid>  Group ID to map to group ID 0 (root).\n"
+       printf    "               <root_gid> is only meaningful if <cpio_source>\n"
+       printf    "               is a directory.\n"
+       printf    "<cpio_source>  File list or directory for cpio archive.\n"
+       printf    "               If <cpio_source> is not provided then a\n"
+       printf    "               a default list will be output.\n"
+       printf -- "-d             Output the default cpio list.  If no <cpio_source>\n"
+       printf    "               is given then the default cpio list will be output.\n"
+       printf    "\n"
+       printf    "All options may be repeated and are interpreted sequentially\n"
+       printf    "and immediately.  -u and -g states are preserved across\n"
+       printf    "<cpio_source> options so an explicit \"-u 0 -g 0\" is required\n"
+       printf    "to reset the root/group mapping.\n"
+}
+
+build_list() {
+       printf "\n#####################\n# $cpio_source\n"
+
+       if [ -f "$cpio_source" ]; then
+               print_mtime "$cpio_source"
+               cat "$cpio_source"
+       elif [ -d "$cpio_source" ]; then
+               srcdir=$(echo "$cpio_source" | sed -e 's://*:/:g;s:/$::')
+               dirlist=$(find "$srcdir" -printf "%p %m %U %G\n" 2>/dev/null)
+
+               # If $dirlist is only one line, then the directory is empty
+               if [  "$(echo "$dirlist" | wc -l)" -gt 1 ]; then
+                       print_mtime "$cpio_source"
+               
+                       echo "$dirlist" | \
+                       while read x; do
+                               parse $x
+                       done
+               else
+                       # Failsafe in case directory is empty
+                       default_initramfs
+               fi
+       else
+               echo "  $0: Cannot open '$cpio_source'" >&2
+               exit 1
+       fi
+}
+
+
+root_uid=0
+root_gid=0
+
+while [ $# -gt 0 ]; do
+       arg="$1"
+       shift
+       case "$arg" in
+               "-u")
+                       root_uid="$1"
+                       shift
+                       ;;
+               "-g")
+                       root_gid="$1"
+                       shift
+                       ;;
+               "-d")
+                       default_list="$arg"
+                       default_initramfs
+                       ;;
+               "-h")
+                       usage
+                       exit 0
+                       ;;
+               *)
+                       case "$arg" in
+                               "-"*)
+                                       printf "ERROR: unknown option \"$arg\"\n" >&2
+                                       printf "If the filename validly begins with '-', then it must be prefixed\n" >&2
+                                       printf "by './' so that it won't be interpreted as an option." >&2
+                                       printf "\n" >&2
+                                       usage >&2
+                                       exit 1
+                                       ;;
+                               *)
+                                       cpio_source="$arg"
+                                       build_list
+                                       ;;
+                       esac
+                       ;;
+       esac
+done
+
+# spit out the default cpio list if a source hasn't been specified
+[ -z "$cpio_source" -a -z "$default_list" ] && default_initramfs
+
+exit 0
diff --git a/fs/initramfs/initramfs.mk b/fs/initramfs/initramfs.mk
new file mode 100644 (file)
index 0000000..cf1fcdb
--- /dev/null
@@ -0,0 +1,18 @@
+#############################################################
+#
+# Make a initramfs_list file to be used by gen_init_cpio
+# gen_init_cpio is part of the 2.6 linux kernels to build an
+# initial ramdisk filesystem based on cpio
+#
+#############################################################
+
+define ROOTFS_INITRAMFS_INIT_SYMLINK
+       rm -f $(TARGET_DIR)/init
+       ln -s sbin/init $(TARGET_DIR)/init
+endef
+
+define ROOTFS_INITRAMFS_CMD
+       $(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $$@
+endef
+
+$(eval $(call ROOTFS_TARGET,initramfs))
\ No newline at end of file
diff --git a/fs/iso9660/Config.in b/fs/iso9660/Config.in
new file mode 100644 (file)
index 0000000..ceee52f
--- /dev/null
@@ -0,0 +1,16 @@
+config BR2_TARGET_ROOTFS_ISO9660
+       bool "iso image"
+       depends on BR2_i386
+       depends on !BR2_KERNEL_none
+       select BR2_TARGET_ROOTFS_EXT2
+       select BR2_TARGET_GRUB
+       help
+         Build a bootable iso9660 image
+
+config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU
+       string "Boot menu.lst file"
+       depends on BR2_TARGET_ROOTFS_ISO9660
+       default "target/iso9660/menu.lst"
+
+comment "iso image requires a Linux kernel to be built"
+       depends on BR2_i386 && BR2_KERNEL_none
diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
new file mode 100644 (file)
index 0000000..66e2de2
--- /dev/null
@@ -0,0 +1,49 @@
+#############################################################
+#
+# Build the iso96600 root filesystem image
+#
+# Cannot be converted to the ROOTFS_TARGET infrastructure, because of
+# the temporary construction in ISO9660_TARGET_DIR.
+#
+#############################################################
+
+ISO9660_TARGET_DIR=$(BUILD_DIR)/iso9660
+ISO9660_BOOT_MENU:=$(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
+ISO9660_OPTS:=
+
+ifeq ($(BR2_TARGET_ROOTFS_ISO9660_SQUASH),y)
+ISO9660_OPTS+=-U
+endif
+
+$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot $(LINUX_KERNEL) $(BINARIES_DIR)/rootfs.ext2 grub
+       @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660")
+       mkdir -p $(ISO9660_TARGET_DIR)
+       mkdir -p $(ISO9660_TARGET_DIR)/boot/grub
+       cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/
+       cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
+       cp $(LINUX_KERNEL) $(ISO9660_TARGET_DIR)/kernel
+       cp $(EXT2_TARGET) $(ISO9660_TARGET_DIR)/initrd
+       # Use fakeroot to pretend all target binaries are owned by root
+       rm -f $(FAKEROOT_SCRIPT)
+       touch $(BUILD_DIR)/.fakeroot.00000
+       cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT)
+       echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
+       # Use fakeroot so mkisofs believes the previous fakery
+       echo "$(HOST_DIR)/usr/bin/genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot " \
+               "-boot-load-size 4 -boot-info-table -o $@ $(ISO9660_TARGET_DIR)" \
+               >> $(FAKEROOT_SCRIPT)
+       chmod a+x $(FAKEROOT_SCRIPT)
+       $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT)
+       -@rm -f $(FAKEROOT_SCRIPT)
+       -@rm -rf $(ISO9660_TARGET_DIR)
+
+iso9660-root: $(BINARIES_DIR)/rootfs.iso9660
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_TARGET_ROOTFS_ISO9660),y)
+TARGETS+=iso9660-root
+endif
diff --git a/fs/iso9660/menu.lst b/fs/iso9660/menu.lst
new file mode 100644 (file)
index 0000000..d78caeb
--- /dev/null
@@ -0,0 +1,11 @@
+default                0
+timeout                10
+color cyan/blue white/blue
+
+title          Hard Drive (first partition)
+rootnoverify   (hd0)
+chainloader    +1
+
+title          BuildRoot ISO9660 image
+kernel         /kernel
+initrd         /initrd
diff --git a/fs/jffs2/Config.in b/fs/jffs2/Config.in
new file mode 100644 (file)
index 0000000..b787ec9
--- /dev/null
@@ -0,0 +1,117 @@
+config BR2_TARGET_ROOTFS_JFFS2
+       bool "jffs2 root filesystem"
+       help
+         Build a jffs2 root filesystem
+
+if BR2_TARGET_ROOTFS_JFFS2
+
+choice
+       prompt "Flash Type"
+       default BR2_TARGET_ROOTFS_JFFS2_FLASH_128
+
+config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
+       bool "AT45 dataflash with 1056 byte pagesize"
+       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
+
+config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
+       bool "AT45 dataflash with 528 byte pagesize"
+       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
+
+config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
+       bool "NAND flash with 512B Page and 16 kB erasesize"
+       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
+
+config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
+       bool "NAND flash with 2kB Page and 128 kB erasesize"
+       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
+
+config BR2_TARGET_ROOTFS_JFFS2_FLASH_128
+       bool "Parallel flash with 4 kB pagesize and 128 kB erase size"
+
+config BR2_TARGET_ROOTFS_JFFS2_FLASH_64
+       bool "Parallel flash with 4 kB pagesize and 64 kB erase size"
+
+config BR2_TARGET_ROOTFS_JFFS2_CUSTOM
+       bool "Select custom page and erase size"
+
+endchoice
+
+config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE
+       hex "Page Size"
+       depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM
+       default 0x1000
+       help
+         Set to pagesize of memory
+
+config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE
+       hex "Erase block size"
+       depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM
+       default 0x20000
+       help
+         Set to erase size of memory
+
+config BR2_TARGET_ROOTFS_JFFS2_PAGESIZE
+       hex
+       default 0x420 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
+       default 0x210 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
+       default 0x200 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
+       default 0x800 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
+       default 0x1000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128
+       default 0x1000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64
+       default $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE) if BR2_TARGET_ROOTFS_JFFS2_CUSTOM
+
+config BR2_TARGET_ROOTFS_JFFS2_EBSIZE
+       hex
+       default 0x2100 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
+       default 0x1080 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
+       default 0x4000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
+       default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
+       default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128
+       default 0x10000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64
+       default $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE) if BR2_TARGET_ROOTFS_JFFS2_CUSTOM
+
+config BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
+       bool "Do not use Cleanmarker"
+       default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
+       default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
+       default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
+       default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
+       help
+         Do not use cleanmarkers if using NAND flash or Dataflash where
+         the pagesize is not a power of 2
+
+config BR2_JFFS2_TARGET_SREC
+       bool "RootFS in SREC file formet"
+
+config BR2_TARGET_ROOTFS_JFFS2_PAD
+       bool "Pad output"
+
+config BR2_TARGET_ROOTFS_JFFS2_PADSIZE
+       hex "Pad output size (0x0 = to end of EB)"
+       depends on BR2_TARGET_ROOTFS_JFFS2_PAD
+       default 0x0
+       help
+         Set to 0x0 to pad to end of erase block.
+
+choice
+       prompt "Endianess"
+       default BR2_TARGET_ROOTFS_JFFS2_BE if BR2_alpha || BR2_armeb || \
+                       BR2_avr32 || BR2_m68k || BR2_mips || \
+                       BR2_powerpc || BR2_sh2a_nofpueb || BR2_sh2eb || \
+                       BR2_sh3eb || BR2_sh4eb || BR2_sparc || BR2_sparc64
+
+config BR2_TARGET_ROOTFS_JFFS2_LE
+       bool "little-endian"
+
+config BR2_TARGET_ROOTFS_JFFS2_BE
+       bool "big-endian"
+
+endchoice
+
+config BR2_TARGET_ROOTFS_JFFS2_SUMMARY
+       bool "Produce a summarized JFFS2 image"
+       help
+         A summarised image can be mounted faster if support is
+         enabled in the kernel (CONFIG_JFFS2_SUMMARY)
+
+endif
diff --git a/fs/jffs2/jffs2root.mk b/fs/jffs2/jffs2root.mk
new file mode 100644 (file)
index 0000000..a0a563d
--- /dev/null
@@ -0,0 +1,61 @@
+#############################################################
+#
+# Build the jffs2 root filesystem image
+#
+#############################################################
+
+JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
+SUMTOOL_OPTS := $(JFFS2_OPTS)
+
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
+ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
+JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
+else
+JFFS2_OPTS += -p
+endif
+SUMTOOL_OPTS += -p
+endif
+
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y)
+JFFS2_OPTS += -l
+SUMTOOL_OPTS += -l
+endif
+
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y)
+JFFS2_OPTS += -b
+SUMTOOL_OPTS += -b
+endif
+
+JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_PAGESIZE)
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y)
+JFFS2_OPTS += -n
+SUMTOOL_OPTS += -n
+endif
+
+ifneq ($(TARGET_DEVICE_TABLE),)
+JFFS2_OPTS += -D $(TARGET_DEVICE_TABLE)
+endif
+
+ROOTFS_JFFS2_DEPENDENCIES = host-mtd
+
+ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
+define ROOTFS_JFFS2_CMD
+       $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@.nosummary && \
+       $(SUMTOOL) $(SUMTOOL_OPTS) -i $$@.nosummary -o $$@ && \
+       rm $$@.nosummary
+endef
+else
+define ROOTFS_JFFS2_CMD
+       $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@
+endef
+endif
+
+define JFFS2_GEN_SREC
+       $(TARGET_CROSS)objcopy -I binary -O srec --adjust-vma 0xa1000000 $$@ $$@.srec
+endef
+
+ifeq ($(BR2_JFFS2_TARGET_SREC),y)
+ROOTFS_JFFS2_POST_GEN_HOOKS += JFFS2_GEN_SREC
+endif
+
+$(eval $(call ROOTFS_TARGET,jffs2))
\ No newline at end of file
diff --git a/fs/romfs/Config.in b/fs/romfs/Config.in
new file mode 100644 (file)
index 0000000..7a8c663
--- /dev/null
@@ -0,0 +1,5 @@
+config BR2_TARGET_ROOTFS_ROMFS
+       bool "romfs root filesystem"
+       help
+         Build a romfs image of the root filesystem.
+
diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk
new file mode 100644 (file)
index 0000000..9719478
--- /dev/null
@@ -0,0 +1,15 @@
+#############################################################
+#
+# Build the romfs root filesystem image
+#
+#############################################################
+
+ROMFS_TARGET=$(IMAGE).romfs
+
+ROOTFS_ROMFS_DEPENDENCIES = host-genromfs
+
+define ROOTFS_ROMFS_CMD
+       $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $$@
+endef
+
+$(eval $(call ROOTFS_TARGET,romfs))
\ No newline at end of file
diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in
new file mode 100644 (file)
index 0000000..6cc8fca
--- /dev/null
@@ -0,0 +1,4 @@
+config BR2_TARGET_ROOTFS_SQUASHFS
+       bool "squashfs root filesystem"
+       help
+         Build a squashfs root filesystem
diff --git a/fs/squashfs/squashfsroot.mk b/fs/squashfs/squashfsroot.mk
new file mode 100644 (file)
index 0000000..d72388e
--- /dev/null
@@ -0,0 +1,13 @@
+#############################################################
+#
+# Build the squashfs root filesystem image
+#
+#############################################################
+
+ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
+
+define ROOTFS_SQUASHFS_CMD
+       $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $$@ -noappend
+endef
+
+$(eval $(call ROOTFS_TARGET,squashfs))
\ No newline at end of file
diff --git a/fs/tar/Config.in b/fs/tar/Config.in
new file mode 100644 (file)
index 0000000..0adca79
--- /dev/null
@@ -0,0 +1,47 @@
+config BR2_TARGET_ROOTFS_TAR
+       bool "tar the root filesystem"
+       help
+         Build a tar archive of the root filesystem
+
+choice
+       prompt "Compression method"
+       default BR2_TARGET_ROOTFS_TAR_NONE
+       depends on BR2_TARGET_ROOTFS_TAR
+       help
+         Select compressor for tar archive of the root filesystem
+
+config BR2_TARGET_ROOTFS_TAR_NONE
+       bool "no compression"
+       help
+        Do not compress the tarball.
+
+config BR2_TARGET_ROOTFS_TAR_GZIP
+       bool "gzip"
+       help
+        Do compress the tarball with gzip.
+        Note that you either have to have gzip installed on your host
+        or select to build a gzip for your host. See the packages submenu.
+
+config BR2_TARGET_ROOTFS_TAR_BZIP2
+       bool "bzip2"
+       help
+        Do compress the tarball with bzip2.
+        Note that you either have to have bzip2 installed on your host
+        or select to build a bzip2 for your host. See the packages submenu.
+
+config BR2_TARGET_ROOTFS_TAR_LZMA
+       bool "lzma"
+       help
+        Do compress the tarball with lzma.
+        Note that you either have to have lzma installed on your host
+        or select to build a lzma for your host. See the packages submenu.
+
+endchoice
+
+config BR2_TARGET_ROOTFS_TAR_OPTIONS
+       string "other random options to pass to tar"
+       depends on BR2_TARGET_ROOTFS_TAR
+       default ""
+       help
+         Any other flags you want to pass to tar
+         Refer to tar --help for details
diff --git a/fs/tar/tarroot.mk b/fs/tar/tarroot.mk
new file mode 100644 (file)
index 0000000..4d435cb
--- /dev/null
@@ -0,0 +1,13 @@
+#############################################################
+#
+# tar to archive target filesystem
+#
+#############################################################
+
+TAR_OPTS:=$(BR2_TARGET_ROOTFS_TAR_OPTIONS)
+
+define ROOTFS_TAR_CMD
+ tar -c$(TAR_OPTS)f $$@ -C $(TARGET_DIR) .
+endef
+
+$(eval $(call ROOTFS_TARGET,tar))
diff --git a/fs/ubifs/Config.in b/fs/ubifs/Config.in
new file mode 100644 (file)
index 0000000..9fa510e
--- /dev/null
@@ -0,0 +1,88 @@
+config BR2_TARGET_ROOTFS_UBIFS
+       bool "ubifs root filesystem"
+       help
+         Build a ubifs root filesystem
+
+config BR2_TARGET_ROOTFS_UBIFS_LEBSIZE
+       hex "UBI logical erase block size"
+       depends on BR2_TARGET_ROOTFS_UBIFS
+       default 0x1f800
+
+config BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE
+       hex "UBI minimum I/O size"
+       depends on BR2_TARGET_ROOTFS_UBIFS
+       default 0x800
+       help
+         Some comment required here
+
+config BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT
+       int "Maximum LEB count"
+       depends on BR2_TARGET_ROOTFS_UBIFS
+       default 2048
+       help
+         Some comment required here
+
+choice
+       prompt "ubifs runtime compression"
+       default BR2_TARGET_ROOTFS_UBIFS_RT_LZO
+       depends on BR2_TARGET_ROOTFS_UBIFS
+       help
+         Select which compression format to use at run-time within
+         the ubifs file system.
+
+config BR2_TARGET_ROOTFS_UBIFS_RT_NONE
+       bool "no compression"
+       help
+         Don't use run-time compression.
+
+config BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB
+       bool "gzip"
+       help
+         Use zlib compression at run-time.
+
+config BR2_TARGET_ROOTFS_UBIFS_RT_LZO
+       bool "lzo"
+       help
+         Use lzo compression at run-time.
+
+endchoice
+
+choice
+       prompt "Compression method"
+       default BR2_TARGET_ROOTFS_UBIFS_NONE
+       depends on BR2_TARGET_ROOTFS_UBIFS
+       help
+         Select which compression format to compress the final image
+         into.
+
+config BR2_TARGET_ROOTFS_UBIFS_NONE
+       bool "no compression"
+       help
+         Do not compress the ubifs filesystem.
+
+config BR2_TARGET_ROOTFS_UBIFS_GZIP
+       bool "gzip"
+       help
+         Do compress the ubifs filesystem with gzip.
+         Note that you either have to have gzip installed on your
+         host or select to build a gzip for your host. See the
+         packages submenu.
+
+config BR2_TARGET_ROOTFS_UBIFS_BZIP2
+       bool "bzip2"
+       help
+         Do compress the ubifs filesystem with bzip2.
+         Note that you either have to have bzip2 installed on your
+         host or select to build a bzip2 for your host. See the
+         packages submenu.
+
+config BR2_TARGET_ROOTFS_UBIFS_LZMA
+       bool "lzma"
+       help
+         Do compress the ubifs filesystem with lzma.
+         Note that you either have to have lzma installed on your
+         host or select to build a lzma for your host. See the
+         packages submenu.
+
+endchoice
+
diff --git a/fs/ubifs/ubifsroot.mk b/fs/ubifs/ubifsroot.mk
new file mode 100644 (file)
index 0000000..0fad234
--- /dev/null
@@ -0,0 +1,25 @@
+#############################################################
+#
+# Build the ubifs root filesystem image
+#
+#############################################################
+
+UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
+
+ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB),y)
+UBIFS_OPTS += -x zlib
+endif
+ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_LZI),y)
+UBIFS_OPTS += -x lzo
+endif
+ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y)
+UBIFS_OPTS += -x none
+endif
+
+ROOTFS_UBIFS_DEPENDENCIES = host-mtd
+
+define ROOTFS_UBIFS_CMD
+       $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $$@
+endef
+
+$(eval $(call ROOTFS_TARGET,ubifs))
\ No newline at end of file
index 5d634ca2a32400426de3c374ca906864a46fabba..5d536353862f7021ead3e160d699b53691c306b2 100644 (file)
@@ -1,35 +1,4 @@
-menu "Target filesystem options"
-
-config BR2_ROOTFS_POST_BUILD_SCRIPT
-       string "Custom script to run before packing files"
-       default ""
-       help
-         Specify a script to be run after the build has finished and before
-         the BR2 starts packing the files into selected packages.
-
-         This gives users the oportunity to do board-specific cleanups,
-         add-ons and the like, so the generated files can be used directly
-         without further processing.
-
-         The script is called with the target directory name as first and
-         only argument. Make sure the exit code of that script is 0,
-         otherwise make will stop after calling it.
-
-comment "filesystem for target device"
-
-source "target/cramfs/Config.in"
-source "target/cloop/Config.in"
-source "target/ext2/Config.in"
-source "target/jffs2/Config.in"
-source "target/ubifs/Config.in"
-source "target/squashfs/Config.in"
-source "target/tar/Config.in"
-source "target/cpio/Config.in"
-source "target/iso9660/Config.in"
-source "target/initramfs/Config.in"
-source "target/romfs/Config.in"
-
-comment "bootloader for target device"
+menu "Bootloaders"
 
 source "target/x86/grub/Config.in"
 #source "target/x86/grub2/Config.in"
index 38993e5d8ed68cedf279de86b0cb3e4303f12979..48396d5d868db1fe29189607ed7943cf6898c8a5 100644 (file)
@@ -62,8 +62,6 @@ ifeq ($(BR2_TARGET_UBOOT),y)
 include target/u-boot/Makefile.in
 endif
 
-# and finally build the filesystems/tarballs
-include target/common.mk
 include target/*/*.mk
 
 # kernel rules
diff --git a/target/cloop/Config.in b/target/cloop/Config.in
deleted file mode 100644 (file)
index 3e01067..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-config BR2_TARGET_ROOTFS_CLOOP
-       bool "cloop root filesystem for the target device"
-       help
-         Build a cloop root filesystem
-
-         cloop is a Linux kernel module that enables compressed
-         loopback filesystem support. With it you can mount a
-         compressed filesystem like a block device and seamlessly
-         decompress its data while accessing it.  The majority of the
-         software on an LNX-BBC is accessed in this fashion.
diff --git a/target/cloop/cloop.mk b/target/cloop/cloop.mk
deleted file mode 100644 (file)
index c1d6abb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#############################################################
-#
-# Build the compressed loop root filesystem image
-#
-#############################################################
-
-ROOTFS_CLOOP_DEPENDENCIES = host-cloop host-cdrkit
-
-define ROOTFS_CLOOP_CMD
-       $(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $$@
-endef
-
-$(eval $(call ROOTFS_TARGET,cloop))
\ No newline at end of file
diff --git a/target/common.mk b/target/common.mk
deleted file mode 100644 (file)
index cebe8c3..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Macro that builds the needed Makefile target to create a root
-# filesystem image.
-#
-# The following variable must be defined before calling this macro
-#
-#  ROOTFS_$(FSTYPE)_CMD, the command that generates the root
-#  filesystem image. A single command is allowed. The filename of the
-#  filesystem image that it must generate is $$@.
-#
-# The following variables can optionaly be defined
-#
-#  ROOTFS_$(FSTYPE)_DEPENDENCIES, the list of dependencies needed to
-#  build the root filesystem (usually host tools)
-#
-#  ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before
-#  generating the filesystem image
-#
-#  ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after
-#  generating the filesystem image
-#
-# In terms of configuration option, this macro assumes that the
-# BR2_TARGET_ROOTFS_$(FSTYPE) config option allows to enable/disable
-# the generation of a filesystem image of a particular type. If
-# configura options BR2_TARGET_ROOTFS_$(FSTYPE)_GZIP,
-# BR2_TARGET_ROOTFS_$(FSTYPE)_BZIP2 or
-# BR2_TARGET_ROOTFS_$(FSTYPE)_LZMA exist and are enabled, then the
-# macro will automatically generate a compressed filesystem image.
-
-FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
-
-define ROOTFS_TARGET_INTERNAL
-
-$(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES) host-fakeroot makedevs $(if $(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
-       @$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
-       $(foreach hook,$(ROOTFS_$(2)_PRE_GEN_HOOKS),$(call $(hook))$(sep))
-       rm -f $(FAKEROOT_SCRIPT)
-       touch $(BUILD_DIR)/.fakeroot.00000
-       cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT)
-       echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
-ifneq ($(TARGET_DEVICE_TABLE),)
-       echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
-endif
-       echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT)
-       chmod a+x $(FAKEROOT_SCRIPT)
-       $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT)
-       -@rm -f $(FAKEROOT_SCRIPT)
-       $(foreach hook,$(ROOTFS_$(2)_POST_GEN_HOOKS),$(call $(hook))$(sep))
-ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
-       gzip -9 -c $$@ > $$@.gz
-endif
-ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y)
-       bzip2 -9 -c $$@ > $$@.bz2
-endif
-ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
-       $(LZMA) -9 -c $$@ > $$@.lzma
-endif
-
-$(1)-root: $(BINARIES_DIR)/rootfs.$(1)
-
-ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y)
-TARGETS += $(1)-root
-endif
-endef
-
-define ROOTFS_TARGET
-$(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1)))
-endef
diff --git a/target/cpio/Config.in b/target/cpio/Config.in
deleted file mode 100644 (file)
index 02fd00d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-config BR2_TARGET_ROOTFS_CPIO
-       bool "cpio the root filesystem"
-       help
-         Build a cpio archive of the root filesystem
-
-choice
-        prompt "Compression method"
-        default BR2_TARGET_ROOTFS_CPIO_NONE
-        depends on BR2_TARGET_ROOTFS_CPIO
-        help
-          Select compressor for cpio filesystem of the root filesystem
-
-config BR2_TARGET_ROOTFS_CPIO_NONE
-        bool "no compression"
-        help
-         Do not compress the cpio filesystem.
-
-config BR2_TARGET_ROOTFS_CPIO_GZIP
-        bool "gzip"
-        help
-         Do compress the cpio filesystem with gzip.
-         Note that you either have to have gzip installed on your host
-         or select to build a gzip for your host. See the packages submenu.
-
-config BR2_TARGET_ROOTFS_CPIO_BZIP2
-        bool "bzip2"
-        help
-         Do compress the cpio filesystem with bzip2.
-         Note that you either have to have bzip2 installed on your host
-         or select to build a bzip2 for your host. See the packages submenu.
-
-config BR2_TARGET_ROOTFS_CPIO_LZMA
-        bool "lzma"
-        help
-         Do compress the cpio filesystem with lzma.
-         Note that you either have to have lzma installed on your host
-         or select to build a lzma for your host. See the packages submenu.
-
-endchoice
-
diff --git a/target/cpio/cpioroot.mk b/target/cpio/cpioroot.mk
deleted file mode 100644 (file)
index ab7d546..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#############################################################
-#
-# cpio to archive target filesystem
-#
-#############################################################
-
-define ROOTFS_CPIO_INIT_SYMLINK
-       rm -f $(TARGET_DIR)/init
-       ln -s sbin/init $(TARGET_DIR)/init
-endef
-
-ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_INIT_SYMLINK
-
-define ROOTFS_CPIO_CMD
-       cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $$@
-endef
-
-$(eval $(call ROOTFS_TARGET,cpio))
\ No newline at end of file
diff --git a/target/cramfs/Config.in b/target/cramfs/Config.in
deleted file mode 100644 (file)
index 1a4e326..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-config BR2_TARGET_ROOTFS_CRAMFS
-       bool "cramfs root filesystem"
-       help
-         Build a cramfs root filesystem
-
-         http://sourceforge.net/projects/cramfs/
diff --git a/target/cramfs/cramfs.mk b/target/cramfs/cramfs.mk
deleted file mode 100644 (file)
index ccd316f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#############################################################
-#
-# Build the cramfs root filesystem image
-#
-#############################################################
-ifeq ($(BR2_ENDIAN),"BIG")
-CRAMFS_OPTS=-b
-else
-CRAMFS_OPTS=-l
-endif
-
-ifneq ($(TARGET_DEVICE_TABLE),)
-CRAMFS_OPTS += -D $(TARGET_DEVICE_TABLE)
-endif
-
-define ROOTFS_CRAMFS_CMD
- $(HOST_DIR)/usr/bin/mkcramfs -q $(CRAMFS_OPTS) $(TARGET_DIR) $$@
-endef
-
-ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
-
-$(eval $(call ROOTFS_TARGET,cramfs))
\ No newline at end of file
diff --git a/target/ext2/Config.in b/target/ext2/Config.in
deleted file mode 100644 (file)
index 02ec18f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-config BR2_TARGET_ROOTFS_EXT2
-       bool "ext2 root filesystem"
-       default y
-       help
-         Build an ext2 root filesystem
-
-config BR2_TARGET_ROOTFS_EXT2_BLOCKS
-       int "size in blocks (leave at 0 for auto calculation)"
-       depends on BR2_TARGET_ROOTFS_EXT2
-       default 0
-
-config BR2_TARGET_ROOTFS_EXT2_INODES
-       int "inodes (leave at 0 for auto calculation)"
-       depends on BR2_TARGET_ROOTFS_EXT2
-       default 0
-
-config BR2_TARGET_ROOTFS_EXT2_RESBLKS
-       int "reserved blocks percentage"
-       depends on BR2_TARGET_ROOTFS_EXT2
-       default 0
-
-config BR2_TARGET_ROOTFS_EXT2_SQUASH
-       bool "Make all files be owned by root"
-       depends on  BR2_TARGET_ROOTFS_EXT2
-       default y
-
-choice
-       prompt "Compression method"
-       default BR2_TARGET_ROOTFS_EXT2_NONE
-       depends on BR2_TARGET_ROOTFS_EXT2
-       help
-         Select compressor for ext2 filesystem of the root filesystem
-
-config BR2_TARGET_ROOTFS_EXT2_NONE
-       bool "no compression"
-       help
-         Do not compress the ext2 filesystem.
-
-config BR2_TARGET_ROOTFS_EXT2_GZIP
-       bool "gzip"
-       help
-         Do compress the ext2 filesystem with gzip.
-         Note that you either have to have gzip installed on your host
-         or select to build a gzip for your host. See the packages submenu.
-
-config BR2_TARGET_ROOTFS_EXT2_BZIP2
-       bool "bzip2"
-       help
-         Do compress the ext2 filesystem with bzip2.
-         Note that you either have to have bzip2 installed on your host
-         or select to build a bzip2 for your host. See the packages submenu.
-
-config BR2_TARGET_ROOTFS_EXT2_LZMA
-       bool "lzma"
-       help
-         Do compress the ext2 filesystem with lzma.
-         Note that you either have to have lzma installed on your host
-         or select to build a lzma for your host. See the packages submenu.
-
-endchoice
-
diff --git a/target/ext2/ext2root.mk b/target/ext2/ext2root.mk
deleted file mode 100644 (file)
index 68b3b81..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#############################################################
-#
-# Build the ext2 root filesystem image
-#
-#############################################################
-
-EXT2_OPTS :=
-
-ifeq ($(BR2_TARGET_ROOTFS_EXT2_SQUASH),y)
-EXT2_OPTS += -U
-endif
-
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
-EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
-endif
-
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
-EXT2_OPTS += -N $(BR2_TARGET_ROOTFS_EXT2_INODES)
-endif
-
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),)
-EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
-endif
-
-ROOTFS_EXT2_DEPENDENCIES = host-genext2fs
-
-ifeq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
-GENEXT2_REALSIZE=$(shell LC_ALL=C du -s -c -k $(TARGET_DIR) | grep total | sed -e "s/total//")
-GENEXT2_ADDTOROOTSIZE=$(shell if [ $(GENEXT2_REALSIZE) -ge 20000 ]; then echo 16384; else echo 2400; fi)
-GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE))
-GENEXT2_ADDTOINODESIZE=$(shell find $(TARGET_DIR) | wc -l)
-GENEXT2_INODES=$(shell expr $(GENEXT2_ADDTOINODESIZE) + 400)
-EXT2_OPTS += -b $(GENEXT2_SIZE) -N $(GENEXT2_INODES)
-endif
-
-define ROOTFS_EXT2_CMD
-       $(HOST_DIR)/usr/bin/genext2fs -d $(TARGET_DIR) $(EXT2_OPTS) $$@
-endef
-
-$(eval $(call ROOTFS_TARGET,ext2))
\ No newline at end of file
diff --git a/target/initramfs/Config.in b/target/initramfs/Config.in
deleted file mode 100644 (file)
index d53982c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-config BR2_TARGET_ROOTFS_INITRAMFS
-       bool "initramfs for initial ramdisk of linux kernel"
-       help
-         Build a file which is usable for the gen_init_cpio tool
-         at linux kernel build.
-         This file is normally called initramfs_list and can be
-         generated with gen_initramfs_list.sh script from the root
-         directory structure.
-         The file is then used in the kernel build process to generate
-         the cpio filesystem for the initial ramdisk. Make sure that
-         you configure this file in kernel build configuration.
-         The location in the kernel build configuration menu is
-         Device Drivers -> Block devices -> Initramfs source file(s).
-         The configuration variable is CONFIG_INITRAMFS_SOURCE
-
diff --git a/target/initramfs/gen_initramfs_list.sh b/target/initramfs/gen_initramfs_list.sh
deleted file mode 100644 (file)
index 26252b6..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/bin/sh
-# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
-# Released under the terms of the GNU GPL
-#
-# Generate a newline separated list of entries from the file/directory
-# supplied as an argument.
-#
-# If a file/directory is not supplied then generate a small dummy file.
-#
-# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c.
-#
-
-default_initramfs() {
-       cat <<-EOF
-               # This is a very simple, default initramfs
-
-               dir /dev 0755 0 0
-               nod /dev/console 0600 0 0 c 5 1
-               dir /root 0700 0 0
-       EOF
-}
-
-filetype() {
-       local argv1="$1"
-
-       # symlink test must come before file test
-       if [ -L "$argv1" ]; then
-               echo "slink"
-       elif [ -f "$argv1" ]; then
-               echo "file"
-       elif [ -d "$argv1" ]; then
-               echo "dir"
-       elif [ -b "$argv1" -o -c "$argv1" ]; then
-               echo "nod"
-       elif [ -p "$argv1" ]; then
-               echo "pipe"
-       elif [ -S "$argv1" ]; then
-               echo "sock"
-       else
-               echo "invalid"
-       fi
-       return 0
-}
-
-print_mtime() {
-       local argv1="$1"
-       local mymtime="0"
-
-       if [ -e "$argv1" ]; then
-               mymtime=$(find "$argv1" -printf "%T@\n" | sort -r | head -n 1)
-       fi
-       
-       echo "# Last modified: $mymtime"
-       echo
-}
-
-parse() {
-       local location="$1"
-       local name=$(echo "$location" | sed -e "s,$srcdir,,")
-       # change '//' into '/'
-       name=$(echo $name | sed -e 's,/[/]*,/,g')
-       local mode="$2"
-       local uid="$3"
-       local gid="$4"
-       local ftype=$(filetype "$location")
-       # remap uid/gid to 0 if necessary
-       [ "x$uid" != "x" ] && [ $uid -eq $root_uid ] && uid=0
-       [ "x$gid" != "x" ] && [ $gid -eq $root_gid ] && gid=0
-       local str="$mode $uid $gid"
-
-       [ "$ftype" = "invalid" ] && return 0
-       [ "$location" = "$srcdir" ] && return 0
-
-       case "$ftype" in
-               "file")
-                       str="$ftype $name $location $str"
-                       ;;
-               "nod")
-                       local devtype=
-                       local maj=$(LC_ALL=C ls -l "$location" | \
-                                       awk '{sub(/,/, "", $5); print $5}')
-                       local min=$(LC_ALL=C ls -l "$location" | \
-                                       awk '{print $6}')
-
-                       if [ -b "$location" ]; then
-                               devtype="b"
-                       else
-                               devtype="c"
-                       fi
-                       str="$ftype $name $str $devtype $maj $min"
-                       ;;
-               "slink")
-                       local target=$(LC_ALL=C ls -l "$location" | \
-                                       awk '{print $11}')
-                       str="$ftype $name $target $str"
-                       ;;
-               *)
-                       str="$ftype $name $str"
-                       ;;
-       esac
-
-       echo "$str"
-
-       return 0
-}
-
-usage() {
-       printf    "Usage:\n"
-       printf    "$0 [ [-u <root_uid>] [-g <root_gid>] [-d | <cpio_source>] ] . . .\n"
-       printf    "\n"
-       printf -- "-u <root_uid>  User ID to map to user ID 0 (root).\n"
-       printf    "               <root_uid> is only meaningful if <cpio_source>\n"
-       printf    "               is a directory.\n"
-       printf -- "-g <root_gid>  Group ID to map to group ID 0 (root).\n"
-       printf    "               <root_gid> is only meaningful if <cpio_source>\n"
-       printf    "               is a directory.\n"
-       printf    "<cpio_source>  File list or directory for cpio archive.\n"
-       printf    "               If <cpio_source> is not provided then a\n"
-       printf    "               a default list will be output.\n"
-       printf -- "-d             Output the default cpio list.  If no <cpio_source>\n"
-       printf    "               is given then the default cpio list will be output.\n"
-       printf    "\n"
-       printf    "All options may be repeated and are interpreted sequentially\n"
-       printf    "and immediately.  -u and -g states are preserved across\n"
-       printf    "<cpio_source> options so an explicit \"-u 0 -g 0\" is required\n"
-       printf    "to reset the root/group mapping.\n"
-}
-
-build_list() {
-       printf "\n#####################\n# $cpio_source\n"
-
-       if [ -f "$cpio_source" ]; then
-               print_mtime "$cpio_source"
-               cat "$cpio_source"
-       elif [ -d "$cpio_source" ]; then
-               srcdir=$(echo "$cpio_source" | sed -e 's://*:/:g;s:/$::')
-               dirlist=$(find "$srcdir" -printf "%p %m %U %G\n" 2>/dev/null)
-
-               # If $dirlist is only one line, then the directory is empty
-               if [  "$(echo "$dirlist" | wc -l)" -gt 1 ]; then
-                       print_mtime "$cpio_source"
-               
-                       echo "$dirlist" | \
-                       while read x; do
-                               parse $x
-                       done
-               else
-                       # Failsafe in case directory is empty
-                       default_initramfs
-               fi
-       else
-               echo "  $0: Cannot open '$cpio_source'" >&2
-               exit 1
-       fi
-}
-
-
-root_uid=0
-root_gid=0
-
-while [ $# -gt 0 ]; do
-       arg="$1"
-       shift
-       case "$arg" in
-               "-u")
-                       root_uid="$1"
-                       shift
-                       ;;
-               "-g")
-                       root_gid="$1"
-                       shift
-                       ;;
-               "-d")
-                       default_list="$arg"
-                       default_initramfs
-                       ;;
-               "-h")
-                       usage
-                       exit 0
-                       ;;
-               *)
-                       case "$arg" in
-                               "-"*)
-                                       printf "ERROR: unknown option \"$arg\"\n" >&2
-                                       printf "If the filename validly begins with '-', then it must be prefixed\n" >&2
-                                       printf "by './' so that it won't be interpreted as an option." >&2
-                                       printf "\n" >&2
-                                       usage >&2
-                                       exit 1
-                                       ;;
-                               *)
-                                       cpio_source="$arg"
-                                       build_list
-                                       ;;
-                       esac
-                       ;;
-       esac
-done
-
-# spit out the default cpio list if a source hasn't been specified
-[ -z "$cpio_source" -a -z "$default_list" ] && default_initramfs
-
-exit 0
diff --git a/target/initramfs/initramfs.mk b/target/initramfs/initramfs.mk
deleted file mode 100644 (file)
index cf1fcdb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#############################################################
-#
-# Make a initramfs_list file to be used by gen_init_cpio
-# gen_init_cpio is part of the 2.6 linux kernels to build an
-# initial ramdisk filesystem based on cpio
-#
-#############################################################
-
-define ROOTFS_INITRAMFS_INIT_SYMLINK
-       rm -f $(TARGET_DIR)/init
-       ln -s sbin/init $(TARGET_DIR)/init
-endef
-
-define ROOTFS_INITRAMFS_CMD
-       $(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $$@
-endef
-
-$(eval $(call ROOTFS_TARGET,initramfs))
\ No newline at end of file
diff --git a/target/iso9660/Config.in b/target/iso9660/Config.in
deleted file mode 100644 (file)
index ceee52f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-config BR2_TARGET_ROOTFS_ISO9660
-       bool "iso image"
-       depends on BR2_i386
-       depends on !BR2_KERNEL_none
-       select BR2_TARGET_ROOTFS_EXT2
-       select BR2_TARGET_GRUB
-       help
-         Build a bootable iso9660 image
-
-config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU
-       string "Boot menu.lst file"
-       depends on BR2_TARGET_ROOTFS_ISO9660
-       default "target/iso9660/menu.lst"
-
-comment "iso image requires a Linux kernel to be built"
-       depends on BR2_i386 && BR2_KERNEL_none
diff --git a/target/iso9660/iso9660.mk b/target/iso9660/iso9660.mk
deleted file mode 100644 (file)
index 66e2de2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################
-#
-# Build the iso96600 root filesystem image
-#
-# Cannot be converted to the ROOTFS_TARGET infrastructure, because of
-# the temporary construction in ISO9660_TARGET_DIR.
-#
-#############################################################
-
-ISO9660_TARGET_DIR=$(BUILD_DIR)/iso9660
-ISO9660_BOOT_MENU:=$(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
-ISO9660_OPTS:=
-
-ifeq ($(BR2_TARGET_ROOTFS_ISO9660_SQUASH),y)
-ISO9660_OPTS+=-U
-endif
-
-$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot $(LINUX_KERNEL) $(BINARIES_DIR)/rootfs.ext2 grub
-       @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660")
-       mkdir -p $(ISO9660_TARGET_DIR)
-       mkdir -p $(ISO9660_TARGET_DIR)/boot/grub
-       cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/
-       cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
-       cp $(LINUX_KERNEL) $(ISO9660_TARGET_DIR)/kernel
-       cp $(EXT2_TARGET) $(ISO9660_TARGET_DIR)/initrd
-       # Use fakeroot to pretend all target binaries are owned by root
-       rm -f $(FAKEROOT_SCRIPT)
-       touch $(BUILD_DIR)/.fakeroot.00000
-       cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT)
-       echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
-       # Use fakeroot so mkisofs believes the previous fakery
-       echo "$(HOST_DIR)/usr/bin/genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot " \
-               "-boot-load-size 4 -boot-info-table -o $@ $(ISO9660_TARGET_DIR)" \
-               >> $(FAKEROOT_SCRIPT)
-       chmod a+x $(FAKEROOT_SCRIPT)
-       $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT)
-       -@rm -f $(FAKEROOT_SCRIPT)
-       -@rm -rf $(ISO9660_TARGET_DIR)
-
-iso9660-root: $(BINARIES_DIR)/rootfs.iso9660
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_TARGET_ROOTFS_ISO9660),y)
-TARGETS+=iso9660-root
-endif
diff --git a/target/iso9660/menu.lst b/target/iso9660/menu.lst
deleted file mode 100644 (file)
index d78caeb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-default                0
-timeout                10
-color cyan/blue white/blue
-
-title          Hard Drive (first partition)
-rootnoverify   (hd0)
-chainloader    +1
-
-title          BuildRoot ISO9660 image
-kernel         /kernel
-initrd         /initrd
diff --git a/target/jffs2/Config.in b/target/jffs2/Config.in
deleted file mode 100644 (file)
index b787ec9..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-config BR2_TARGET_ROOTFS_JFFS2
-       bool "jffs2 root filesystem"
-       help
-         Build a jffs2 root filesystem
-
-if BR2_TARGET_ROOTFS_JFFS2
-
-choice
-       prompt "Flash Type"
-       default BR2_TARGET_ROOTFS_JFFS2_FLASH_128
-
-config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
-       bool "AT45 dataflash with 1056 byte pagesize"
-       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
-
-config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
-       bool "AT45 dataflash with 528 byte pagesize"
-       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
-
-config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
-       bool "NAND flash with 512B Page and 16 kB erasesize"
-       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
-
-config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
-       bool "NAND flash with 2kB Page and 128 kB erasesize"
-       select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
-
-config BR2_TARGET_ROOTFS_JFFS2_FLASH_128
-       bool "Parallel flash with 4 kB pagesize and 128 kB erase size"
-
-config BR2_TARGET_ROOTFS_JFFS2_FLASH_64
-       bool "Parallel flash with 4 kB pagesize and 64 kB erase size"
-
-config BR2_TARGET_ROOTFS_JFFS2_CUSTOM
-       bool "Select custom page and erase size"
-
-endchoice
-
-config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE
-       hex "Page Size"
-       depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM
-       default 0x1000
-       help
-         Set to pagesize of memory
-
-config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE
-       hex "Erase block size"
-       depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM
-       default 0x20000
-       help
-         Set to erase size of memory
-
-config BR2_TARGET_ROOTFS_JFFS2_PAGESIZE
-       hex
-       default 0x420 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
-       default 0x210 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
-       default 0x200 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
-       default 0x800 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
-       default 0x1000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128
-       default 0x1000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64
-       default $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE) if BR2_TARGET_ROOTFS_JFFS2_CUSTOM
-
-config BR2_TARGET_ROOTFS_JFFS2_EBSIZE
-       hex
-       default 0x2100 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
-       default 0x1080 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
-       default 0x4000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
-       default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
-       default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128
-       default 0x10000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64
-       default $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE) if BR2_TARGET_ROOTFS_JFFS2_CUSTOM
-
-config BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
-       bool "Do not use Cleanmarker"
-       default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056
-       default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528
-       default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K
-       default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K
-       help
-         Do not use cleanmarkers if using NAND flash or Dataflash where
-         the pagesize is not a power of 2
-
-config BR2_JFFS2_TARGET_SREC
-       bool "RootFS in SREC file formet"
-
-config BR2_TARGET_ROOTFS_JFFS2_PAD
-       bool "Pad output"
-
-config BR2_TARGET_ROOTFS_JFFS2_PADSIZE
-       hex "Pad output size (0x0 = to end of EB)"
-       depends on BR2_TARGET_ROOTFS_JFFS2_PAD
-       default 0x0
-       help
-         Set to 0x0 to pad to end of erase block.
-
-choice
-       prompt "Endianess"
-       default BR2_TARGET_ROOTFS_JFFS2_BE if BR2_alpha || BR2_armeb || \
-                       BR2_avr32 || BR2_m68k || BR2_mips || \
-                       BR2_powerpc || BR2_sh2a_nofpueb || BR2_sh2eb || \
-                       BR2_sh3eb || BR2_sh4eb || BR2_sparc || BR2_sparc64
-
-config BR2_TARGET_ROOTFS_JFFS2_LE
-       bool "little-endian"
-
-config BR2_TARGET_ROOTFS_JFFS2_BE
-       bool "big-endian"
-
-endchoice
-
-config BR2_TARGET_ROOTFS_JFFS2_SUMMARY
-       bool "Produce a summarized JFFS2 image"
-       help
-         A summarised image can be mounted faster if support is
-         enabled in the kernel (CONFIG_JFFS2_SUMMARY)
-
-endif
diff --git a/target/jffs2/jffs2root.mk b/target/jffs2/jffs2root.mk
deleted file mode 100644 (file)
index a0a563d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################
-#
-# Build the jffs2 root filesystem image
-#
-#############################################################
-
-JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
-SUMTOOL_OPTS := $(JFFS2_OPTS)
-
-ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
-ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
-JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
-else
-JFFS2_OPTS += -p
-endif
-SUMTOOL_OPTS += -p
-endif
-
-ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y)
-JFFS2_OPTS += -l
-SUMTOOL_OPTS += -l
-endif
-
-ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y)
-JFFS2_OPTS += -b
-SUMTOOL_OPTS += -b
-endif
-
-JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_PAGESIZE)
-ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y)
-JFFS2_OPTS += -n
-SUMTOOL_OPTS += -n
-endif
-
-ifneq ($(TARGET_DEVICE_TABLE),)
-JFFS2_OPTS += -D $(TARGET_DEVICE_TABLE)
-endif
-
-ROOTFS_JFFS2_DEPENDENCIES = host-mtd
-
-ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
-define ROOTFS_JFFS2_CMD
-       $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@.nosummary && \
-       $(SUMTOOL) $(SUMTOOL_OPTS) -i $$@.nosummary -o $$@ && \
-       rm $$@.nosummary
-endef
-else
-define ROOTFS_JFFS2_CMD
-       $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@
-endef
-endif
-
-define JFFS2_GEN_SREC
-       $(TARGET_CROSS)objcopy -I binary -O srec --adjust-vma 0xa1000000 $$@ $$@.srec
-endef
-
-ifeq ($(BR2_JFFS2_TARGET_SREC),y)
-ROOTFS_JFFS2_POST_GEN_HOOKS += JFFS2_GEN_SREC
-endif
-
-$(eval $(call ROOTFS_TARGET,jffs2))
\ No newline at end of file
diff --git a/target/romfs/Config.in b/target/romfs/Config.in
deleted file mode 100644 (file)
index 7a8c663..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-config BR2_TARGET_ROOTFS_ROMFS
-       bool "romfs root filesystem"
-       help
-         Build a romfs image of the root filesystem.
-
diff --git a/target/romfs/romfs.mk b/target/romfs/romfs.mk
deleted file mode 100644 (file)
index 9719478..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#############################################################
-#
-# Build the romfs root filesystem image
-#
-#############################################################
-
-ROMFS_TARGET=$(IMAGE).romfs
-
-ROOTFS_ROMFS_DEPENDENCIES = host-genromfs
-
-define ROOTFS_ROMFS_CMD
-       $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $$@
-endef
-
-$(eval $(call ROOTFS_TARGET,romfs))
\ No newline at end of file
diff --git a/target/squashfs/Config.in b/target/squashfs/Config.in
deleted file mode 100644 (file)
index 6cc8fca..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-config BR2_TARGET_ROOTFS_SQUASHFS
-       bool "squashfs root filesystem"
-       help
-         Build a squashfs root filesystem
diff --git a/target/squashfs/squashfsroot.mk b/target/squashfs/squashfsroot.mk
deleted file mode 100644 (file)
index d72388e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#############################################################
-#
-# Build the squashfs root filesystem image
-#
-#############################################################
-
-ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
-
-define ROOTFS_SQUASHFS_CMD
-       $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $$@ -noappend
-endef
-
-$(eval $(call ROOTFS_TARGET,squashfs))
\ No newline at end of file
diff --git a/target/tar/Config.in b/target/tar/Config.in
deleted file mode 100644 (file)
index 0adca79..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-config BR2_TARGET_ROOTFS_TAR
-       bool "tar the root filesystem"
-       help
-         Build a tar archive of the root filesystem
-
-choice
-       prompt "Compression method"
-       default BR2_TARGET_ROOTFS_TAR_NONE
-       depends on BR2_TARGET_ROOTFS_TAR
-       help
-         Select compressor for tar archive of the root filesystem
-
-config BR2_TARGET_ROOTFS_TAR_NONE
-       bool "no compression"
-       help
-        Do not compress the tarball.
-
-config BR2_TARGET_ROOTFS_TAR_GZIP
-       bool "gzip"
-       help
-        Do compress the tarball with gzip.
-        Note that you either have to have gzip installed on your host
-        or select to build a gzip for your host. See the packages submenu.
-
-config BR2_TARGET_ROOTFS_TAR_BZIP2
-       bool "bzip2"
-       help
-        Do compress the tarball with bzip2.
-        Note that you either have to have bzip2 installed on your host
-        or select to build a bzip2 for your host. See the packages submenu.
-
-config BR2_TARGET_ROOTFS_TAR_LZMA
-       bool "lzma"
-       help
-        Do compress the tarball with lzma.
-        Note that you either have to have lzma installed on your host
-        or select to build a lzma for your host. See the packages submenu.
-
-endchoice
-
-config BR2_TARGET_ROOTFS_TAR_OPTIONS
-       string "other random options to pass to tar"
-       depends on BR2_TARGET_ROOTFS_TAR
-       default ""
-       help
-         Any other flags you want to pass to tar
-         Refer to tar --help for details
diff --git a/target/tar/tarroot.mk b/target/tar/tarroot.mk
deleted file mode 100644 (file)
index 4d435cb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#############################################################
-#
-# tar to archive target filesystem
-#
-#############################################################
-
-TAR_OPTS:=$(BR2_TARGET_ROOTFS_TAR_OPTIONS)
-
-define ROOTFS_TAR_CMD
- tar -c$(TAR_OPTS)f $$@ -C $(TARGET_DIR) .
-endef
-
-$(eval $(call ROOTFS_TARGET,tar))
diff --git a/target/ubifs/Config.in b/target/ubifs/Config.in
deleted file mode 100644 (file)
index 9fa510e..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-config BR2_TARGET_ROOTFS_UBIFS
-       bool "ubifs root filesystem"
-       help
-         Build a ubifs root filesystem
-
-config BR2_TARGET_ROOTFS_UBIFS_LEBSIZE
-       hex "UBI logical erase block size"
-       depends on BR2_TARGET_ROOTFS_UBIFS
-       default 0x1f800
-
-config BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE
-       hex "UBI minimum I/O size"
-       depends on BR2_TARGET_ROOTFS_UBIFS
-       default 0x800
-       help
-         Some comment required here
-
-config BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT
-       int "Maximum LEB count"
-       depends on BR2_TARGET_ROOTFS_UBIFS
-       default 2048
-       help
-         Some comment required here
-
-choice
-       prompt "ubifs runtime compression"
-       default BR2_TARGET_ROOTFS_UBIFS_RT_LZO
-       depends on BR2_TARGET_ROOTFS_UBIFS
-       help
-         Select which compression format to use at run-time within
-         the ubifs file system.
-
-config BR2_TARGET_ROOTFS_UBIFS_RT_NONE
-       bool "no compression"
-       help
-         Don't use run-time compression.
-
-config BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB
-       bool "gzip"
-       help
-         Use zlib compression at run-time.
-
-config BR2_TARGET_ROOTFS_UBIFS_RT_LZO
-       bool "lzo"
-       help
-         Use lzo compression at run-time.
-
-endchoice
-
-choice
-       prompt "Compression method"
-       default BR2_TARGET_ROOTFS_UBIFS_NONE
-       depends on BR2_TARGET_ROOTFS_UBIFS
-       help
-         Select which compression format to compress the final image
-         into.
-
-config BR2_TARGET_ROOTFS_UBIFS_NONE
-       bool "no compression"
-       help
-         Do not compress the ubifs filesystem.
-
-config BR2_TARGET_ROOTFS_UBIFS_GZIP
-       bool "gzip"
-       help
-         Do compress the ubifs filesystem with gzip.
-         Note that you either have to have gzip installed on your
-         host or select to build a gzip for your host. See the
-         packages submenu.
-
-config BR2_TARGET_ROOTFS_UBIFS_BZIP2
-       bool "bzip2"
-       help
-         Do compress the ubifs filesystem with bzip2.
-         Note that you either have to have bzip2 installed on your
-         host or select to build a bzip2 for your host. See the
-         packages submenu.
-
-config BR2_TARGET_ROOTFS_UBIFS_LZMA
-       bool "lzma"
-       help
-         Do compress the ubifs filesystem with lzma.
-         Note that you either have to have lzma installed on your
-         host or select to build a lzma for your host. See the
-         packages submenu.
-
-endchoice
-
diff --git a/target/ubifs/ubifsroot.mk b/target/ubifs/ubifsroot.mk
deleted file mode 100644 (file)
index 0fad234..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#############################################################
-#
-# Build the ubifs root filesystem image
-#
-#############################################################
-
-UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
-
-ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB),y)
-UBIFS_OPTS += -x zlib
-endif
-ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_LZI),y)
-UBIFS_OPTS += -x lzo
-endif
-ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y)
-UBIFS_OPTS += -x none
-endif
-
-ROOTFS_UBIFS_DEPENDENCIES = host-mtd
-
-define ROOTFS_UBIFS_CMD
-       $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $$@
-endef
-
-$(eval $(call ROOTFS_TARGET,ubifs))
\ No newline at end of file