[OpenWrt-Devel] [PATCH] x86: fix virutalbox squashfs images
Daniel Golle
daniel at makrotopia.org
Wed Mar 25 09:18:50 EDT 2020
Hi,
On Wed, Mar 25, 2020 at 12:45:08PM +0100, mail at adrianschmutzler.de wrote:
> Hi,
>
> > -----Original Message-----
> > From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> > On Behalf Of Paul Spooren
> > Sent: Mittwoch, 25. März 2020 08:07
> > To: openwrt-devel at lists.openwrt.org
> > Cc: russell at personaltelco.net
> > Subject: [OpenWrt-Devel] [PATCH] x86: fix virutalbox squashfs images
> >
> > The previous rework of x86 image creation broke the `vdi` images. ussell
>
> typo in title and missing "R" in name directly above.
>
> Best
>
> Adrian
>
> > Senior <russell at personaltelco.net> came up with this patch to fix the
> > padding.
> >
> > Tested with x86/64 with Docker (squashfs), qemustart (ext4/squashfs) and
> > virtualbox (ext4/squashfs).
> >
> > Signed-off-by: Paul Spooren <mail at aparcar.org>
> > ---
> > target/linux/x86/image/Makefile | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/target/linux/x86/image/Makefile
> > b/target/linux/x86/image/Makefile index 81a8f73efc..6d12494f54 100644
> > --- a/target/linux/x86/image/Makefile
> > +++ b/target/linux/x86/image/Makefile
> > @@ -47,7 +47,7 @@ BOOTOPTS:=$(call qstrip,$(CONFIG_GRUB_BOOTOPTS))
> > define Build/combined
> > $(CP) $(KDIR)/$(KERNEL_NAME) $@.boot/boot/vmlinuz
> > -$(CP) $(STAGING_DIR_ROOT)/boot/. $@.boot/boot/
> > - PADDING="$(CONFIG_TARGET_IMAGES_PAD)"
> > SIGNATURE="$(IMG_PART_SIGNATURE)"
> > $(SCRIPT_DIR)/gen_image_generic.sh \
> > + PADDING="1" SIGNATURE="$(IMG_PART_SIGNATURE)"
Enabling padding unconditionally wastes space on targets which do not
need it (ie. small size NOR flash devices).
Looks like you should rather fix the logic setting
CONFIG_TARGET_IMAGE_PAD.
> > +$(SCRIPT_DIR)/gen_image_generic.sh \
> > $@ \
> > $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
> > $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
> > @@ -95,10 +95,10 @@ endef DEVICE_VARS += GRUB2_VARIANT define
> > Device/Default
> > ARTIFACT/image.iso := grub-config iso | iso
> > - IMAGE/combined.img := append-rootfs | pad-extra 128k | grub-config pc |
> > combined | grub-install
> > - 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/combined.img := grub-config pc | combined | grub-install
> > + IMAGE/combined.img.gz := grub-config pc | combined | grub-install |
> > + gzip IMAGE/combined.vdi := grub-config pc | combined | grub-install |
> > + qemu-image vdi IMAGE/combined.vmdk := grub-config pc | combined |
> > + grub-install | qemu-image vmdk
> > ifeq ($(CONFIG_TARGET_IMAGES_GZIP),y)
> > IMAGES := combined.img.gz
> > else
> > --
> > 2.25.1
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
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