A couple of tips for faster booting:
Disable any device probing that isn't critical. Probing for USB and SD
cards that aren't there isn't helpful. Maybe the DTB helps. It'll be faster
to load additional modules once the kernel is initialized.
Disable networking helps as I think you saw.

You can eliminate fsck (filesystem) checks by putting the system files on a
read only partition, and the user code on a read write. Using a overlay or
union file system if needed, to get around third party softwares that don't
conform to the LSB (Linux standards base for file system layout).

You can delay the fsck of the user file system to after the system is
booted. And file system checks can be parallelized and backgrounded.

Using a file system journal will speed up checks.
There are flash specific file system that can offer better performance.

One discovery of mine was that when writing compact flash and SD cards it
was faster to decompress the file on the fly than work with the
uncompressed file system image.  This appeared to be due to a couple of
effects, i.e. fast cpus with L2 caches (Intel atom) can decompress faster
than data can be transferred from ram. So this may or may not be a benefit.
(This appeared to hold true with our TI OMAP firewall, but I didn't spend
as much time testing it).

I think I have my freebsd beagle bones booting in about 6 seconds... Linux
should do a lot better.




On Mon, Oct 7, 2019, 1:33 PM Robert Nelson <[email protected]> wrote:

> > > 1.5s to before the kernel starts printing messages? Is this mostly due
> to decompression? Certainly something to pay attention to here.
> >
> > So we use LZO, maybe it's time to switch to LZ4:
> >
> >   │ LZ4 is an LZ77-type compressor with a fixed, byte-oriented
> >
> > As of Debian Buster, LZ4 is now pretty stable:
> >
> > https://packages.debian.org/source/buster/lz4
>
> Nope, while lz4 is "faster" at decompression, it's not faster then
> lzo, due to the vmlinuz size:
>
> lz4:
>
> [0.029385 0.029385] loading /boot/vmlinuz-5.4.0-rc2-bone0.1 ...
> [0.724044 0.694659] 9044480 bytes read in 652 ms (13.2 MiB/s)
> [0.724719 0.000675] debug: [enable_uboot_overlays=1] ...
>
>
> [0.002140 0.002140] debug: [bootz 0x82000000 - 88000000] ...
> [0.002576 0.000436] ## Flattened Device Tree blob at 88000000
> [0.003020 0.000444]    Booting using the fdt blob at 0x88000000
> [0.003481 0.000461]    Loading Device Tree to 8ff68000, end 8fffffff ... OK
> [0.015984 0.012503]
> [0.016097 0.000113] Starting kernel ...
> [0.016451 0.000354]
> [1.852331 1.835880] [    0.000000] Booting Linux on physical CPU 0x0
>
> Total: 2.57705
>
> lzo:
>
> [0.027253 0.027253] loading /boot/vmlinuz-5.4.0-rc2-bone0.1 ...
> [0.693089 0.665836] 8581632 bytes read in 623 ms (13.1 MiB/s)
> [0.694399 0.001310] debug: [enable_uboot_overlays=1] ...
>
> [0.004443 0.004443] debug: [bootz 0x82000000 - 88000000] ...
> [0.005406 0.000963] ## Flattened Device Tree blob at 88000000
> [0.006403 0.000997]    Booting using the fdt blob at 0x88000000
> [0.007432 0.001029]    Loading Device Tree to 8ff68000, end 8fffffff ... OK
> [0.015855 0.008423]
> [0.015896 0.000041] Starting kernel ...
> [0.016128 0.000232]
> [1.874360 1.858232] [    0.000000] Booting Linux on physical CPU 0x0
>
> Total: 2.568759
>
> lzo - lz4 = -0.008291
>
> So in our case lzo is 8.3ms faster..  (and 0.5 MB smaller..)
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAOCHtYgETTk8N5OnuNBfSADz1nOZFC5x3hPxXxFQsxGHJ4b4rQ%40mail.gmail.com
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAKuUi11M-kYZO2P2qfHWNN7JdGhiBkk3bzcvR88g0HS1-jrAJg%40mail.gmail.com.

Reply via email to