Integrated Computer Solutions Inc.
Improving User Experience with Ubiquitous QuickBoot
Jeff Tranter, ICS
Andrew McNaughton, Ubiquitous AI
Integrated Computer Solutions Inc.
Jeff Tranter
Engineering Manager
ICS
Optimizing Boot Times for Embedded Systems
Integrated Computer Solutions Inc.
Optimizing Boot Times for Embedded Systems
1. The Importance of Fast Booting.
2. OS/Linux Distribution Choice Considerations.
3. Specific Optimization Techniques.
4. Qt-Specific Optimizations.
5. Minimizing Impact on UI.
6. Summary and Conclusions.
3
Integrated Computer Solutions Inc.
The Importance of Fast Booting
● Fast boot times are critical for embedded applications.
● Slow boot is, at best, an inconvenience (e.g. automotive IVI system).
● At worst, life and death (e.g. medical defibrillator).
● Cost impact: may require use of faster and more expensive hardware
platform.
● Increasingly challenging as software becomes larger and more complex at a
greater rate than hardware.
4
Integrated Computer Solutions Inc.
The Importance of Fast Booting
● Conceptually, boot time is the time from power on to the device being fully up
and running, including user interface (if applicable).
● Will want to look at and optimize all the phases of booting:
● Power on -> SPL -> boot loader -> kernel -> init -> application
● Recommend measuring, quantifying, and focussing on slowest areas first.
● Will look at some specific approaches and techniques.
5
Integrated Computer Solutions Inc.
OS/Linux Distribution Choice Considerations
● One approach is to use an operating system developed for desktop (e.g. Linux
or Windows) and adapt it to embedded.
● This will bring in many applications, processes, services which are not
required.
● While you can cut it down to only what is required, this can be a significant
effort and difficult to do at the end of the development process.
● Better to use an operating system/distribution designed specifically for
embedded (e.g. Yocto Linux).
6
Integrated Computer Solutions Inc.
Remove Unused Services and Processes
● Minimize running services and processes to only those that are needed.
● Will help at boot and run time and reduce memory usage and CPU load.
● Also desirable for cybersecurity.
● Can start services on demand when needed.
● Systemd has some advantages over SysVinit (e.g. makes it easier to
parallelize job execution).
7
Integrated Computer Solutions Inc.
Qt-Specific Optimizations
● Embedding files as Qt resources in the application generally improves
performance, but can be an issue for large assets like videos.
● Enable ahead-of-time caching of compiled QML so this does not happen at
run time and slow down the initial run of the application.
● Also has the benefit that the QML source code is no longer in the application,
making reverse engineering harder.
● Usually just need to add "CONFIG += qtquickcompiler"
● The application binary is typically only slightly larger.
8
Integrated Computer Solutions Inc.
Misc. Techniques
● Explore optimal compiler and compile options.
● Remove any delays in your boot loader (e.g. U-Boot waiting for key press).
● Disable console.
● Remove unneeded drivers from kernel that scan for non-existent devices
(smaller kernel also boots faster).
● Memory checks in boot loader.
● Avoid/minimize file system checks on boot.
9
Integrated Computer Solutions Inc.
Misc. Techniques
● Statically linked applications can start up faster (but may be licensing
implications for LGPL code, etc.)
● Use of compiled languages (e.g. C, C++) versus interpreted or JIT (e.g.
Python, Java).
● May want to use a small RTOS or "bare metal" to minimize application size
and boot time.
● Qt for MCUs is an option with RTOS or bare metal.
● Useful tools: grabserial, bootchart
10
Integrated Computer Solutions Inc.
Minimizing Impact on UI
Various techniques to hide or minimize impact of boot time on the user:
● Splash screen early on startup.
● Run time consuming functions in the background so UI comes up earlier.
● Suspend/resume/hibernate solutions and products like Quick Boot.
● Always keep device running (impact on power consumption unless device can
go into a low power/sleep mode).
11
Integrated Computer Solutions Inc.
Summary and Conclusions
● Fast boot times are critical for embedded systems.
● Various techniques to reduce boot times.
● Tackle it early: more difficult to solve late in the project.
12
Integrated Computer Solutions Inc.
Andrew McNaughton
Senior Manager
Ubiquitous AI Corporation
Integrated Computer Solutions Inc.
Founded in 2001, Ubiquitous AI Corporation is a Leading Embedded
Software Development Company, headquartered in Tokyo,
Japan. Ubiquitous AI Corporation is a Public Company listed on the
JASDAQ Stock Exchange (3858).
https://www.ubiquitous-ai.com/en/
● Connectivity & Security
● Embedded Database - DeviceSQL
● QuickBoot
2
Integrated Computer Solutions Inc.
What is QuickBoot ?
3
● Advanced Hibernation Technology
● Rapid Boot from a complete Power Down State.
● Delivered as an SDK
Integrated Computer Solutions Inc.
Uses
● Shorten the Boot Time for a better User Experience
● Use No Power State to Save Energy / Maximize battery
● Faster Development
4
Integrated Computer Solutions Inc.
Over 40 Million Devices
5
Integrated Computer Solutions Inc.
QuickBoot vs Hibernation
6
Entire Image is
Restored
Prioritized Image
Restoration
Integrated Computer Solutions Inc.
Super Fast Boot
● Unique Technologies:
The Snapshot Image only needs to be partially loaded
before the device is up and running
● Optimization:
QuickBoot’s Optimization Features help customers
optimize their Boot Time
● Compression:
Compress the Snapshot Image to reduce disk usage and
increase boot performance
7
Integrated Computer Solutions Inc.
Experience
● Over 40 Million Devices with QuickBoot installed
● Millions of new devices ship with QuickBoot every year.
● Leverage Ubiquitous’ experience in developing great user
experiences and reducing cold boot times.
8
Integrated Computer Solutions Inc.
SDK
● Source Code for Kernel, Bootloader and Storage Driver all
provided for easy debugging and integration
● Custom Core - ported to your development environment
9
Integrated Computer Solutions Inc.
Technical Details
10
Integrated Computer Solutions Inc.
Requirements
● ARM CPU - v5, v6, v7, v8 (AArch32, AArch64)
x86_64 CPU - Bay Trail, Apollo Lake
● RAM
- min. 192 KiB for QuickBoot BIOS
- avg. 8 MiB in Kernel
● Storage
- eMMC, SD, NAND, NOR
- Contiguous partition for Snapshot Image
● Linux - 3.x, 4.x, 5.x
Android 4 and above
11
Integrated Computer Solutions Inc.
QuickBoot Software Stack
12
Integrated Computer Solutions Inc.
QuickBoot Sequence
13
Integrated Computer Solutions Inc.
Snapshot Creation Sequence
14
Integrated Computer Solutions Inc.
QuickBoot Configuration
● Static Mode
● One Snapshot Image used for QuickBoot
● Settings and State must be restored Manually
● System Resumes to same State
● Dynamic Mode
● Snapshot Image Saved at Shutdown
● System Resumes to last State Automatically
● Settings Restored Automatically
● Android
● Install Apps, Restore Settings, OTA
15
Integrated Computer Solutions Inc.
QuickBoot Features
● Read Boost
● Maximize eMMC throughput
● Minimize Preload time
● Interruptible
● QuickBoot can be interrupted at any time
● Concurrent Threads
● Implement own threads which run while QuickBooting
16
Integrated Computer Solutions Inc.
Snapshot Customization
● Learning Feature
● Adjust Preload Data size
● Update Snapshot Image after QuickBoot
● Automatic
● Preload Customization
● Specify exact Memory ranges to add to Preload
● Manual
17
Integrated Computer Solutions Inc.
Secure Boot
● Tampering Detection
● QuickBoot Binaries
● Snapshot Image
● Digest Lookup
● Integration
● ATF
● SoC / Hardware Key Store
● Encryption / Hashing
18
Integrated Computer Solutions Inc.
QuickBoot Demo
19
Integrated Computer Solutions Inc.
Linux on STMicroelectronics STA1295A
20
Integrated Computer Solutions Inc.
Android on MediaTek MT2712
21
Integrated Computer Solutions Inc.
DON'T WAIT. QUICKBOOT

Improving User Experience with Ubiquitous QuickBoot

  • 1.
    Integrated Computer SolutionsInc. Improving User Experience with Ubiquitous QuickBoot Jeff Tranter, ICS Andrew McNaughton, Ubiquitous AI
  • 2.
    Integrated Computer SolutionsInc. Jeff Tranter Engineering Manager ICS Optimizing Boot Times for Embedded Systems
  • 3.
    Integrated Computer SolutionsInc. Optimizing Boot Times for Embedded Systems 1. The Importance of Fast Booting. 2. OS/Linux Distribution Choice Considerations. 3. Specific Optimization Techniques. 4. Qt-Specific Optimizations. 5. Minimizing Impact on UI. 6. Summary and Conclusions. 3
  • 4.
    Integrated Computer SolutionsInc. The Importance of Fast Booting ● Fast boot times are critical for embedded applications. ● Slow boot is, at best, an inconvenience (e.g. automotive IVI system). ● At worst, life and death (e.g. medical defibrillator). ● Cost impact: may require use of faster and more expensive hardware platform. ● Increasingly challenging as software becomes larger and more complex at a greater rate than hardware. 4
  • 5.
    Integrated Computer SolutionsInc. The Importance of Fast Booting ● Conceptually, boot time is the time from power on to the device being fully up and running, including user interface (if applicable). ● Will want to look at and optimize all the phases of booting: ● Power on -> SPL -> boot loader -> kernel -> init -> application ● Recommend measuring, quantifying, and focussing on slowest areas first. ● Will look at some specific approaches and techniques. 5
  • 6.
    Integrated Computer SolutionsInc. OS/Linux Distribution Choice Considerations ● One approach is to use an operating system developed for desktop (e.g. Linux or Windows) and adapt it to embedded. ● This will bring in many applications, processes, services which are not required. ● While you can cut it down to only what is required, this can be a significant effort and difficult to do at the end of the development process. ● Better to use an operating system/distribution designed specifically for embedded (e.g. Yocto Linux). 6
  • 7.
    Integrated Computer SolutionsInc. Remove Unused Services and Processes ● Minimize running services and processes to only those that are needed. ● Will help at boot and run time and reduce memory usage and CPU load. ● Also desirable for cybersecurity. ● Can start services on demand when needed. ● Systemd has some advantages over SysVinit (e.g. makes it easier to parallelize job execution). 7
  • 8.
    Integrated Computer SolutionsInc. Qt-Specific Optimizations ● Embedding files as Qt resources in the application generally improves performance, but can be an issue for large assets like videos. ● Enable ahead-of-time caching of compiled QML so this does not happen at run time and slow down the initial run of the application. ● Also has the benefit that the QML source code is no longer in the application, making reverse engineering harder. ● Usually just need to add "CONFIG += qtquickcompiler" ● The application binary is typically only slightly larger. 8
  • 9.
    Integrated Computer SolutionsInc. Misc. Techniques ● Explore optimal compiler and compile options. ● Remove any delays in your boot loader (e.g. U-Boot waiting for key press). ● Disable console. ● Remove unneeded drivers from kernel that scan for non-existent devices (smaller kernel also boots faster). ● Memory checks in boot loader. ● Avoid/minimize file system checks on boot. 9
  • 10.
    Integrated Computer SolutionsInc. Misc. Techniques ● Statically linked applications can start up faster (but may be licensing implications for LGPL code, etc.) ● Use of compiled languages (e.g. C, C++) versus interpreted or JIT (e.g. Python, Java). ● May want to use a small RTOS or "bare metal" to minimize application size and boot time. ● Qt for MCUs is an option with RTOS or bare metal. ● Useful tools: grabserial, bootchart 10
  • 11.
    Integrated Computer SolutionsInc. Minimizing Impact on UI Various techniques to hide or minimize impact of boot time on the user: ● Splash screen early on startup. ● Run time consuming functions in the background so UI comes up earlier. ● Suspend/resume/hibernate solutions and products like Quick Boot. ● Always keep device running (impact on power consumption unless device can go into a low power/sleep mode). 11
  • 12.
    Integrated Computer SolutionsInc. Summary and Conclusions ● Fast boot times are critical for embedded systems. ● Various techniques to reduce boot times. ● Tackle it early: more difficult to solve late in the project. 12
  • 13.
    Integrated Computer SolutionsInc. Andrew McNaughton Senior Manager Ubiquitous AI Corporation
  • 14.
    Integrated Computer SolutionsInc. Founded in 2001, Ubiquitous AI Corporation is a Leading Embedded Software Development Company, headquartered in Tokyo, Japan. Ubiquitous AI Corporation is a Public Company listed on the JASDAQ Stock Exchange (3858). https://www.ubiquitous-ai.com/en/ ● Connectivity & Security ● Embedded Database - DeviceSQL ● QuickBoot 2
  • 15.
    Integrated Computer SolutionsInc. What is QuickBoot ? 3 ● Advanced Hibernation Technology ● Rapid Boot from a complete Power Down State. ● Delivered as an SDK
  • 16.
    Integrated Computer SolutionsInc. Uses ● Shorten the Boot Time for a better User Experience ● Use No Power State to Save Energy / Maximize battery ● Faster Development 4
  • 17.
    Integrated Computer SolutionsInc. Over 40 Million Devices 5
  • 18.
    Integrated Computer SolutionsInc. QuickBoot vs Hibernation 6 Entire Image is Restored Prioritized Image Restoration
  • 19.
    Integrated Computer SolutionsInc. Super Fast Boot ● Unique Technologies: The Snapshot Image only needs to be partially loaded before the device is up and running ● Optimization: QuickBoot’s Optimization Features help customers optimize their Boot Time ● Compression: Compress the Snapshot Image to reduce disk usage and increase boot performance 7
  • 20.
    Integrated Computer SolutionsInc. Experience ● Over 40 Million Devices with QuickBoot installed ● Millions of new devices ship with QuickBoot every year. ● Leverage Ubiquitous’ experience in developing great user experiences and reducing cold boot times. 8
  • 21.
    Integrated Computer SolutionsInc. SDK ● Source Code for Kernel, Bootloader and Storage Driver all provided for easy debugging and integration ● Custom Core - ported to your development environment 9
  • 22.
    Integrated Computer SolutionsInc. Technical Details 10
  • 23.
    Integrated Computer SolutionsInc. Requirements ● ARM CPU - v5, v6, v7, v8 (AArch32, AArch64) x86_64 CPU - Bay Trail, Apollo Lake ● RAM - min. 192 KiB for QuickBoot BIOS - avg. 8 MiB in Kernel ● Storage - eMMC, SD, NAND, NOR - Contiguous partition for Snapshot Image ● Linux - 3.x, 4.x, 5.x Android 4 and above 11
  • 24.
    Integrated Computer SolutionsInc. QuickBoot Software Stack 12
  • 25.
    Integrated Computer SolutionsInc. QuickBoot Sequence 13
  • 26.
    Integrated Computer SolutionsInc. Snapshot Creation Sequence 14
  • 27.
    Integrated Computer SolutionsInc. QuickBoot Configuration ● Static Mode ● One Snapshot Image used for QuickBoot ● Settings and State must be restored Manually ● System Resumes to same State ● Dynamic Mode ● Snapshot Image Saved at Shutdown ● System Resumes to last State Automatically ● Settings Restored Automatically ● Android ● Install Apps, Restore Settings, OTA 15
  • 28.
    Integrated Computer SolutionsInc. QuickBoot Features ● Read Boost ● Maximize eMMC throughput ● Minimize Preload time ● Interruptible ● QuickBoot can be interrupted at any time ● Concurrent Threads ● Implement own threads which run while QuickBooting 16
  • 29.
    Integrated Computer SolutionsInc. Snapshot Customization ● Learning Feature ● Adjust Preload Data size ● Update Snapshot Image after QuickBoot ● Automatic ● Preload Customization ● Specify exact Memory ranges to add to Preload ● Manual 17
  • 30.
    Integrated Computer SolutionsInc. Secure Boot ● Tampering Detection ● QuickBoot Binaries ● Snapshot Image ● Digest Lookup ● Integration ● ATF ● SoC / Hardware Key Store ● Encryption / Hashing 18
  • 31.
    Integrated Computer SolutionsInc. QuickBoot Demo 19
  • 32.
    Integrated Computer SolutionsInc. Linux on STMicroelectronics STA1295A 20
  • 33.
    Integrated Computer SolutionsInc. Android on MediaTek MT2712 21
  • 34.
    Integrated Computer SolutionsInc. DON'T WAIT. QUICKBOOT