bugfix
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 26 Feb 2005 02:32:16 +0000 (02:32 +0000)
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 26 Feb 2005 02:32:16 +0000 (02:32 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@294 3c298f89-4303-0410-b956-a3cf2f4a3e73

openwrt/Makefile
openwrt/package/openwrt/jffs2root.c
openwrt/target/default/target_skeleton/etc/preinit
openwrt/target/squashfs-lzma/squashfslzmaroot.mk
openwrt/target/squashfs/squashfsroot.mk

index dfa2721..b8c9b10 100644 (file)
@@ -118,6 +118,8 @@ $(TARGET_DIR):
        fi;
        -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf
        -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf
+       -ln -sf /tmp/resolv.conf $(TARGET_DIR)
+       -mkdir -p $(TARGET_DIR)/jffs
 
 source: $(TARGETS_SOURCE)
 
index e74c89a..2ff37fd 100644 (file)
@@ -48,7 +48,10 @@ void init_crc32()
     unsigned long crc;
     unsigned long poly = 0xEDB88320L;
     int n, bit;
-    crc32 = (unsigned long *) malloc(256 * sizeof(unsigned long));
+    if ((crc32 = (unsigned long *) malloc(256 * sizeof(unsigned long))) == (void *)-1) {
+           perror("malloc");
+           exit(1);
+    }
     for (n = 0; n < 256; n++) {
        crc = (unsigned long) n;
        for (bit = 0; bit < 8; bit++)
index d2036f4..28fe805 100755 (executable)
@@ -11,10 +11,10 @@ else
     mtd unlock mtd4
     mount -t jffs2 /dev/mtdblock/4 /jffs
     pivot_root /jffs /jffs/rom
-    mount none /dev -t devfs
-    mount none /proc -t proc
-    umount rom/proc
   }
+  mount none /dev -t devfs
+  mount none /proc -t proc
+  umount rom/proc
 fi
 mount none /tmp -t ramfs
 exec /sbin/init
index 4059896..722c205 100644 (file)
@@ -39,7 +39,6 @@ squashfslzma-dirclean:
 squashfslzmaroot: squashfslzma
        @rm -rf $(TARGET_DIR)/usr/man
        @rm -rf $(TARGET_DIR)/usr/info
-       @mkdir -p $(TARGET_DIR)/jffs
        $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(TARGET_DIR) $(IMAGE).squashfslzma -noappend -root-owned -le
 
 squashfslzmaroot-source: squashfslzma-source
index 62b645a..d3a104a 100644 (file)
@@ -38,7 +38,6 @@ squashfs-dirclean:
 squashfsroot: squashfs
        @rm -rf $(TARGET_DIR)/usr/man
        @rm -rf $(TARGET_DIR)/usr/info
-       @mkdir -p $(TARGET_DIR)/jffs
        $(SQUASHFS_DIR)/squashfs-tools/mksquashfs $(TARGET_DIR) $(IMAGE).squashfs -noappend -root-owned -le
 
 squashfsroot-source: squashfs-source