Open main menu

DAVE Developer's Wiki β

Changes

SDVX-TN-001: Fast boot time

6,630 bytes added, 13:43, 4 October 2018
Created page with "{{InfoBoxTop}} {{Applies To SDVX}} {{InfoBoxBottom}} == History == {| class="wikitable" border="1" !Version !Date !Notes |- |1.0.0 |October 2018 |First public release |} ==In..."
{{InfoBoxTop}}
{{Applies To SDVX}}
{{InfoBoxBottom}}
== History ==
{| class="wikitable" border="1"
!Version
!Date
!Notes
|-
|1.0.0
|October 2018
|First public release
|}

==Introduction==
When using Linux embedded platforms, boot time is an important performance to take into account. Many indication or examples can be found on Internet but when a ''real case'' where <code>real industrial platform</code> is used, those techniques cannot be easily adopted.

This Technical Note describes howto reduces the boot time using the main general purpose indications and a ''well designed board architecture'', like '''DAVE's SDV03''' platform are used.

==Testbed==
As stated in the introduction, the solution has been tested on a DAVE's Embedded platform: here below the main characteristics

* Board: [[SDV03|SDV03]] equipped with [[:Category:AxelLite|AxelLite]] SOM
* SOC: NXP i.MX6 DualLite
* Flash storage: eMMC
* U-boot: 2016.03
* Linux Version: 4.1.15 ([[SDV04_Embedded_Linux_Kit_(SDVX)#SDVX_software_components | BSP]]).

To verify the boot time achieved, a serial port terminal with timestamping capabilities has been used, like [https://ttssh2.osdn.jp/index.html.en Teraterm]

== Serial terminal configuration ==

Select form Teraterm the menu: File / Log...

[[File:Teraterm-log-menu.png |thumb|center|600px]]

Select the filename for the log file and enable the <code>timestamp</code>

[[File:Teraterm-log-timestamp.png |thumb|center|600px]]

== Boot time measure ==

The serial terminal collects all the string from u-boot and linux kernel: at the beginning of each raw the related timestamp is printend before the message

<pre class="board-terminal">
[Thu Oct 04 15:22:30.038 2018]
[Thu Oct 04 15:22:30.038 2018] U-Boot 2016.03-sdvx-1.0.1 (Oct 03 2018 - 23:08:31 +0200), Build: jenkins-SDVX_U-Boot-5
[Thu Oct 04 15:22:30.038 2018]
[Thu Oct 04 15:22:30.038 2018] CPU: Freescale i.MX6DL rev1.3 at 792MHz
[Thu Oct 04 15:22:30.038 2018] CPU: Industrial temperature grade (-40C to 105C) at 50C
[Thu Oct 04 15:22:30.038 2018] Reset cause: POR
[Thu Oct 04 15:22:30.038 2018] Environment: MMC
[Thu Oct 04 15:22:30.038 2018] I2C: ready
[Thu Oct 04 15:22:30.038 2018] DRAM: 1 GiB
[Thu Oct 04 15:22:30.038 2018] Relocating to 4ff0c000, new gd at 4df09eb8, sp at 4df09e90
[Thu Oct 04 15:22:30.114 2018] PMIC: PFUZE100 ID=0x10
[Thu Oct 04 15:22:30.131 2018] NAND: Board NAND skip
[Thu Oct 04 15:22:30.131 2018] MMC: WARNING: CB ConfigID on block 0 is UNLOCKED
[Thu Oct 04 15:22:30.209 2018] FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
[Thu Oct 04 15:22:30.334 2018] Display: LDB-AM-800480STMQW-TA1-SDV03 (800x480)
[Thu Oct 04 15:22:30.383 2018] reading splash_image.bmp
[Thu Oct 04 15:22:30.447 2018] 1152054 bytes read in 59 ms (18.6 MiB/s)
[Thu Oct 04 15:22:30.669 2018] In: serial
[Thu Oct 04 15:22:30.704 2018] Out: serial
[Thu Oct 04 15:22:30.704 2018] Err: serial
[Thu Oct 04 15:22:30.704 2018] SOM ConfigID#: 00000001
[Thu Oct 04 15:22:30.704 2018] SOM UniqueID#: e317d7c9:1a0151d4
[Thu Oct 04 15:22:30.704 2018] CB ConfigID#: 0000002a
[Thu Oct 04 15:22:30.704 2018] CB UniqueID#: b100001a:baed182d
[Thu Oct 04 15:22:30.704 2018] Board: MX6DL-AxelLite on SDV03
[Thu Oct 04 15:22:30.858 2018] switch to partitions #0, OK
[Thu Oct 04 15:22:30.858 2018] mmc2(part 0) is current device (eMMC)
[Thu Oct 04 15:22:30.858 2018] flash target is MMC:2
[Thu Oct 04 15:22:30.858 2018] Bad partition index:5 for partition:system
[Thu Oct 04 15:22:30.858 2018] Bad partition index:4 for partition:data
[Thu Oct 04 15:22:30.858 2018] Net: FEC [PRIME]
[Thu Oct 04 15:22:31.369 2018] Warning: FEC (eth0) using random MAC address - de:b6:b3:f6:69:b5
[Thu Oct 04 15:22:31.403 2018]
[Thu Oct 04 15:22:31.403 2018] Normal Boot
[Thu Oct 04 15:22:31.403 2018] Hit ENTER within 0 seconds to stop autoboot
[Thu Oct 04 15:22:31.403 2018] reading sdvx-1.0.1_lite_uImage
[Thu Oct 04 15:22:31.642 2018] 6695408 bytes read in 245 ms (26.1 MiB/s)
[Thu Oct 04 15:22:31.661 2018] reading imx6dl-sdv03-cb002a.dtb
[Thu Oct 04 15:22:31.724 2018] 43187 bytes read in 20 ms (2.1 MiB/s)
[Thu Oct 04 15:22:31.724 2018] FDT: override 'som_uniqueid' with 'e317d7c9:1a0151d4'
[Thu Oct 04 15:22:31.724 2018] FDT: override 'cb_uniqueid' with 'b100001a:baed182d'
[Thu Oct 04 15:22:31.724 2018] ## Booting kernel from Legacy Image at 12000000 ...
[Thu Oct 04 15:22:31.724 2018] Image Name: Linux-4.1.15-sdvx-1.0.1
[Thu Oct 04 15:22:31.725 2018] Image Type: ARM Linux Kernel Image (uncompressed)
[Thu Oct 04 15:22:31.725 2018] Data Size: 6695344 Bytes = 6.4 MiB
[Thu Oct 04 15:22:31.725 2018] Load Address: 10008000
[Thu Oct 04 15:22:31.725 2018] Entry Point: 10008000
[Thu Oct 04 15:22:31.725 2018] ## Flattened Device Tree blob at 18000000
[Thu Oct 04 15:22:31.725 2018] Booting using the fdt blob at 0x18000000
[Thu Oct 04 15:22:31.725 2018] Loading Kernel Image ... OK
[Thu Oct 04 15:22:31.756 2018] reserving fdt memory region: addr=18000000 size=b000
[Thu Oct 04 15:22:31.756 2018] Using Device Tree in place at 18000000, end 1800dfff
[Thu Oct 04 15:22:31.783 2018] switch to ldo_bypass mode!
[Thu Oct 04 15:22:33.214 2018] Frame buffer: configure splashscreen reserved memory to 0x4e000000 (2 MiB)
[Thu Oct 04 15:22:33.214 2018] WARNING: could not find 2nd splashscreen reserved memory path
[Thu Oct 04 15:22:33.214 2018]
[Thu Oct 04 15:22:33.214 2018] Starting kernel ...
[Thu Oct 04 15:22:33.214 2018]
[Thu Oct 04 15:22:34.694 2018] [ 1.086794] snvs-secvio 20cc000.caam-snvs: can't get snvs clock
[Thu Oct 04 15:22:34.819 2018] INIT: version 2.88 booting
[Thu Oct 04 15:22:35.140 2018] Starting udev
[Thu Oct 04 15:22:37.105 2018] ALSA: Restoring mixer settings...
[Thu Oct 04 15:22:37.249 2018] INIT: Entering runlevel: 5
[Thu Oct 04 15:22:37.279 2018] Configuring network interfaces... done.
[Thu Oct 04 15:22:37.550 2018] Starting Dropbear SSH server: dropbear.
[Thu Oct 04 15:22:37.598 2018] Starting rpcbind daemon...done.
[Thu Oct 04 15:22:37.678 2018] Starting crond: OK
[Thu Oct 04 15:22:37.712 2018] Running local boot scripts (/etc/rc.local).
[Thu Oct 04 15:22:37.742 2018] Starting tcf-agent: OK
[Thu Oct 04 15:22:37.945 2018]
[Thu Oct 04 15:22:37.945 2018] Freescale i.MX Release Distro 4.1.15-2.0.1 sdv03-lite /dev/ttymxc2
[Thu Oct 04 15:22:37.945 2018]
[Thu Oct 04 15:22:37.945 2018] sdv03-lite login:
</pre>

== Results ==

* u-boot starts at

15:22:30.038

* linux kernel starts <b>3 s</b> from the boot

15:22:33.214

* INIT: runlevel 5 is executed after <b>7s</b> from the boot

15:22:37.249

and finally the <code>login:</code> is processed after '''less then 8 s''' from the boot
8,286
edits