public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andrew Wozniak <awozniak@mc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] custom loadable command shell
Date: Thu, 30 Mar 2006 11:45:55 -0500	[thread overview]
Message-ID: <442C0B43.20103@mc.com> (raw)
In-Reply-To: <4429A56A.30307@smiths-aerospace.com>

Jerry, all good suggestions.

Jerry Van Baren wrote:
> Andrew Wozniak wrote:
>> Hi,
>>
>> I've been contemplating how to develop a U-Boot loadable applet which 
>> provides a set of custom commands which augment the standard U-Boot 
>> command set. The general idea is to keep a working version of U-Boot 
>> in Flash without modifying - and then simply installing the new 
>> command applet as it changes.
>>
>> The applet would include a command parser. If none of my custom 
>> commands are found, a call to the U-Boot parser (via ABI) would be 
>> made to handle U-Boot commands.
>>
>> This is just a concept phase and I was hoping to get some opinions on 
>> the feasibility and obstacle of this approach.
>>
>> Thanks for all comments. Andy
> 
> Hi Andy,
> 
> My first thought is:
> * Make the command table in u-boot longer than necessary (pad it with 
> empty elements)

Assuming that the default table is allocated at build time, this makes 
sense. Change the default table to be dynamically allocated at runtime 
might be too much effort.

> * Add to the ABI so that your plug-in could either find the command 
> table and add its commands to the table or create an "add a command" ABI 
> call to add an extension command to the table (call repeatedly to add 
> multiple commands or pass in an extension table that gets added to the 
> standard table).

I was thinking more in the line of "add a local table" function.

> * Better alternative(?): add a "add an extension table" ABI with a 
> pointer to an extension table.  If the parser doesn't find the command 
> in the built-in table, it searches the add-on table (if provided). 
> Disadvantage: only one add-on table would be supported.

The tricky part would be telling the default parser when NOT to parse 
the local table when the plug-in (applet) is no longer present - such as 
when it exits back to UBoot, possibly due to some applet error.

This would have to be handled no matter what table extension method is 
chosen.

> Viola' instant extension commands.  This would have the advantage of 
> using the existing parser.
> 
> I have not looked very closely at how difficult it would be to do this 
> but it appears to be possible.
> * It would require an extension of the ABI.

Easy, done that before.

> * The commands are scattered through the code as macros.  Making 
> extension room may or may not be difficult.  A add-on table would be 
> simpler.

I'm just at the planning stage - will have a few beers while reviewing 
the source ;)

-andy

> * The command structure has pieces that are #ifdefed in and out... your 
> extension either has to match configurations or the "add a command" 
> routine would have to handle missing/extra pieces.
> 
> gvb
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live 
> webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 

  parent reply	other threads:[~2006-03-30 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 20:28 [U-Boot-Users] custom loadable command shell Andrew Wozniak
2006-03-28 21:06 ` Jerry Van Baren
2006-03-28 22:20   ` Wolfgang Denk
2006-03-30 16:45   ` Andrew Wozniak [this message]
2006-03-28 21:14 ` Scott McNutt
2006-03-28 22:20   ` Wolfgang Denk
2006-03-28 22:17 ` Wolfgang Denk
2006-03-28 22:39   ` 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=442C0B43.20103@mc.com \
    --to=awozniak@mc.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox