This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Booting Linux dm365 Network Camera in 3.2 seconds

Boot/reboot time of embedded system is very critical for some applications. As you know, default boot of DaVinci Demo EVM and IPNC (IP Network Camera) is about 15-20 seconds. We designed fast boot for functional DaVinci network camera. Gross reboot time takes 3.2 seconds. (measured on network) Firmware boot time is 2.5 seconds. (measured on serial console) Please see explanations and logs below.

Specifications:

Functionality:

  • Capture of PAL video.
  • Encoding to MPEG4
  • Streaming of raw encoding video over UDP and TCP.

Summary of boot process:
Please see serial boot log with timestamps for details.

  • About 0.5 seconds takes to boot RBL and load UBL. This stage passes silently on serial console.
  • 0.5 second takes to boot UBL and U-Boot
  • 1.5 seconds takes to load 3MB image of Linux kernel and root FS.
  • 0.36 second to start kernel, application, video capture, encoding and streaming.
  • 2.6 seconds passed from UBL start to sending first encoded packet.

Serial boot log of firmware with timestamps (2.6 sec):

0.000 0.000: TI UBL Version: 1.50
0.000 0.000: Booting Catalog Boot Loader
0.000 0.000: BootMode = NAND
0.000 0.000: Starting NAND Copy...
0.013 0.013: Valid magicnum, 0xA1ACED66, found in block 0x00000019.
0.112 0.099:    DONE
0.112 0.000: Jumping to entry point at 0x81080000.
0.112 0.000: 
0.120 0.008: U-Boot 2009.03-dirty (Jun 21 2010 - 20:03:02)
0.120 0.000: 
0.170 0.050: I2C:   ready
0.170 0.000: DRAM:  128 MB
0.250 0.080: NAND:  NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit)
0.250 0.000: 1024 MiB
0.429 0.179: Ethernet PHY: GENERIC @ 0x00
0.532 0.104: Hit any key to stop autoboot:  0 
0.541 0.009: NAND read: device 0 offset 0x400000, size 0x300000
2.079 1.538:  3145728 bytes read: OK t=1539
2.090 0.012: ## Starting application at 0x80008000 ...
2.172 0.082: | 0.00   Linux version 2.6.32-rc2-davinci1-dm365 (const@makelinux.net)
2.203 0.000: | 0.08   Starting application
2.212 0.010: Encode demo started.
2.482 0.269: | 0.29 First frame captured
2.482 0.000: | 0.36 Sending first packet
2.620 0.139: num=0 sent_total=13775 

Network dump to measure gross reboot time (3.24 sec)

Encoded data is streamed over TCP and UDP. We will capture data stream and reset board to measure reboot/recovery time. First column is delta time between current and previous line on each dump line. Gap in UDP data stream lasts 3.24 seconds.

# tcpdump  -ttt -n udp port 12345

...Stream dump before reset:
00:00:00.039997 IP 10.0.0.2.54804 > 10.0.0.1.12345: UDP, length 5106
00:00:00.039973 IP 10.0.0.2.54804 > 10.0.0.1.12345: UDP, length 5125
00:00:00.040040 IP 10.0.0.2.54804 > 10.0.0.1.12345: UDP, length 5076
Here reset was pressed on test board.
Stream dump after reset:
00:00:03.242057 IP 10.0.0.2.47957 > 10.0.0.1.12345: UDP, length 6861
00:00:00.036950 IP 10.0.0.2.47957 > 10.0.0.1.12345: UDP, length 8536
00:00:00.039239 IP 10.0.0.2.47957 > 10.0.0.1.12345: UDP, length 4018

...

Firmware is designed for linux-2.6.32, dvsdk_3_10_00_12 and dm365 EVM and can be ported to other processor of DaVinci family.
Demo binaries are here: http://www.makelinux.net/ti/fastboot/dm365ipnc/
Source code is available for charge.

Your comments and questions are welcome.