fix permissions on image build
authorFelix Fietkau <nbd@openwrt.org>
Thu, 22 Sep 2005 13:36:56 +0000 (13:36 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 22 Sep 2005 13:36:56 +0000 (13:36 +0000)
SVN-Revision: 1976

openwrt/target/linux/image/Makefile
openwrt/target/linux/image/jffs2.mk
openwrt/target/linux/image/squashfs.mk

index c0ff70929bae8cc63534945b611c370baece3bda..566afc30efd8b138e6d36c42936821bb8ab2a400 100644 (file)
@@ -21,6 +21,12 @@ install-ib:
        mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
        cp $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/      
 
+install-prepare:
+       find $(KDIR)/root -type f -not -perm +0100 | xargs chmod 0644
+       find $(KDIR)/root -type f -perm +0100 | xargs chmod 0755
+       find $(KDIR)/root -type d | xargs chmod 0755
+       chmod 0777 $(KDIR)/root/tmp
+
 rebuild: clean prepare compile install
 clean:
 
index a2c47e4dcd60b20a1e5c26a7743f38fb9c42f864..2a169ab320627b9f8563a8a524944b7593cf5343 100644 (file)
@@ -11,11 +11,11 @@ jffs2-clean:
        $(MAKE) -C jffs2 clean
        rm -f $(KDIR)/root.jffs2*
 
-$(KDIR)/root.jffs2-4MB:
+$(KDIR)/root.jffs2-4MB: install-prepare
        @rm -rf $(KDIR)/root/jffs
        $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $@ -d $(KDIR)/root
 
-$(KDIR)/root.jffs2-8MB:
+$(KDIR)/root.jffs2-8MB: install-prepare
        @rm -rf $(KDIR)/root/jffs
        $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(KDIR)/root
 
index 42ff77db6455e6643932fa8fea34d50eb8411f62..3811567a097070c753484ef8b06bddb4534bfef1 100644 (file)
@@ -8,7 +8,7 @@ squashfs-clean:
        $(MAKE) -C squashfs clean
        rm -f $(KDIR)/root.squashfs
 
-$(KDIR)/root.squashfs:
+$(KDIR)/root.squashfs: install-prepare
        @mkdir -p $(KDIR)/root/jffs
        $(STAGING_DIR)/bin/mksquashfs-lzma $(KDIR)/root $@ -nopad -noappend -root-owned -le