Lines Matching +full:time +full:- +full:based
1 U-Boot for the Gateworks Ventana Product Family boards
3 This file contains information for the port of U-Boot to the Gateworks
7 is supported by a single bootloader build by using a common SPL and U-Boot
13 ---------------------------------
19 will build the following artifacts from U-Boot source:
20 - SPL - Secondary Program Loader that the i.MX6 BOOT ROM (Primary Program
22 The DRAM controller, loads u-boot.img from the detected boot device,
25 - u-boot.img - The main U-Boot core which is u-boot.bin with a image header.
29 --------
31 To build U-Boot for the Gateworks Ventana product family:
33 For NAND FLASH based boards:
37 For EMMC FLASH based boards:
43 ---------------
45 The Gateworks Ventana boards support booting from NAND or micro-SD depending
46 on the board model. The IMX6 BOOT ROM will choose a boot media based on eFUSE
49 Boards with NAND flash will always boot from NAND, and NAND-less boards will
50 always boot from micro-SD. However, it is possible to use the U-Boot bmode
55 -------------------
64 The Freescale 'kobs-ng' application from the Freescale LTIB BSP, which runs
70 specified by providing kobs-ng with the --search_exponent=1 argument). Once in
74 kobs-ng init -v -x --search_exponent=1 SPL
76 The kobs-ng application uses an imximage which contains the Image Vector Table
78 requires to boot. The kobs-ng adds the Firmware Configuration Block (FCB) and
79 Discovered Bad Block Table (DBBT). The SPL build artifact from U-Boot is
82 The u-boot.img, which is the non SPL U-Boot binary appended to a U-Boot image
85 The image can be programmed from either U-Boot or Linux:
87 U-Boot:
88 Ventana > setenv mtdparts mtdparts=nand:14m(spl),2m(uboot),1m(env),-(rootfs)
89 Ventana > tftp ${loadaddr} u-boot.img && nand erase.part uboot && \
93 nandwrite /dev/mtd1 u-boot.img
97 - spl: 14MB
98 - uboot: 2M
99 - env: 1M
100 - rootfs: the rest
108 ---------------------------------
112 booted, it will load and execute U-Boot (u-boot.img) from offset 69KB
113 on the micro-SD (defined by CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR).
116 U-Boot from a file on a FAT/EXT filesystem on the micro-SD, we chose to
117 use raw micro-SD access to keep the code-size and boot time of the SPL down.
130 # copy U-Boot to 69KB offset
131 sudo dd if=u-boot.img of=$DEV bs=1K seek=69 oflag=sync status=none && sync
133 printf "1,,L\n" | sudo sfdisk --in-order --no-reread -L -uM $DEV && sync
135 sudo mkfs.ext4 -L root ${DEV}1
137 sudo udisks --mount ${DEV}1
139 sudo tar xvf rootfs.tar.gz -C /media/root
143 The above assumes the default Ventana micro-SD partitioning scheme
144 - spl : 1KB-69KB (68KB) required by IMX6 BOOT ROM
145 - uboot : 69KB-709KB (640KB) defined by
147 - env : 709KB-965KB (256KB) defined by
150 - rootfs : 1MB-
158 ------------------------------
161 which allows the SPL to boot directly to an OS instead of to U-Boot
162 (u-boot.img) thus acheiving a faster overall boot time. The time savings
163 depends on your boot medium (ie NAND Flash vs micro-SD) and size/storage
164 of the OS. The time savings can be anywhere from 2 seconds (256MB NAND Flash
169 - NAND flash
170 - micro-SD
174 as the size of the SPL is fairly limitted (to 64KB based on the smallest
176 OS load time which defeats the purpose of Falcon mode in the first place.
178 The SPL decides to boot either U-Boot (u-boot.img) or the OS (args + kernel)
179 based on the return value of the spl_start_uboot() function. While often
180 this can simply be the state of a GPIO based pushbutton or DIP switch, for
181 Gateworks Ventana, we use an EEPROM register on i2c-0 at 0x50:0x00:
182 set to '0' will choose to boot to U-Boot and otherwise it will boot to OS.
186 OS or bare-metal application). In the case of the Linux kernel the 'args'
187 is the flatenned device-tree which normally gets altered prior to booting linux
188 by U-Boot's 'bootm' command. To achieve this for SPL we use the
189 'spl export fdt' command in U-Boot after loading the kernel and dtb which
190 will go through the same process of modifying the device-tree for the board
200 ------------------------------
203 located where defined at compile time by the following:
204 CONFIG_CMD_SPL_NAND_OFS 17MB - offset of 'args'
205 CONFIG_SYS_NAND_SPL_KERNEL_OFFS 18MB - offset of 'kernel'
208 flexible if you want to re-define them.
210 The following steps executed in U-Boot will configure Falcon mode for NAND
214 Ventana > setenv mtdparts 'mtdparts=nand:14m(spl),2m(uboot),1m(env),1m(args),10m(kernel),-(rootfs)'
220 # load the device-tree
232 # create args based on env, board, EEPROM, and dtb
233 Ventana > spl export fdt ${loadaddr} - ${fdt_addr}
246 http://trac.gateworks.com/wiki/ventana/bootloader/falcon-mode#nand
249 4.2. Falcon Mode on micro-SD card
250 ---------------------------------
252 To prepare a Gateworks Ventana board with a primary boot device of micro-SD
253 you first need to make sure you build U-Boot with CONFIG_ENV_IS_IN_MMC
256 For micro-SD based Falcon mode you must program your micro-SD such that
257 the 'args' and 'kernel' are located where defined at compile time
259 CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x800 (1MB) - offset of 'args'
260 CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1000 (2MB) - offset of 'kernel'
263 flexible if you want to re-define them.
265 First you must prepare a micro-SD such that the SPL can be loaded by the
266 IMX6 BOOT ROM (fixed offset of 1KB), and U-Boot can be loaded by the SPL
270 block storage device of your micro-SD):
277 # copy U-Boot to 69KB offset
278 sudo dd if=u-boot.img of=$DEV bs=1K seek=69 oflag=sync status=none && sync
280 printf "10,,L\n" | sudo sfdisk --in-order --no-reread -L -uM $DEV && sync
282 sudo mkfs.ext4 -L root ${DEV}1
284 sudo udisks --mount ${DEV}1
286 sudo tar xvf rootfs.tar.gz -C /media/root
290 Now that your micro-SD partitioning has been adjusted to leave room for the
291 raw 'args' and 'kernel' data boot the board with the prepared micro-SD, break
292 out in U-Boot and use the following to enable Falcon mode:
294 # load device-tree from rootfs
307 Ventana > spl export fdt ${loadaddr} - ${fdt_addr}
320 http://trac.gateworks.com/wiki/ventana/bootloader/falcon-mode#microsd