diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2010-07-23 12:58:21 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-09 17:20:35 +0100 |
commit | eaacd258d8675f9523203666721d17d8867c6e97 (patch) | |
tree | 21a36fa570fcd8e9fc3ca01b87c5f9e4606dbc09 /meta/packages | |
parent | 601464b4974e46d15abd02efd46663efcd530da8 (diff) | |
download | poky-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')
-rw-r--r-- | meta/packages/kern-tools/kern-tools-native_git.bb | 3 | ||||
-rw-r--r-- | meta/packages/linux/linux-wrs_git.bb | 38 |
2 files changed, 33 insertions, 8 deletions
diff --git a/meta/packages/kern-tools/kern-tools-native_git.bb b/meta/packages/kern-tools/kern-tools-native_git.bb index 4e4b86b979..d21d2b0aaa 100644 --- a/meta/packages/kern-tools/kern-tools-native_git.bb +++ b/meta/packages/kern-tools/kern-tools-native_git.bb | |||
@@ -14,7 +14,8 @@ S = "${WORKDIR}" | |||
14 | 14 | ||
15 | kern_tools_LIST = kgit kgit-init kgit-meta \ | 15 | kern_tools_LIST = kgit kgit-init kgit-meta \ |
16 | kgit-checkpoint kgit-clean \ | 16 | kgit-checkpoint kgit-clean \ |
17 | generate_cfg kconf_check configme | 17 | generate_cfg kconf_check configme \ |
18 | createme modifyme get_defconfig | ||
18 | 19 | ||
19 | do_compile() { | 20 | do_compile() { |
20 | : | 21 | : |
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 | ||
25 | LINUX_VERSION = "v2.6.34" | 25 | LINUX_VERSION = "v2.6.34" |
26 | LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}" | 26 | LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}" |
27 | PR = "r2" | 27 | PR = "r3" |
28 | 28 | ||
29 | S = "${WORKDIR}/linux" | 29 | S = "${WORKDIR}/linux" |
30 | B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build" | 30 | B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build" |
31 | 31 | ||
32 | do_patch() { | 32 | do_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 | ||
36 | do_wrlinux_checkout() { | 57 | do_wrlinux_checkout() { |
@@ -50,9 +71,14 @@ addtask wrlinux_checkout before do_patch after do_unpack | |||
50 | 71 | ||
51 | do_wrlinux_configme() { | 72 | do_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() { | |||
72 | do_wrlinux_configme[depends] = "kern-tools-native:do_populate_sysroot" | 98 | do_wrlinux_configme[depends] = "kern-tools-native:do_populate_sysroot" |
73 | addtask wrlinux_configme before do_configure after do_patch | 99 | addtask wrlinux_configme before do_configure after do_patch |
74 | addtask wrlinux_link_vmlinux after do_compile before do_install | 100 | addtask wrlinux_link_vmlinux after do_compile before do_install |
75 | 101 | addtask wrlinux_configcheck after do_configure before do_compile | |
76 | # XXX | ||
77 | #addtask wrlinux_configcheck after do_configure before do_compile | ||
78 | 102 | ||
79 | inherit kernel | 103 | inherit kernel |
80 | 104 | ||