Flashing PXA27M bootloader: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | == System set up == | ||
*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 9: | Line 8: | ||
*[[Media:Voipac-pxa27x-u-boot nostart.tar]] | *[[Media:Voipac-pxa27x-u-boot nostart.tar]] | ||
*[[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 | |||
====Ubuntu 10.x==== | |||
[http://www.howtogeek.com/howto/ubuntu/how-to-customize-your-ubuntu-kernel/ how-to-customize-your-ubuntu-kernel] | |||
====Ubuntu 11.x==== | |||
[https://help.ubuntu.com/11.10/installation-guide/ia64/kernel-baking.html Customize kernel for 11.x] | |||
<syntaxhighlight lang="bash"> | |||
# Download kernel source | |||
sudo apt-get install linux-source-3.0.0 | |||
cd ~ | |||
mkdir kernel-usb-fs | |||
cd kernel-usb-fs | |||
tar xjf /usr/src/linux-source-3.0.0.tar.bz2 | |||
cd linux-source-3.0.0/ | |||
# Enable CONFIG_USB_DEVICEFS | |||
make xconfig | |||
# after making changes to kernel it's time to compile | |||
make-kpkg clean | |||
fakeroot make-kpkg -j6 --initrd --revision=1.0 kernel_image | |||
# install new kernel, edit filename to what was generated | |||
sudo dpkg -i ../linux-image- | |||
</syntaxhighlight> | |||
=== Install OpenOCD === | |||
* Copy libftd2xx.so to your /usr/lib folder | |||
* Create symlinks for the libftd2xx by using the following commands: | |||
<syntaxhighlight lang="bash"> | |||
sudo cp libftd2xx.so.0.4.13 /usr/lib/ | |||
cd /usr/lib | |||
ln -s libftd2xx.so.0.4.13 libftd2xx.so.0.4 | |||
ln -s libftd2xx.so.0.4 libftd2xx.so.0 | |||
ln -s libftd2xx.so.0 libftd2xx.so | |||
</syntaxhighlight> | |||
* tar xzfv Openocd_1.0.1383_i386.tar.gz | |||
* sudo 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. | |||
*** sudo dpkg --force-architecture -i openocd_1.0.1383_i386.deb | |||
== Using OpenOCD == | == Using OpenOCD == | ||
# Power up target board and connect JTAG | |||
# Start the first terminal and write | # Start the first terminal and write | ||
#* | #* openocd -f vpac270.cfg | ||
#** '''Error: unable to open ftdi device: 18''' | #** '''Error: unable to open ftdi device: 18''' | ||
#*** OpenOCD needs usbfs | #*** OpenOCD needs usbfs | ||
#*** | #*** sudo 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 | ||
#*** | #*** 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. | ||
# | ## telnet localhost 4444 | ||
#* reset halt | ##* you can stack the next commands | ||
# | ##**reset halt; load_image /tftpboot/u-boot_noboot.bin 0x5c010000; resume 0x5c010000 | ||
# | ## reset halt | ||
## load_image /tftpboot/u-boot_noboot.bin 0x5c010000 | |||
## resume 0x5c010000 | |||
# Start third terminal | # Start third terminal | ||
#* minicom | #* minicom | ||
#* set ipaddr 10.0.0. | #** Use settings 38400 8N1 | ||
#* set ipaddr 10.0.0.23;set serverip 10.0.0.10;erase 1:0-2;tftp Telem-GW6/x-load.bin;cp.b a1000000 0 400;tftp Telem-GW6/u-boot.bin;cp.b a1000000 800 $(filesize);reset | |||
== 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] |
Latest revision as of 12:04, 12 August 2014
System set up
- tftp server
- konsole/ssherminator - allows you to open as many terminals in one window as you need
- During this procedure you're gonna need at least three
- Media:Libftd2xx0.4.13.tar.gz
- Media:Openocd 1.0.1383 i386.tar.gz
- Media:Voipac-pxa27x xloader.tar.gz
- Media:Voipac-pxa27x-u-boot nostart.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
Ubuntu 10.x
how-to-customize-your-ubuntu-kernel
Ubuntu 11.x
# Download kernel source
sudo apt-get install linux-source-3.0.0
cd ~
mkdir kernel-usb-fs
cd kernel-usb-fs
tar xjf /usr/src/linux-source-3.0.0.tar.bz2
cd linux-source-3.0.0/
# Enable CONFIG_USB_DEVICEFS
make xconfig
# after making changes to kernel it's time to compile
make-kpkg clean
fakeroot make-kpkg -j6 --initrd --revision=1.0 kernel_image
# install new kernel, edit filename to what was generated
sudo dpkg -i ../linux-image-
Install OpenOCD
- Copy libftd2xx.so to your /usr/lib folder
- Create symlinks for the libftd2xx by using the following commands:
sudo cp libftd2xx.so.0.4.13 /usr/lib/
cd /usr/lib
ln -s libftd2xx.so.0.4.13 libftd2xx.so.0.4
ln -s libftd2xx.so.0.4 libftd2xx.so.0
ln -s libftd2xx.so.0 libftd2xx.so
- tar xzfv Openocd_1.0.1383_i386.tar.gz
- sudo 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.
- sudo dpkg --force-architecture -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
- Power up target board and connect JTAG
- Start the first terminal and write
- openocd -f vpac270.cfg
- Error: unable to open ftdi device: 18
- OpenOCD needs usbfs
- sudo 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
- Error: unable to open ftdi device: 18
- openocd -f vpac270.cfg
- Start second terminal, use telnet to connect to OpenOCD daemon.
- telnet localhost 4444
- you can stack the next commands
- reset halt; load_image /tftpboot/u-boot_noboot.bin 0x5c010000; resume 0x5c010000
- you can stack the next commands
- reset halt
- load_image /tftpboot/u-boot_noboot.bin 0x5c010000
- resume 0x5c010000
- telnet localhost 4444
- Start third terminal
- minicom
- Use settings 38400 8N1
- set ipaddr 10.0.0.23;set serverip 10.0.0.10;erase 1:0-2;tftp Telem-GW6/x-load.bin;cp.b a1000000 0 400;tftp Telem-GW6/u-boot.bin;cp.b a1000000 800 $(filesize);reset
- minicom