Discussion:
[uClinux-dev] How to set up a HUSH script to run at boot (mit-out das U-Boot rebuildung)
Eric Fowler
2014-01-31 22:33:23 UTC
Permalink
I have a set of HUSH commands that I wish to have read in every time I
boot, much like a .bashrc file on grownup Linux.



As I understand, I must put them in a file, use MKIMAGE to make an
image out of that file, transfer them to the device(tftp or whatever),
and run AUTOSCR on the device.



However, my device does not have AUTOSCR on it. So, I think this means
tweaking UBOOT to add AUTOSCR, and re-flashing the device with the new
boot loader through JTAG.



That seems, um, kind of drastic. I would like to avoid it if I can.



Is there an easier way?



Eric
--
cc:NSA
Steve Strobel
2014-02-04 00:09:08 UTC
Permalink
Post by Eric Fowler
I have a set of HUSH commands that I wish to have read in every time I
boot, much like a .bashrc file on grownup Linux.
On my uClinux system, /etc/rc gets executed automatically on startup. I
call a variety of other scripts from there. When uClinux (with my apps,
all of the libraries, etc) gets built, those other scripts get copied from
vendors/.../my_target/... on the dev machine so they end up in /etc/ on the
target. Note that anything you call from there either needs to exit
quickly or be run in the background (such as with a trailing '&') or you
won't get a root:~> prompt.

Steve
--
Steve Strobel
Link Communications, Inc.
1035 Cerise Rd
Billings, MT 59101-7378
(406) 245-5002 ext 102
(406) 245-4889 (fax)
WWW: http://www.link-comm.com
MailTo:steve.strobel at link-comm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20140203/6ce3c064/attachment.html>
Loading...