target/jffs2/blocksize.mk for setting block size (req. for wrt54g) squashfs removed...
authorMike Baker <mbm@openwrt.org>
Thu, 3 Mar 2005 02:44:10 +0000 (02:44 +0000)
committerMike Baker <mbm@openwrt.org>
Thu, 3 Mar 2005 02:44:10 +0000 (02:44 +0000)
SVN-Revision: 301

13 files changed:
openwrt/Makefile
openwrt/package/linux/kernel-patches/600-linux-squashfs-lzma.bz2 [new file with mode: 0644]
openwrt/package/linux/linux.config
openwrt/package/linux/linux.mk
openwrt/package/openwrt/trx.c
openwrt/scripts/configtest.pl [deleted file]
openwrt/target/Config.in
openwrt/target/Makefile.in
openwrt/target/jffs2/blocksize.mk [new file with mode: 0644]
openwrt/target/jffs2/jffs2root.mk
openwrt/target/squashfs-lzma/kernel-patch/linux-squashfs-lzma.bz2 [deleted file]
openwrt/target/squashfs/Config.in [deleted file]
openwrt/target/squashfs/squashfsroot.mk [deleted file]

index e490078bc5971123ac6b7a37fad3ad6e1eb175e1..bc69f2a1deaded8988579d9d9f31455dad6bbce6 100644 (file)
@@ -170,25 +170,21 @@ menuconfig: $(CONFIG)/mconf
        -touch .config
        -cp .config .config.test
        @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
-       -./scripts/configtest.pl
 
 config: $(CONFIG)/conf
        -touch .config
        -cp .config .config.test
        @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
-       -./scripts/configtest.pl
 
 oldconfig: $(CONFIG)/conf
        -touch .config
        -cp .config .config.test
        @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
-       -./scripts/configtest.pl
 
 randconfig: $(CONFIG)/conf
        -touch .config
        -cp .config .config.test
        @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
-       -./scripts/configtest.pl
 
 allyesconfig: $(CONFIG)/conf
        #@$(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
@@ -196,19 +192,16 @@ allyesconfig: $(CONFIG)/conf
        -touch .config
        -cp .config .config.test
        @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
-       -./scripts/configtest.pl
 
 allnoconfig: $(CONFIG)/conf
        -touch .config
        -cp .config .config.test
        @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
-       -./scripts/configtest.pl
 
 defconfig: $(CONFIG)/conf
        -touch .config
        -cp .config .config.test
        @$(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
-       -./scripts/configtest.pl
 
 #############################################################
 #
diff --git a/openwrt/package/linux/kernel-patches/600-linux-squashfs-lzma.bz2 b/openwrt/package/linux/kernel-patches/600-linux-squashfs-lzma.bz2
new file mode 100644 (file)
index 0000000..8e19292
Binary files /dev/null and b/openwrt/package/linux/kernel-patches/600-linux-squashfs-lzma.bz2 differ
index de477721ae1f57603ad54038c95bb8dc320f1017..761906ae5df63a87cb92387881ccb85ea4a37e75 100644 (file)
@@ -86,7 +86,7 @@ CONFIG_BCM4704=y
 # CONFIG_HIGHMEM is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
-CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,115200"
+CONFIG_CMDLINE="root=/dev/mtdblock2 init=/etc/preinit noinitrd console=ttyS0,115200"
 CONFIG_PCI=y
 CONFIG_NONCOHERENT_IO=y
 CONFIG_NEW_TIME_C=y
index bead2226a6af5b8d5a26c81d80008f582bf43254..6e3f7a4d270debec9219a73be738a8d35c86193b 100644 (file)
@@ -50,21 +50,13 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) $(DL_DIR)/$(LINKSYS_KERNEL_TGZ
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        $(PATCH) $(LINUX_DIR) $(LINUX_PATCHES)
-ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y)
-       $(PATCH) $(LINUX_DIR) target/squashfs-lzma/kernel-patch
-endif
        touch $(LINUX_DIR)/.patched
 
 $(LINUX_DIR)/.configured:  $(LINUX_DIR)/.patched
        -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
-ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y)
-       $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config
-endif
-ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS),y)
-       $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config
-endif
-       $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile
-       $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/arch/mips/Makefile
+       $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
+               $(LINUX_DIR)/Makefile \
+               $(LINUX_DIR)/arch/mips/Makefile
        $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h
        touch $(LINUX_DIR)/.configured
index d4ad600378ff99dfba2db36b99431311046420e2..79a04026ea2775ba329aef8e970cd68d39e3ba84 100644 (file)
@@ -170,7 +170,12 @@ int main(int argc, char **argv)
                                }
                                break;
                        case 'a':
-                               n = atoi(optarg);
+                               errno = 0;
+                               n = strtoul(optarg, &e, 0);
+                               if (errno || (e == optarg) || *e) {
+                                       fprintf(stderr, "illegal numeric string\n");
+                                       usage();
+                               }
                                if (cur_len & (n-1)) {
                                        n = n - (cur_len & (n-1));
                                        memset(buf + cur_len, 0, n);
@@ -178,7 +183,12 @@ int main(int argc, char **argv)
                                }
                                break;
                        case 'b':
-                               n = atoi(optarg);
+                               errno = 0;
+                               n = strtoul(optarg, &e, 0);
+                               if (errno || (e == optarg) || *e) {
+                                       fprintf(stderr, "illegal numeric string\n");
+                                       usage();
+                               }
                                if (n < cur_len) {
                                        fprintf(stderr, "WARNING: current length exceeds -b %d offset\n",n);
                                } else {
diff --git a/openwrt/scripts/configtest.pl b/openwrt/scripts/configtest.pl
deleted file mode 100755 (executable)
index 61fe8a7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/perl
-
-my %change = (
-       'ROOTFS' => 'make linux-dirclean'
-);
-
-foreach my $change (keys %change) {
-       my $v1 = `grep '$change' .config.test`;
-       my $v2 = `grep '$change' .config`;
-       $v1 eq $v2 or system($change{$change});
-}
index 36616f07b8d61e2b0a275bc2bf218a7189819f83..1a997da2a652d434a1de0b4c7320fe3e719ce5aa 100644 (file)
@@ -1,7 +1,6 @@
 choice
        prompt "Target Root Filesystem"
        source "target/jffs2/Config.in"
-       source "target/squashfs/Config.in"
        source "target/squashfs-lzma/Config.in"
 endchoice
 
index 15cf6bdedeee7eea1f4952c8be20524e235b4855..22cd7a4208ed34a3dc336ee9586a84c59bb3604b 100644 (file)
@@ -6,7 +6,8 @@ TARGET_SKEL_DIR=target/default/target_skeleton
 include target/device/Makefile.in
 
 ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
-JFFS2FLAGS+=-a 131072
+include target/jffs2/blocksize.mk
+JFFS2FLAGS+=-a $(JFFS2_BLOCK_SIZE) 
 endif
 
 
diff --git a/openwrt/target/jffs2/blocksize.mk b/openwrt/target/jffs2/blocksize.mk
new file mode 100644 (file)
index 0000000..9e08a04
--- /dev/null
@@ -0,0 +1 @@
+JFFS2_BLOCK_SIZE:=0x20000
index 92dad0e57c03e2968dcaa0ca9b1453a849790ad2..9846d001f04c090d9563cf83a87b9226ff07057e 100644 (file)
@@ -4,6 +4,8 @@
 #
 #############################################################
 
+include target/jffs2/blocksize.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
@@ -32,7 +34,7 @@ jffs2root: mtd
        -@find $(TARGET_DIR) -type f -perm +111 | xargs $(SSTRIP) 2>/dev/null || true;
        @rm -rf $(TARGET_DIR)/usr/man
        @rm -rf $(TARGET_DIR)/usr/info
-       $(MKFS_JFFS2) --pad --little-endian --squash -e 0x20000 \
+       $(MKFS_JFFS2) --pad --little-endian --squash -e $(JFFS2_BLOCK_SIZE) \
                -d $(TARGET_DIR) -o $(IMAGE).jffs2
 
 jffs2root-source: $(DL_DIR)/$(MTD_SOURCE)
diff --git a/openwrt/target/squashfs-lzma/kernel-patch/linux-squashfs-lzma.bz2 b/openwrt/target/squashfs-lzma/kernel-patch/linux-squashfs-lzma.bz2
deleted file mode 100644 (file)
index 8e19292..0000000
Binary files a/openwrt/target/squashfs-lzma/kernel-patch/linux-squashfs-lzma.bz2 and /dev/null differ
diff --git a/openwrt/target/squashfs/Config.in b/openwrt/target/squashfs/Config.in
deleted file mode 100644 (file)
index 6f1d709..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-config BR2_TARGET_ROOTFS_SQUASHFS
-       bool "squashfs"
-       help
-         Build a squashfs root filesystem
-
diff --git a/openwrt/target/squashfs/squashfsroot.mk b/openwrt/target/squashfs/squashfsroot.mk
deleted file mode 100644 (file)
index d3a104a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################
-#
-# squashfs target 
-# 
-#############################################################
-
-SQUASHFS_DIR=$(BUILD_DIR)/squashfs2.1-r2
-SQUASHFS_SOURCE=squashfs2.1-r2.tar.gz
-SQUASHFS_SITE=http://dl.sourceforge.net/sourceforge/squashfs
-
-$(DL_DIR)/$(SQUASHFS_SOURCE):
-       $(WGET) -P $(DL_DIR) $(SQUASHFS_SITE)/$(SQUASHFS_SOURCE)
-
-$(SQUASHFS_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFS_SOURCE) 
-       zcat $(DL_DIR)/$(SQUASHFS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
-       touch $(SQUASHFS_DIR)/.unpacked
-
-$(SQUASHFS_DIR)/squashfs-tools/mksquashfs: $(SQUASHFS_DIR)/.unpacked
-       $(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools;
-
-squashfs: $(SQUASHFS_DIR)/squashfs-tools/mksquashfs
-       
-squashfs-source: $(DL_DIR)/$(SQUASHFS_SOURCE)
-
-squashfs-clean:
-       -$(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools clean
-
-squashfs-dirclean:
-       rm -rf $(SQUASHFS_DIR)
-
-
-#############################################################
-#
-# Build the squashfs root filesystem image
-#
-#############################################################
-
-squashfsroot: squashfs
-       @rm -rf $(TARGET_DIR)/usr/man
-       @rm -rf $(TARGET_DIR)/usr/info
-       $(SQUASHFS_DIR)/squashfs-tools/mksquashfs $(TARGET_DIR) $(IMAGE).squashfs -noappend -root-owned -le
-
-squashfsroot-source: squashfs-source
-
-squashfsroot-clean:
-       -$(MAKE) -C $(SQUASHFS_DIR) clean
-
-squashfsroot-dirclean:
-       rm -rf $(SQUASHFS_DIR)
-
-ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS)),y)
-TARGETS+=squashfsroot openwrt-image
-ROOTFS=squashfs
-endif