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 <jakob.unterwurzacher@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
This commit is contained in:
parent
6c7010b779
commit
b32b1bd10b
@ -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
Block a user