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

David Collier from_denx_uboot at dexdyne.com
Fri Oct 23 22:13:00 CEST 2009


Well I have got it working - but it seems to do exactly what you say it
doesn't

for instance 

LPNC U-Boot> printenv serialnumber
serialnumber=410
LPNC U-Boot> setexpr sn34 ${serialnumber} / 2
LPNC U-Boot> printenv sn34
sn34=208

so it looks like it works ONLY in hex -

yup

	a = simple_strtoul(argv[2], NULL, 16);
	b = simple_strtoul(argv[4], NULL, 16);

I'd like the decimal version like you described :-)

so I've defined setexprd to do that

David


More information about the U-Boot mailing list