sg3-utils: add newer buildable version
[openembedded.git] / classes / xilinx-bsp.bbclass
1 # Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
2 # Released under the MIT license (see packages/COPYING)
3 #
4 #This class handles all the intricasies of getting the required files from the 
5 #ISE/EDK/project to the kernel and prepare the kernel for compilation.
6 #The Xilinx EDK supports 2 different architectures : PowerPC (ppc 405,440) and Microblaze
7 #Only the PowerPC BSP has been tested so far
8 #For this to work correctly you need to add XILINX_BSP_PATH and XILINX_BOARD to your 
9 #local.conf
10 #XILINX_BSP_PATH should have the complete path to your project dir
11 #XILINX_BOARD should have the board type i.e ML403
12 #
13 #Currently supported boards
14 #Xilinx ML403
15 #Xilinx ML507
16 #More to come soon ;)
17
18 do_configure_prepend() {
19
20 #first check that the XILINX_BSP_PATH and XILINX_BOARD have been defined in local.conf
21 #now depending on the board type and arch do what is nessesary
22
23 if [ -n "${XILINX_BSP_PATH}" ]; then
24         case "${XILINX_BOARD}" in
25                 ml403 | ML403)
26                         oenote "ML403 board setup"
27                         cp -pPR ${XILINX_BSP_PATH}/ppc405_0/libsrc/linux_2_6_v1_00_a/linux/arch/ppc/platforms/4xx/xparameters/xparameters_ml40x.h \
28                 ${S}/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h
29                 ;;
30                 ml507 | ML507)
31                         oenote "Xilinx ML507 board setup"
32                         dts=`find "${XILINX_BSP_PATH}" -name *.dts -print`
33                         if [ -n "$dts" ]; then
34                                 oenote "Replacing device tree with ${dts}"
35                                 cp -pP ${dts} ${S}/arch/powerpc/boot/dts/virtex440-ml507.dts
36                         else
37                                 oenote "Device tree not found in project dir"
38                         fi
39                 ;;
40                 *)
41                         oefatal "! Unknow Xilinx board ! Exit ..."
42                         exit 1
43                 ;;
44         esac
45 else
46         oefatal "XILINX_BSP_PATH not defined ! Exit"
47         exit 1
48 fi
49
50 }
51
52
53
54
55