When the board is powered on, the CPU executes code in its internal ROM, loading the first sectors of the SD card. In this way the U-Boot boot-loader is loaded and executed.

The boot-loader

This thin layer of software takes care of initialize some registers, devices (like the PMIC) and RAM time settings. It is composed of two stages, the first is called SPL (secondary program loader) which initializes several things:

  • arch_cpu_init() initializes some registers, the watchdog, the DMA, etc;
  • ccgr_init initializes CCGR registers in the CCM (Clock Controller Module);
  • board_early_init_f initializes the M4 core and the pads of the UART1;
  • timer_init initializes CPU timers and clock sources;
  • preloader_console_init initializes serial port communications and prints the message "U-Boot SPL 2015.04-00267-gd781468 (Dec 16 2015 - 14:44:56)";
  • spl_dram_init sets board-specific DRAM configuration (UDOO Neo Basic has 512MB of RAM and different timings);
  • memset zeros BSS memory;
  • board_init_r continues the boot, loading the second stage of the boot-loader.

In the second stage, more devices and registers are initialized. I2C buses, LVDS, Ethernet, Wireless and motions sensors pads are initialized. The PFUZE3000 power regulator is setup and MMC is initialized so files can be read from it.

The uEnv.txt file

Once the hardware is correctly initialized, the uEnv.txt file is read from the FAT /boot partition. This file contains a few options to override some default settings, like the main video output (which defaults to HDMI).

Variable name Default value Possible values
video_output hdmi hdmi, lvds7, disabled
m4_enabled true true, false
use_custom_dtb false true, false

Those variables (screen type, M4 core status and the use of custom device tree) are used to select the correct device tree file to load.

Linux kernel boot

The last step is to load the Linux kernel zImage and the device tree file, both from the /boot partition:

reading /zImage
4376112 bytes read in 232 ms (18 MiB/s)
Booting from mmc ...
reading dts-overlay/imx6sx-udoo-neo-full-hdmi-m4.dtb
45210 bytes read in 35 ms (1.2 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x42c630 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300e099
Switched to ldo_bypass mode!

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.56-udooneo-01989-.....
This page was last updated on Monday, March 21, 2022 at 5:19 AM.