bb files: Revert the introduction of FILE_PR
[vuplus_openembedded] / packages / ixp4xx / ixp4xx-csr_2.0.bb
1 # Intel ixp4xx access library software.  Note that this has an Intel
2 # license which restricts its use.
3 HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp420.htm"
4 LICENSE = "http://www.intel.com/design/network/swsup/np_sla/ixp400.htm"
5 LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm"
6 # You must download the following software to your OpenEmbedded downloads
7 # directory before using this package:
8 #
9 #       IPL_ixp400AccessLibrary-2_0.zip
10 #       IPL_ixp400NpeLibrary-2_0_5.zip
11 #
12 # To do this go to the LICENSE_HOMEPAGE above, register/login (using a
13 # web browser which is supported by the login page), this will give you
14 # access to the web page from which you can download the software - you
15 # need the: "IntelĀ® IXP400 Software and RedBoot* Boot Loader" and, from
16 # this the "Intel Hardware Access Software" and "NPE Microcode" (both
17 # versions 2.0, encryption is not required.)
18 #
19 # Store the files with the names given below in your downloads directory
20 # and store the 32 character md5sum of the file in a file of the same
21 # name with the additional extension .md5:
22 #
23 #       IPL_ixp400AccessLibrary-2_0.zip.md5
24 #       IPL_ixp400NpeLibrary-2_0_5.zip.md5
25 #
26 SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_0.zip"
27 SRC_URI += "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400NpeLibrary-2_0_5.zip"
28 SRC_URI += "file://Makefile.patch;patch=1"
29 SRC_URI += "file://2.6.patch;patch=1"
30 SRC_URI += "file://2.6.14.patch;patch=1"
31 SRC_URI += "file://le.patch;patch=1"
32 DEPENDS = "ixp-osal"
33 S = "${WORKDIR}/ixp400_xscale_sw"
34 PR = "r6"
35
36 COMPATIBLE_HOST = "^arm.*-linux.*"
37 COMPATIBLE_MACHINE = "(nslu2|ixp4xx)"
38
39 inherit module
40
41 IX_TARGET = "linux${SITEINFO_ENDIANESS}"
42
43 OSAL_PATH = "lib/ixp425/linux/${IX_TARGET}"
44 # This is a somewhat arbitrary choice:
45 OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
46
47 # COMPONENTS: do not build all the components, this just creates a
48 # ridiculously large module which duplicates functionality in the
49 # available Linux drivers.
50 COMPONENTS = "qmgr npeMh npeDl ethAcc ethDB ethMii featureCtrl osServices oslinux"
51 CODELETS_COMPONENTS = ""
52
53 # NOTE: IX_INCLUDE_MICROCODE causes the microcode to be included in
54 # the ixp4xx-csr module, this *requires* the IPL_ixp400NpeLibrary-2_0.zip
55 # to be added to the SRC_URI - see above.
56 EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \
57                 'LD=${KERNEL_LD}' \
58                 'AR=${AR}' \
59                 'IX_XSCALE_SW=${S}' \
60                 'IX_TARGET=${IX_TARGET}' \
61                 '${IX_TARGET}_COMPONENTS=${COMPONENTS}' \
62                 '${IX_TARGET}_CODELETS_COMPONENTS=${CODELETS_COMPONENTS}' \
63                 'IX_DEVICE=ixp42X' \
64                 'IX_MPHY=1' \
65                 'IX_MPHYSINGLEPORT=1' \
66                 'IX_INCLUDE_MICROCODE=1' \
67                 'LINUX_SRC=${STAGING_KERNEL_DIR}' \
68                 'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \
69                 'OSAL_DIR=${OSAL_DIR}' \
70                 'OSAL_IMAGE=${OSAL_DIR}/${OSAL_PATH}/libosal.a' \
71                 'OSAL_MODULE=${OSAL_DIR}/${OSAL_PATH}/ixp_osal.o' \
72                 "
73
74 do_compile () {
75         # The target makes the .ko as a side effect, as a result of the
76         # Makefile.patch
77         oe_runmake lib/${IX_TARGET}/ixp400.o
78 }
79
80 do_stage () {
81         install -d ${STAGING_INCDIR}/linux/ixp4xx-csr
82         install -m 0644 src/include/*.h ${STAGING_INCDIR}/linux/ixp4xx-csr/
83 }
84
85
86 do_install () {
87         install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400
88         install -m 0644 lib/${IX_TARGET}/ixp400.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400/
89 }