x86: stop relying on hexdump for image build signature
authorFelix Fietkau <nbd@nbd.name>
Sun, 3 Jul 2016 16:39:08 +0000 (18:39 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sun, 3 Jul 2016 16:39:11 +0000 (18:39 +0200)
Use perl to generate random number instead.
See https://github.com/freifunk-gluon/gluon/issues/811

Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/x86/image/Makefile

index d33d1b4fa3d982958c5381b6a9b745f3383510c0..93b7fca2b7c952f0a37710b33660f20a91f04b6d 100644 (file)
@@ -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 '"%08x"')
+SIGNATURE:=$(shell perl -e 'printf("%08x", rand(0xFFFFFFFF))')
 ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
 ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02)