Reflashing images on the GuruPlug

From PlugWiki

Jump to: navigation, search

Contents

Important Note

Factory uboot image (for first versions at least) do not support vanilla kernels. Pease read : Re-building_the_kernel_and_U-Boot or Compiling_Linux_Kernel_for_the_Plug_Computer.

Modified uboot may not support factory kernel images either.

Flashing U-Boot on Bricked Plug

Please download GuruPlug Installer from File:Guruplug-installer.tar.gz. This contains Openocd binary, Guruplug configuration files and wrapper script to run necessary commands to burn U-boot via JTAG. After connecting JTAG cable provided on GuruPlug to serial port (enumerated as ttyUSB0), please run following command

 ./runme.sh <Path of U-boot binary>

This will burn corresponding U-Boot binary(0-2 blocks) and default U-Boot environment variables(2-4 blocks) in internal NAND flash.

Burning Kernel and Rootfs

If working U-Boot binary is present please issue following commands after connecting GuruPlug serial console (enumerated as ttyUSB1),

Make the kernel and Rootfs images available to GuruPlug Board through TFTP.

Configure the Network Settings

To access the TFTP images, you will need to specify the TFTP server, and the IP address for the GuruPlug.

 setenv serverip <IP of TFTP server>
 setenv ipaddr <IP on the same subnet as the TFTP server>

Burn the Kernel image

The original stock Kernel image can be downloaded from: http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=66

 tftp 0x6400000 <kernel image name>
 nand erase 0x100000 0x400000
 nand write.e 0x6400000 0x100000 0x400000

Burn the Rootfs image

The original stock RootFS image can be downloaded from: http://openplug.org/index.php/us/resources/downloads?func=fileinfo&id=78

 tftp 0x6400000 <rootfs image name>
 nand erase 0x500000 0x1fb00000
 nand write.e 0x6400000 0x500000 0x<number-of-hex-bytes-tftp-ed>

Set environment variables

 setenv x_bootcmd_usb 'usb start'
 setenv x_bootcmd_kernel 'nand read.e 0x6400000 0x100000 0x400000'
 setenv x_bootargs_root 'ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs'
 setenv x_bootargs 'console=ttyS0,115200'
 setenv x_bootcmd '$(x_bootcmd_usb); $(x_bootcmd_kernel); setenv bootargs $(x_bootargs) $(x_bootargs_root) ;bootm 0x6400000;'
 setenv bootcmd 'run x_bootcmd'

We are using the default partitions - uboot(1m),kernel(4m) and rootfs(rest of the flash), hence no need to explicitly pass them via x_bootargs.Also the the x_bootargs_root now says that the second mtd partition(rfs) will be treated as ubi block 0 for ubifs mounting.

Reset the board

Save the environment variables and reset the board

 saveenv
 reset

Upgrading U-Boot image

If Working U-Boot binary is already present and need to upgrade U-Boot please issue following commands at console,

 tftp 0x6400000 <file-name>.bin
 nand erase 0x0 0x100000
 nand write.e 0x6400000 0x0 0x100000

After the uboot burning is done, reset the board

 reset
Personal tools