i.MX35 PDK NAND Flashing Kernel and Root File System Using RedBoot

Showing results for 
Search instead for 
Did you mean: 

i.MX35 PDK NAND Flashing Kernel and Root File System Using RedBoot

No ratings

i.MX35 PDK NAND Flashing Kernel and Root File System Using RedBoot

Creating an image

A kernel image and a root file system can be created using LTIB, or compiling the kernel and setting the correct set of files.

Create a root file system image from a set of files converting the files to a jffs2 file system. For this, install the package mtd-tools.

In Ubuntu type

apt-get install mtd-tools 

For making an root file system for flash, use the jffs2 file system like:

mkfs.jffs2 -r rootfs -e 0x40000 -s 0x800 -n -o rootfs.jffs2 

Where rootfs/ is the original set of file for the file system and rootfs.jffs2 is the output image file.


Some connection errors can be avoided by Configuring RedBoot.

The process below uses TFTP to copy the files between host and target.

Copy the kernel image and the root file system image to the TFTP dir. For example, in All Boards LTIB dir, type

sudo cp ./rootfs/boot/zImage /tftpboot 
sudo cp rootfs.jffs2 /tftpboot/

Where /tftpboot is the dir configured for TFTP

The next steps are performed in a Minicom session, and happens on the board.

Formatting the flash:

fis init 

Flashing kernel

Load kernel image (zImage) using the command below. Remember to modify the host IP address:

load -r -b 0x100000 /tftpboot/zImage -h 

The address 0x100000 is used as a temporary location

Create the kernel

fis create -f 0x100000 kernel 

Flashing root file system

Load root file system image (rootfs.jffs2) to the temporary address. Remember to modify the host IP address:

load -r -b 0x100000 /tftpboot/rootfs.jffs2 -h 

Create the root file system in the right address (0x600000, for i.MX35 PDK)

fis create -f 0x600000 root 

You can now load your kernel in the flash by typing:

fis load kernel 

To know if the root file system written in the flash was correctly saved, execute the NFS file system and mount the flash.

For load the the root file system by NFS, type:

exec -b 0x100000 -l 0x200000 -c "noinitrd console=ttymxc0,115200 root=/dev/nfs nfsroot= init=/linuxrc ip=" 

Wait the system go up, then mount the flash at /mnt. Reminde that the flash has a jffs2 file system.

mount -t jffs2 /dev/mtdblock8 /mnt ls /mnt 

List the /mnt contents. The output must be the right file system.

Modifying the initial script

Reset the board and press CTRL-C.

Type fc to modify the configurations and insert the initialization script.

RedBoot> fc 
Run script at boot: true 
Boot script: 
Enter script, terminate with empty line 
>> fis load kernel 
>> exec -c "noinitrd console=ttymxc0,115200 root=/dev/mtdblock8 rw rootfstype=jffs2 ip=dhcp" 
Boot script timeout (1000ms resolution): 1 
Use BOOTP for network configuration: false 
Gateway IP address: 
Local IP address:
Local IP address mask:
Default server IP address: 
Board specifics: 0 
Console baud rate: 115200 
Set eth0 network hardware address [MAC]: false 
GDB connection port: 9000 
Force console for special debug messages: false 
Network debug at boot time: false 
Update RedBoot non-volatile configuration - continue (y/n)? y 
... Read from 0x07ee0000-0x07eff000 at 0x00080000: . 
... Erase from 0x00080000-0x000a0000: . 
... Program from 0x07ee0000-0x07f00000 at 0x00080000: . 

Remember to save the configuration in the flash by typing y

Reset the system.

To certify that the board is loading the system from flash, remove the Ethernet cable.

Version history
Revision #:
2 of 2
Last update:
‎09-10-2020 03:38 AM
Updated by: