[U-Boot] [PATCH v2 3/3] warp7: Set u-boot serial# based on OTP value

Fabio Estevam festevam at gmail.com
Tue Mar 13 15:53:39 UTC 2018


On Tue, Mar 13, 2018 at 12:48 PM, Bryan O'Donoghue
<bryan.odonoghue at linaro.org> wrote:
> u-boot has a standard "serial#" environment variable that is suitable
> for storing the iSerial number we will supply via the USB device
> descriptor. serial# is automatically picked up by the disk subsystem in
> u-boot - thus providing a handy unique identifier in /dev/disk/by-id as
> detailed below.
>
> Storing the hardware serial identifier in serial# means we can change the
> serial# if we want before USB enumeration - thus making iSerial automatic
> via OTP but overridable if necessary.
>
> This patch reads the defined OTP fuse and sets environment variable
> "serial#" to the value read.
>
> With this patch in place the USB mass storage device will appear in
> /dev/disk/by-id with a unique name based on the OTP value. For example
>
> /dev/disk/by-id/usb-Linux_UMS_disk_0_WaRP7-0xf42400d3000001d4-0:0
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org>
> Cc: Fabio Estevam <fabio.estevam at nxp.com>
> Cc: Rui Miguel Silva <rui.silva at linaro.org>
> Cc: Ryan Harkin <ryan.harkin at linaro.org>

Reviewed-by: Fabio Estevam <fabio.estevam at nxp.com>


More information about the U-Boot mailing list