Closing Ethernet

Ed Sutter esutter at
Wed Oct 22 14:24:43 UTC 2008

>>> Would be nice if uMon had a user defined 
>>> "pre_autoboot_hook() that would be called to, e.g., shut down ethernet 
>>> before loading the app.
>> There is, refer to the #define PRE_TFSAUTOBOOT_HOOK (in start.c).  This is a function
>> call you can put into your build of the monitor (via config.h) to do whatever you want
>> just prior to uMon calling the autoboot code.
> Wow, I almost guessed the name! Yes, this is in the manual but think 
> this was left out of the template config.h.  I tried defining this with 
> my DisableEthdev() function but it shuts down ethernet even if you abort 
> the load. Seem like it should only be called if your autoboot with query 
> times out right before the load begins (at least that's what I thought 
> it would do). Now I have no ethernet in uMon since my file has autoboot 
> flag. But I can fix it, no problem.

Ok, thanks, its in template/config.h now.
Yea, that's true, it does execute regardless of whether or not something
actually autoboots.  Maybe I should think more about that...
Still seems to me that you're better served by just using an autoboot
script to start up your RTEMS application, and have the script run "ether off"
before calling your RTEMS app (or use mon_docommand("ether off",0) at the start
of your app).

More information about the users mailing list