Reflashing images on the GuruPlug
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://www.plugcomputer.org/405/us/guru-plug/kernel/uImage-guruplug
Warning
Kernel image from addres above does not work for me - Guru Plug Server Plus does not boot. Working kernel image can be found here (this is original stock kernel that Guru Plug came with)
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://www.plugcomputer.org/405/us/guru-plug/rfs/rootfs.ubi.img
See Recreating_the_GuruPlug_RFS for more info on the UBI image format
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
Upgrading U-Boot image on D2Plug
if you find the nand command described above is not recognized in uboot on your d2plug, have no fear!. You can read about how to directly tftp copy, flash / upgrade uboot with a single command (assuming you have a working tftp link). Please find the instructions on how to do this in the D2Plug Software User Guide