summaryrefslogtreecommitdiff
path: root/openwrt/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-09-22 13:38:05 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-09-22 13:38:05 +0000
commitc050c0c948413b390f703b0884e8f06b82c2debd (patch)
tree326669f86154b304bac5d0eb24d062976cd39596 /openwrt/target/linux
parent44791013dd9a3e6214eb639fdcc9d12cf9072f7c (diff)
downloadmtk-20170518-c050c0c948413b390f703b0884e8f06b82c2debd.zip
mtk-20170518-c050c0c948413b390f703b0884e8f06b82c2debd.tar.gz
mtk-20170518-c050c0c948413b390f703b0884e8f06b82c2debd.tar.bz2
fix permissions on image build
SVN-Revision: 1977
Diffstat (limited to 'openwrt/target/linux')
-rw-r--r--openwrt/target/linux/image/Makefile6
-rw-r--r--openwrt/target/linux/image/jffs2.mk4
-rw-r--r--openwrt/target/linux/image/squashfs.mk2
3 files changed, 9 insertions, 3 deletions
diff --git a/openwrt/target/linux/image/Makefile b/openwrt/target/linux/image/Makefile
index 74c778a..1e3e22f 100644
--- a/openwrt/target/linux/image/Makefile
+++ b/openwrt/target/linux/image/Makefile
@@ -25,6 +25,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:
diff --git a/openwrt/target/linux/image/jffs2.mk b/openwrt/target/linux/image/jffs2.mk
index a2c47e4..2a169ab 100644
--- a/openwrt/target/linux/image/jffs2.mk
+++ b/openwrt/target/linux/image/jffs2.mk
@@ -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
diff --git a/openwrt/target/linux/image/squashfs.mk b/openwrt/target/linux/image/squashfs.mk
index 42ff77d..3811567 100644
--- a/openwrt/target/linux/image/squashfs.mk
+++ b/openwrt/target/linux/image/squashfs.mk
@@ -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