Bootstrap/U-Boot Recovery

To be able to perform a bootstrap or U-Boot recovery, you must install a jumper. This jumper will enable the updating of the U-Boot area. This should only be necessary, if the Bootstrap or U-Boot memory area is corrupted from a failed flash.

R0.0 R1.0

The area outlined is ‘red’ will be referenced throughout this article.

Hardware Modification

R0.0 R1.0

Original hardware with no modification.

R0.0 R1.0

Modified hardware with jumper installed.

R0.0 – Power off the device, remove the jumper and power on the device. R1.0 – Power off the device, install the jumper and power on the device.

Action needed to disable NAND Flash

R0.0 – Install the jumper. R1.0 – Remove the jumper.

Action taken after unit is powered up

Installing Atmel SAM-BA Utility

Download Atmel SAM-BA utility and unzip onto your Linux development system:

http://www.atmel.com/tools/ATMELSAM-BAIN-SYSTEMPROGRAMMER.aspx

Connect USB cable between Linux system and the MTCDP hardware and perform USB CDC Serial driver mount procedure:

Ubuntu 9.10 and older releases
  • Login with administrator rights
  • Unload usbserial and cdc_acm module if it is already running
  • # rmmod cdc_acm
    # rmmod usbserial
    
  • Load usbserial kernel module
  • #modprobe usbserial vendor=0x03eb product=0x6124
  • Verify that the USB connection is established
  • #lsusb -d 03eb:6124
  • Know which USB connection is established
  • #dmesg
    ...
    kernel: usb 4-2: new full speed USB device using uhci_hcd and address 5
    kernel: usb 4-2: configuration #1 chosen from 1 choice
    kernel: usbserial_generic 4-2:1.0: generic converter detected
    kernel: usbserial_generic: probe of 4-2:1.0 failed with error -5
    kernel: usbserial_generic 4-2:1.1: generic converter detected
    kernel: usb 4-2: generic converter now attached to ttyUSBx
  • You will have to use /dev/ttyUSBx to connect to your board
Ubuntu 10.04 and newer with updated kernel
  • If you are using a 64-bit system, ensure 32-bit libraries are installed
  • sudo apt-get install ia32-libs
  • Check that the ACM device was detected and check the port name
  • #dmesg
    ...
    kernel: usb 4-1: new full speed USB device using ohci_hcd and address 2
    kernel: usb 4-1: configuration #1 chosen from 1 choice
    kernel: cdc_acm 4-1:1.0: This device cannot do calls on its own. It is not a modem.
    kernel: cdc_acm 4-1:1.0: ttyACM0: USB ACM device
    kernel: usbcore: registered new interface driver cdc_acm
    kernel: cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
      
  • Use /dev/ttyACMX to connect to your board

Running Atmel SAM-BA Utility

# ./sam-ba
  • Select your board as at91sam9g20-ek and click Connect
  • Select the “NandFlash” tab
    • Select the “Enable NandFlash” script and Execute
    • Make sure the script executed successfully, otherwise the following steps will fail
  • To program bootstrap, do the following:
    • Select the “Send Boot File” script and execute
      • Select the bootstrap file to program
      • Make sure bootstrap is programmed successfully.
  • To program u-boot, do the following:
    • Set the address to 0×20000
      • Open and Select “Send File Name” and open the uboot bin file
      • Click on Send File
      • Make sure uboot bin file is programmed successfully. Click on Compare Sent File with Memory to make sure they match.