image.mk: Generate cpiogz with root-owned files
[openwrt/openwrt.git] / include / image.mk
index 8f55627390f93a82d505cab35c954aba20eb7079..84b46f256cf5ac92b8c92fca2983402794468008 100644 (file)
@@ -277,7 +277,7 @@ endif
 
 ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
   define Image/Build/cpiogz
-       ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
+       ( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
   endef
 endif