diff --git a/recipes-kernel/linux/linux-raspberrypi_3.1.9.bb b/recipes-kernel/linux/linux-raspberrypi_3.1.9.bb old mode 100644 new mode 100755 index 83f1dcc..8a61f89 --- a/recipes-kernel/linux/linux-raspberrypi_3.1.9.bb +++ b/recipes-kernel/linux/linux-raspberrypi_3.1.9.bb @@ -1,18 +1,17 @@ +COMPATIBLE_MACHINE = "raspberrypi" + require linux.inc DESCRIPTION = "Linux kernel for the RaspberryPi board" -KERNEL_IMAGETYPE = "zImage" - -COMPATIBLE_MACHINE = "raspberrypi" # This is on the rpi-patches branch SRCREV = "2fb814968753d0d4a5fdf056a3a8c9eee3c41aa6" -SRC_URI = " \ - git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-patches \ +SRC_URI = "git://github.com/djwillis/rpi-linux.git;protocol=git;branch=rpi-patches \ " -PV = "3.1.9-rpi+${PR}+git${SRCREV}" +LINUX_VERSION ?= "3.1.9-rpi" +PV = "${LINUX_VERSION}+${PR}+git${SRCREV}" S = "${WORKDIR}/git" diff --git a/recipes-kernel/linux/linux.inc b/recipes-kernel/linux/linux.inc old mode 100644 new mode 100755 index a8ddf7f..6996283 --- a/recipes-kernel/linux/linux.inc +++ b/recipes-kernel/linux/linux.inc @@ -115,7 +115,7 @@ do_configure_prepend() { fi # Enable thumb2 fixup for specific issue in angstrom toolchains when used on A8 r1p[012] silicon - if [ "${DISTRO_NAME}" = "Angstrom" -o "${CORTEXA8FIXUP}" = "yes" ] ; then + if [ "${CORTEXA8FIXUP}" = "yes" ] ; then sed -i -e /CONFIG_ARM_ERRATA_430973/d ${WORKDIR}/defconfig echo "CONFIG_ARM_ERRATA_430973=y" >> ${S}/.config fi @@ -228,6 +228,10 @@ do_configure_append() { fi } +# bitbake.conf only prepends PARALLEL make in tasks called do_compile, which isn't the case for compile_modules +# So explicitly enable it for that in here +EXTRA_OEMAKE = "${PARALLEL_MAKE} " + do_install_append() { oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH } @@ -260,3 +264,19 @@ pkg_postrm_kernel-devicetree () { cd /${KERNEL_IMAGEDEST}; update-alternatives --remove devicetree devicetree-${KERNEL_VERSION} || true } +# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled +python () { + try: + defconfig = bb.fetch2.localpath('file://defconfig', d) + except bb.fetch2.FetchError: + return + + try: + configfile = open(defconfig) + except IOError: + return + + if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines(): + depends = d.getVar('DEPENDS', False) + d.setVar('DEPENDS', depends + ' lzop-native') +}