[OpenWrt-Devel] [PATCH] x86_64: fix PARTUUID format with leading zeros

Matthias Schiffer mschiffer at universe-factory.net
Mon Mar 23 16:11:03 EDT 2015


Otherwise the root device won't be found in 1/16 of the generated images
(whenever the signature starts with a zero digit).

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 target/linux/x86_64/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/x86_64/image/Makefile b/target/linux/x86_64/image/Makefile
index e8d9ac1..cd80bb1 100644
--- a/target/linux/x86_64/image/Makefile
+++ b/target/linux/x86_64/image/Makefile
@@ -40,7 +40,7 @@ ifneq ($(GRUB_TERMINALS),)
   GRUB_TERMINAL_CONFIG := terminal_input $(GRUB_TERMINALS); terminal_output $(GRUB_TERMINALS)
 endif
 
-SIGNATURE:=$(shell dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump -v -e '"%02x"')
+SIGNATURE:=$(shell dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump -v -e '"%08x"')
 ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
 ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02)
 
-- 
2.3.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list