diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/distutils-common-base.bbclass | 4 | ||||
-rw-r--r-- | classes/glx-use-tls.bbclass | 7 | ||||
-rw-r--r-- | classes/kernel.bbclass | 7 | ||||
-rw-r--r-- | classes/patch.bbclass | 20 |
4 files changed, 36 insertions, 2 deletions
diff --git a/classes/distutils-common-base.bbclass b/classes/distutils-common-base.bbclass index 9ca392b84a..01bf9eaeba 100644 --- a/classes/distutils-common-base.bbclass +++ b/classes/distutils-common-base.bbclass @@ -8,7 +8,9 @@ def python_dir(d): staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) for majmin in "2.6 2.5 2.4 2.3".split(): if os.path.exists( "%s/python%s" % ( staging_incdir, majmin ) ): return "python%s" % majmin - raise "No Python in STAGING_INCDIR. Forgot to build python-native ?" + if not "python-native" in bb.data.getVar( "DEPENDS", d, 1 ).split(): + raise "No Python in STAGING_INCDIR. Forgot to build python-native ?" + return "INVALID" PYTHON_DIR = "${@python_dir(d)}" diff --git a/classes/glx-use-tls.bbclass b/classes/glx-use-tls.bbclass new file mode 100644 index 0000000000..7530872fa4 --- /dev/null +++ b/classes/glx-use-tls.bbclass @@ -0,0 +1,7 @@ +def get_tls_setting(bb, d): + # until we have no prober TLS support in uclibc disable it + if bb.data.getVar('TARGET_OS', d, 1).find('uclibc') >= 0 : + return "" + return "--enable-glx-tls" + +EXTRA_OECONF += "${@get_tls_setting(bb, d)}" diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index d084cefee8..c5192d59d4 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -78,6 +78,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" UBOOT_ENTRYPOINT ?= "20008000" UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" +# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. +# We don't want to override kernel Makefile variables from the environment +EXTRA_OEMAKE = "" + kernel_do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}" @@ -182,6 +186,7 @@ kernel_do_install() { install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} install -d ${D}/etc/modutils if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then install -d ${D}/etc/modprobe.d @@ -232,7 +237,7 @@ EXPORT_FUNCTIONS do_compile do_install do_stage do_configure PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux" FILES = "" FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" -FILES_kernel-dev = "/boot/System.map* /boot/config*" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*" FILES_kernel-vmlinux = "/boot/vmlinux*" RDEPENDS_kernel = "kernel-base" RRECOMMENDS_kernel-module-hostap-cs += '${@base_version_less_or_equal("KERNEL_VERSION", "2.6.17", "", "apm-wifi-suspendfix", d)}' diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 2f99e4cf30..dfb8ec960f 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -189,6 +189,24 @@ def patch_init(d): def Clean(self): """""" + class GitApplyTree(PatchTree): + def __init__(self, dir, d): + PatchTree.__init__(self, dir, d) + + def _applypatch(self, patch, force = False, reverse = False, run = True): + shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']] + + if reverse: + shellcmd.append('-R') + + shellcmd.append(patch['file']) + + if not run: + return "sh" + "-c" + " ".join(shellcmd) + + return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) + + class QuiltTree(PatchSet): def _runcmd(self, args, run = True): quiltrc = bb.data.getVar('QUILTRCFILE', self.d, 1) @@ -424,6 +442,7 @@ def patch_init(d): g["PatchSet"] = PatchSet g["PatchTree"] = PatchTree g["QuiltTree"] = QuiltTree + g["GitApplyTree"] = GitApplyTree g["Resolver"] = Resolver g["UserResolver"] = UserResolver g["NOOPResolver"] = NOOPResolver @@ -449,6 +468,7 @@ python patch_do_patch() { patchsetmap = { "patch": PatchTree, "quilt": QuiltTree, + "git": GitApplyTree, } cls = patchsetmap[bb.data.getVar('PATCHTOOL', d, 1) or 'quilt'] |