mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
53f4a686aa
Current snapshot images doesn't provide images with usable overlay filesystems: mount_root: no usable overlay filesystem found, using tmpfs overlay So this patch fixes this by updating support to current f2fs/ext4 based overlays and providing squashfs with proper rootfs TARGET_ROOTFS_PARTSIZE size. While at it, I've also added support for optional gzipping of the images, and renamed the output rootfs image filenames to match the more common naming pattern $(IMG_PREFIX)-rootfs-$(FS-TYPE).img. Cc: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
35 lines
844 B
Makefile
35 lines
844 B
Makefile
#
|
|
# Copyright (C) 2016-2017 Yousong Zhou <yszhou4tech@gmail.com>
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
define Image/BuildKernel
|
|
$(foreach k,$(filter zImage Image,$(KERNELNAME)), \
|
|
cp $(KDIR)/$(KERNELNAME) $(BIN_DIR)/$(IMG_PREFIX)-$(k) \
|
|
)
|
|
endef
|
|
|
|
define Image/Build/Initramfs
|
|
$(foreach k,$(filter zImage Image,$(KERNELNAME)), \
|
|
cp $(KDIR)/$(k)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(k)-initramfs \
|
|
)
|
|
endef
|
|
|
|
define Image/Build/gzip
|
|
gzip -f9n $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
|
|
endef
|
|
|
|
$(eval $(call Image/gzip-ext4-padded-squashfs))
|
|
|
|
define Image/Build
|
|
$(call Image/Build/$(1))
|
|
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
|
|
$(call Image/Build/gzip/$(1))
|
|
endef
|
|
|
|
$(eval $(call BuildImage))
|