diff options
author | Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> | 2017-12-07 14:23:34 +0100 |
---|---|---|
committer | Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> | 2017-12-07 14:25:43 +0100 |
commit | e700ccda32b05e27eb4279e8db21728af88f350b (patch) | |
tree | 06dd904f737cb5c1a3c4dcd707e51ef742e03de6 | |
parent | 47386b55072dd55f1e852f38fe5676a1f432b7b8 (diff) |
rockchip: puma_rk3399: 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>
-rw-r--r-- | board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 26c4535f1b..c9768dd75c 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -138,7 +138,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), "%0llx", serialno); env_set("cpuid#", cpuid_str); env_set("serial#", serialno_str); |