aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86/image
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-03-24 21:06:57 -1000
committerPetr Štetiar <ynezz@true.cz>2020-03-28 13:03:02 +0100
commit6fcca31fc3c3ddaa5e085fdf643892d31f29ab93 (patch)
tree50ae6dfded09fd7874fecf2d4be92033ab9d0cf7 /target/linux/x86/image
parent2785d003d3bce8d1039a3169564a231e06ddef9c (diff)
downloadupstream-6fcca31fc3c3ddaa5e085fdf643892d31f29ab93.tar.gz
upstream-6fcca31fc3c3ddaa5e085fdf643892d31f29ab93.tar.bz2
upstream-6fcca31fc3c3ddaa5e085fdf643892d31f29ab93.zip
x86: fix padding in images
The previous rework of x86 image creation done in commit cb007a7bf619 ("x86: switch image generation to new code") broke the padding in images. sda: p2 size 212992 extends beyond EOD, enabling native capacity sda: p2 size 212992 extends beyond EOD, truncated sd 0:0:0:0: [sda] Attached SCSI disk SQUASHFS error: squashfs_read_data failed to read block 0x2cc556 unable to read id index table VFS: Cannot open root device "PARTUUID=ac5c9cd8-02" or unknown-block(8,2): error -5 Please append a correct "root=" boot option; here are the available partitions: 0800 19761 sda driver: sd 0801 16384 sda1 ac5c9cd8-01 0802 2865 sda2 ac5c9cd8-02 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2) Tested with x86/64 with Docker (squashfs), qemustart (ext4/squashfs) and virtualbox (ext4/squashfs). Ref: FS#2935 Fixes: cb007a7bf619 ("x86: switch image generation to new code") Suggested-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Paul Spooren <mail@aparcar.org> [commit subject and description tweaks] Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'target/linux/x86/image')
-rw-r--r--target/linux/x86/image/Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index c2961e5b9c..c29eef9c7a 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)" $(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