Hello folks!I'm trying to reduce the boot time of a BB Black by skipping u-boot and trying to load a compressed kernel directly from the u-boot SPL. Is there a way to do such thing? If so how?Thanks in advance!
Two stage U-Boot designThis section gives an overview of the two stage U-Boot approach adopted for AM335X. The size of the internal RAM in AM335X is 128KB out of which 18KB at the end is used by the ROM code. Also, 1 KB at the start (0x402f0000 - 0x402f0400) is secure and it cannot be accessed This places a limit of 109KB on the size of the U-Boot binary which the ROM code can transfer to the internal RAM and use as an initial stack before initialization of DRAM. Since it is not possible to squeeze in all the functionality that is normally expected from U-Boot in < 110KB (after setting aside some space for stack, heap etc) a two stage approach has been adopted. Initial stage initalize only the required boot devices (NAND, MMC, I2C etc); 2nd full stage initall all other devices (ethernet, timers, clocks etc). The 1st binary is generated MLO and the 2nd stage is generated as u-boot.img. http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User's_Guide --- On Sat, 6/1/13, Brent <bren...@hotmail.com> wrote: |
|
Wow, that's really amazing that you got the kernel to load in 600ms! Do you mind sharing how you achieved this? I haven't started optimizing the kernel yet so any direction would be appreciated.
-brent
Thank you for the patch, Brent. I'm down to a 3 second boot time (full boot, from PWRON to shell). Still, the kernel boots in less than 600ms, and the rest (2.4s) is up to u-boot. Since I just started learning how to use an embedded linux device, I think it's a shame that u-boot takes so long to do it's thing and that I can't help to develop(?) a way to use the kernel as a payload for SPL for now.Other things that I used to speed u-boot up are:- using other CFLAGS for compiling u-boot (-Os and so on) and removing -g;- embedding the environment into the u-boot img so as not to read from uEnv.txt;- use on include/configs/am335x_evm.h:#define CONFIG_SYS_CONSOLE_INFO_QUIET#define CONFIG_SILENT_CONSOLE 1#define CONFIG_SYS_DEVICE_NULLDEV#define CONFIG_SILENT_U_BOOT_ONLY#undef CONFIG_SYS_LONGHELP#undef CONFIG_CMD_GPIO#define CONFIG_EXTRA_ENV_SETTINGS \........"verify=no\0" \"silent=1\0" \.......#undef CONFIG_FAT_WRITE#undef CONFIG_CMD_EXT2#undef CONFIG_CMD_DHCP#undef CONFIG_CMD_PING#undef CONFIG_BOOTP_DEFAULT#undef CONFIG_BOOTP_DNS#undef CONFIG_BOOTP_DNS2#undef CONFIG_BOOTP_SEND_HOSTNAME#undef CONFIG_BOOTP_GATEWAY#undef CONFIG_BOOTP_SUBNETMASKStill it takes a lot of time to run it. Any further tips are appreciated!
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Hm-WAK_E4xo/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
| Have you islolated what/where U-boot spends this time? Its hard to imagine what initialization could take that long. uncompressing and copying kernel into DDR should be the lions share of the time spent. I have seen RAM test on really slow really large older memories take a long time but this memory is modern. I think if you google this list there was talk about an easy way to profile/measure. I am spoiled using CCS to measure clock tick between breakpoints so I cant offer any ideas on how to measure beyond the painful old school way of scope and toggle gpio --- On Sat, 6/1/13, ylla...@gmail.com <ylla...@gmail.com> wrote: |
|
Date: Saturday, June 1, 2013, 9:54 PM |
|
|
--- You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Hm-WAK_E4xo/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beagleboard+unsubscribe@googlegroups.com.
Hello folks!I'm trying to reduce the boot time of a BB Black by skipping u-boot and trying to load a compressed kernel directly from the u-boot SPL. Is there a way to do such thing? If so how?
Hey Tom!I tried applying the patches and when the SPL tries to load the kernel it stops. The messages it outs are:U-Boot SPL 2013.04-dirty (Jun 06 2013 - 12:32:32)USB Peripheral mode controller at 47401000 using PIO, IRQ 0USB Host mode controller at 47401800 using PIO, IRQ 0OMAP SD/MMC: 0reading argsreading zImagereading zImageand then it gets stuck... my kernel is called zImage (a LZO compressed kernel). Is that perhaps the cause? Can the SPL uncompress the kernel or must it be in the uImage form?Thanks in advance my friend.
Hey Tom!I tried applying the patches and when the SPL tries to load the kernel it stops. The messages it outs are:U-Boot SPL 2013.04-dirty (Jun 06 2013 - 12:32:32)USB Peripheral mode controller at 47401000 using PIO, IRQ 0USB Host mode controller at 47401800 using PIO, IRQ 0OMAP SD/MMC: 0reading argsreading zImagereading zImageand then it gets stuck... my kernel is called zImage (a LZO compressed kernel). Is that perhaps the cause? Can the SPL uncompress the kernel or must it be in the uImage form?
Uncompressing Linux... done, booting the kernel.
Error: unrecognized/unsupported machine ID (r1 = 0x00000e05).
Available machine support:
ID (hex) NAME
ffffffff Generic AM33XX (Flattened Device Tree)
ffffffff Generic OMAP3-GP (Flattened Device Tree)
ffffffff Generic OMAP3 (Flattened Device Tree)
0000060a OMAP3 Beagle Board
Please check your kernel config and/or bootloader.
Wow, falcon mode looks really slick! I've been hacking away at u-boot trying to get my system to boot faster, this looks cool!I'm pretty new to some topics in Linux, and am having trouble patching the u-boot directory properly so that I can compile the new falcon-mode bootloader for the BeagleBone Black. Can anyone give me some pointers for creating the new bootloaders?