Re: Expose system Serial Number to userspace.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux