public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] custom loadable command shell
@ 2006-03-28 20:28 Andrew Wozniak
  2006-03-28 21:06 ` Jerry Van Baren
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrew Wozniak @ 2006-03-28 20:28 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] custom loadable command shell
  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
  2006-03-28 21:14 ` Scott McNutt
  2006-03-28 22:17 ` Wolfgang Denk
  2 siblings, 2 replies; 8+ messages in thread
From: Jerry Van Baren @ 2006-03-28 21:06 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] custom loadable command shell
  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 21:14 ` Scott McNutt
  2006-03-28 22:20   ` Wolfgang Denk
  2006-03-28 22:17 ` Wolfgang Denk
  2 siblings, 1 reply; 8+ messages in thread
From: Scott McNutt @ 2006-03-28 21:14 UTC (permalink / raw)
  To: u-boot

Hi Andy,

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

If it has its own parser, sounds like a standalone app is all that
you need -- which is already supported.

Regards,
--Scott

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] custom loadable command shell
  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 21:14 ` Scott McNutt
@ 2006-03-28 22:17 ` Wolfgang Denk
  2006-03-28 22:39   ` Wolfgang Denk
  2 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2006-03-28 22:17 UTC (permalink / raw)
  To: u-boot

In message <44299C65.7050304@mc.com> you wrote:
> 
> 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.

No problem to do this. There are already several boards which do this.

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

No need to implement a new parser. The existing one  deals  perfectly
fine with such a requirement. Just read the documentation.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
They say a little knowledge is a dangerous thing,  but it is not  one
half so bad as a lot of ignorance.   - Terry Pratchett, _Equal Rites_

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] custom loadable command shell
  2006-03-28 21:06 ` Jerry Van Baren
@ 2006-03-28 22:20   ` Wolfgang Denk
  2006-03-30 16:45   ` Andrew Wozniak
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-03-28 22:20 UTC (permalink / raw)
  To: u-boot

In message <4429A56A.30307@smiths-aerospace.com> you wrote:
>
> My first thought is:
> * Make the command table in u-boot longer than necessary (pad it with 
> empty elements)

No need to do that. Just read the docs.

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

No need to do that. Just read the docs.

> I have not looked very closely at how difficult it would be to do this 
> but it appears to be possible.

More, it already has been done.

> * It would require an extension of the ABI.

Wrong.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Hegel was right when he said that we learn from history that man  can
never learn anything from history.              - George Bernard Shaw

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] custom loadable command shell
  2006-03-28 21:14 ` Scott McNutt
@ 2006-03-28 22:20   ` Wolfgang Denk
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-03-28 22:20 UTC (permalink / raw)
  To: u-boot

In message <4429A73E.9040905@psyent.com> you wrote:
> 
> > 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.
> 
> If it has its own parser, sounds like a standalone app is all that
> you need -- which is already supported.

No new parser is needed at all.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"He only drinks when he gets depressed." "Why does he get depressed?"
"Sometimes it's because he hasn't had a drink."
                                     - Terry Pratchett, _Men at Arms_

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] custom loadable command shell
  2006-03-28 22:17 ` Wolfgang Denk
@ 2006-03-28 22:39   ` Wolfgang Denk
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-03-28 22:39 UTC (permalink / raw)
  To: u-boot

Hi,

in message <20060328221754.4316E3535F7@atlas.denx.de> I wrote:
>
> > 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.
> 
> No need to implement a new parser. The existing one  deals  perfectly
> fine with such a requirement. Just read the documentation.

Argh... sorry. Wrong answer. This has not been  implemented  yet,  so
you do need your own parser for now.

I apologize - too little sleep and/or too much beer. 

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every time history repeats itself the price goes up.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] custom loadable command shell
  2006-03-28 21:06 ` Jerry Van Baren
  2006-03-28 22:20   ` Wolfgang Denk
@ 2006-03-30 16:45   ` Andrew Wozniak
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Wozniak @ 2006-03-30 16:45 UTC (permalink / raw)
  To: u-boot

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
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-03-30 16:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox