wdenk | 028ab6b | 2004-02-23 23:54:43 +0000 | [diff] [blame] | 1 | Xilinx ML300 platform |
| 2 | ===================== |
| 3 | |
| 4 | 0. Introduction |
| 5 | --------------- |
| 6 | |
| 7 | The Xilinx ML300 board is based on the Virtex-II Pro FPGA with |
Wolfgang Denk | 0c8721a | 2005-09-23 11:05:55 +0200 | [diff] [blame] | 8 | integrated AMCC PowerPC 405 core. The board is normally booted from |
wdenk | 028ab6b | 2004-02-23 23:54:43 +0000 | [diff] [blame] | 9 | System ACE CF. U-Boot is then run out of main memory. |
| 10 | |
| 11 | An FPGA is a configurable and thus very flexible device. To |
| 12 | accommodate for this flexibility this port of U-Boot includes the |
| 13 | required means to regenerate the drivers and configuration files if |
| 14 | you decide to change the hardware design. The required steps are |
| 15 | described below. |
| 16 | |
| 17 | |
| 18 | 1. Requirements |
| 19 | --------------- |
| 20 | |
| 21 | To compile and run U-Boot on the Xilinx ML300 platform you need the |
| 22 | following items. |
| 23 | |
| 24 | - A Xilinx ML300 platform (see http://www.xilinx.com/ml300) |
| 25 | - EDK and ISE development tools (shipping with ML300) |
| 26 | - Parallel4 cable (shipping with ML300) |
| 27 | - The EDK reference design for ML300. You can get this as design #6 from |
| 28 | http://www.xilinx.com/ise/embedded/edk_examples.htm |
| 29 | - A BOOTP/TFTP server |
| 30 | |
| 31 | |
| 32 | 2. Quick Start |
| 33 | -------------- |
| 34 | |
| 35 | To compile and run U-Boot on ML300 follow the steps below. Make sure |
| 36 | to consult the documentation for U-Boot, EDK, and the EDK reference |
| 37 | design for ML300 if you have any questions. |
| 38 | |
| 39 | 1. Implement the EDK reference design for ML300. You can use any of |
| 40 | the project files, for example from a xygwin shell: |
| 41 | $ xps -nw system_linux.xmp |
| 42 | XPS% run init_bram |
| 43 | 2. Configure and compile U-Boot. Change into the root directory of |
| 44 | U-Boot and run: |
| 45 | $ export CROSS_COMPILE=powerpc-eabi- |
| 46 | $ make ml300_config |
| 47 | $ make |
| 48 | 3. Set up the ML300, connect the Parallel4 and the serial cable. Start |
| 49 | a terminal on your host computer and set the communication |
| 50 | parameters to 9600,8N1,no handshake. |
| 51 | 4. Set up the BOOTP/TFTP server on your host machine. U-Boot is |
| 52 | preconfigured to use a fixed HW MAC address of 00:0A:35:00:22:01. |
| 53 | 5. Download the bitstream to the ML300. |
| 54 | 6. Use XMD to download and run U-Boot on the ML300: |
| 55 | $ xmd |
| 56 | XMD% ppcconnect |
| 57 | XMD% dow u-boot |
| 58 | XMD% run |
| 59 | |
| 60 | You can now make an ACE file out of bitstream and U-Boot: |
| 61 | $ xmd genace.tcl -jprog -board ml300 -hw \ |
| 62 | implementation/download.bit -elf u-boot -ace top.ace |
| 63 | |
| 64 | Put the ACE file onto the MicroDrive, for example into xilinx/myace, |
| 65 | and reboot ML300. |
| 66 | |
| 67 | |
| 68 | 3. Generating a Custom BSP for U-Boot |
| 69 | ------------------------------------- |
| 70 | |
| 71 | If you decide to change the EDK reference design for ML300 or if you |
| 72 | build a new design from scratch either with the Base System Builder in |
| 73 | XPS or all by hand you most likely will change the base addresses for |
| 74 | the Uart and the Ethernet peripheral. If you do so you will have two |
| 75 | options: |
| 76 | |
| 77 | 1. Edit boards/xilinx/ml300/xparameters.h to reflect the changes you |
| 78 | made to your hardware. |
| 79 | 2. Use the MLD technology provided by Xilinx Platform Studio to make |
| 80 | the changes automatically. To do so go to the root directory of the |
| 81 | EDK reference design for ML300. Copy the Linux project file and the |
| 82 | Linux software configuration file: |
| 83 | $ cp system_linux.xmp system_uboot.xmp |
| 84 | $ cp system_linux.mss system_uboot.mss |
| 85 | |
| 86 | Edit system_uboot.xmp and and have it point to system_uboot.mss for |
| 87 | the software configuration. |
| 88 | |
| 89 | Then, copy the sw_services directory in |
| 90 | boards/xilinx/ml300/sw_services to the root directory of the EDK |
| 91 | reference design for ML300. |
| 92 | $ cp -R <uboot dir>/boards/xilinx/ml300/sw_services <edk dir> |
| 93 | |
| 94 | Modify system_uboot.mss. Look for the Linux library definition |
| 95 | and change it to generate a BSP for U-Boot. An example, might look |
| 96 | like this: |
| 97 | |
| 98 | BEGIN LIBRARY |
| 99 | PARAMETER LIBRARY_NAME = uboot |
| 100 | PARAMETER LIBRARY_VER = 1.00.a |
| 101 | PARAMETER CONNECTED_PERIPHS = (opb_uart16550_0,opb_ethernet_0) |
| 102 | PARAMETER TARGET_DIR = <uboot dir> |
| 103 | END |
| 104 | |
| 105 | Now, you are ready to generate the Xilinx ML300 BSP for U-Boot: |
| 106 | $ xps -nw system_uboot.xmp |
| 107 | XPS% run libs |
| 108 | |
| 109 | If all goes well the new configuration has been copied into the |
| 110 | right places within the U-Boot source tree. Recompile U-Boot and |
| 111 | run it on the ML300. |
| 112 | |
| 113 | |
| 114 | 4. ToDo |
| 115 | ------- |
| 116 | |
| 117 | - Add support for all other peripherals on ML300. |
| 118 | - Read the MAC address out of the IIC EEPROM. |
| 119 | - Store the bootargs in the IIC EEPROM. |
| 120 | |
| 121 | |
| 122 | 5. References |
| 123 | ------------- |
| 124 | |
| 125 | ML300: http://www.xilinx.com/ml300 |
| 126 | EDK: http://www.xilinx.com/edk |
| 127 | ISE: http://www.xilinx.com/ise |
| 128 | Reference Design: http://www.xilinx.com/ise/embedded/edk_examples.htm |