summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2015-10-28 13:33:10 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2015-10-28 13:33:10 +0100
commitf870e2215af9aefd2625d336e3afcf4318f851af (patch)
tree1eff50db93ea38c3ac11c6a82341a5f5229eed11
downloadmeta-enea-bsp-ppc-f870e2215af9aefd2625d336e3afcf4318f851af.tar.gz
Initial commit
result of splitting up meta-enea Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--COPYING.MIT17
-rw-r--r--README63
-rw-r--r--conf/layer.conf12
-rw-r--r--recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch39
-rw-r--r--recipes-kernel/linux/files/b4860-hard_irq_disable-bug.patch24
-rwxr-xr-xrecipes-kernel/linux/files/merge_config.sh142
-rw-r--r--recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch19
-rw-r--r--recipes-kernel/linux/files/pramfs-1.5.1-3.12.tar.gzbin0 -> 72817 bytes
-rw-r--r--recipes-kernel/linux/kernel-configure.inc49
-rw-r--r--recipes-kernel/linux/linux-qoriq-common.inc38
-rw-r--r--recipes-kernel/linux/linux-qoriq_3.12.bbappend1
-rw-r--r--recipes-kernel/linux/pramfs-3.12.inc21
-rw-r--r--recipes-kernel/linux/staging-kernel.inc133
13 files changed, 558 insertions, 0 deletions
diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..89de354
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..ef3cf8b
--- /dev/null
+++ b/README
@@ -0,0 +1,63 @@
1meta-enea-bsp-ppc
2===================================================================
3
4This layer is contains Enea BSP customizations for PowerPC architecures.
5
6Dependencies
7============
8
9This layer depends on:
10
11 URI: git://git.yoctoproject.org/meta-fsl-ppc
12 branch: dizzy
13 revision: HEAD
14
15 URI: git://git.enea.com/linux/meta-enea-base.git
16 branch: dizzy
17 revision: HEAD
18
19
20Source code
21===========
22
23git://git.enea.com/linux/meta-enea-bsp-ppc.git
24
25
26Patches
27=======
28
29Please submit any patches against the enea-bsp-ppc layer to the
30linux-maintainers mailing list: linux-maintainers@enea.com
31
32Maintainers: Enea Linux Team <linux-maintainers@enea.com>
33
34
35Table
36=================
37
38 I. Adding the enea-bsp-ppc layer to your build
39 II. Misc
40
41
42I. Adding the enea-bsp-ppc layer to your build
43=================================================
44
45In order to use this layer, you need to make the build system aware of
46it.
47
48Assuming the enea-bsp-ppc layer exists at the top-level of your
49yocto build tree, you can add it to the build system by adding the
50location of the enea-bsp-ppc layer to bblayers.conf, along with any
51other layers needed. e.g.:
52
53
54 BBLAYERS ?= " \
55 /path/to/yocto/meta \
56 /path/to/yocto/meta-yocto \
57 /path/to/yocto/meta-enea-base \
58 /path/to/yocto/meta-fsl-ppc \
59 /path/to/yocto/meta-enea-bsp-ppc \
60 "
61
62II. Misc
63========
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..961ca96
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,12 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have recipes-* directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/images/* \
7 ${LAYERDIR}/packagegroups/* \
8 ${LAYERDIR}/recipes-*/*/*.bbappend"
9
10BBFILE_COLLECTIONS += "enea-bsp-ppc"
11BBFILE_PATTERN_enea-bsp-ppc = "^${LAYERDIR}/"
12BBFILE_PRIORITY_enea-bsp-ppc = "6"
diff --git a/recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch b/recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch
new file mode 100644
index 0000000..9e42dbd
--- /dev/null
+++ b/recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch
@@ -0,0 +1,39 @@
1From 34a06b51a1928ed1692da4fce9f2203dfd306648 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@enea.com>
3Date: Tue, 22 Apr 2014 07:26:59 +0200
4Subject: [PATCH] sdhci: fix Timeout error messages
5
6If the driver doesn't implement proper card detection,
7we shouldn't flood the console with Timeout error messages
8
9Upstream-Status: Pending
10
11Signed-off-by: Maxin B. John <maxin.john@enea.com>
12---
13 drivers/mmc/host/sdhci.c | 9 ++++++---
14 1 file changed, 6 insertions(+), 3 deletions(-)
15
16diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
17index 79db375..c77117c 100644
18--- a/drivers/mmc/host/sdhci.c
19+++ b/drivers/mmc/host/sdhci.c
20@@ -2149,10 +2149,13 @@ static void sdhci_timeout_timer(unsigned long data)
21 spin_lock_irqsave(&host->lock, flags);
22
23 if (host->mrq) {
24- pr_err("%s: Timeout waiting for hardware "
25+ /* If the driver doesn't implement proper card detection,
26+ we shouldn't flood the console with Timeout error messages */
27+ if (!(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)) {
28+ pr_err("%s: Timeout waiting for hardware "
29 "interrupt.\n", mmc_hostname(host->mmc));
30- sdhci_dumpregs(host);
31-
32+ sdhci_dumpregs(host);
33+ }
34 if (host->data) {
35 host->data->error = -ETIMEDOUT;
36 sdhci_finish_data(host);
37--
381.7.10.4
39
diff --git a/recipes-kernel/linux/files/b4860-hard_irq_disable-bug.patch b/recipes-kernel/linux/files/b4860-hard_irq_disable-bug.patch
new file mode 100644
index 0000000..b8ef705
--- /dev/null
+++ b/recipes-kernel/linux/files/b4860-hard_irq_disable-bug.patch
@@ -0,0 +1,24 @@
1linux-qoriq-sdk: Repair a kernel compile issue due to a sintax error.
2
3The define __hard_irq_disable() was done using ";" character
4into the comment so the if structure did not recognized the
5"else" branch.
6
7Upstream-Status: Pending
8
9Signed-off-by: Alexandru Vaduva <alexandru.vaduva@enea.com>
10
11diff -ruN a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
12--- a/arch/powerpc/kernel/irq.c 2014-01-30 12:56:20.470918180 +0100
13+++ b/arch/powerpc/kernel/irq.c 2014-01-30 12:57:25.228109187 +0100
14@@ -227,8 +227,9 @@
15 * common cases that we'll ignore for now), so we skip the
16 * (expensive) mtmsrd.
17 */
18- if (unlikely(irq_happened != PACA_IRQ_HARD_DIS))
19+ if (unlikely(irq_happened != PACA_IRQ_HARD_DIS)) {
20 __hard_irq_disable();
21+ }
22 #ifdef CONFIG_TRACE_IRQFLAGS
23 else {
24 /*
diff --git a/recipes-kernel/linux/files/merge_config.sh b/recipes-kernel/linux/files/merge_config.sh
new file mode 100755
index 0000000..33f18d4
--- /dev/null
+++ b/recipes-kernel/linux/files/merge_config.sh
@@ -0,0 +1,142 @@
1#!/bin/sh
2# merge_config.sh - Takes a list of config fragment values, and merges
3# them one by one. Provides warnings on overridden values, and specified
4# values that did not make it to the resulting .config file (due to missed
5# dependencies or config symbol removal).
6#
7# Portions reused from kconf_check and generate_cfg:
8# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check
9# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/generate_cfg
10#
11# Copyright (c) 2009-2010 Wind River Systems, Inc.
12# Copyright 2011 Linaro
13#
14# This program is free software; you can redistribute it and/or modify
15# it under the terms of the GNU General Public License version 2 as
16# published by the Free Software Foundation.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21# See the GNU General Public License for more details.
22
23
24usage() {
25 echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
26echo " -h display this help text"
27echo " -m only merge the fragments, do not execute the make command"
28echo " -n use allnoconfig instead of alldefconfig"
29echo " -x use allmodconfig instead of alldefconfig"
30echo " -d debug. Don't cleanup temporary files"
31}
32
33MAKE_FLAG=true
34ALLTARGET=alldefconfig
35
36# There are two variables that impact where the .config will be dropped,
37# O= and KBUILD_OUTPUT=. So we'll respect those variables and use them as
38# an output directory as well. These two variables are not propagating
39# automatically to the kernel build, so always explicitly setting O=
40# and passing it to the kernel build ensures that it is respected.
41if [ -n "$KBUILD_OUTPUT" ]; then
42 O=$KBUILD_OUTPUT
43fi
44if [ -z "$O" ]; then
45 O=.
46fi
47
48while true; do
49 case $1 in
50 "-n")
51 ALLTARGET=allnoconfig
52 shift
53 continue
54 ;;
55 "-m")
56 MAKE_FLAG=false
57 shift
58 continue
59 ;;
60 "-d")
61 DEBUG=true
62 shift
63 continue
64 ;;
65 "-h")
66 usage
67 exit
68 ;;
69 *)
70 break
71 ;;
72 esac
73done
74
75clean_up() {
76 rm -f $TMP_FILE
77 exit
78}
79if [ -z "$DEBUG" ]; then
80 trap clean_up SIGHUP SIGINT SIGTERM
81fi
82
83
84MERGE_LIST=$*
85SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
86TMP_FILE=$(mktemp $O/.tmp.config.XXXXXXXXXX)
87
88# Merge files, printing warnings on overrided values
89for MERGE_FILE in $MERGE_LIST ; do
90 echo "Merging $MERGE_FILE"
91 CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE)
92
93 for CFG in $CFG_LIST ; do
94 grep -q -w $CFG $TMP_FILE
95 if [ $? -eq 0 ] ; then
96 PREV_VAL=$(grep -w $CFG $TMP_FILE)
97 NEW_VAL=$(grep -w $CFG $MERGE_FILE)
98 if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
99 echo Value of $CFG is redefined by fragment $MERGE_FILE:
100 echo Previous value: $PREV_VAL
101 echo New value: $NEW_VAL
102 echo
103 fi
104 sed -i "/$CFG[ =]/d" $TMP_FILE
105 fi
106 done
107 cat $MERGE_FILE >> $TMP_FILE
108done
109
110if [ "$MAKE_FLAG" = "false" ]; then
111 cp $TMP_FILE $O/.config
112 echo "#"
113 echo "# merged configuration written to $O/.config (needs make)"
114 echo "#"
115 if [ -z "$DEBUG" ]; then
116 clean_up
117 fi
118 exit
119fi
120
121# Use the merged file as the starting point for:
122# alldefconfig: Fills in any missing symbols with Kconfig default
123# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
124make KCONFIG_ALLCONFIG=$TMP_FILE O=$O $ALLTARGET
125
126
127# Check all specified config values took (might have missed-dependency issues)
128for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
129
130 REQUESTED_VAL=$(sed -n "$SED_CONFIG_EXP" $TMP_FILE | grep -w -e "$CFG")
131 ACTUAL_VAL=$(sed -n "$SED_CONFIG_EXP" $O/.config | grep -w -e "$CFG")
132 if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
133 echo "Value requested for $CFG not in final .config"
134 echo "Requested value: $REQUESTED_VAL"
135 echo "Actual value: $ACTUAL_VAL"
136 echo ""
137 fi
138done
139
140if [ -z "$DEBUG" ]; then
141 clean_up
142fi
diff --git a/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch b/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch
new file mode 100644
index 0000000..5acf97a
--- /dev/null
+++ b/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch
@@ -0,0 +1,19 @@
1diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
2index ae3d5b7..92cb18d 100644
3--- a/arch/powerpc/mm/tlb_nohash.c
4+++ b/arch/powerpc/mm/tlb_nohash.c
5@@ -596,8 +596,13 @@ static void __early_init_mmu(int boot_cpu)
6 /* XXX This should be decided at runtime based on supported
7 * page sizes in the TLB, but for now let's assume 16M is
8 * always there and a good fit (which it probably is)
9+ *
10+ * Freescale booke only supports 4K pages in TLB0, so use that.
11 */
12- mmu_vmemmap_psize = MMU_PAGE_16M;
13+ if (mmu_has_feature(MMU_FTR_TYPE_FSL_E))
14+ mmu_vmemmap_psize = MMU_PAGE_4K;
15+ else
16+ mmu_vmemmap_psize = MMU_PAGE_16M;
17
18 /* XXX This code only checks for TLB 0 capabilities and doesn't
19 * check what page size combos are supported by the HW. It
diff --git a/recipes-kernel/linux/files/pramfs-1.5.1-3.12.tar.gz b/recipes-kernel/linux/files/pramfs-1.5.1-3.12.tar.gz
new file mode 100644
index 0000000..2d1a065
--- /dev/null
+++ b/recipes-kernel/linux/files/pramfs-1.5.1-3.12.tar.gz
Binary files differ
diff --git a/recipes-kernel/linux/kernel-configure.inc b/recipes-kernel/linux/kernel-configure.inc
new file mode 100644
index 0000000..f3d0abe
--- /dev/null
+++ b/recipes-kernel/linux/kernel-configure.inc
@@ -0,0 +1,49 @@
1SRC_URI += " file://merge_config.sh "
2
3configure_kernel() {
4 # Add debug flavour config elements from fragments
5 # Listed in increasing priority order if conflicts are detected.
6 #
7
8 #
9 #combine features cfgs with defconfig
10 #
11 addon_features=""
12 if [ -n "${2}" ]; then
13 for feature in ${2}; do
14 addon_features="${addon_features} ${WORKDIR}/${feature}"
15 done
16 fi
17
18 # Some meta layers like meta-ti use defconfig file to point to a real
19 # default config file (use-kernel-config=config_filename) which is found
20 # under kernel path (${S}/arch/${archname}/configs/).
21 config=`cat ${1} | grep use-kernel-config | cut -d= -f2`
22 if [ "x${config}" != "x" ]
23 then
24 configfilepath=`find ${S}/arch/ -name ${config} -print | head -n 1`
25 if [ -f ${configfilepath} ]
26 then
27 cp ${configfilepath} ${1}
28 else
29 bbfatal "Specified config file:${config} was not found!"
30 fi
31 fi
32
33 if [ -e "${S}/scripts/kconfig/merge_config.sh" ]; then
34 O=${B} ${S}/scripts/kconfig/merge_config.sh -m ${1} ${addon_features}
35 else
36 O=${B} ${WORKDIR}/merge_config.sh -m ${1} ${addon_features}
37 fi
38
39 mv -f ${B}/.config ${B}/.mconfig
40
41 #
42 #in linux kernel 2.6.33, kconfig does not support alldefconfig yet.
43 #
44 if [ "x${PV}" = "x2.6.33" ]; then
45 oe_runmake KCONFIG_ALLCONFIG=${B}/.mconfig O=${B} allnoconfig
46 else
47 oe_runmake KCONFIG_ALLCONFIG=${B}/.mconfig O=${B} alldefconfig
48 fi
49}
diff --git a/recipes-kernel/linux/linux-qoriq-common.inc b/recipes-kernel/linux/linux-qoriq-common.inc
new file mode 100644
index 0000000..4f22f8a
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq-common.inc
@@ -0,0 +1,38 @@
1require recipes-kernel/linux/enea-common.inc
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
4
5SRC_URI += "file://b4860-hard_irq_disable-bug.patch \
6 file://0001-sdhci-fix-Timeout-error-messages.patch \
7 file://powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch \
8 "
9
10STAGING_KERNEL_FEATURES += "\
11 cfg/00013-localversion.cfg \
12 cfg/00006-with_modules.cfg \
13 cfg/00001-embedded.cfg \
14 cfg/00012-preempt.cfg \
15 cfg/00002-root_nfs.cfg \
16 cfg/00029-devtmpfs.cfg \
17 cfg/00021-bootlogd.cfg \
18 cfg/00022-mtd_tests.cfg \
19 cfg/00030-latencytop.cfg \
20 cfg/00026-ltp.cfg \
21 cfg/00003-fuse.cfg \
22 cfg/00032-dpa.cfg \
23 cfg/00033-kprobes.cfg \
24 cfg/00019-i2c.cfg \
25 cfg/00027-lttng.cfg \
26 cfg/00025-powertop.cfg \
27 cfg/00004-systemtap.cfg \
28 cfg/00014-kgdb.cfg \
29 cfg/00049-gpio.cfg \
30 cfg/00034-cpusets.cfg \
31 "
32
33STAGING_KERNEL_FEATURES_append_p2020rdb="cfg/00015-uio.cfg"
34
35DELTA_KERNEL_DEFCONFIG += " ${STAGING_KERNEL_FEATURES} \
36 "
37
38require recipes-kernel/linux/pramfs-3.12.inc
diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bbappend b/recipes-kernel/linux/linux-qoriq_3.12.bbappend
new file mode 100644
index 0000000..f9311e9
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq_3.12.bbappend
@@ -0,0 +1 @@
require recipes-kernel/linux/linux-qoriq-common.inc
diff --git a/recipes-kernel/linux/pramfs-3.12.inc b/recipes-kernel/linux/pramfs-3.12.inc
new file mode 100644
index 0000000..ec5775d
--- /dev/null
+++ b/recipes-kernel/linux/pramfs-3.12.inc
@@ -0,0 +1,21 @@
1RRECOMMENDS_${PN} += "pramfs-init"
2
3PRAMFS_VERSION = '1.5.1-3.12'
4
5SRC_URI += "file://pramfs-${PRAMFS_VERSION}.tar.gz \
6 file://cfg/00005-pramfs.cfg"
7
8STAGING_KERNEL_FEATURES_append = " cfg/00005-pramfs.cfg"
9
10do_apply_pramfs() {
11 # Apply PRAMFS patch
12
13 # Already done by bitbake ->
14 # tar xvf ${WORKDIR}/pramfs-${PRAMFS_VERSION}.tar.gz -C ${WORKDIR}
15 cd ${WORKDIR}/pramfs-${PRAMFS_VERSION}/
16 ./patch-ker.sh ${S}
17 cd -
18}
19
20do_apply_pramfs[deptask] = "do_unpack"
21addtask apply_pramfs after do_unpack before do_patch
diff --git a/recipes-kernel/linux/staging-kernel.inc b/recipes-kernel/linux/staging-kernel.inc
new file mode 100644
index 0000000..3ef802d
--- /dev/null
+++ b/recipes-kernel/linux/staging-kernel.inc
@@ -0,0 +1,133 @@
1# This .inc file allows building and deploying staging kernel + modules
2# with defconfig + fragment cfgs
3
4require kernel-configure.inc
5
6STAGING_NAME ?= "RELEASE"
7STAGING_KERNEL_FEATURES ?= ""
8KERNEL_FEATURES ?= ""
9MODULES_IMAGE_BASE_NAME = "modules-${PV}-${PR}-${MACHINE}"
10EXTRA_OEMAKE_prepend_task-stagingkernel = "${PARALLEL_MAKE} "
11
12do_stagingkernel () {
13 stagingkernel "${STAGING_KERNEL_FEATURES}" ${STAGING_NAME}
14}
15
16stagingkernel () {
17
18 configure_kernel "${KERNEL_DEFCONFIG}" "${1}"
19
20 # Copy defconfig to .config if .config does not exist. This allows
21 # recipes to manage the .config themselves in do_configure_prepend().
22 if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
23 cp "${WORKDIR}/defconfig" "${B}/.config"
24 fi
25 yes '' | oe_runmake oldconfig
26
27 if [ ! -z "${INITRAMFS_IMAGE}" ]; then
28 for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do
29 if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
30 cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
31 fi
32 done
33 fi
34
35 #
36 # Build this alternative kernel
37 #
38
39 kernel_do_compile
40 do_compile_kernelmodules
41
42 #
43 # First install the modules to deploy dir
44 #
45 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
46 if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
47 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
48 else
49 bbnote "no modules to install"
50 fi
51 if [ -d "${D}/lib" ]; then
52 tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}-${2}.tgz -C ${D} lib
53 fi
54 rm -fr ${D}/lib
55
56 #
57 # Dont build any dtb:s for the staging kernel
58 #
59
60 #
61 # Drop the resulting images in the deploy dir
62 #
63 cd ${S}
64 install -d ${DEPLOY_DIR_IMAGE}
65 install -m 0644 ${KERNEL_OUTPUT} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}-${2}.bin
66 mv ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}-${2}
67
68 #
69 # Install the final config alongside the images
70 #
71 cd ${S}
72 cp .config ${DEPLOY_DIR_IMAGE}/config-${PV}-${PR}-${MACHINE}-${2}.config
73 rm -f .config
74
75 #
76 # Create symlinks
77 #
78 cd ${DEPLOY_DIR_IMAGE}
79 rm -f ${KERNEL_IMAGE_SYMLINK_NAME}-${2}.bin
80 ln -sf ${KERNEL_IMAGE_BASE_NAME}-${2}.bin ${KERNEL_IMAGE_SYMLINK_NAME}-${2}.bin
81
82 rm -f config-${MACHINE}-${2}.config
83 ln -sf config-${PV}-${PR}-${MACHINE}-${2}.config config-${MACHINE}-${2}.config
84
85}
86
87do_stagingkernel[dirs] = "${DEPLOY_DIR_IMAGE} ${B}"
88
89do_stagingkernel[depends] += "u-boot-mkimage-native:do_populate_sysroot virtual/${TARGET_PREFIX}gcc:do_populate_sysroot virtual/${TARGET_PREFIX}gcc:do_populate_sysroot libgcc:do_populate_sysroot"
90
91addtask stagingkernel after do_patch before do_configure
92
93#
94# For reference, copy .config to deploy image
95#
96do_deploy_append () {
97
98 install -d ${DEPLOY_DIR_IMAGE}
99
100 #
101 # Drop the regular defconfig along side the others for consistency
102 #
103 cd ${S}
104 cp .config ${DEPLOY_DIR_IMAGE}/config-${PV}-${PR}-${MACHINE}.config
105
106 #
107 # add symlink
108 #
109 cd ${DEPLOY_DIR_IMAGE}
110 rm -f config-${MACHINE}.config
111 ln -s config-${PV}-${PR}-${MACHINE}.config config-${MACHINE}.config
112
113}
114
115#
116# Clean staging kernel related files in deploy dir
117#
118do_cleanstagingkernel () {
119
120 cd ${DEPLOY_DIR_IMAGE}
121 rm -f *-${STAGING_NAME}.*
122
123 rm -f config-${PV}-${PR}-${MACHINE}.config
124 rm -f config-${MACHINE}.config
125
126}
127
128LDFLAGS=""
129
130do_cleanstagingkernel[nostamp] = "1"
131
132addtask cleanstagingkernel after do_cleansstate
133