All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] setting u-boot params based on serial number
Date: Fri, 23 Oct 2009 23:04:21 +0200	[thread overview]
Message-ID: <20091023210421.4AEBCE398E1@gemini.denx.de> (raw)
In-Reply-To: <memo.20091023211352.2092c@postmaster+dexdyne.com.cix.co.uk>

Dear "David Collier",

In message <memo.20091023211352.2092c@postmaster+dexdyne.com.cix.co.uk> you wrote:
> 
> Well I have got it working - but it seems to do exactly what you say it
> doesn't

Well, I'm not always right :-)

> so it looks like it works ONLY in hex -

Makes sense. That's what semi-all commands do in U-Boot.

> I'd like the decimal version like you described :-)
> 
> so I've defined setexprd to do that

I did not only describe it, I tested it. I just "tricked" a bit.
You asked to extract the last two digits, and I used "% 100" to do
this. Note that this works correctly in any number base - may it be 10
or 16 or whatever :-)

Hey, that was clever, wasn't it? :-)

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
"Love is an ideal thing, marriage a real thing; a  confusion  of  the
real with the ideal never goes unpunished."                  - Goethe

  parent reply	other threads:[~2009-10-23 21:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 16:52 [U-Boot] setting u-boot params based on serial number David Collier
2009-10-23 16:58 ` Ben Warren
2009-10-23 18:03 ` Wolfgang Denk
2009-10-23 20:13   ` David Collier
2009-10-23 20:38     ` David Collier
2009-10-23 21:05       ` Wolfgang Denk
2009-10-23 21:04     ` Wolfgang Denk [this message]
2009-10-26 10:36       ` David Collier
2009-10-26 12:01         ` Wolfgang Denk
2009-10-26 13:29           ` David Collier
2009-10-26 14:12             ` Wolfgang Denk

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=20091023210421.4AEBCE398E1@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /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.