UPSTREAM: 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. Change-Id: Ie1b53d75468ac9ae6ac3298ed54a4e7b5e6bea9a Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit b32b1bd10b86d01a26056f50de89f768e5183ed1)
This commit is contained in:
parent
995085a9d5
commit
7cc0da0b68
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue