summaryrefslogtreecommitdiff
path: root/packages/ixp425-eth/ixp425-eth_1.1.bb
blob: 7f55bcec3b3bbb6af4d1e2873a59928b313596eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
DEPENDS = "ixp4xx-csr patcher-native"
LICENSE = "GPL"
MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
SRC_URI = "http://www.intel.com/design/network/swsup/ixp400LinuxEthernetDriverPatch-1_1.zip \
	   http://nslu.sourceforge.net/downloads/ixp425_eth.c.patch \
	   file://makefile.patch;patch=1 \
	   file://ethhdr.patch;patch=1 \
	   file://intdriven.patch;patch=1 \
	   file://pollcontroller.patch;patch=1 \
	   file://mm4.patch;patch=1"
SRC_URI += "file://2.6.13.patch;patch=1"
SRC_URI += "file://2.6.14.patch;patch=1"
PR = "r12"

RDEPENDS = "ixp4xx-csr"

S = "${WORKDIR}"

COMPATIBLE_HOST = "^armeb-linux.*"

PROVIDES = "virtual/ixp-eth"

inherit module

# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
# required.  Notice that this has to be done for each separately built
# module as well!
KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"

do_pre_patch () {
	patcher -p 0 -i ixp425_eth_1_1_update_nf_bridge.patch
	patcher -f -p 0 -i ixp425_eth.c.patch
}

addtask pre_patch before do_patch

do_compile () {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
	oe_runmake 'KDIR=${STAGING_KERNEL_DIR}' \
		   'CC=${KERNEL_CC}' \
		   'LD=${KERNEL_LD}' \
		   'EXTRA_CFLAGS=-I${STAGING_INCDIR}/linux/ixp4xx-csr -I${STAGING_KERNEL_DIR}/include -DCPU=33 -DXSCALE=33'
}

do_install () {
	install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net
	install -m 0644 ixp425_eth.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/
}