Difference between revisions of "Standalone boot (SDVX)"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "== Introduction == == Storing root file system into NAND flash == == Storing boot images ...== ==... into NOR flash == ===U-Boot=== ===Linux kernel image and device tree=== ==...")
 
Line 1: Line 1:
 +
== History ==
 +
 +
{| class="wikitable" border="1"
 +
!Version
 +
!Date
 +
!XUELK version
 +
!Hardware Part Nr
 +
!Notes
 +
|-
 +
|1.0.0
 +
|September 2018
 +
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#SDVX_1.0.0|SDVX 1.0.0]]
 +
|XUBE0000I1R
 +
|
 +
|-
 +
|}
 +
 
== Introduction ==
 
== Introduction ==
== Storing root file system into NAND flash ==
+
This document was written and tested with the software/hardware combination described in the history table above. However, it contains general concepts that can be adapted on any DAVE Embedded Systems' Linux platform.
 +
 
 +
We'll explain how to program and configure an [[:Category:SDVX |SDVX ]] to boot in standalone mode, without the need of a system microSD card or an NFS server, with two options:
 +
* booting with NAND only
 +
** In this configuration the whole system will boot without the need of a NOR flash storage, all images and the root file system will be fetched from NAND flash.
 +
* booting with microSD only
 +
** In this configuration the whole system will boot without the need of a NOR flash storage, all images and the root file system will be fetched from NAND flash.
 +
 
 +
== Storing root file system into NAND flash (only Lite) ==
 +
This is a common step for both booting options.
 +
 
 +
* Boot the system via SD or NFS as described into the [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#Quick_start_guide|Quick_start_guide]]
 +
* By default, the NAND is already partitioned to allow booting from NAND-only (see next section) and, thus, some partitions are reserved for U-boot and kernel images. Here we won't modify this default configuration. The [[Memory Tecnology Device (MTD)|MTD]] partitions can be dumped with <code>/proc/mtd</code> (the partition's name should be self-explanatory)
 +
 
 
== Storing boot images ...==
 
== Storing boot images ...==
 
==... into NOR flash ==
 
==... into NOR flash ==
Line 8: Line 38:
 
===U-Boot===
 
===U-Boot===
 
===Linux kernel image and device tree===
 
===Linux kernel image and device tree===
== ... into NAND flash ==
+
== ... into eMMC ==
 +
We assume that the following environment variables are present in u-boot:
 +
<pre class="mw-collapsible mw-collapsed">
 +
mmc_loadfdt=fatload mmc 0:1 ${fdtaddr} imx6ul-lynx.dtb
 +
mmc_loadk=fatload mmc 0:1 ${loadaddr} uImage
 +
mmc_loadsplash=fatload mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}
 +
mmc_update=setexpr blocks ${filesize} / 0x200; setexpr blocks ${blocks} + 1; mmc write ${loadaddr} 2 ${blocks}
 +
mmcargs=setenv bootargs root=${mmcroot}
 +
</pre>
 +
* Update the <code>bootfile</code> and <code>fdtfile</code> environment variables to fit the filename as found inside the TFTP server.
 +
* Program kernel and device tree on the MMC with the following U-Boot command
 +
 
 +
<pre class="board-terminal">
 +
 
 +
</pre>

Revision as of 13:43, 5 September 2018

History[edit | edit source]

Version Date XUELK version Hardware Part Nr Notes
1.0.0 September 2018 SDVX 1.0.0 XUBE0000I1R

Introduction[edit | edit source]

This document was written and tested with the software/hardware combination described in the history table above. However, it contains general concepts that can be adapted on any DAVE Embedded Systems' Linux platform.

We'll explain how to program and configure an SDVX to boot in standalone mode, without the need of a system microSD card or an NFS server, with two options:

  • booting with NAND only
    • In this configuration the whole system will boot without the need of a NOR flash storage, all images and the root file system will be fetched from NAND flash.
  • booting with microSD only
    • In this configuration the whole system will boot without the need of a NOR flash storage, all images and the root file system will be fetched from NAND flash.

Storing root file system into NAND flash (only Lite)[edit | edit source]

This is a common step for both booting options.

  • Boot the system via SD or NFS as described into the Quick_start_guide
  • By default, the NAND is already partitioned to allow booting from NAND-only (see next section) and, thus, some partitions are reserved for U-boot and kernel images. Here we won't modify this default configuration. The MTD partitions can be dumped with /proc/mtd (the partition's name should be self-explanatory)

Storing boot images ...[edit | edit source]

... into NOR flash[edit | edit source]

U-Boot[edit | edit source]

Linux kernel image and device tree[edit | edit source]

... into NAND flash[edit | edit source]

U-Boot[edit | edit source]

Linux kernel image and device tree[edit | edit source]

... into eMMC[edit | edit source]

We assume that the following environment variables are present in u-boot:

mmc_loadfdt=fatload mmc 0:1 ${fdtaddr} imx6ul-lynx.dtb
mmc_loadk=fatload mmc 0:1 ${loadaddr} uImage
mmc_loadsplash=fatload mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}
mmc_update=setexpr blocks ${filesize} / 0x200; setexpr blocks ${blocks} + 1; mmc write ${loadaddr} 2 ${blocks}
mmcargs=setenv bootargs root=${mmcroot}
  • Update the bootfile and fdtfile environment variables to fit the filename as found inside the TFTP server.
  • Program kernel and device tree on the MMC with the following U-Boot command