X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=include%2Fimage.mk;h=31689c7e6b8756baf2751a3cac7a8fec5a313199;hp=8d21f24c240d852259ed30588da42e484bb37fc8;hb=0178639777040135e88606e6af13942328a0cc3b;hpb=23c5f411265882be0bbfb0b6c270756a12e04338 diff --git a/include/image.mk b/include/image.mk index 8d21f24c24..31689c7e6b 100644 --- a/include/image.mk +++ b/include/image.mk @@ -244,8 +244,8 @@ endef define Image/mkfs/prepare/default # Use symbolic permissions to avoid clobbering SUID/SGID/sticky bits - - $(FIND) $(TARGET_DIR) -type f -not -perm +0100 -not -name 'ssh_host*' -not -name 'shadow' -print0 | $(XARGS) -0 chmod u+rw,g+r,o+r - - $(FIND) $(TARGET_DIR) -type f -perm +0100 -print0 | $(XARGS) -0 chmod u+rwx,g+rx,o+rx + - $(FIND) $(TARGET_DIR) -type f -not -perm /0100 -not -name 'ssh_host*' -not -name 'shadow' -print0 | $(XARGS) -0 chmod u+rw,g+r,o+r + - $(FIND) $(TARGET_DIR) -type f -perm /0100 -print0 | $(XARGS) -0 chmod u+rwx,g+rx,o+rx - $(FIND) $(TARGET_DIR) -type d -print0 | $(XARGS) -0 chmod u+rwx,g+rx,o+rx $(INSTALL_DIR) $(TARGET_DIR)/tmp $(TARGET_DIR)/overlay chmod 1777 $(TARGET_DIR)/tmp @@ -353,7 +353,10 @@ define Device/ExportVar $(1) : $(2):=$$($(2)) endef -Device/Export = $(foreach var,$(DEVICE_VARS) KERNEL,$(call Device/ExportVar,$(1),$(var))) +define Device/Export + $(foreach var,$(DEVICE_VARS) KERNEL KERNEL_INITRAMFS,$(call Device/ExportVar,$(1),$(var))) + $(1) : FILESYSTEM:=$(2) +endef define Device/Check _TARGET = $$(if $$(filter $(PROFILE),$$(PROFILES)),install,install-disabled) @@ -378,6 +381,7 @@ define Device/Build/check_size endef define Device/Build/kernel + $(KDIR)/$$(KERNEL_NAME): image_prepare $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE)) $(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE) cp $$^ $$@ @@ -389,14 +393,15 @@ endef define Device/Build/image $$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)) - $(eval $(call Device/Export,$(KDIR)/$(KERNEL_IMAGE))) - $(eval $(call Device/Export,$(KDIR)/$(KERNEL_INITRAMFS_IMAGE))) - $(eval $(call Device/Export,$(KDIR)/$(call IMAGE_NAME,$(1),$(2)))) + $(eval $(call Device/Export,$(KDIR)/$(KERNEL_IMAGE),$(1))) + $(eval $(call Device/Export,$(KDIR)/$(KERNEL_INITRAMFS_IMAGE),$(1))) + $(eval $(call Device/Export,$(KDIR)/$(call IMAGE_NAME,$(1),$(2)),$(1))) $(KDIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/$$(KERNEL_IMAGE) $(KDIR)/root.$(1) @rm -f $$@ [ -f $$(word 1,$$^) -a -f $$(word 2,$$^) ] $$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2)))) + .IGNORE: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)) $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/$(call IMAGE_NAME,$(1),$(2)) cp $$^ $$@