build: label kernel and rootfs ext4 volumes
authorYousong Zhou <yszhou4tech@gmail.com>
Sun, 3 Nov 2019 04:10:12 +0000 (04:10 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Sun, 3 Nov 2019 04:25:40 +0000 (04:25 +0000)
UUID of ext4 volumes generated by make_ext4fs are determined by volume
label and it will all be 57f8f4bc-abf4-655f-bf67-946fc0f9f25b when label
is empty

Labeling them does not make them unique but tools like block command
from fstools have a better chance differentiating them

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
include/image.mk
scripts/gen_image_generic.sh
target/linux/mvebu/image/Makefile

index 3e6c9adc661e85b39b437f82a3900bbe6f4268ef..940ae812ea950c8ddbc16a0532b5a903d532473c 100644 (file)
@@ -287,7 +287,7 @@ define Image/mkfs/ubifs
 endef
 
 define Image/mkfs/ext4
-       $(STAGING_DIR_HOST)/bin/make_ext4fs \
+       $(STAGING_DIR_HOST)/bin/make_ext4fs -L rootfs \
                -l $(ROOTFS_PARTSIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \
                $(if $(CONFIG_TARGET_EXT4_RESERVED_PCT),-m $(CONFIG_TARGET_EXT4_RESERVED_PCT)) \
                $(if $(CONFIG_TARGET_EXT4_JOURNAL),,-J) \
index d9beeb02953a224bdf6376966b368b47ff8a5331..2d2fb120ceadabc389ad76ca36e027f30262fef6 100755 (executable)
@@ -30,6 +30,6 @@ ROOTFSSIZE="$(($4 / 512))"
 [ -n "$PADDING" ] && dd if=/dev/zero of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc count="$ROOTFSSIZE"
 dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc
 
-make_ext4fs -J -l "$KERNELSIZE" "$OUTPUT.kernel" "$KERNELDIR"
+make_ext4fs -J -L kernel -l "$KERNELSIZE" "$OUTPUT.kernel" "$KERNELDIR"
 dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc
 rm -f "$OUTPUT.kernel"
index b4b77b70b4b8746f44a4ecb209b80711838284a0..967a1e4ee1525ec9db9197c3d5ac13a8ef1c1810 100644 (file)
@@ -38,7 +38,7 @@ define Build/boot-img-ext4
        $(foreach dts,$(DEVICE_DTS), $(CP) $(KDIR)/image-$(dts).dtb $@.boot/$(dts).dtb;)
        $(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME)
        -$(CP) $@-boot.scr $@.boot/boot.scr
-       make_ext4fs -J -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M $@.bootimg $@.boot
+       make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M $@.bootimg $@.boot
 endef
 
 define Build/sdcard-img