Understanding and reducing boot time

441 views
Skip to first unread message

Jean-Sebastien Stoezel

unread,
Oct 25, 2016, 12:40:50 PM10/25/16
to BeagleBoard
Hi:

I am running a Beagle Bone with a custom cape and I am looking for ways to reduce its boot time. The cape will always be the same and so I'd like to see what it is I can change to reduce or completely remove custom auto detection scripts.
As of now, the board boots in 18s, 8s are spent in the kernel, 10s are spent in user space.

I have seen numbers out stating that the kernel can boot in less than 2s. I'd be interested to know how this is possible. I am aware of a timeout being used in the kernel, though I am not sure how to disable this (using 4.1.33-bone-rt-r24).

Currently generic-board-startup.service seems to be the service that takes the longest to complete. Looking at what it does, it seems to be invoking am335x_evm.h.sh. I am wondering if I could disable anything related to detecting capes (including trying to read the eeprom). At this time I can see lines 30 to 55 in the scripts being related to eeprom flashing/reading, though I am not sure this is targetting the cape's eeprom.

In general, how would I go about disabling auto detection of capes? Would I need to edit these scripts? Or is there a cleaner way to disable features by editing a config file?

Regards,
JS

Jean-Sebastien Stoezel

unread,
Oct 26, 2016, 9:28:15 AM10/26/16
to BeagleBoard
Any comments on these questions? Where should I post in to get information on boot configuration and boot time?

Regards,
JS

Mark Lazarewicz

unread,
Oct 26, 2016, 6:58:48 PM10/26/16
to beagl...@googlegroups.com
This question was addressed at least twice in here .do you know how to use Google to search the group ? When I tried it about  1 year ago  I also came up with a tutorial on how to speed up linux load uboot optomizing and discussion of profiling where time is spent 


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/44e11b5a-531a-4553-8d78-a67f480dc2a6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jean-Sebastien Stoezel

unread,
Oct 27, 2016, 9:41:41 AM10/27/16
to BeagleBoard
Lazarman:

To answer your question, yes I have used the Google search in the group and I did not find something that applied directly to my questions:
- The information I found on how to disable the timeout where either to vague for me to figure out, or did not seem to apply to the configuration on my board,
- I did not find anything related to customizing the bootup, apart from enabling/disabling capes manually in uEnv.txt. My question is related to forcing states in the bootup scripts rather than automatic detection

Now since you seem to have written a tutorial on how to speed up boot time, and since this did not show up in the search results, would it be possible for you to link directly to it? This I feel, would be a useful piece of information to this thread.

Regards,
JS


On Tuesday, October 25, 2016 at 11:40:50 AM UTC-5, Jean-Sebastien Stoezel wrote:

Mark Lazarewicz

unread,
Oct 27, 2016, 4:56:55 PM10/27/16
to beagl...@googlegroups.com, Jean-Sebastien Stoezel
I used Google beagleboard boot time  I'd help but my focus is barebone or RTOS embedded systems not linux. From memory I think the biggest reduction is obtained from loading linux. Try that search and take a look at the results and if still don't see anything useful I'll post links. What kind of total boot time are your requirements ?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Mark Lazarewicz

unread,
Oct 27, 2016, 7:19:41 PM10/27/16
to beagl...@googlegroups.com





From: 'Mark Lazarewicz' via BeagleBoard <beagl...@googlegroups.com>
To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>; Jean-Sebastien Stoezel <js.st...@gmail.com>; BeagleBoard <beagl...@googlegroups.com>
Sent: Thursday, October 27, 2016 3:56 PM
Subject: Re: [beagleboard] Re: Understanding and reducing boot time

Jean-Sebastien Stoezel

unread,
Oct 28, 2016, 9:35:48 AM10/28/16
to laza...@yahoo.com, beagl...@googlegroups.com

Mark:

I've finally found quite a few interesting pages and documents and I will be going over them over the week-end. 
To answer your question, I would like to get down to about 5s total boot time.

Regards,
JS

To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.

Jean-Sebastien Stoezel

unread,
Nov 15, 2016, 10:27:00 PM11/15/16
to laza...@yahoo.com, beagl...@googlegroups.com
A follow up on this. Looking at the uBoot printouts, I thought there was 2 things I could do to speed up the boot time:
- Zero the bootdelay (currently set to 2s)
- Locate uEnv.txt/boot.scr on the root to save .2s (...), since currently it's looking in 2 different locations

To change bootdelay, I was hoping to just get on the uboot boot prompt,

=>setenv bootdelay 0
=>saveenv

But unfortunately saveenv is not a command of the version I am running

=> version

U-Boot 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31 -0600)
arm-linux-gnueabihf-gcc (Linaro GCC 5.2-2015.11) 5.2.1 20151005
GNU ld (GNU Binutils) 2.25.0 Linaro 2015_10

And so I guess I cloned uboot

git clone git://git.denx.de/u-boot.git

And started to look for bootdelay. Well it turns out there's quite a few entries for bootdelay. Would somebody be kind enough to point me to the place where I need to effectively change the default value?

Regards,
JS

Reply all
Reply to author
Forward
0 new messages