]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/wrt/wrt-utils.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / wrt / wrt-utils.bb
1 DESCRIPTION = "wrt tools"
2 SECTION = "base"
3 LICENSE = "broadcom"
4 SRC_URI = "cvs://anonymous@openwrt.org/openwrt;module=openwrt/package/openwrt;tag=TESTED \
5         http://openwrt.inf.fh-brs.de/mirror/linksys-wlconf.tar.gz \
6         file://nvram-makefile.diff;patch=1;pnum=0 \
7         file://libshared-makefile.diff;patch=1;pnum=0"
8
9 S = "${WORKDIR}/openwrt"
10
11 inherit module-base
12
13 TARGET_CFLAGS =+ "-I${STAGING_KERNEL_DIR}/include"
14
15 do_compile() {
16         make -C libshared TARGET_CC="${CC}"
17         make -C libnvram TARGET_CC="${CC}"
18         
19         ${CC} ${CFLAGS} -Iinclude -o wlc wlc.c -L./libshared -lshared
20         ${CC} ${CFLAGS} -o jffs2root jffs2root.c
21         ${CC} ${CFLAGS} -o mtd mtd.c
22         
23         make -C ../linksys-wlconf TOP=${S} SRCBASE=${S} LDFLAGS="-L${S}/libnvram -lnvram -L${S}/libshared -lshared"
24
25         ${KERNEL_CC} -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
26         -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 \
27         -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common \
28         -funsigned-char -nostdinc -iwithprefix include -I. -I${STAGING_KERNEL_DIR}/include \
29         -I${STAGING_KERNEL_DIR}/include/asm/gcc -I./include -c -o wlcompat.o wlcompat.c
30 }
31
32 do_install() {
33         install -d ${D}/usr/sbin/ ${D}/sbin/ ${D}/${libdir} ${D}/lib/modules/${KERNEL_VERSION}
34         install -m 644 libshared/libshared.so ${D}/${libdir}
35         install -m 755 libnvram/nvram ${D}/usr/sbin/
36         install -m 644 libnvram/libnvram.so ${D}/${libdir}
37         
38         install -m 755 wlc ${D}/usr/sbin/
39         install -m 755 jffs2root ${D}/sbin/
40         install -m 755 mtd ${D}/sbin/
41         
42         install -m 755 ../linksys-wlconf/wlconf ${D}/usr/sbin/
43         install -m 644 wlcompat.o ${D}/lib/modules/${KERNEL_VERSION}/
44 }
45
46 PACKAGES = "wrt-libs wrt-utils kernel-module-wlcompat"
47 FILES_wrt-libs = "/usr/lib"
48 FILES_wrt-utils = "/usr/sbin /sbin"
49 FILES_kernel-module-wlcompat = "/lib/modules/"
50 RDEPENDS_wrt-utils = "wrt-libs"