This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: Querying Loader from Kernel
- From: Gary Thomas <gary at mlbassoc dot com>
- To: H Hartley Sweeten <hartleys at visionengravers dot com>
- Cc: Eric Bresie <ebresie at gmail dot com>, ecos-devel at ecos dot sourceware dot org
- Date: Wed, 01 Jul 2009 11:06:34 -0600
- Subject: Re: Querying Loader from Kernel
- References: <113b56700906291200n4e3ca671s63462d29b31e5821@mail.gmail.com> <BD79186B4FD85F4B8E60E381CAEE190901A137DF@mi8nycmail19.Mi8.com>
H Hartley Sweeten wrote:
> On Monday, June 29, 2009 12:00 PM, Eric Bresie wrote:
>> Is it possible to query info from the loader (Redboot) from the
>> loaded kernel?
>>
>> I'd like to have Redboot version indicated in syslog or something
>> to confirm version details at both loader and kernel level.
>>
>> With dmesg I see some indication of the mtd partitions but nothing
>> else beyond that.
>>
>> Any ideas?
>
> I'm not sure you can query the info from the kernel but maybe from
> userspace.
>
> You can use the fconfig utility to parse the mtd partition that
> contains your Redboot config. Create an alias in Redboot that has
> the version information you need. For example I set a serial number
> on each of my boards as:
>
> alias/SNUM: 0x27260017
>
> Then use fconfig to read it:
>
> / #fconfig -r -d /dev/mtd3 -n alias/SNUM
> 0x27260017
> / #
Two things:
* What is the 'fconfig' utility and where did you get it?
* This only works for data stored in 'fconfig' I think the
original poster was interested in other data, such as the
build version string, etc. The best way to provide that
would be to pass it to Linux during 'exec'. The details
depend on the architecture (e.g. PowerPC does things differently
from how ARM works, etc)
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------