diff options
| -rw-r--r-- | meta-emenlow/conf/machine/emenlow.conf | 3 | ||||
| -rw-r--r-- | meta/classes/kernel-yocto.bbclass | 202 | ||||
| -rw-r--r-- | meta/conf/distro/include/poky-default-revisions.inc | 36 | ||||
| -rw-r--r-- | meta/conf/machine/atom-pc.conf | 3 | ||||
| -rw-r--r-- | meta/conf/machine/beagleboard.conf | 3 | ||||
| -rw-r--r-- | meta/conf/machine/include/qemu.inc | 1 | ||||
| -rw-r--r-- | meta/conf/machine/mpc8315e-rdb.conf | 3 | ||||
| -rw-r--r-- | meta/conf/machine/routerstationpro.conf | 3 | ||||
| -rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb | 4 | ||||
| -rw-r--r-- | meta/recipes-kernel/linux/linux-tools.inc | 19 | ||||
| -rw-r--r-- | meta/recipes-kernel/linux/linux-yocto-stable_git.bb | 41 | ||||
| -rw-r--r-- | meta/recipes-kernel/linux/linux-yocto.inc | 23 | ||||
| -rw-r--r-- | meta/recipes-kernel/linux/linux-yocto_git.bb | 219 |
13 files changed, 336 insertions, 224 deletions
diff --git a/meta-emenlow/conf/machine/emenlow.conf b/meta-emenlow/conf/machine/emenlow.conf index 0f9ed8a299..b8dea64038 100644 --- a/meta-emenlow/conf/machine/emenlow.conf +++ b/meta-emenlow/conf/machine/emenlow.conf | |||
| @@ -16,7 +16,8 @@ MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 x86 \ | |||
| 16 | 16 | ||
| 17 | KERNEL_IMAGETYPE = "bzImage" | 17 | KERNEL_IMAGETYPE = "bzImage" |
| 18 | 18 | ||
| 19 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" | 19 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-stable" |
| 20 | #PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" | ||
| 20 | PREFERRED_PROVIDER_libdrm = "libdrm-poulsbo" | 21 | PREFERRED_PROVIDER_libdrm = "libdrm-poulsbo" |
| 21 | PREFERRED_PROVIDER_drm = "libdrm-poulsbo" | 22 | PREFERRED_PROVIDER_drm = "libdrm-poulsbo" |
| 22 | PREFERRED_PROVIDER_virtual/libx11 = "libx11-trim" | 23 | PREFERRED_PROVIDER_virtual/libx11 = "libx11-trim" |
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass new file mode 100644 index 0000000000..8e820122ec --- /dev/null +++ b/meta/classes/kernel-yocto.bbclass | |||
| @@ -0,0 +1,202 @@ | |||
| 1 | S = "${WORKDIR}/linux" | ||
| 2 | |||
| 3 | # Determine which branch to fetch and build. Not all branches are in the | ||
| 4 | # upstream repo (but will be locally created after the fetchers run) so | ||
| 5 | # a fallback branch needs to be chosen. | ||
| 6 | # | ||
| 7 | # The default machine 'UNDEFINED'. If the machine is not set to a specific | ||
| 8 | # branch in this recipe or in a recipe extension, then we fallback to a | ||
| 9 | # branch that is always present 'standard'. This sets the KBRANCH variable | ||
| 10 | # and is used in the SRC_URI. The machine is then set back to ${MACHINE}, | ||
| 11 | # since futher processing will use that to create local branches | ||
| 12 | python __anonymous () { | ||
| 13 | import bb, re | ||
| 14 | |||
| 15 | version = bb.data.getVar("LINUX_VERSION", d, 1) | ||
| 16 | # 2.6.34 signifies the old-style tree, so we need some temporary | ||
| 17 | # conditional processing based on the kernel version. | ||
| 18 | if version == "2.6.34": | ||
| 19 | bb.data.setVar("KBRANCH", "${KMACHINE}-${LINUX_KERNEL_TYPE}", d) | ||
| 20 | bb.data.setVar("KMETA", "wrs_meta", d) | ||
| 21 | mach = bb.data.getVar("KMACHINE", d, 1) | ||
| 22 | if mach == "UNDEFINED": | ||
| 23 | bb.data.setVar("KBRANCH", "standard", d) | ||
| 24 | bb.data.setVar("KMACHINE", "${MACHINE}", d) | ||
| 25 | # track the global configuration on a bootstrapped BSP | ||
| 26 | bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) | ||
| 27 | bb.data.setVar("BOOTSTRAP", "t", d) | ||
| 28 | else: | ||
| 29 | # The branch for a build is: | ||
| 30 | # yocto/<kernel type>/${KMACHINE} or | ||
| 31 | # yocto/<kernel type>/${KMACHINE}/base | ||
| 32 | bb.data.setVar("KBRANCH", bb.data.expand("yocto/${LINUX_KERNEL_TYPE}/${KMACHINE}",d), d) | ||
| 33 | bb.data.setVar("KMETA", "meta", d) | ||
| 34 | |||
| 35 | mach = bb.data.getVar("KMACHINE", d, 1) | ||
| 36 | # drop the "/base" if it was on the KMACHINE | ||
| 37 | kmachine = mach.replace('/base','') | ||
| 38 | # and then write KMACHINE back | ||
| 39 | bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d) | ||
| 40 | |||
| 41 | if mach == "UNDEFINED": | ||
| 42 | bb.data.setVar("KBRANCH", "yocto/standard/base", d) | ||
| 43 | bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), bb.data.expand("${MACHINE}",d), d) | ||
| 44 | bb.data.setVar("SRCREV_machine", "standard", d) | ||
| 45 | bb.data.setVar("BOOTSTRAP", "t", d) | ||
| 46 | } | ||
| 47 | |||
| 48 | do_patch() { | ||
| 49 | cd ${S} | ||
| 50 | if [ -f ${WORKDIR}/defconfig ]; then | ||
| 51 | defconfig=${WORKDIR}/defconfig | ||
| 52 | fi | ||
| 53 | |||
| 54 | if [ -n "${BOOTSTRAP}" ]; then | ||
| 55 | kbranch="yocto/${LINUX_KERNEL_TYPE}/${KMACHINE}" | ||
| 56 | else | ||
| 57 | kbranch=${KBRANCH} | ||
| 58 | fi | ||
| 59 | |||
| 60 | # simply ensures that a branch of the right name has been created | ||
| 61 | createme ${ARCH} ${kbranch} ${defconfig} | ||
| 62 | if [ $? -ne 0 ]; then | ||
| 63 | echo "ERROR. Could not create ${kbranch}" | ||
| 64 | exit 1 | ||
| 65 | fi | ||
| 66 | |||
| 67 | # updates or generates the target description | ||
| 68 | if [ -n "${KERNEL_FEATURES}" ]; then | ||
| 69 | addon_features="--features ${KERNEL_FEATURES}" | ||
| 70 | fi | ||
| 71 | updateme ${addon_features} ${ARCH} ${WORKDIR} | ||
| 72 | if [ $? -ne 0 ]; then | ||
| 73 | echo "ERROR. Could not update ${kbranch}" | ||
| 74 | exit 1 | ||
| 75 | fi | ||
| 76 | |||
| 77 | # executes and modifies the source tree as required | ||
| 78 | patchme ${kbranch} | ||
| 79 | if [ $? -ne 0 ]; then | ||
| 80 | echo "ERROR. Could not modify ${kbranch}" | ||
| 81 | exit 1 | ||
| 82 | fi | ||
| 83 | } | ||
| 84 | |||
| 85 | do_kernel_checkout() { | ||
| 86 | if [ -d ${WORKDIR}/.git/refs/remotes/origin ]; then | ||
| 87 | echo "Fixing up git directory for ${LINUX_KERNEL_TYPE}/${KMACHINE}" | ||
| 88 | rm -rf ${S} | ||
| 89 | mkdir ${S} | ||
| 90 | mv ${WORKDIR}/.git ${S} | ||
| 91 | |||
| 92 | if [ -e ${S}/.git/packed-refs ]; then | ||
| 93 | cd ${S} | ||
| 94 | rm -f .git/refs/remotes/origin/HEAD | ||
| 95 | IFS=' | ||
| 96 | '; | ||
| 97 | for r in `git show-ref | grep remotes`; do | ||
| 98 | ref=`echo $r | cut -d' ' -f1`; | ||
| 99 | b=`echo $r | cut -d' ' -f2 | sed 's%refs/remotes/origin/%%'`; | ||
| 100 | dir=`dirname $b` | ||
| 101 | mkdir -p .git/refs/heads/$dir | ||
| 102 | echo $ref > .git/refs/heads/$b | ||
| 103 | done | ||
| 104 | cd .. | ||
| 105 | else | ||
| 106 | cp -r ${S}/.git/refs/remotes/origin/* ${S}/.git/refs/heads | ||
| 107 | rmdir ${S}/.git/refs/remotes/origin | ||
| 108 | fi | ||
| 109 | fi | ||
| 110 | cd ${S} | ||
| 111 | |||
| 112 | # checkout and clobber and unimportant files | ||
| 113 | git checkout -f ${KBRANCH} | ||
| 114 | } | ||
| 115 | do_kernel_checkout[dirs] = "${S}" | ||
| 116 | |||
| 117 | addtask kernel_checkout before do_patch after do_unpack | ||
| 118 | |||
| 119 | do_kernel_configme() { | ||
| 120 | echo "[INFO] doing kernel configme" | ||
| 121 | |||
| 122 | cd ${S} | ||
| 123 | configme --reconfig | ||
| 124 | if [ $? -ne 0 ]; then | ||
| 125 | echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}" | ||
| 126 | exit 1 | ||
| 127 | fi | ||
| 128 | |||
| 129 | echo "# Global settings from linux recipe" >> ${B}/.config | ||
| 130 | echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config | ||
| 131 | } | ||
| 132 | |||
| 133 | do_kernel_configcheck() { | ||
| 134 | echo "[INFO] validating kernel configuration" | ||
| 135 | cd ${B}/.. | ||
| 136 | kconf_check ${B}/.config ${B} ${S} ${B} ${LINUX_VERSION} ${KMACHINE}-${LINUX_KERNEL_TYPE} | ||
| 137 | } | ||
| 138 | |||
| 139 | |||
| 140 | # Ensure that the branches (BSP and meta) are on the locatios specified by | ||
| 141 | # their SRCREV values. If they are NOT on the right commits, the branches | ||
| 142 | # are reset to the correct commit. | ||
| 143 | do_validate_branches() { | ||
| 144 | cd ${S} | ||
| 145 | branch_head=`git show-ref -s --heads ${KBRANCH}` | ||
| 146 | meta_head=`git show-ref -s --heads ${KMETA}` | ||
| 147 | target_branch_head="${SRCREV_machine}" | ||
| 148 | target_meta_head="${SRCREV_meta}" | ||
| 149 | |||
| 150 | # nothing to do if bootstrapping | ||
| 151 | if [ -n "${BOOTSTRAP}" ]; then | ||
| 152 | return | ||
| 153 | fi | ||
| 154 | |||
| 155 | current=`git branch |grep \*|sed 's/^\* //'` | ||
| 156 | if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then | ||
| 157 | if [ -n "${KERNEL_REVISION_CHECKING}" ]; then | ||
| 158 | git show ${target_branch_head} > /dev/null 2>&1 | ||
| 159 | if [ $? -eq 0 ]; then | ||
| 160 | echo "Forcing branch $current to ${target_branch_head}" | ||
| 161 | git branch -m $current $current-orig | ||
| 162 | git checkout -b $current ${target_branch_head} | ||
| 163 | else | ||
| 164 | echo "ERROR ${target_branch_head} is not a valid commit ID." | ||
| 165 | echo "The kernel source tree may be out of sync" | ||
| 166 | exit 1 | ||
| 167 | fi | ||
| 168 | fi | ||
| 169 | fi | ||
| 170 | |||
| 171 | if [ "$meta_head" != "$target_meta_head" ]; then | ||
| 172 | if [ -n "${KERNEL_REVISION_CHECKING}" ]; then | ||
| 173 | git show ${target_meta_head} > /dev/null 2>&1 | ||
| 174 | if [ $? -eq 0 ]; then | ||
| 175 | echo "Forcing branch meta to ${target_meta_head}" | ||
| 176 | git branch -m ${KMETA} ${KMETA}-orig | ||
| 177 | git checkout -b ${KMETA} ${target_meta_head} | ||
| 178 | else | ||
| 179 | echo "ERROR ${target_meta_head} is not a valid commit ID" | ||
| 180 | echo "The kernel source tree may be out of sync" | ||
| 181 | exit 1 | ||
| 182 | fi | ||
| 183 | fi | ||
| 184 | fi | ||
| 185 | |||
| 186 | # restore the branch for builds | ||
| 187 | git checkout -f ${KBRANCH} | ||
| 188 | } | ||
| 189 | |||
| 190 | # Many scripts want to look in arch/$arch/boot for the bootable | ||
| 191 | # image. This poses a problem for vmlinux based booting. This | ||
| 192 | # task arranges to have vmlinux appear in the normalized directory | ||
| 193 | # location. | ||
| 194 | do_kernel_link_vmlinux() { | ||
| 195 | if [ ! -d "${B}/arch/${ARCH}/boot" ]; then | ||
| 196 | mkdir ${B}/arch/${ARCH}/boot | ||
| 197 | fi | ||
| 198 | cd ${B}/arch/${ARCH}/boot | ||
| 199 | ln -sf ../../../vmlinux | ||
| 200 | } | ||
| 201 | |||
| 202 | |||
diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc index 58a0a3d516..81c39ab96a 100644 --- a/meta/conf/distro/include/poky-default-revisions.inc +++ b/meta/conf/distro/include/poky-default-revisions.inc | |||
| @@ -57,7 +57,7 @@ SRCREV_pn-gypsy ??= "147" | |||
| 57 | SRCREV_pn-inputproto ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" | 57 | SRCREV_pn-inputproto ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" |
| 58 | SRCREV_pn-inputproto-native ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" | 58 | SRCREV_pn-inputproto-native ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" |
| 59 | SRCREV_pn-inputproto-nativesdk ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" | 59 | SRCREV_pn-inputproto-nativesdk ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" |
| 60 | SRCREV_pn-kern-tools-native ??= "9722d8decacd2b750f079b3fde7918810700f80e" | 60 | SRCREV_pn-kern-tools-native ??= "c85dcdd2dc50d71476a11c2960bf14c2b144b3c7" |
| 61 | SRCREV_pn-libdrm ??= "3f3c5be6f908272199ccf53f108b1124bfe0a00e" | 61 | SRCREV_pn-libdrm ??= "3f3c5be6f908272199ccf53f108b1124bfe0a00e" |
| 62 | SRCREV_pn-libfakekey ??= "2031" | 62 | SRCREV_pn-libfakekey ??= "2031" |
| 63 | SRCREV_pn-libgdbus ??= "aeab6e3c0185b271ca343b439470491b99cc587f" | 63 | SRCREV_pn-libgdbus ??= "aeab6e3c0185b271ca343b439470491b99cc587f" |
| @@ -84,17 +84,29 @@ SRCREV_pn-linux-omap-zoomsync ??= "015cbaf1035cd9a61d33a27de2a22902555db3c5" | |||
| 84 | SRCREV_pn-linux-omap2 ??= "d3b3ae0fe6c71641da19c8de466ec366d39847e3" | 84 | SRCREV_pn-linux-omap2 ??= "d3b3ae0fe6c71641da19c8de466ec366d39847e3" |
| 85 | SRCREV_pn-linux-omap3 ??= "de1121fdb899f762b9e717f44eaf3fae7c00cd3e" | 85 | SRCREV_pn-linux-omap3 ??= "de1121fdb899f762b9e717f44eaf3fae7c00cd3e" |
| 86 | SRCREV_pn-linux-omap3-pm ??= "totallybroken" | 86 | SRCREV_pn-linux-omap3-pm ??= "totallybroken" |
| 87 | SRCREV_machine_pn-linux-yocto_qemuarm ?= "4f4177b4bea5b8858acc1eeb788d80b7af0df962" | 87 | SRCREV_machine_pn-linux-yocto-stable_qemuarm ?= "4f4177b4bea5b8858acc1eeb788d80b7af0df962" |
| 88 | SRCREV_machine_pn-linux-yocto_qemumips ?= "81f3cd467b9d51fa1dfa2d5939337cc756ae8061" | 88 | SRCREV_machine_pn-linux-yocto-stable_qemumips ?= "81f3cd467b9d51fa1dfa2d5939337cc756ae8061" |
| 89 | SRCREV_machine_pn-linux-yocto_qemuppc ?= "9ac0daee43dd19d8bea828cf79450c9748ae0daa" | 89 | SRCREV_machine_pn-linux-yocto-stable_qemuppc ?= "9ac0daee43dd19d8bea828cf79450c9748ae0daa" |
| 90 | SRCREV_machine_pn-linux-yocto_qemux86 ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" | 90 | SRCREV_machine_pn-linux-yocto-stable_qemux86 ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" |
| 91 | SRCREV_machine_pn-linux-yocto_qemux86-64 ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" | 91 | SRCREV_machine_pn-linux-yocto-stable_qemux86-64 ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" |
| 92 | SRCREV_machine_pn-linux-yocto_emenlow ?= "aae69fdf104b0a9d7b3710f808aac6ab303490f7" | 92 | SRCREV_machine_pn-linux-yocto-stable_emenlow ?= "aae69fdf104b0a9d7b3710f808aac6ab303490f7" |
| 93 | SRCREV_machine_pn-linux-yocto_atom-pc ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" | 93 | SRCREV_machine_pn-linux-yocto-stable_atom-pc ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" |
| 94 | SRCREV_machine_pn-linux-yocto_routerstationpro ?= "2ec2edaf256dd8500ee3d4763fee6ca3ecd6da4b" | 94 | SRCREV_machine_pn-linux-yocto-stable_routerstationpro ?= "2ec2edaf256dd8500ee3d4763fee6ca3ecd6da4b" |
| 95 | SRCREV_machine_pn-linux-yocto_mpc8315e-rdb ?= "986e6eb66c26007cee7916d5d12f4756e6b5436f" | 95 | SRCREV_machine_pn-linux-yocto-stable_mpc8315e-rdb ?= "986e6eb66c26007cee7916d5d12f4756e6b5436f" |
| 96 | SRCREV_machine_pn-linux-yocto_beagleboard ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" | 96 | SRCREV_machine_pn-linux-yocto-stable_beagleboard ?= "0431115c9d720fee5bb105f6a7411efb4f851d26" |
| 97 | SRCREV_meta_pn-linux-yocto ?= "d1cd5c80ee97e81e130be8c3de3965b770f320d6" | 97 | SRCREV_meta_pn-linux-yocto-stable ?= "d1cd5c80ee97e81e130be8c3de3965b770f320d6" |
| 98 | # development SRCREVs | ||
| 99 | SRCREV_machine_pn-linux-yocto_qemuarm = "87e00a2d47ba80b4ad1f9170cb3f6cf81f21d739" | ||
| 100 | SRCREV_machine_pn-linux-yocto_qemumips = "7231e473dd981a28e3cea9f677ed60583e731550" | ||
| 101 | SRCREV_machine_pn-linux-yocto_qemuppc = "3ab3559637130b65d8889fa74286fdb57935726f" | ||
| 102 | SRCREV_machine_pn-linux-yocto_qemux86 = "87aacc373557f8849dde8618fbe1f7f8f2af6038" | ||
| 103 | SRCREV_machine_pn-linux-yocto_qemux86-64 = "87aacc373557f8849dde8618fbe1f7f8f2af6038" | ||
| 104 | SRCREV_machine_pn-linux-yocto_emenlow = "87aacc373557f8849dde8618fbe1f7f8f2af6038" | ||
| 105 | SRCREV_machine_pn-linux-yocto_atom-pc = "87aacc373557f8849dde8618fbe1f7f8f2af6038" | ||
| 106 | SRCREV_machine_pn-linux-yocto_routerstationpro = "773d3a1c8eba563ffcdbf61057ef6e39cee0c88b" | ||
| 107 | SRCREV_machine_pn-linux-yocto_mpc8315e-rdb = "5ff609967ffe87c49d534d7861a7e0b150517726" | ||
| 108 | SRCREV_machine_pn-linux-yocto_beagleboard = "87aacc373557f8849dde8618fbe1f7f8f2af6038" | ||
| 109 | SRCREV_meta_pn-linux-yocto ?= "ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9" | ||
| 98 | SRCREV_pn-linux-libc-headers-yocto ??= "09a39c638dd65dc27c549c119abe1af2631b2ae0" | 110 | SRCREV_pn-linux-libc-headers-yocto ??= "09a39c638dd65dc27c549c119abe1af2631b2ae0" |
| 99 | SRCREV_pn-matchbox-config-gtk ??= "2081" | 111 | SRCREV_pn-matchbox-config-gtk ??= "2081" |
| 100 | SRCREV_pn-matchbox-desktop-sato ??= "76" | 112 | SRCREV_pn-matchbox-desktop-sato ??= "76" |
diff --git a/meta/conf/machine/atom-pc.conf b/meta/conf/machine/atom-pc.conf index 7ca952a0a2..8cf09b811e 100644 --- a/meta/conf/machine/atom-pc.conf +++ b/meta/conf/machine/atom-pc.conf | |||
| @@ -13,7 +13,8 @@ MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 x86 wifi \ | |||
| 13 | 13 | ||
| 14 | KERNEL_IMAGETYPE = "bzImage" | 14 | KERNEL_IMAGETYPE = "bzImage" |
| 15 | 15 | ||
| 16 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" | 16 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable" |
| 17 | #PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" | ||
| 17 | PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim" | 18 | PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim" |
| 18 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri" | 19 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri" |
| 19 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite" | 20 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite" |
diff --git a/meta/conf/machine/beagleboard.conf b/meta/conf/machine/beagleboard.conf index 657bd366ca..1b73250c24 100644 --- a/meta/conf/machine/beagleboard.conf +++ b/meta/conf/machine/beagleboard.conf | |||
| @@ -22,7 +22,8 @@ EXTRA_IMAGECMD_jffs2 = "-lnp " | |||
| 22 | # Guesswork | 22 | # Guesswork |
| 23 | SERIAL_CONSOLE = "115200 ttyS2" | 23 | SERIAL_CONSOLE = "115200 ttyS2" |
| 24 | 24 | ||
| 25 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" | 25 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-stable" |
| 26 | #PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" | ||
| 26 | 27 | ||
| 27 | KERNEL_IMAGETYPE = "uImage" | 28 | KERNEL_IMAGETYPE = "uImage" |
| 28 | 29 | ||
diff --git a/meta/conf/machine/include/qemu.inc b/meta/conf/machine/include/qemu.inc index 1b1b8881c6..502e24f770 100644 --- a/meta/conf/machine/include/qemu.inc +++ b/meta/conf/machine/include/qemu.inc | |||
| @@ -16,5 +16,6 @@ RDEPENDS_kernel-base = "" | |||
| 16 | 16 | ||
| 17 | # Use a common kernel recipe for all QEMU machines | 17 | # Use a common kernel recipe for all QEMU machines |
| 18 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" | 18 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" |
| 19 | #PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" | ||
| 19 | 20 | ||
| 20 | EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" | 21 | EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" |
diff --git a/meta/conf/machine/mpc8315e-rdb.conf b/meta/conf/machine/mpc8315e-rdb.conf index 334118668a..1b7982a5dd 100644 --- a/meta/conf/machine/mpc8315e-rdb.conf +++ b/meta/conf/machine/mpc8315e-rdb.conf | |||
| @@ -13,4 +13,5 @@ SERIAL_CONSOLE = "115200 ttyS0" | |||
| 13 | 13 | ||
| 14 | MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" | 14 | MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial" |
| 15 | 15 | ||
| 16 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" | 16 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-stable" |
| 17 | #PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" | ||
diff --git a/meta/conf/machine/routerstationpro.conf b/meta/conf/machine/routerstationpro.conf index 485ee3c124..4f1bbbb2c7 100644 --- a/meta/conf/machine/routerstationpro.conf +++ b/meta/conf/machine/routerstationpro.conf | |||
| @@ -12,7 +12,8 @@ MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 \ | |||
| 12 | KERNEL_IMAGETYPE = "vmlinux" | 12 | KERNEL_IMAGETYPE = "vmlinux" |
| 13 | KERNEL_ALT_IMAGETYPE = "vmlinux.bin" | 13 | KERNEL_ALT_IMAGETYPE = "vmlinux.bin" |
| 14 | 14 | ||
| 15 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" | 15 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-stable" |
| 16 | #PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" | ||
| 16 | 17 | ||
| 17 | SERIAL_CONSOLE = "115200 ttyS0" | 18 | SERIAL_CONSOLE = "115200 ttyS0" |
| 18 | 19 | ||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb index 6ae6d5f642..3e3c1fa9ba 100644 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb | |||
| @@ -4,7 +4,7 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
| 4 | DEPENDS += "unifdef-native" | 4 | DEPENDS += "unifdef-native" |
| 5 | PROVIDES = "linux-libc-headers" | 5 | PROVIDES = "linux-libc-headers" |
| 6 | PV = "2.6.34+git-${SRCPV}" | 6 | PV = "2.6.34+git-${SRCPV}" |
| 7 | PR = "r0" | 7 | PR = "r1" |
| 8 | 8 | ||
| 9 | SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;fullclone=1" | 9 | SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;fullclone=1" |
| 10 | 10 | ||
| @@ -45,7 +45,7 @@ do_compile () { | |||
| 45 | 45 | ||
| 46 | do_install() { | 46 | do_install() { |
| 47 | set_arch | 47 | set_arch |
| 48 | oe_runmake headers_install_all INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH | 48 | oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | BBCLASSEXTEND = "nativesdk" | 51 | BBCLASSEXTEND = "nativesdk" |
diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc new file mode 100644 index 0000000000..714207f860 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-tools.inc | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # included by kernel recipes if they want to build/provide | ||
| 2 | # perf functionality from their tree. | ||
| 3 | |||
| 4 | do_compile_perf() { | ||
| 5 | oe_runmake -C ${S}/tools/perf CC="${KERNEL_CC}" LD="${KERNEL_LD}" prefix=${prefix} | ||
| 6 | } | ||
| 7 | |||
| 8 | do_install_perf() { | ||
| 9 | oe_runmake -C ${S}/tools/perf CC="${KERNEL_CC}" LD="${KERNEL_LD}" prefix=${prefix} DESTDIR=${D} install | ||
| 10 | } | ||
| 11 | |||
| 12 | |||
| 13 | # perf tasks | ||
| 14 | addtask compile_perf after do_compile before do_install | ||
| 15 | addtask install_perf after do_install before do_package do_deploy | ||
| 16 | |||
| 17 | do_compile_perf[depends] = "virtual/libc:do_populate_sysroot" | ||
| 18 | do_compile_perf[depends] =+ "elfutils:do_populate_sysroot" | ||
| 19 | RDEPENDS_perf += "python perl elfutils" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto-stable_git.bb b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb new file mode 100644 index 0000000000..8ecd86fa9f --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | inherit kernel | ||
| 2 | require linux-yocto.inc | ||
| 3 | |||
| 4 | KMACHINE_qemux86 = "common_pc/base" | ||
| 5 | KMACHINE_qemux86-64 = "common_pc_64" | ||
| 6 | KMACHINE_qemuppc = "qemu_ppc32" | ||
| 7 | KMACHINE_qemumips = "mti_malta32_be" | ||
| 8 | KMACHINE_qemuarm = "arm_versatile_926ejs" | ||
| 9 | KMACHINE_atom-pc = "atom-pc" | ||
| 10 | KMACHINE_routerstationpro = "routerstationpro" | ||
| 11 | KMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb" | ||
| 12 | KMACHINE_beagleboard = "beagleboard" | ||
| 13 | |||
| 14 | LINUX_VERSION ?= "2.6.34" | ||
| 15 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" | ||
| 16 | PR = "r0" | ||
| 17 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
| 18 | SRCREV_FORMAT = "meta_machine" | ||
| 19 | |||
| 20 | # this performs a fixup on the SRCREV for new/undefined BSPs | ||
| 21 | python __anonymous () { | ||
| 22 | import bb, re | ||
| 23 | |||
| 24 | rev = bb.data.getVar("SRCREV_machine", d, 1) | ||
| 25 | if rev == "standard": | ||
| 26 | bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) | ||
| 27 | } | ||
| 28 | |||
| 29 | SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${KBRANCH};name=machine \ | ||
| 30 | git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;noclone=1;branch=wrs_meta;name=meta" | ||
| 31 | |||
| 32 | |||
| 33 | # Functionality flags | ||
| 34 | KERNEL_REVISION_CHECKING ?= "t" | ||
| 35 | KERNEL_FEATURES=features/netfilter | ||
| 36 | |||
| 37 | # extra tasks | ||
| 38 | addtask kernel_link_vmlinux after do_compile before do_install | ||
| 39 | addtask validate_branches before do_patch after do_kernel_checkout | ||
| 40 | |||
| 41 | require linux-tools.inc | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc new file mode 100644 index 0000000000..095b3375fa --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto.inc | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | DESCRIPTION = "Yocto Kernel" | ||
| 2 | SECTION = "kernel" | ||
| 3 | LICENSE = "GPL" | ||
| 4 | |||
| 5 | # A KMACHINE is the mapping of a yocto $MACHINE to what is built | ||
| 6 | # by the kernel. This is typically the branch that should be built, | ||
| 7 | # and it can be specific to the machine or shared | ||
| 8 | KMACHINE = "UNDEFINED" | ||
| 9 | |||
| 10 | COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|routerstationpro)" | ||
| 11 | |||
| 12 | # Set this to 'preempt_rt' in the local.conf if you want a real time kernel | ||
| 13 | LINUX_KERNEL_TYPE ?= standard | ||
| 14 | |||
| 15 | do_patch[depends] = "kern-tools-native:do_populate_sysroot" | ||
| 16 | |||
| 17 | addtask kernel_configme before do_configure after do_patch | ||
| 18 | addtask kernel_configcheck after do_configure before do_compile | ||
| 19 | |||
| 20 | # Pick up shared functions | ||
| 21 | inherit kernel-yocto | ||
| 22 | |||
| 23 | B = "${WORKDIR}/linux-${KMACHINE}-${LINUX_KERNEL_TYPE}-build" | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto_git.bb b/meta/recipes-kernel/linux/linux-yocto_git.bb index ef005aefca..1e3df478eb 100644 --- a/meta/recipes-kernel/linux/linux-yocto_git.bb +++ b/meta/recipes-kernel/linux/linux-yocto_git.bb | |||
| @@ -1,21 +1,7 @@ | |||
| 1 | DESCRIPTION = "Yocto Kernel" | 1 | inherit kernel |
| 2 | SECTION = "kernel" | 2 | require linux-yocto.inc |
| 3 | LICENSE = "GPL" | ||
| 4 | |||
| 5 | # Set this to 'preempt_rt' in the local.conf if you want a real time kernel | ||
| 6 | LINUX_KERNEL_TYPE ?= standard | ||
| 7 | SRCREV_FORMAT = "meta_machine" | ||
| 8 | PV = "2.6.34+git${SRCPV}" | ||
| 9 | |||
| 10 | # To use a staged, on-disk bare clone of a Wind River Kernel, use a | ||
| 11 | # variant of the below | ||
| 12 | # SRC_URI = "git://///path/to/kernel/default_kernel.git;fullclone=1" | ||
| 13 | SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${KBRANCH};name=machine \ | ||
| 14 | git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;noclone=1;branch=wrs_meta;name=meta" | ||
| 15 | 3 | ||
| 16 | # map the poky machine to a 'kernel machine' | 4 | KMACHINE_qemux86 = "common_pc/base" |
| 17 | KMACHINE = "UNDEFINED" | ||
| 18 | KMACHINE_qemux86 = "common_pc" | ||
| 19 | KMACHINE_qemux86-64 = "common_pc_64" | 5 | KMACHINE_qemux86-64 = "common_pc_64" |
| 20 | KMACHINE_qemuppc = "qemu_ppc32" | 6 | KMACHINE_qemuppc = "qemu_ppc32" |
| 21 | KMACHINE_qemumips = "mti_malta32_be" | 7 | KMACHINE_qemumips = "mti_malta32_be" |
| @@ -25,199 +11,22 @@ KMACHINE_routerstationpro = "routerstationpro" | |||
| 25 | KMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb" | 11 | KMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb" |
| 26 | KMACHINE_beagleboard = "beagleboard" | 12 | KMACHINE_beagleboard = "beagleboard" |
| 27 | 13 | ||
| 28 | # Determine which branch to fetch and build. Not all branches are in the | 14 | LINUX_VERSION ?= "2.6.37" |
| 29 | # upstream repo (but will be locally created after the fetchers run) so | 15 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
| 30 | # a fallback branch needs to be chosen. | 16 | PR = "r14" |
| 31 | # | 17 | PV = "${LINUX_VERSION}+git${SRCPV}" |
| 32 | # The default machine 'UNDEFINED'. If the machine is not set to a specific | 18 | SRCREV_FORMAT = "meta_machine" |
| 33 | # branch in this recipe or in a recipe extension, then we fallback to a | ||
| 34 | # branch that is always present 'standard'. This sets the KBRANCH variable | ||
| 35 | # and is used in the SRC_URI. The machine is then set back to ${MACHINE}, | ||
| 36 | # since futher processing will use that to create local branches | ||
| 37 | python __anonymous () { | ||
| 38 | import bb, re | ||
| 39 | |||
| 40 | bb.data.setVar("KBRANCH", "${KMACHINE}-${LINUX_KERNEL_TYPE}", d) | ||
| 41 | mach = bb.data.getVar("KMACHINE", d, 1) | ||
| 42 | if mach == "UNDEFINED": | ||
| 43 | bb.data.setVar("KBRANCH", "standard", d) | ||
| 44 | bb.data.setVar("KMACHINE", "${MACHINE}", d) | ||
| 45 | # track the global configuration on a bootstrapped BSP | ||
| 46 | bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) | ||
| 47 | bb.data.setVar("BOOTSTRAP", "t", d) | ||
| 48 | } | ||
| 49 | |||
| 50 | COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|routerstationpro|mpc8315e-rdb|beagleboard)" | ||
| 51 | 19 | ||
| 52 | LINUX_VERSION = "v2.6.34" | 20 | SRC_URI = "git://git.pokylinux.org/linux-yocto-2.6.37;protocol=git;fullclone=1;branch=${KBRANCH};name=machine \ |
| 53 | LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}" | 21 | git://git.pokylinux.org/linux-yocto-2.6.37;protocol=git;noclone=1;branch=meta;name=meta" |
| 54 | PR = "r13" | ||
| 55 | 22 | ||
| 56 | S = "${WORKDIR}/linux" | ||
| 57 | B = "${WORKDIR}/linux-${KMACHINE}-${LINUX_KERNEL_TYPE}-build" | ||
| 58 | 23 | ||
| 59 | # functionality flags | 24 | # Functionality flags |
| 60 | KERNEL_REVISION_CHECKING ?= "t" | 25 | KERNEL_REVISION_CHECKING ?= "t" |
| 61 | KERNEL_FEATURES=features/netfilter | 26 | KERNEL_FEATURES=features/netfilter |
| 62 | 27 | ||
| 63 | do_patch() { | 28 | # extra tasks |
| 64 | cd ${S} | ||
| 65 | if [ -f ${WORKDIR}/defconfig ]; then | ||
| 66 | defconfig=${WORKDIR}/defconfig | ||
| 67 | fi | ||
| 68 | |||
| 69 | # simply ensures that a branch of the right name has been created | ||
| 70 | createme ${ARCH} ${KMACHINE}-${LINUX_KERNEL_TYPE} ${defconfig} | ||
| 71 | if [ $? -ne 0 ]; then | ||
| 72 | echo "ERROR. Could not create ${KMACHINE}-${LINUX_KERNEL_TYPE}" | ||
| 73 | exit 1 | ||
| 74 | fi | ||
| 75 | |||
| 76 | # updates or generates the target description | ||
| 77 | if [ -n "${KERNEL_FEATURES}" ]; then | ||
| 78 | addon_features="--features ${KERNEL_FEATURES}" | ||
| 79 | fi | ||
| 80 | updateme ${addon_features} ${ARCH} ${WORKDIR} | ||
| 81 | if [ $? -ne 0 ]; then | ||
| 82 | echo "ERROR. Could not update ${KMACHINE}-${LINUX_KERNEL_TYPE}" | ||
| 83 | exit 1 | ||
| 84 | fi | ||
| 85 | |||
| 86 | # executes and modifies the source tree as required | ||
| 87 | patchme ${KMACHINE}-${LINUX_KERNEL_TYPE} | ||
| 88 | if [ $? -ne 0 ]; then | ||
| 89 | echo "ERROR. Could not modify ${KMACHINE}-${LINUX_KERNEL_TYPE}" | ||
| 90 | exit 1 | ||
| 91 | fi | ||
| 92 | } | ||
| 93 | |||
| 94 | validate_branches() { | ||
| 95 | branch_head=`git show-ref -s --heads ${KBRANCH}` | ||
| 96 | meta_head=`git show-ref -s --heads wrs_meta` | ||
| 97 | target_branch_head="${SRCREV_machine}" | ||
| 98 | target_meta_head="${SRCREV_meta}" | ||
| 99 | |||
| 100 | if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then | ||
| 101 | if [ -n "${KERNEL_REVISION_CHECKING}" ]; then | ||
| 102 | git show ${target_branch_head} > /dev/null 2>&1 | ||
| 103 | if [ $? -eq 0 ]; then | ||
| 104 | echo "Forcing branch ${KMACHINE}-${LINUX_KERNEL_TYPE} to ${target_branch_head}" | ||
| 105 | git branch -m ${KMACHINE}-${LINUX_KERNEL_TYPE} ${KMACHINE}-${LINUX_KERNEL_TYPE}-orig | ||
| 106 | git checkout -b ${KMACHINE}-${LINUX_KERNEL_TYPE} ${target_branch_head} | ||
| 107 | else | ||
| 108 | echo "ERROR ${target_branch_head} is not a valid commit ID." | ||
| 109 | echo "The kernel source tree may be out of sync" | ||
| 110 | exit 1 | ||
| 111 | fi | ||
| 112 | fi | ||
| 113 | fi | ||
| 114 | |||
| 115 | if [ "$meta_head" != "$target_meta_head" ]; then | ||
| 116 | if [ -n "${KERNEL_REVISION_CHECKING}" ]; then | ||
| 117 | git show ${target_meta_head} > /dev/null 2>&1 | ||
| 118 | if [ $? -eq 0 ]; then | ||
| 119 | echo "Forcing branch wrs_meta to ${target_meta_head}" | ||
| 120 | git branch -m wrs_meta wrs_meta-orig | ||
| 121 | git checkout -b wrs_meta ${target_meta_head} | ||
| 122 | else | ||
| 123 | echo "ERROR ${target_meta_head} is not a valid commit ID" | ||
| 124 | echo "The kernel source tree may be out of sync" | ||
| 125 | exit 1 | ||
| 126 | fi | ||
| 127 | fi | ||
| 128 | fi | ||
| 129 | } | ||
| 130 | |||
| 131 | do_kernel_checkout() { | ||
| 132 | if [ -d ${WORKDIR}/.git/refs/remotes/origin ]; then | ||
| 133 | echo "Fixing up git directory for ${KMACHINE}-${LINUX_KERNEL_TYPE}" | ||
| 134 | rm -rf ${S} | ||
| 135 | mkdir ${S} | ||
| 136 | mv ${WORKDIR}/.git ${S} | ||
| 137 | |||
| 138 | if [ -e ${S}/.git/packed-refs ]; then | ||
| 139 | cd ${S} | ||
| 140 | rm -f .git/refs/remotes/origin/HEAD | ||
| 141 | IFS=' | ||
| 142 | '; | ||
| 143 | |||
| 144 | for r in `git show-ref | grep remotes`; do | ||
| 145 | ref=`echo $r | cut -d' ' -f1`; | ||
| 146 | b=`echo $r | cut -d'/' -f4`; | ||
| 147 | echo $ref > .git/refs/heads/$b | ||
| 148 | done | ||
| 149 | cd .. | ||
| 150 | else | ||
| 151 | mv ${S}/.git/refs/remotes/origin/* ${S}/.git/refs/heads | ||
| 152 | rmdir ${S}/.git/refs/remotes/origin | ||
| 153 | fi | ||
| 154 | fi | ||
| 155 | cd ${S} | ||
| 156 | |||
| 157 | # checkout and clobber and unimportant files | ||
| 158 | git checkout -f ${KBRANCH} | ||
| 159 | |||
| 160 | if [ -z "${BOOTSTRAP}" ]; then | ||
| 161 | validate_branches | ||
| 162 | fi | ||
| 163 | |||
| 164 | # this second checkout is intentional, we want to leave ourselves | ||
| 165 | # on the branch to be built, but validate_branches could have changed | ||
| 166 | # our initial checkout. So we do it a second time to be sure | ||
| 167 | git checkout -f ${KBRANCH} | ||
| 168 | } | ||
| 169 | do_kernel_checkout[dirs] = "${S}" | ||
| 170 | |||
| 171 | addtask kernel_checkout before do_patch after do_unpack | ||
| 172 | |||
| 173 | do_kernel_configme() { | ||
| 174 | echo "Doing kernel configme" | ||
| 175 | |||
| 176 | cd ${S} | ||
| 177 | configme --reconfig | ||
| 178 | if [ $? -ne 0 ]; then | ||
| 179 | echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}" | ||
| 180 | exit 1 | ||
| 181 | fi | ||
| 182 | |||
| 183 | echo "# CONFIG_WRNOTE is not set" >> ${B}/.config | ||
| 184 | echo "# Global settings from linux recipe" >> ${B}/.config | ||
| 185 | echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config | ||
| 186 | } | ||
| 187 | |||
| 188 | do_kernel_configcheck() { | ||
| 189 | echo "[INFO] validating kernel configuration" | ||
| 190 | cd ${B}/.. | ||
| 191 | kconf_check ${B}/.config ${B} ${S} ${B} ${LINUX_VERSION} ${KMACHINE}-${LINUX_KERNEL_TYPE} | ||
| 192 | } | ||
| 193 | |||
| 194 | do_kernel_link_vmlinux() { | ||
| 195 | if [ ! -d "${B}/arch/${ARCH}/boot" ]; then | ||
| 196 | mkdir ${B}/arch/${ARCH}/boot | ||
| 197 | fi | ||
| 198 | cd ${B}/arch/${ARCH}/boot | ||
| 199 | ln -sf ../../../vmlinux | ||
| 200 | } | ||
| 201 | |||
| 202 | do_compile_perf() { | ||
| 203 | oe_runmake -C ${S}/tools/perf CC="${KERNEL_CC}" LD="${KERNEL_LD}" prefix=${prefix} | ||
| 204 | } | ||
| 205 | |||
| 206 | do_install_perf() { | ||
| 207 | oe_runmake -C ${S}/tools/perf CC="${KERNEL_CC}" LD="${KERNEL_LD}" prefix=${prefix} DESTDIR=${D} install | ||
| 208 | } | ||
| 209 | |||
| 210 | do_patch[depends] = "kern-tools-native:do_populate_sysroot" | ||
| 211 | addtask kernel_configme before do_configure after do_patch | ||
| 212 | addtask kernel_link_vmlinux after do_compile before do_install | 29 | addtask kernel_link_vmlinux after do_compile before do_install |
| 213 | addtask kernel_configcheck after do_configure before do_compile | 30 | addtask validate_branches before do_patch after do_kernel_checkout |
| 214 | |||
| 215 | inherit kernel | ||
| 216 | |||
| 217 | # perf tasks | ||
| 218 | addtask compile_perf after do_compile before do_install | ||
| 219 | addtask install_perf after do_install before do_package do_deploy | ||
| 220 | 31 | ||
| 221 | do_compile_perf[depends] = "virtual/libc:do_populate_sysroot" | 32 | require linux-tools.inc |
| 222 | do_compile_perf[depends] =+ "elfutils:do_populate_sysroot" | ||
| 223 | RDEPENDS_perf += "python perl elfutils" | ||
