All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] custom loadable command shell
Date: Tue, 28 Mar 2006 16:06:50 -0500	[thread overview]
Message-ID: <4429A56A.30307@smiths-aerospace.com> (raw)
In-Reply-To: <44299C65.7050304@mc.com>

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)
* 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).
* 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.

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.
* 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.
* 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

  reply	other threads:[~2006-03-28 21:06 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 [this message]
2006-03-28 22:20   ` Wolfgang Denk
2006-03-30 16:45   ` Andrew Wozniak
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=4429A56A.30307@smiths-aerospace.com \
    --to=gerald.vanbaren@smiths-aerospace.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 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.