init
[vuplus_openvuplus] / meta-openvuplus / recipes-kernel / linux-libc-headers / linux-libc-headers.inc
1 DESCRIPTION = "Sanitized set of kernel headers for the C library's use."
2 SECTION = "devel"
3 LICENSE = "GPLv2"
4
5 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
6
7 python __anonymous () {
8     major = d.getVar("PV",True).split('.')[0]
9     if major == "3":
10         d.setVar("HEADER_FETCH_VER", "3.0")
11     else:
12         d.setVar("HEADER_FETCH_VER", "2.6")
13 }
14
15 SRC_URI = "http://archive.vuplus.com/download/kernel/linux-${KV}_${SRCREV}.tar.bz2"
16
17 S = "${WORKDIR}/linux-${PV}"
18
19 set_arch() {
20         case ${TARGET_ARCH} in
21                 alpha*)   ARCH=alpha ;;
22                 arm*)     ARCH=arm ;;
23                 cris*)    ARCH=cris ;;
24                 hppa*)    ARCH=parisc ;;
25                 i*86*)    ARCH=i386 ;;
26                 ia64*)    ARCH=ia64 ;;
27                 mips*)    ARCH=mips ;;
28                 m68k*)    ARCH=m68k ;;
29                 powerpc*) ARCH=powerpc ;;
30                 s390*)    ARCH=s390 ;;
31                 sh*)      ARCH=sh ;;
32                 sparc64*) ARCH=sparc64 ;;
33                 sparc*)   ARCH=sparc ;;
34                 x86_64*)  ARCH=x86_64 ;;
35                 avr32*)   ARCH=avr32 ;;
36                 bfin*)    ARCH=blackfin ;;
37                 microblaze*) ARCH=microblaze ;;
38         esac
39 }
40
41 do_configure() {
42         set_arch
43         oe_runmake allnoconfig ARCH=$ARCH
44 }
45
46 do_compile () {
47 }
48
49 do_install() {
50         set_arch
51         oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH
52         # Kernel should not be exporting this header
53         rm -f ${D}${exec_prefix}/include/scsi/scsi.h
54
55         # The ..install.cmd conflicts between various configure runs
56         find ${D}${includedir} -name ..install.cmd | xargs rm -f
57 }
58
59 BBCLASSEXTEND = "nativesdk"
60
61 #DEPENDS = "cross-linkage"
62 RDEPENDS_${PN}-dev = ""
63 RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
64
65 INHIBIT_DEFAULT_DEPS = "1"
66 DEPENDS += "unifdef-native"