7 using the onboard nand flash – Kontron COMe-cP2020 User Manual

Page 96

Advertising
background image

www.kontron.com

COMe-P2020 User Guide

96

After that, the contents can be verified with:

in case of the ext2 file system, or with

in case of the fat file system.
To load a file into memory, the commands “ext2load” or “fatload” can be used, for example:

which loads the file “kernel.bin” from the USB device to memory address 0x1000000.

6.5.7

Using the Onboard NAND Flash

The onboard NAND Flash is supported with the “ubi” filesystem. The access is read only. Thus, the filesystem and its con-
tents must be prepared with Linux first.
As a prerequisite, the environment variables “mtdids” and “mtdparts” must be set correctly.
“mtdids” identifies the NAND chip to use while “mtdparts” defines the partitions.
Example:

This defines the first NAND chip (nand0) to be used with the name “chip1”. The chip contains one partition “all” which
occupies the whole chip.
The next command sets the partition “all” to be used with the “ubi” layer:

Now, an “ubi” volume can be mounted; in this example volume “boot”:

=> ext2ls usb 0
=>

=> fatls usb 0
=>

=> ext2load usb 0 1000000 kernel.bin
=>

=> setenv mtdids nand0=chip1
=> setenv mtdparts mtdparts=chip1:-(all)
=>

=> ubi part all
=>

=> ubifsmount boot
=>

Advertising