Reducing the bootup time and some miscellaneous Qs

Hi,

I am starting with Linux (a few weeks now), so the Q might be obvious to
some, but seems daunting to me.

I want to boot up the system as fast as possible and display my
application after that. Boot-up time of less than 5 seconds is very much
desirable.
Currently, the project will do the following:
1. Display some graphics stuff (GUI using GTK+ and custom widgets) on a
high resolution monitor.
2. Access the data on the serial port, store it on the USB flash drive
or MMC (if possible), use some GPIO on the board and interface a RTC.
3. Safely shutdown, whenever asked to so.

I have already downloaded OE and worked on it for a while. I have also
got my small application running on it :-D. I have been looking at the
recipes and they are hard to understand (at least for a beginner like
me).

The GUI for the application will be built using GTK+, so I would require
X, and other dependencies that GTK+ requires.

Now, to the actual Qs:
1. How to go about reducing the boot-up time? And removing the unwanted
components? I had thought of using the base-image and the have a script
run the console from the SD card to install everything that is required.
OR
Use the existing X11 Angstrom image and modify the bitbake recipes. I am
not able to decide, which seems to be the more efficient way.
OR
something else, which I have not thought of.

2. This is a very general one. I want to control the GPIO ports, and the
serial port and other stuff like that (I2C for RTC). So, what is the
approach that should be taken? I know one has to write a driver, so
whether these drivers are already implemented or some of them are
implemented and some not. And where to look for these drivers?

Thanks for reading this longish email. I appreciate the time you have
taken to read it.

Thanks,
-Deven

Hi Deven,

Wed, 29 Apr 2009, Deven wrote:

I want to boot up the system as fast as possible and display my
application after that. Boot-up time of less than 5 seconds is very much
desirable.

Under 5 seconds sounds pretty much impossible. Just loading the kernel from flash or SD takes ~5 seconds on my setups.

2. This is a very general one. I want to control the GPIO ports, and the
serial port and other stuff like that (I2C for RTC). So, what is the
approach that should be taken? I know one has to write a driver, so
whether these drivers are already implemented or some of them are
implemented and some not. And where to look for these drivers?

For GPIO you might want to check these threads which were helpful for me:
  http://groups.google.com/group/beagleboard/msg/c623a16637625685
  http://groups.google.com/group/beagleboard/browse_thread/thread/be52908485cf1add/616972bf1e572b61
  http://groups.google.com/group/beagleboard/browse_thread/thread/cd2300fb60cc01b/2d3419107dda7867

Using I2C2 on Beagle board requires few things:
  - Set correct MUX values for relevant pins either in U-Boot or in kernel. I
    prefer U-Boot at the moment
  - In kernel source tree add entry for I2C2 in file board-omap3beagle.c. Just
    search look for I2C.
  - Check kernel's documentation on I2C, especially file dev-interface if you
    want to use I2C in userspace without the need to write any special drivers.

For RTC check this:
  http://groups.google.com/group/beagleboard/browse_frm/thread/331e5ddd950b73c0

Check out this: http://lwn.net/Articles/299483/
There is also a fastboot git (don't have the address handy)

still of course SD causes some overhead but loading the kernel itself
should definitely be done in less than 1 second.
If I load the kernel in u-boot it is less than a second before the
prompt returns.
But of course also time is lost in mlo, u-boot etc.

Frans.