Lines Matching +full:flash +full:- +full:mode

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
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 -------------------
62 addition, the i.MX6 BOOT ROM Flash Configuration Block (FCB) supports two
63 copies of a bootloader in flash in the case that a bad block has corrupted one.
64 The Freescale 'kobs-ng' application from the Freescale LTIB BSP, which runs
66 bootstream in order to setup this flash structure correctly.
68 The Gateworks Ventana boards with NAND flash have been factory programmed
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
83 header must be programmed in the NAND flash boot device at an offset hard
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-
157 4. Falcon Mode
158 ------------------------------
160 The Gateworks Ventana board config enables Falcon mode (CONFIG_SPL_OS_BOOT)
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
165 with ~1MB kernel) to 6 seconds or more (2GB NAND Flash with ~6 kernel)
167 The Gateworks Ventana board supports Falcon mode for the following boot
169 - NAND flash
170 - micro-SD
172 For all boot mediums, raw mode is used. While support of more complex storage
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)
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.
184 To use Falcon mode it is required that you first 'prepare' the 'args' data
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
192 args data to the location the SPL expects it and then enable Falcon mode.
199 4.1. Falcon Mode on NAND flash
200 ------------------------------
201 To prepare a Gateworks Ventana board that boots from NAND flash for Falcon
202 mode you must program your flash such that the 'args' and 'kernel' are
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)'
216 # flash rootfs (at 28MB)
220 # load the device-tree
226 # flash kernel (at 18MB)
233 Ventana > spl export fdt ${loadaddr} - ${fdt_addr}
235 # flash args (at 17MB)
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
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