[U-Boot] setting u-boot params based on serial number

Wolfgang Denk wd at denx.de
Fri Oct 23 23:05:11 CEST 2009


Dear "David Collier",

In message <memo.20091023213810.2092d at postmaster+dexdyne.com.cix.co.uk> you wrote:
> 
> serialnumber=1234
> set_mac_IP=setexprd sn34 ${serialnumber} % 100 ;setexprd sn12
> ${serialnumber} / 100; setenv ipaddr 10.212.${sn12}.${sn34}; setenv
> ethaddr 00:90:46:20:${sn12}:${sn34}; setenv eth1addr
> 00:90:46:21:${sn12}:${sn34}; setenv sn12 ; setenv sn34
> 
> that's seriously useful!

And it works the same when using "setexpr" ...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
COBOL is for morons.                                 -- E.W. Dijkstra


More information about the U-Boot mailing list