News for hackers. Stuff that matters.
Re:How the ARM32 Linux kernel decompresses by dmitrygr on Thursday August 13, 2020 @02:34PM (#24146619)
The bootloader's driver for your storage device is often very simplistic. Eg: it might only read one sector at a time, might not have the FAT cached in RAM, etc. It is not designed for speed - only for simplicity and size. So, reading a few MB fewer from storage is often actual time savings.

Plus there are things like [e]MMC's "boot" area, where a special storage area is simpler to read using a simpler special protocol. That area has a limited size.

Re:How the ARM32 Linux kernel decompresses by jandrese on Thursday August 13, 2020 @02:43PM (#24146734)
What kind of time savings are we talking about for 7 megabytes here? A second? Three seconds? Or is it more like 20ms? Is it still common to source components from 1995 in these devices?
Re:How the ARM32 Linux kernel decompresses by setpatchaddress on Thursday August 13, 2020 @02:55PM (#24146875)
20ms is a long time in low-level systems programming, especially where concurrency might be low or limited. You only need to find five 20ms savings opportunities to shave a tenth of a second off of your boot time.

Edited to add: A lot of performance loss for large, complex systems is death-by-a-thousand-cuts -- 20ms here and there can make a real, user-perceivable difference.

Re:How the ARM32 Linux kernel decompresses by tkln on Thursday August 13, 2020 @04:33PM (#24148567)
I don't have exact numbers on this any more. It's been couple of years since I last worked in embedded storage and boot optimization.

When optimizing boot time of an embedded system something like 100 ms is a significant saving once you've picked all the low hanging fruit in the user space init side. In the end, every millisecond counts as it all adds up when there are hundred or so places where they may end up being spent needlesly. An embedded product, especially automotive, might have rather strict boot time requirements.

The time it takes for a bootloader to load a kernel image can be a decent part of the boot time. The bootloader most likely won't be running the SDHCI controller in any of the faster modes that require implementing bus training, calibration, and tuning algorithms of varying complexity.

Re:How the ARM32 Linux kernel decompresses by MartijnBraam on Thursday August 13, 2020 @04:08PM (#24148046)
In case of the PinePhone (which is arm64) the actual loading of the kernel image from eMMC can take a second because the MMC controller isn't initialized for max speed by the bootloader, so having a smaller kernel saves some time between pressing the power button and having the splash screen show up (since the bootloader can't control the display)
Re:How the ARM32 Linux kernel decompresses by megous on Thursday August 13, 2020 @05:22PM (#24149433)
U-Boot can absolutely use the max speed. Just apply some mmc patches from here: https://megous.com/git/u-boot/log/?h=opi-v2020.04
Re:How the ARM32 Linux kernel decompresses by voltagex_ on Thursday August 13, 2020 @07:15PM (#24150896)
Do you think those patches will be upstreamed?
Re:How the ARM32 Linux kernel decompresses by megous on Wednesday August 19, 2020 @07:09AM (#24209135)
If someone does it, then yes, otherwise I don't plan to do it myself.
Re:How the ARM32 Linux kernel decompresses by voltagex_ on Thursday August 13, 2020 @07:14PM (#24150880)
Slightly off topic: the last time I saw stuff about speeding up boot of small devices was here - https://megous.com/git/p-boot/about/
Re:How the ARM32 Linux kernel decompresses by megous on Thursday August 13, 2020 @05:24PM (#24149472)
Usual unoptimized speed may be ~23MiB/s for SD card for example.