From: Brad Arnold <brad@check-it.ca>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: linux-embedded@vger.kernel.org
Subject: RE: Expose system Serial Number to userspace.
Date: Wed, 29 Aug 2012 10:57:25 -0600 [thread overview]
Message-ID: <75d49b059819c35d03995bd86e72d6fb@mail.gmail.com> (raw)
In-Reply-To: <503E3DDB.8050708@gmail.com>
That'll help me move along. I'm currently storing the mac and serial in
the u-boot environment, but I was thinking I might want to move those two
to the OTP. But at least having some level of write protection in u-boot
is nice. I wasn't aware that this existed, because it's disabled by
default in the config for Marvell boards.
I'll have to look at that example program futher...
Brad
-----Original Message-----
From: Marco Stornelli [mailto:marco.stornelli@gmail.com]
Sent: August-29-12 10:06 AM
To: Brad Arnold
Cc: linux-embedded@vger.kernel.org
Subject: Re: Expose system Serial Number to userspace.
Il 29/08/2012 17:18, Brad Arnold ha scritto:
> Hi,
>
> I'm working on an embedded board which uses u-boot + linux. At
> manufacturing time, the device serial number will be programmed into
> OTP memory on NAND (probably from within u-boot). We'd like the linux
> kernel to make this serial number available to be read from userspace.
> Is there an accepted method to do this sort of thing?
>
> One idea I had was to make the serial number available as a device
> node
> (ie: you can simply read the serial number from "/dev/serialnumber").
> Then there's the question of how the kernel learns the serial in the
> first place (a kernel boot command like parameter passed from u-boot?).
>
> Does this sound sane, or is there a better way to do something like
this?
>
> Thanks,
>
> Brad
U-Boot manage a serial number via env variable "serial#". It provides
several tools. You'll find under tools/env applications to read/write env
variable of uboot, so reading from Linux is very simple. You should use a
dedicated little space of flash to store the env variables.
Regards,
Marco
next prev parent reply other threads:[~2012-08-29 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 15:18 Expose system Serial Number to userspace Brad Arnold
2012-08-29 15:50 ` Nicolas Pitre
2012-08-29 16:53 ` Brad Arnold
2012-08-29 20:47 ` Brad Arnold
2012-08-29 20:52 ` Nicolas Pitre
2012-08-29 16:05 ` Marco Stornelli
2012-08-29 16:57 ` Brad Arnold [this message]
2012-08-29 17:07 ` Marco Stornelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=75d49b059819c35d03995bd86e72d6fb@mail.gmail.com \
--to=brad@check-it.ca \
--cc=linux-embedded@vger.kernel.org \
--cc=marco.stornelli@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.