WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Optimizing boot  (Read 5960 times)

Offline B-O

  • Newbie
  • *
  • Posts: 5
Optimizing boot
« on: November 22, 2011, 01:29:06 AM »
Hi,

Hi. We have installed your Tiny Core Linux in a compact flash for demonstrating fast boot with our embedded BIOS (zBIOS) on a panel PC with N270/945GS/ICH7 chipset.

The results for a full boot from power on is:

zBIOS       4.8s (1.3s BIOS, 3.5s Tiny Core)
AMI BIOS  19.5s (10s BIOS, 9.5s Tiny Core)

Note that we actually perform full POST and brought Tiny Core Linux up in less than half the AMI BIOS POST.  There is a video clip on zBIOS boot here[url]www.youtube.com/watch?v=L-wewy-qlu4/url].

However, we think we can make this even faster if a non multi boot loader is used (GRUB, LILO) and also enhance the boot loader to take full advantage of zBIOS. Would it be interesting for you to cooperate in optimizing the boot times further or can we have access to the development to contribute?

B-O Bergman
Zebor Technology


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Optimizing boot
« Reply #1 on: November 22, 2011, 04:32:28 AM »
That looks very nice. Absolutely, patches welcome, or even only data on where we can improve.

Was that unmodified TC in the video? If so it's interesting how big an effect the bios has on our boot.
The only barriers that can stop you are the ones you create yourself.

Offline B-O

  • Newbie
  • *
  • Posts: 5
Re: Optimizing boot
« Reply #2 on: November 22, 2011, 07:00:40 AM »
Yes, that was a completely unmodified TC. The zBIOS used is also our standard BIOS and not an altered version. It's common to have a manipulated boot loader and OS for fast boot demonstrations. Even hibernation tricks are common. We use a standard OS and our standard BIOS for these demos, so the fast boot is available outside the lab.

To optimize the boot further with TC and zBIOS, the boot loader should be simplified (to be faster) and load the ram image in maximum chunks. Our BIOS supports 255 sectors read/write/verify on any media, so using that feature will significantly reduce the total number of calls needed to load the image.
 

 

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Optimizing boot
« Reply #3 on: November 22, 2011, 09:51:06 AM »
I'm afraid none of us is familiar with bootloader internals, or BIOS interrupt calls for that matter. I don't think we can help there.

Of course if I'm wrong here, feel free to correct me.
The only barriers that can stop you are the ones you create yourself.

Offline B-O

  • Newbie
  • *
  • Posts: 5
Re: Optimizing boot
« Reply #4 on: November 23, 2011, 12:07:42 AM »
Then I will help you with that. Maybe I can contribute with some modifications in the kernel as well?

Offline yoshi314

  • Full Member
  • ***
  • Posts: 135
Re: Optimizing boot
« Reply #5 on: November 23, 2011, 02:25:52 AM »
i suppose coreboot team or syslinux devs could help here a lot. why not try asking on their mailing lists as well? i suppose it would be of mutual benefit.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Optimizing boot
« Reply #6 on: November 23, 2011, 06:01:41 AM »
Hi B-O
Any generic modifications for boot loaders, kernels, etc. that improve the boot process are likely
to be well received, however, modifications specifically aimed at zBIOS compatibility may experience
some resistance. I'm not trying to put a damper on this thread, just thought I should point that out.
Having said that, any ideas you have that would be mutually beneficial would be welcome as booting
is a topic that comes up on a regular basis.


Offline B-O

  • Newbie
  • *
  • Posts: 5
Re: Optimizing boot
« Reply #7 on: November 23, 2011, 06:49:09 AM »
Hi, this needs a little background discussion.

The BIOS disk services has since the early PC had an API where the number of sectors parameter for read/write/verify is a byte value. This allows you specify a value between 0 and 255. Most BIOSes can not handle the full amount of sectors that the API allows and fails on different quantities depending on media. Some will even hang. The unique with zBIOS is that we support up to 255 sectors on any media, even on legacy DMA based floppy I/O.

Because of the ill behavior of many BIOSes, Linux boot loader probes for how many sectors it can read in one go. Instead we suggest that Linux boot loader should detect if it's running on a zBIOS based PC and then use 255 sectors per read chunk, thus saving time.

Another way to do the same thing would be to try reading 255 sectors in one go, then if that succeeds just continue reading this chunk size. Some BIOSes will be able to handle 255 sectors at one go on hard drives, so it will make sense.