Conditional 'hush' script examples anyone?
Greetings
I've RTFM'd and I've FAQ'd but I still can't find a single example of the use of conditionals with the u-boot hush shell command line.
I assume its only usable with an autoscript or can environmental variables hold complete conditional blocks. Most interested in this so that I can make sensible decisions about what to do if an image CRC is bad for example (or when to boot a different image after an upgrade).
Examples, examples, examples is what I'm looking for rather than a dry explanation about hush (which I can get close to from any book that documents bash!!)
Many thanks
Signature · 5 lines
Robin Gilks Senior Design Engineer Phone: (+64)(3) 357 1569 Tait Electronics Fax : (+64)(3) 359 4632 PO Box 1645 Christchurch Email : robin.gilks at tait.co.nz New Zealand
Dear Robin,
Quoted 3 lines · in message <[email protected]> you wrote:
I've RTFM'd and I've FAQ'd but I still can't find a single example of the use of conditionals with the u-boot hush shell command line.
man sh :-)
Quoted 1 line
I assume its only usable with an autoscript or can environmental
What makes you think so?
Quoted 3 lines
variables hold complete conditional blocks. Most interested in this so that I can make sensible decisions about what to do if an image CRC is bad for example (or when to boot a different image after an upgrade).
You can use conditionals everywhere: in interactive input, in environment variables, in scripts ....
Quoted 3 lines
Examples, examples, examples is what I'm looking for rather than a dry explanation about hush (which I can get close to from any book that documents bash!!)
See http://www.denx.de/twiki/bin/view/DULG/CommandLineParsing#Section_12.1.7.3.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Was hei?t Windows auf Indianisch? - "Wei?er Mann, der auf Sanduhr wartet!"
Many thanks for that Wolfgang - most appreciated.
The only thing I find a bit odd is that on my system (0.4.0) setenv is set for 6 significant characters in the command table but presumably the example you give was with a system using only 3 characters significant (unless the 'set' command is not the same as the 'setenv' command).
I'll be parsing the command tables to remove all the commands that return "Sorry, but the xxxxx command has not been implemented" such as 'spiinfo' since they should either work or be conditionally compiled out if the user hasn't requested them. That being the case I'll send in a patch against 0.4.0 when I've tidied up these anomalies
Quoted 3 lines · Wolfgang Denk
See http://www.denx.de/twiki/bin/view/DULG/CommandLineParsing#Section_12.1.7.3.
Signature · 5 lines
Robin Gilks Senior Design Engineer Phone: (+64)(3) 357 1569 Tait Electronics Fax : (+64)(3) 359 4632 PO Box 1645 Christchurch Email : robin.gilks at tait.co.nz New Zealand
Dear Robin,
Quoted 5 lines · in message <[email protected]> you wrote:
The only thing I find a bit odd is that on my system (0.4.0) setenv is set for 6 significant characters in the command table but presumably the example you give was with a system using only 3 characters significant (unless the 'set' command is not the same as the 'setenv' command).
It's the same; the whole command lookup code was completely rewritten in U-Boot 0.4.1 - the behavious changes slightly, and is now more consistent.
Quoted 5 lines
I'll be parsing the command tables to remove all the commands that return "Sorry, but the xxxxx command has not been implemented" such as 'spiinfo' since they should either work or be conditionally compiled out if the user hasn't requested them. That being the case I'll send in a patch against 0.4.0 when I've tidied up these anomalies
Thanks in advance, but please send a patch against a RECENT version of U-Boot. 0.4.0 is very old. A patch against 0.4.0 may be difficult to merge.
Best regards,
Wolfgang Denk
Signature · 6 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de The White Rabbit put on his spectacles. "Where shall I begin, please your Majesty ?" he asked. "Begin at the beginning,", the King said, very gravely, "and go on till you come to the end: then stop." -- Lewis Carroll
Quoted 4 lines · Wolfgang Denk
Thanks in advance, but please send a patch against a RECENT version of U-Boot. 0.4.0 is very old. A patch against 0.4.0 may be difficult to merge.
According to sourceforge, 0.4.0 is the latest stable release and less than 3 months old. Not ancient (compared to say the kernel update cycle) but the only thing that many people would consider using rather than an unstable* version from CVS - assuming of course they can get anything from sf CVS!!
Perhaps its time for another stable release that is easier to patch/merge against if nothing else :-))
* a matter of definition - but if its not stable it _must_ necessarily be unstable :-((
Signature · 5 lines
Robin Gilks Senior Design Engineer Phone: (+64)(3) 357 1569 Tait Electronics Fax : (+64)(3) 359 4632 PO Box 1645 Christchurch Email : robin.gilks at tait.co.nz New Zealand
Quoted 2 lines · Robin Gilks
According to sourceforge, 0.4.0 is the latest stable release and less than 3 months old.
Look at ftp.denx.de, there are newer versions available.
Wolfgang, could you make an announcement from time to time on this list when you make a release? I noticed it almost by accident recently.
Robert
Signature · 5 lines
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hornemannstra?e 12, 31137 Hildesheim, Germany
Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4Dear Robert,
Quoted 3 lines · in message <[email protected]> you wrote:
Wolfgang, could you make an announcement from time to time on this list when you make a release? I noticed it almost by accident recently.
Releases, i. e. increments of X or Y in the U-Boot-X_Y_Z CVS tags, have always been announced here, and will be. The "minor" releases on our FTP server are merely snapshots to help work around the access and delay problems to SF's CVS server.
I think there is two groups of people on this mailing list: users and developers. For users, the "major releases" are perfectly OK to use. Developers usually can use the top-of-tree version from CVS. Except for a very few cases I always run a certain set of tests before ever checking in code to the public CVS server. This is good enough for 99% of all developers. If you feel unsafe with that, you can use a tagged version; if you need even more reliability you can use one of the "minor releases" tagged as U-Boot-X_Y_Z (with snapshots on our FTP server).
If you're interested in the development, watch the CVS. I don't intend to announce each and every check-in. If you like, you can, for example, "cvs watch add CHANGELOG".
Best regards,
Wolfgang Denk
Signature · 6 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
He had been eight years upon a project for extracting sunbeams out of
cucumbers, which were to be put in vials hermetically sealed, and let
out to warm the air in raw inclement summers. - Jonathan Swift
_Gulliver's Travels_ ``A Voyage to Laputa, etc.'' ch. 5Quoted 3 lines · Wolfgang Denk
If you're interested in the development, watch the CVS. I don't intend to announce each and every check-in. If you like, you can, for example, "cvs watch add CHANGELOG".
Perhaps a CVS commits mailing list that automatically got the changelogs (and possibly diffs) committed to CVS would be of use?
Signature · 1 line
"You grabbed my hand and we fell into it, like a daydream - or a fever."
Quoted 3 lines · In message <[email protected]> you wrote:
Perhaps a CVS commits mailing list that automatically got the changelogs (and possibly diffs) committed to CVS would be of use?
Sounds like a LOT of overkill to me.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de You have the capacity to learn from mistakes. You'll learn a lot today.
Quoted 6 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:
Perhaps a CVS commits mailing list that automatically got the changelogs (and possibly diffs) committed to CVS would be of use?
Sounds like a LOT of overkill to me.
It's something that a lot of projects provide and it would seem to provide a way of helping with this. If people aren't interested they can always just not subscribe to the list.
Signature · 1 line
"You grabbed my hand and we fell into it, like a daydream - or a fever."
Quoted 3 lines · Mark Brown
It's something that a lot of projects provide and it would seem to provide a way of helping with this. If people aren't interested they can always just not subscribe to the list.
Ack. Would be much easier for board maintainers to see if things have changed for them.
Robert
Signature · 5 lines
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hornemannstra?e 12, 31137 Hildesheim, Germany
Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4Robert,
Quoted 3 lines · in message <[email protected]> you wrote:
Ack. Would be much easier for board maintainers to see if things have changed for them.
Why do you use "would"? I think you already subscribed to the list??
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Q: Do you know what the death rate around here is? A: One per person.
Quoted 1 line · Wolfgang Denk
Why do you use "would"? I think you already subscribed to the list??
FIFO reordering error: I replied before I found your announcement mail further down ;)
Robert
Signature · 5 lines
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hornemannstra?e 12, 31137 Hildesheim, Germany
Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4[U-Boot-Users] u-boot - Booting Linux from JFFS2 in Flash
In reply to Wolfgang DenkHi ,
How to configure u-boot to load my Linux kernel image (/boot/image.bin) from *JFFS2 FLASH partition* ?
- -
rupesh
Dear Robin,
Quoted 3 lines · in message <[email protected]> you wrote:
According to sourceforge, 0.4.0 is the latest stable release and less than 3 months old. Not ancient (compared to say the kernel update cycle)
Development of U-Boot happens pretty fast. _Many_ people contribute, and DENX is running quite a lot of projects, too.
Quoted 2 lines
but the only thing that many people would consider using rather than an unstable* version from CVS - assuming of course they can get anything
There has never been a forma declaration of whatis stable and what
not. Normally you can consider each version tagges with a
U-Boot-X_Y_Z label as "stable".
Quoted 1 line
from sf CVS!!
I am aware of this problem. There is little I can do about it. But I regularly put tarballs of the "minor releases" on our FTP server; see ftp://ftp.denx.de/pub/u-boot/
Quoted 2 lines
Perhaps its time for another stable release that is easier to patch/merge against if nothing else :-))
Well, we're preparing for something, but it will take a little more time.
Quoted 2 lines
* a matter of definition - but if its not stable it _must_ necessarily be unstable :-((
Has there ever been any "stable" software? Isn't "stable software" an oxymoron per se?
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Real programmers don't comment their code. It was hard to write, it should be hard to understand.