Flashing PXA27M bootloader: Difference between revisions

From Phobos Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
== Necessary software ==
== System set up ==
*[http://voipac.com/downloads/jtag/doc/vpaclink-jtag.txt Installing OpenOCD]
*tftp server
*tftp server
*konsole/ssherminator - allows you to open as many terminals in one window as you need
*konsole/ssherminator - allows you to open as many terminals in one window as you need
Line 10: Line 9:
*[[Media:Voipac-pxa27x u-boot original.tar]]
*[[Media:Voipac-pxa27x u-boot original.tar]]


=== Linux kernel ===
You need to enable usbfs in your kernel.
Enable CONFIG_USB_DEVICEFS option in kernel options
[http://www.howtogeek.com/howto/ubuntu/how-to-customize-your-ubuntu-kernel/ how-to-customize-your-ubuntu-kernel]
=== Install OpenOCD ===
# Copy libftd2xx.so to your /usr/lib folder
# Create symlinks for the libftd2xx by using the following commands:
#* cd /usr/lib
#* ln -s libftd2xx.so.0.4.13 libftd2xx.so.0.4
#* ln -s libftd2xx.so.0.4.13 libftd2xx.so.0
#* ln -s libftd2xx.so.0.4.13 libftd2xx.so
# tar xzfv openocd_1.0.1383_i386.tar.gz
# dpkg -i openocd_1.0.1383_i386.deb
#* When trying to install this on a 64bit system you need to '''--force-architecture''' or you'll get an error.
== Using OpenOCD ==
== Using OpenOCD ==
 
# Power up target board and connect JTAG
# Start the first terminal and write
# Start the first terminal and write
#* bash$> openocd -f vpac270.cfg
#* openocd -f vpac270.cfg
#** '''Error: unable to open ftdi device: 18'''
#** '''Error: unable to open ftdi device: 18'''
#*** OpenOCD needs usbfs
#*** OpenOCD needs usbfs
#*** bash$> mount -t usbfs none /proc/bus/usb
#*** mount -t usbfs none /proc/bus/usb
#** '''Error: unable to open ftdi device: 2'''
#** '''Error: unable to open ftdi device: 2'''
#*** You need root privileges
#*** You need root privileges
#*** log in as root or
#*** log in as root or
#*** bash$> sudo openocd -f vpac270.cfg
#*** sudo openocd -f vpac270.cfg
# Start second terminal, use telnet to connect to OpenOCD daemon.
# Start second terminal, use telnet to connect to OpenOCD daemon.
#* bash$> telnet localhost 4444
## telnet localhost 4444
#* reset halt  
## reset halt  
#* load_image /tftpboot/u-boot_noboot.bin 0x5c010000
## load_image /tftpboot/u-boot_noboot.bin 0x5c010000
#* resume 0x5c010000
## resume 0x5c010000
# Start third terminal
# Start third terminal
#* minicom gw6uboot
#* minicom
#** Use settings 38400 8N1
#* set ipaddr 10.0.0.22;set serverip 10.0.0.16;erase 1:0-2;tftp x-load.bin;cp.b a1000000 0 400;tftp u-boot.bin;cp.b a1000000 800 $(filesize);reset
#* set ipaddr 10.0.0.22;set serverip 10.0.0.16;erase 1:0-2;tftp x-load.bin;cp.b a1000000 0 400;tftp u-boot.bin;cp.b a1000000 800 $(filesize);reset


Line 33: Line 49:
== Reference material ==  
== Reference material ==  
*[http://voipac.com/downloads/jtag/doc/vpaclink-jtag.txt Installing OpenOCD]
*[http://voipac.com/downloads/jtag/doc/vpaclink-jtag.txt Installing OpenOCD]
*[http://www.howtogeek.com/howto/ubuntu/how-to-customize-your-ubuntu-kernel/ How to customize your Ubuntu kernel]

Revision as of 06:36, 12 April 2011

System set up

Linux kernel

You need to enable usbfs in your kernel.
Enable CONFIG_USB_DEVICEFS option in kernel options

how-to-customize-your-ubuntu-kernel

Install OpenOCD

  1. Copy libftd2xx.so to your /usr/lib folder
  2. Create symlinks for the libftd2xx by using the following commands:
    • cd /usr/lib
    • ln -s libftd2xx.so.0.4.13 libftd2xx.so.0.4
    • ln -s libftd2xx.so.0.4.13 libftd2xx.so.0
    • ln -s libftd2xx.so.0.4.13 libftd2xx.so
  3. tar xzfv openocd_1.0.1383_i386.tar.gz
  4. dpkg -i openocd_1.0.1383_i386.deb
    • When trying to install this on a 64bit system you need to --force-architecture or you'll get an error.

Using OpenOCD

  1. Power up target board and connect JTAG
  2. Start the first terminal and write
    • openocd -f vpac270.cfg
      • Error: unable to open ftdi device: 18
        • OpenOCD needs usbfs
        • mount -t usbfs none /proc/bus/usb
      • Error: unable to open ftdi device: 2
        • You need root privileges
        • log in as root or
        • sudo openocd -f vpac270.cfg
  3. Start second terminal, use telnet to connect to OpenOCD daemon.
    1. telnet localhost 4444
    2. reset halt
    3. load_image /tftpboot/u-boot_noboot.bin 0x5c010000
    4. resume 0x5c010000
  4. Start third terminal
    • minicom
      • Use settings 38400 8N1
    • set ipaddr 10.0.0.22;set serverip 10.0.0.16;erase 1:0-2;tftp x-load.bin;cp.b a1000000 0 400;tftp u-boot.bin;cp.b a1000000 800 $(filesize);reset


Reference material