6 using the onboard nand flash, Using the onboard nand flash, Am4150 u-boot bootloader u-boot usage – Kontron AM4150 U-Boot Bootloader User Manual

Page 43

Advertising
background image

AM4150 U-Boot Bootloader

U-Boot Usage

ID 1052-5678, Rev. 1.0

Page 43

P R E L I M I N A R Y

6.6

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 contents 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”:

After the volume is mounted, its contents can be listed:

or a file loaded, in this case “kernel.bin” to address 0x100000:

setenv mtdids nand0=chip1

setenv mtdparts mtdparts=chip1:-(all)

ubi part all

ubifsmount boot

ubifsls

ubifsload 100000 kernel.bin

Advertising