Document: Flashing bootloader Copyright (c) 2009, Voipac Technologies a.s. It is required to have OpenOCD based USB jtag adapter from Voipac or compatible. Refer to folowing location about how to install OpenOCD JTAG software. http://voipac.com/downloads/jtag/doc/vpaclink-jtag.txt Connect USB JTAG adapter to 20pin JTAG connector on baseboard and USB port on PC. Plug in dimm module and power up the baseboard, startup OpenOCD daemon with configuration in vpac270.cfg. bash$> openocd -f vpac270.cfg Open On-Chip Debugger 1.0 (2009-03-02-21:09) svn:1383 BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ jtag_speed: 0 Info : JTAG tap: pxa270.cpu tap/device found: 0x79265013 (Manufacturer: 0x009, Part: 0x9265, Version: 0x7) Info : JTAG Tap/device matched Warn : no tcl port specified, using default port 6666 In other terminal window use telnet to connect to OpenOCD daemon. bash$> telnet localhost 4444 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > Download latest bootloader binaries and move it to TFTP root directory. bash$> wget http://voipac.com/downloads/pxa/270m/dimm/bin/linux/x-load.bin bash$> wget http://voipac.com/downloads/pxa/270m/dimm/bin/linux/u-boot-1.1.2-vpac4m.bin bash$> mv x-load.bin u-boot-1.1.2-vpac4m.bin /tftpboot Connect serial console cable, open minicom and set it to mode 38400, 8N1. In OpenOCD terminal execute following commands to download bootloader binary to PXA270 SRAM and execute it. > reset halt JTAG tap: pxa270.cpu tap/device found: 0x79265013 (Manufacturer: 0x009, Part: 0x9265, Version: 0x7) JTAG Tap/device matched target state: halted target halted in ARM state due to debug-request, current mode: Supervisor cpsr: 0x080000d3 pc: 0x00000000 MMU: disabled, D-Cache: disabled, I-Cache: disabled (processor reset) > load_image /tftpboot/u-boot-1.1.2-vpac4m.bin 0x5c010000 55752 byte written at address 0x5c010000 downloaded 55752 byte in 0.359166s > resume 0x5c010000 After power cycling baseboard, the u-boot bootloader should come up. U-Boot 1.1.2-vpac4 (Feb 26 2009 - 18:20:24) U-Boot code: 5C010000 -> 5C01D9C8 BSS: -> 5C0214D8 RAM Configuration: Bank #0: a0000000 64 MB Bank #1: 80000000 0 kB OneNAND: Scanning device for bad blocks Bad eraseblock 22 at 0x002c0000 Flash: 128 MB *** Warning - bad CRC, using default environment dm9000 i/o: 0x8000300 (32bit), id: 0x90000a46 MAC: 00:01:02:03:04:05 Hit any key to stop autoboot: 0 u-boot> Use TFT to download first stage boot loader x-load.bin and write it to flash at offset 0. u-boot> erase all u-boot> tftp x-load.bin u-boot> cp.b a1000000 0 400 NOTE: During erase some blocks may fail to erase, those are bad blocks which may appear. Download second stage bootloader and write it to flash at offset 0x800. u-boot> tftp u-boot-1.1.2-vpac4m.bin u-boot> cp.b a1000000 800 $(filesize) After power cycling baseboard, the first stage X-Loader and next u-boot bootloader should come up. NAND X-Loader 1.22 U-Boot 1.1.2-vpac4 (Feb 26 2009 - 18:20:24) U-Boot code: 5C010000 -> 5C01D9C8 BSS: -> 5C0214D8 RAM Configuration: Bank #0: a0000000 64 MB Bank #1: 80000000 0 kB OneNAND: Scanning device for bad blocks Bad eraseblock 22 at 0x002c0000 Flash: 128 MB *** Warning - bad CRC, using default environment dm9000 i/o: 0x8000300 (32bit), id: 0x90000a46 MAC: 00:01:02:03:04:05 Hit any key to stop autoboot: 0 u-boot>