summaryrefslogtreecommitdiff
path: root/openwrt/target
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt/target')
-rw-r--r--openwrt/target/Config.in8
-rw-r--r--openwrt/target/linux/image/tgz.mk14
2 files changed, 22 insertions, 0 deletions
diff --git a/openwrt/target/Config.in b/openwrt/target/Config.in
index 5019b3d722..63d87aee3f 100644
--- a/openwrt/target/Config.in
+++ b/openwrt/target/Config.in
@@ -3,15 +3,23 @@ menu "Target Root Filesystem"
config BR2_TARGET_ROOTFS_JFFS2
bool "jffs2"
default y
+ depends BR2_mipsel
help
Build a jffs2 root filesystem
config BR2_TARGET_ROOTFS_SQUASHFS_LZMA
bool "squashfs-lzma"
default y
+ depends BR2_mipsel
help
Build a squashfs-lzma root filesystem
+ config BR2_TARGET_ROOTFS_TGZ
+ bool "tgz"
+ default y
+ help
+ Build a compressed tar archive of the kernel and the root filesystem
+
endmenu
menu "Kernel Configuration / Device Support"
diff --git a/openwrt/target/linux/image/tgz.mk b/openwrt/target/linux/image/tgz.mk
new file mode 100644
index 0000000000..850f5a6157
--- /dev/null
+++ b/openwrt/target/linux/image/tgz.mk
@@ -0,0 +1,14 @@
+$(KDIR)/vmlinux.gz: $(KDIR)/vmlinux
+ gzip -c -vf9 < $< > $@
+
+$(KDIR)/rootfs.tar.gz: $(KDIR)/vmlinux.gz
+ tar -cf $(KDIR)/rootfs.tar --owner=root --group=root -C $(KDIR)/ ./vmlinux.gz
+ tar -rf $(KDIR)/rootfs.tar --owner=root --group=root -C $(KDIR)/root/ .
+ gzip -f9 $(KDIR)/rootfs.tar
+
+tgz-install: $(KDIR)/rootfs.tar.gz
+ $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="tgz"
+
+prepare:
+compile:
+install: tgz-install