From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17962 invoked by alias); 1 Jul 2009 17:06:46 -0000 Received: (qmail 17733 invoked by uid 22791); 1 Jul 2009 17:06:44 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hermes.mlbassoc.com (HELO mail.chez-thomas.org) (76.76.67.137) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Jul 2009 17:06:36 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 8D7263B52837; Wed, 1 Jul 2009 11:06:34 -0600 (MDT) Received: from hermes.chez-thomas.org (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 2DCAA3B5261B; Wed, 1 Jul 2009 11:06:34 -0600 (MDT) Message-ID: <4A4B979A.8000004@mlbassoc.com> Date: Wed, 01 Jul 2009 17:06:00 -0000 From: Gary Thomas User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: H Hartley Sweeten CC: Eric Bresie , ecos-devel@ecos.sourceware.org Subject: Re: Querying Loader from Kernel References: <113b56700906291200n4e3ca671s63462d29b31e5821@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-07/txt/msg00002.txt.bz2 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 ------------------------------------------------------------