Boot-process

From Wandboard Wiki
Jump to: navigation, search

First try documenting the boot process

i.mx6 startup

[1]

  • Device Boot mode is determined by boot mode pin settings (pg 391)
  • According to schematics[2] boot pins are BOOT_MODE[1:0]=10 -> internal boot
  • ROM code looks for DCD table in secondary boot loader (offset 0x400)
  • DCD table contains information for ROM to initialize memory, clocks etc
  • After DCD table is processed, the secondary boot loader is loaded to RAM
  • The secondary boot loader loads third boot loader if needed, kernel otherwise
  • Boot mode

sdcard boot data layout

[2] pg 438

Hex Dec Description
0x00000000 Reserved For MBR
0x00000200 512 Secondary Image Table (optional)
0x00000400 1024 uBoot Image (Starting From IVT)
0x00060000 393216 start of uboot env (size:8k)
0x00062000 end of uboot env
0x00100000 1048576 Linux kernel start
0x0076AC00 7777280 start of partition 1
       /* address of boot parameters */
       gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
       #ifdef CONFIG_MX6SL
       #define MMDC0_ARB_BASE_ADDR             0x80000000
       #else
       ##define MMDC0_ARB_BASE_ADDR             0x10000000

wandboard.h:

 #define PHYS_SDRAM                  MMDC0_ARB_BASE_ADDR
 /* FLASH and environment organization */
 #define CONFIG_SYS_NO_FLASH
 #define CONFIG_ENV_SIZE                 (8 * 1024)
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_OFFSET               (6 * 64 * 1024)
 #define CONFIG_SYS_MMC_ENV_DEV          0


[1]i.MX 6Dual/6Quad Applications Processor Reference Manual http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf?fpsp=1

[2]Wandboard QUAD REV B1 Userguide + Schematics Wandboard Enclosure Assembling Guide http://www.wandboard.org/images/downloads/wbquad-revb1-userguide.pdf

[3]Linux Sourcecode SDK (14 May 2013) http://www.wandboard.org/images/downloads/wandboard-sdk-20130514.tar.xz

build u-boot

  • get source from git://git.denx.de/u-boot.git
  • set model: $ make wandboard_quad_config
  • compile: $ make
  • put on sd card: $ sudo dd if=u-boot.imx of=/dev/mmcblk0 bs=1 seek=1024

build kernel