Open main menu

DAVE Developer's Wiki β

Changes

Standalone boot (SDVX)

2,181 bytes added, 14:31, 22 October 2018
Program root file system into eMMC flash
42547 bytes written: OK
=>
</pre>
 
Reboot the system and configure U-Boot to apply the new configuration
 
<pre class="board-terminal">
=> setenv bootcmd run nand_nand
=> saveenv
</pre>
mmc_update=mmc dev; setexpr blocks ${filesize} / 0x200; setexpr blocks ${blocks} + 1; mmc write ${loadaddr} 2 ${blocks}
</pre>
 
Load u-boot binary form a <code>tftp</code> server:
<pre class="board-terminal">
done
Bytes transferred = 671788 (a402c hex)
=> run mmc_update
switch to partitions #0, OK
mmc2(part 0) is current device (eMMC)
 
MMC write: dev # 2, block # 2, count 1313 ... 1313 blocks written: OK
=>
</pre>
 
Load u-boot binary form an <code>SD</code> card:
 
<pre class="board-terminal">
Hit ENTER within 1 seconds to stop autoboot
=> fatload mmc 0:1 ${loadaddr} sdvx-1.0.1_mx6dlaxel_u-boot.imx
reading sdvx-1.0.1_mx6dlaxel_u-boot.imx
671788 bytes read in 50 ms (12.8 MiB/s)
=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device (eMMC)
=> run mmc_update
switch to partitions #0, OK
mmc_loadfdt=fatload mmc ${mmcdev}:1 ${fdtaddr} ${fdtfile}
mmc_loadsplash=fatload mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}
mmcboot=run mmcargs addcons addmisc; if run mmc_loadk; then if run mmc_loadfdt; then if run configid_fixupfdt; then bootm ${loadaddr} - ${fdtaddr}; fi; fi; fi
</pre>
mmcargs=setenv bootargs root=${mmcroot}
mmcroot=/dev/mmcblk2p2 rootwait rw
</pre>
 
=== boot vars ===
 
The following environment variables should be configured for u-boot properly reading the boot files from the first SD card partition, e.g.
 
<pre class="board-terminal">
=> setenv normalboot mmcboot
=> setenv bootfile sdvx-1.0.1_lite_uImage
=> setenv fdtfile sdvx-1.0.1_lite_imx6dl-sdv03-cb002a.dtb
=> setenv splashfile splash_image.bmp
</pre>
 
then save the environment and reboot the system to apply the new configuration:
 
<pre class="board-terminal">
=> saveenv
Saving Environment to MMC...
Writing to MMC(2)... done
=> reset
</pre>
* an example of SD partitioning script is the following one:
=== FAT32 partition ===
<pre>
#!/bin/sh
<pre class="workstation-terminal">
=> setenv bootcmd run mmcboot
=> saveenv
</pre>
 
=== ext4 partition ===
For using an <b>ext4</b> partition also for boot files, it is possibile to change the formatting script:
 
{ echo ${boot_start},${boot_size},'''83''',-; echo ${rfs_start},${rfs_size},83,-; } | sfdisk --force ${node}
 
and formatting the first partition using ''mkfs.ext4''
 
mkfs.ext4 -F ${node}${part}1 -Lboot
 
then, the u-boot <code>environment</code> has to be properly configured:
 
<pre class="workstation-terminal">
=> setenv mmc_loadk 'ext4load mmc ${mmcdev}:1 ${loadaddr} ${bootfile}'
=> setenv mmc_loadfdt 'ext4load mmc ${mmcdev}:1 ${fdtaddr} ${fdtfile}'
=> setenv mmc_loadsplash 'ext4load mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}'
=> saveenv
</pre>
8,186
edits