[OpenWrt-Devel] [PATCH] x86: fix offer f2fs/ext4 based overlays

Tomasz Maciej Nowak tomek_n at o2.pl
Wed Mar 25 10:27:48 EDT 2020


Hi Paul.

W dniu 25.03.2020 o 05:58, Paul Spooren pisze:
> With the recent rework of the x86 image creation the f2fs/ext4 based
> overlays dissappeared as their are not copied by default.
> 
> This commit follows the implementation of malta and armvirt to copy the
> overlays as well.
> 
> Signed-off-by: Paul Spooren <mail at aparcar.org>
> ---
>  target/linux/x86/image/Makefile | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
> index c2961e5b9c..81a8f73efc 100644
> --- a/target/linux/x86/image/Makefile
> +++ b/target/linux/x86/image/Makefile
> @@ -118,6 +118,10 @@ define Device/Default
>    endif
>  endef
>  
> +define Image/Build/gzip
> +	gzip -f9n $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
> +endef
> +
>  $(eval $(call Image/gzip-ext4-padded-squashfs))
>  
>  ifeq ($(SUBTARGET),64)
> @@ -136,5 +140,11 @@ ifeq ($(SUBTARGET),legacy)
>    include legacy.mk
>  endif
>  
> +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))
>  

To be in line with current image generation, I think this would look better:

--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -99,10 +99,12 @@ define Device/Default
   IMAGE/combined.img.gz := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | gzip
   IMAGE/combined.vdi := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | qemu-image vdi
   IMAGE/combined.vmdk := append-rootfs | pad-extra 128k | grub-config pc | combined | grub-install | qemu-image vmdk
+  IMAGE/rootfs.img := append-rootfs
+  IMAGE/rootfs.img.gz := append-rootfs
   ifeq ($(CONFIG_TARGET_IMAGES_GZIP),y)
-    IMAGES := combined.img.gz
+    IMAGES := combined.img.gz rootfs.img.gz
   else
-    IMAGES := combined.img
+    IMAGES := combined.img rootfs.img
   endif
   KERNEL := kernel-bin
   KERNEL_INSTALL := 1

-- 
TMN

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list