summaryrefslogtreecommitdiffstats
path: root/target/linux/image
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/image')
-rw-r--r--target/linux/image/ar7/Makefile2
-rw-r--r--target/linux/image/aruba/Makefile2
-rw-r--r--target/linux/image/au1000/Makefile2
-rw-r--r--target/linux/image/brcm/Makefile2
-rw-r--r--target/linux/image/generic/Makefile2
-rw-r--r--target/linux/image/image.mk55
-rw-r--r--target/linux/image/jffs2.mk30
-rw-r--r--target/linux/image/jffs2/Makefile29
-rw-r--r--target/linux/image/jffs2/patches/gcc4-fix.patch24
-rw-r--r--target/linux/image/rb532/Makefile2
-rw-r--r--target/linux/image/squashfs.mk25
-rw-r--r--target/linux/image/squashfs/Makefile27
-rw-r--r--target/linux/image/squashfs/patches/100-lzma.patch25
-rw-r--r--target/linux/image/tgz.mk3
-rw-r--r--target/linux/image/x86/Makefile2
-rw-r--r--target/linux/image/xscale/Makefile2
16 files changed, 8 insertions, 226 deletions
diff --git a/target/linux/image/ar7/Makefile b/target/linux/image/ar7/Makefile
index 4ac6d3015..4b22f90df 100644
--- a/target/linux/image/ar7/Makefile
+++ b/target/linux/image/ar7/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader
diff --git a/target/linux/image/aruba/Makefile b/target/linux/image/aruba/Makefile
index c8dab056a..5091d3f40 100644
--- a/target/linux/image/aruba/Makefile
+++ b/target/linux/image/aruba/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
LOADADDR = 0x81000000 # RAM start + 16M
KERNEL_ENTRY = 0x80100000
diff --git a/target/linux/image/au1000/Makefile b/target/linux/image/au1000/Makefile
index 2607ed9eb..682670a22 100644
--- a/target/linux/image/au1000/Makefile
+++ b/target/linux/image/au1000/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
LOADADDR = 0x8108c8f4 # RAM start + 16M
KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile
diff --git a/target/linux/image/brcm/Makefile b/target/linux/image/brcm/Makefile
index df2a42ea5..d219dc354 100644
--- a/target/linux/image/brcm/Makefile
+++ b/target/linux/image/brcm/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
define Build/Compile
rm -f $(KDIR)/loader.gz
diff --git a/target/linux/image/generic/Makefile b/target/linux/image/generic/Makefile
index f87fb116d..b9efc95b9 100644
--- a/target/linux/image/generic/Makefile
+++ b/target/linux/image/generic/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
# use default targets for everything
diff --git a/target/linux/image/image.mk b/target/linux/image/image.mk
deleted file mode 100644
index 92143d64e..000000000
--- a/target/linux/image/image.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
-
-ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
-ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y)
-include $(TOPDIR)/target/linux/image/jffs2.mk
-endif
-
-ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y)
-include $(TOPDIR)/target/linux/image/squashfs.mk
-endif
-
-ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
-include $(TOPDIR)/target/linux/image/tgz.mk
-endif
-endif
-
-define Image/mkfs/prepare/default
- find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644
- find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755
- find $(BUILD_DIR)/root -type d | xargs chmod 0755
- mkdir -p $(BUILD_DIR)/root/tmp
- chmod 0777 $(BUILD_DIR)/root/tmp
-endef
-
-define Image/mkfs/prepare
- $(call Image/mkfs/prepare/default)
-endef
-
-define BuildImage
-compile:
- $(call Build/Compile)
-
-install:
- $(call Image/Prepare)
- $(call Image/mkfs/prepare)
- $(call Image/BuildKernel)
- $(call Image/mkfs/jffs2)
- $(call Image/mkfs/squashfs)
- $(call Image/mkfs/tgz)
-
-clean:
- $(call Build/Clean)
-endef
-
-compile-targets:
-install-targets:
-clean-targets:
-
-source:
-prepare:
-compile: compile-targets
-install: compile install-targets
-clean: clean-targets
diff --git a/target/linux/image/jffs2.mk b/target/linux/image/jffs2.mk
deleted file mode 100644
index a0e14daa9..000000000
--- a/target/linux/image/jffs2.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-ifneq ($(CONFIG_BIG_ENDIAN),y)
-JFFS2OPTS := --pad --little-endian --squash
-else
-JFFS2OPTS := --pad --big-endian --squash
-endif
-
-define Image/mkfs/jffs2
- rm -rf $(BUILD_DIR)/root/jffs
-
- $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root
- $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root
-
- $(call Image/Build,jffs2-64k)
- $(call Image/Build,jffs2-128k)
-endef
-
-jffs2-source: FORCE
- $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 source
-
-$(STAGING_DIR)/bin/mkfs.jffs2:
- $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile
-
-jffs2-clean: FORCE
- $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean
- rm -f $(KDIR)/root.jffs2*
-
-source: jffs2-source
-compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2
-clean-targets: jffs2-clean
-
diff --git a/target/linux/image/jffs2/Makefile b/target/linux/image/jffs2/Makefile
deleted file mode 100644
index b673c438a..000000000
--- a/target/linux/image/jffs2/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig
-MTD_SOURCE=mtd_20050122.orig.tar.gz
-MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd
-MTD_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338
-MKFS_JFFS2=$(MTD_DIR)/util/mkfs.jffs2
-
-$(DL_DIR)/$(MTD_SOURCE):
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(MTD_SOURCE) $(MTD_MD5SUM) $(MTD_SITE)
-
-$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE)
- zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- $(PATCH) $(MTD_DIR) ./patches
- touch $(MTD_DIR)/.unpacked
-
-$(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked
- $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
-
-$(STAGING_DIR)/bin/mkfs.jffs2: $(MTD_DIR)/util/mkfs.jffs2
- $(CP) $< $@
-
-source: $(DL_DIR)/$(MTD_SOURCE)
-prepare: $(MTD_DIR)/.unpacked
-compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2
-install:
-clean: FORCE
- rm -rf $(MTD_DIR) $(STAGING_DIR)/bin/mkfs.jffs2
-
diff --git a/target/linux/image/jffs2/patches/gcc4-fix.patch b/target/linux/image/jffs2/patches/gcc4-fix.patch
deleted file mode 100644
index 50c8edb47..000000000
--- a/target/linux/image/jffs2/patches/gcc4-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -urN mtd-20050122.orig.old/include/mtd/jffs2-user.h mtd-20050122.orig.dev/include/mtd/jffs2-user.h
---- mtd-20050122.orig.old/include/mtd/jffs2-user.h 2004-05-05 13:57:54.000000000 +0200
-+++ mtd-20050122.orig.dev/include/mtd/jffs2-user.h 2005-07-02 10:03:09.000000000 +0200
-@@ -19,8 +19,6 @@
- #undef je32_to_cpu
- #undef jemode_to_cpu
-
--extern int target_endian;
--
- #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); })
- #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); })
-
-diff -urN mtd.old/util/jffs3.h mtd.dev/util/jffs3.h
---- mtd.old/util/jffs3.h 2005-01-22 00:00:13.000000000 +0100
-+++ mtd.dev/util/jffs3.h 2005-07-17 17:48:24.000000000 +0200
-@@ -177,8 +177,6 @@
- #undef je32_to_cpu
- #undef jemode_to_cpu
-
--extern int target_endian;
--
- #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); })
- #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); })
-
diff --git a/target/linux/image/rb532/Makefile b/target/linux/image/rb532/Makefile
index ed419c8c6..53adfc432 100644
--- a/target/linux/image/rb532/Makefile
+++ b/target/linux/image/rb532/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
LOADADDR = 0x81000000 # RAM start + 16M
KERNEL_ENTRY = 0x80101000
diff --git a/target/linux/image/squashfs.mk b/target/linux/image/squashfs.mk
deleted file mode 100644
index e01766c0c..000000000
--- a/target/linux/image/squashfs.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-ifneq ($(CONFIG_BIG_ENDIAN),y)
-ENDIAN := le
-else
-ENDIAN := be
-endif
-
-squashfs-source: FORCE
- $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs source
-
-$(STAGING_DIR)/bin/mksquashfs-lzma:
- $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs compile
-
-squashfs-clean: FORCE
- $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs clean
- rm -f $(KDIR)/root.squashfs
-
-define Image/mkfs/squashfs
- @mkdir -p $(BUILD_DIR)/root/jffs
- $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned -$(ENDIAN)
- $(call Image/Build,squashfs)
-endef
-
-FILESYSTEMS += squashfs
-compile-targets: $(STAGING_DIR)/bin/mksquashfs-lzma
-clean-targets: squashfs-clean
diff --git a/target/linux/image/squashfs/Makefile b/target/linux/image/squashfs/Makefile
deleted file mode 100644
index a2b367187..000000000
--- a/target/linux/image/squashfs/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-SQUASHFSLZMA_DIR=$(BUILD_DIR)/squashfs3.0
-SQUASHFSLZMA_SOURCE=squashfs3.0.tar.gz
-SQUASHFSLZMA_SITE=@SF/squashfs
-SQUASHFSLZMA_MD5SUM=9fd05d0bfbb712f5fb95edafea5bc733
-
-$(DL_DIR)/$(SQUASHFSLZMA_SOURCE):
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SQUASHFSLZMA_SOURCE) $(SQUASHFSLZMA_MD5SUM) $(SQUASHFSLZMA_SITE)
-
-$(SQUASHFSLZMA_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE)
- zcat $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- $(PATCH) $(SQUASHFSLZMA_DIR) ./patches
- touch $(SQUASHFSLZMA_DIR)/.unpacked
-
-$(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/.unpacked
- $(MAKE) -C $(SQUASHFSLZMA_DIR)/squashfs-tools mksquashfs-lzma LZMAPATH=$(BUILD_DIR)/lzma
-
-$(STAGING_DIR)/bin/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma
- $(CP) $< $@
-
-source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE)
-prepare: $(SQUASHFSLZMA_DIR)/.unpacked
-compile: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma
-install:
-clean: FORCE
- rm -rf $(SQUASHFSLZMA_DIR)
diff --git a/target/linux/image/squashfs/patches/100-lzma.patch b/target/linux/image/squashfs/patches/100-lzma.patch
deleted file mode 100644
index 85aa21fb9..000000000
--- a/target/linux/image/squashfs/patches/100-lzma.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Nur squashfs3.0/squashfs-tools/Makefile squashfs3.0-owrt/squashfs-tools/Makefile
---- squashfs3.0/squashfs-tools/Makefile 2006-03-15 22:36:20.000000000 +0100
-+++ squashfs3.0-owrt/squashfs-tools/Makefile 2006-03-21 11:14:08.000000000 +0100
-@@ -1,4 +1,5 @@
- INCLUDEDIR = .
-+#LZMAPATH = ../lzma/SRC/7zip/Compress/LZMA_Lib
-
- CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2
-
-@@ -7,6 +8,9 @@
- mksquashfs: mksquashfs.o read_fs.o sort.o
- $(CC) mksquashfs.o read_fs.o sort.o -lz -o $@
-
-+mksquashfs-lzma: mksquashfs.o read_fs.o sort.o
-+ $(CXX) mksquashfs.o read_fs.o sort.o -L$(LZMAPATH) -llzma -o $@
-+
- mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h
-
- read_fs.o: read_fs.c squashfs_fs.h read_fs.h global.h
-@@ -17,3 +21,5 @@
- $(CC) unsquashfs.o -lz -o $@
-
- unsquashfs.o: unsquashfs.c squashfs_fs.h read_fs.h global.h
-+
-+clean:
diff --git a/target/linux/image/tgz.mk b/target/linux/image/tgz.mk
deleted file mode 100644
index 39adb6925..000000000
--- a/target/linux/image/tgz.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-define Image/mkfs/tgz
- tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ .
-endef
diff --git a/target/linux/image/x86/Makefile b/target/linux/image/x86/Makefile
index 69f9bf470..d76294f15 100644
--- a/target/linux/image/x86/Makefile
+++ b/target/linux/image/x86/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
define Image/Build
cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
diff --git a/target/linux/image/xscale/Makefile b/target/linux/image/xscale/Makefile
index 09616d409..d94d7f07c 100644
--- a/target/linux/image/xscale/Makefile
+++ b/target/linux/image/xscale/Makefile
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
define Image/Build
ifneq ($(FS),jffs2-64k)