summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2010-07-23 12:58:21 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-09 17:20:35 +0100
commiteaacd258d8675f9523203666721d17d8867c6e97 (patch)
tree21a36fa570fcd8e9fc3ca01b87c5f9e4606dbc09 /meta/packages/linux
parent601464b4974e46d15abd02efd46663efcd530da8 (diff)
downloadpoky-eaacd258d8675f9523203666721d17d8867c6e97.tar.gz
kernel: add dynamic configuration and patching
This change adds the ability to dynamicaly modify a git based linux repo during the do_patch and do_configure changes. The bulk of the work is done by the kern_tools, and the recipe simply needs to add createme and modifyme scripts to go along with the existing configme. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/packages/linux')
-rw-r--r--meta/packages/linux/linux-wrs_git.bb38
1 files changed, 31 insertions, 7 deletions
diff --git a/meta/packages/linux/linux-wrs_git.bb b/meta/packages/linux/linux-wrs_git.bb
index d6a81d1a59..ddd387743b 100644
--- a/meta/packages/linux/linux-wrs_git.bb
+++ b/meta/packages/linux/linux-wrs_git.bb
@@ -24,13 +24,34 @@ COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips)"
24 24
25LINUX_VERSION = "v2.6.34" 25LINUX_VERSION = "v2.6.34"
26LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}" 26LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}"
27PR = "r2" 27PR = "r3"
28 28
29S = "${WORKDIR}/linux" 29S = "${WORKDIR}/linux"
30B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build" 30B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build"
31 31
32do_patch() { 32do_patch() {
33 echo "[INFO] Patching is currently not supported" 33 cd ${S}
34 if [ -f ${WORKDIR}/defconfig ]; then
35 defconfig=${WORKDIR}/defconfig
36 fi
37
38 createme ${TARGET_ARCH} ${WRMACHINE}-${LINUX_KERNEL_TYPE} ${defconfig}
39 if [ $? -ne 0 ]; then
40 echo "ERROR. Could not create ${WRMACHINE}-${LINUX_KERNEL_TYPE}"
41 exit 1
42 fi
43
44 updateme ${WORKDIR}
45 if [ $? -ne 0 ]; then
46 echo "ERROR. Could not update ${WRMACHINE}-${LINUX_KERNEL_TYPE}"
47 exit 1
48 fi
49
50 patchme ${WRMACHINE}-${LINUX_KERNEL_TYPE}
51 if [ $? -ne 0 ]; then
52 echo "ERROR. Could not modify ${WRMACHINE}-${LINUX_KERNEL_TYPE}"
53 exit 1
54 fi
34} 55}
35 56
36do_wrlinux_checkout() { 57do_wrlinux_checkout() {
@@ -50,9 +71,14 @@ addtask wrlinux_checkout before do_patch after do_unpack
50 71
51do_wrlinux_configme() { 72do_wrlinux_configme() {
52 echo "Doing wrlinux configme" 73 echo "Doing wrlinux configme"
53 rm -rf ${B} 74
54 cd ${S} 75 cd ${S}
55 configme 76 configme --reconfig
77 if [ $? -ne 0 ]; then
78 echo "ERROR. Could not configure ${WRMACHINE}-${LINUX_KERNEL_TYPE}"
79 exit 1
80 fi
81
56 echo "# CONFIG_WRNOTE is not set" >> ${B}/.config 82 echo "# CONFIG_WRNOTE is not set" >> ${B}/.config
57 echo "# Global settings from linux recipe" >> ${B}/.config 83 echo "# Global settings from linux recipe" >> ${B}/.config
58 echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config 84 echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
@@ -72,9 +98,7 @@ do_wrlinux_link_vmlinux() {
72do_wrlinux_configme[depends] = "kern-tools-native:do_populate_sysroot" 98do_wrlinux_configme[depends] = "kern-tools-native:do_populate_sysroot"
73addtask wrlinux_configme before do_configure after do_patch 99addtask wrlinux_configme before do_configure after do_patch
74addtask wrlinux_link_vmlinux after do_compile before do_install 100addtask wrlinux_link_vmlinux after do_compile before do_install
75 101addtask wrlinux_configcheck after do_configure before do_compile
76# XXX
77#addtask wrlinux_configcheck after do_configure before do_compile
78 102
79inherit kernel 103inherit kernel
80 104