leon2: cannot boot without the console driver
Joel Sherrill
joel.sherrill at oarcorp.com
Thu Aug 24 13:31:44 UTC 2006
Ingolf Steinbach wrote:
> Hi,
>
> while trying to reduce the size of my application, I left
> out CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER from my
> RTEMS configuration (there is no printf()/puts()/...) in
> my application.
>
> Indeed, this reduces the size. However I can no longer boot
> the application because the bsp_postdriver_hook() tries to
> open "/dev/console".
>
> What is the correct way to leave out the console driver?
> (Probably writing a dummy bsp_postdriver_hook() function
> does the trick, but this looks rather hackish to me.)
>
I am open to ideas from others since I don't know that I particularly
like any of my ideas right now. :)
One idea is for it not to be a fatal error if open failed for /dev/console
in shared/bsppost.c.
Another is for that code to test if /dev/console exists. It if does
not, then
skip trying to open it and leave it a fatal error if it exists and
doesn't open.
A third (easy in a real application) is for you to define your own
bsp_postdriver_hook
that is empty in your application. It will get linked in first.
A simple way to avoid open entirely might be to have an empty "open console"
routine automatically generated if
CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
is not defined. This is kind of a merge of the previous solution with
an automated way of
doing it.
--joel
> RTEMS-4.6.5 on leon2.
>
> Kind regards
> Ingolf
More information about the users
mailing list