All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] rockchip: rk3399-puma: preserve leading zeros in serial#
@ 2017-12-07 15:20 Jakob Unterwurzacher
  2017-12-07 15:31 ` Dr. Philipp Tomsich
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jakob Unterwurzacher @ 2017-12-07 15:20 UTC (permalink / raw)
  To: u-boot

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>
---

 board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 26c4535f1b..737206ae0f 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), "%016llx", serialno);
 
 	env_set("cpuid#", cpuid_str);
 	env_set("serial#", serialno_str);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] rockchip: rk3399-puma: preserve leading zeros in serial#
  2017-12-07 15:20 [U-Boot] [PATCH] rockchip: rk3399-puma: preserve leading zeros in serial# Jakob Unterwurzacher
@ 2017-12-07 15:31 ` Dr. Philipp Tomsich
  2017-12-07 20:14 ` [U-Boot] " Philipp Tomsich
  2017-12-07 20:39 ` Philipp Tomsich
  2 siblings, 0 replies; 4+ messages in thread
From: Dr. Philipp Tomsich @ 2017-12-07 15:31 UTC (permalink / raw)
  To: u-boot


> On 7 Dec 2017, at 16:20, Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> wrote:
> 
> 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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] rockchip: rk3399-puma: preserve leading zeros in serial#
  2017-12-07 15:20 [U-Boot] [PATCH] rockchip: rk3399-puma: preserve leading zeros in serial# Jakob Unterwurzacher
  2017-12-07 15:31 ` Dr. Philipp Tomsich
@ 2017-12-07 20:14 ` Philipp Tomsich
  2017-12-07 20:39 ` Philipp Tomsich
  2 siblings, 0 replies; 4+ messages in thread
From: Philipp Tomsich @ 2017-12-07 20:14 UTC (permalink / raw)
  To: u-boot

> 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>
> ---
> 
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] rockchip: rk3399-puma: preserve leading zeros in serial#
  2017-12-07 15:20 [U-Boot] [PATCH] rockchip: rk3399-puma: preserve leading zeros in serial# Jakob Unterwurzacher
  2017-12-07 15:31 ` Dr. Philipp Tomsich
  2017-12-07 20:14 ` [U-Boot] " Philipp Tomsich
@ 2017-12-07 20:39 ` Philipp Tomsich
  2 siblings, 0 replies; 4+ messages in thread
From: Philipp Tomsich @ 2017-12-07 20:39 UTC (permalink / raw)
  To: u-boot

> 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>
> ---
> 
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-07 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 15:20 [U-Boot] [PATCH] rockchip: rk3399-puma: preserve leading zeros in serial# Jakob Unterwurzacher
2017-12-07 15:31 ` Dr. Philipp Tomsich
2017-12-07 20:14 ` [U-Boot] " Philipp Tomsich
2017-12-07 20:39 ` Philipp Tomsich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.