From: Jakob Unterwurzacher Date: Thu, 7 Dec 2017 15:20:44 +0000 (+0100) Subject: rockchip: rk3399-puma: preserve leading zeros in serial# X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=b32b1bd10b86d01a26056f50de89f768e5183ed1;p=u-boot.git rockchip: rk3399-puma: preserve leading zeros in serial# Linux preserves leading zeros in /proc/cpuinfo, so we should as well. Otherwise we have the situation that /sys/firmware/devicetree/base/serial-number and /proc/cpuinfo disagree in Linux. Signed-off-by: Jakob Unterwurzacher Reviewed-by: Philipp Tomsich Acked-by: Philipp Tomsich --- diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 0ad267cdd0..27e3823d52 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -173,7 +173,7 @@ static void setup_serial(void) serialno = crc32_no_comp(0, low, 8); serialno |= (u64)crc32_no_comp(serialno, high, 8) << 32; - snprintf(serialno_str, sizeof(serialno_str), "%llx", serialno); + snprintf(serialno_str, sizeof(serialno_str), "%016llx", serialno); env_set("cpuid#", cpuid_str); env_set("serial#", serialno_str);