diff options
author | Richard Purdie <richard@openedhand.com> | 2005-12-12 14:41:23 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2005-12-12 14:41:23 +0000 |
commit | f0702a22fe1e95075d0159ddeafb453ab4c87ebc (patch) | |
tree | d2eed3877e77b9fc71c6a05ba652f2f406b28465 /openembedded/classes/kernel.bbclass | |
parent | 9e7c699670036999a2c4c238d910534689739aa3 (diff) | |
download | poky-f0702a22fe1e95075d0159ddeafb453ab4c87ebc.tar.gz |
oe/classes updates from Openembedded
git-svn-id: https://svn.o-hand.com/repos/poky@187 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes/kernel.bbclass')
-rw-r--r-- | openembedded/classes/kernel.bbclass | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/openembedded/classes/kernel.bbclass b/openembedded/classes/kernel.bbclass index 463ff5f6b5..8416b8acb3 100644 --- a/openembedded/classes/kernel.bbclass +++ b/openembedded/classes/kernel.bbclass | |||
@@ -11,6 +11,13 @@ KERNEL_IMAGETYPE = "zImage" | |||
11 | 11 | ||
12 | KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}" | 12 | KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}" |
13 | 13 | ||
14 | # [jbowler 20051109] ${PV}${KERNEL_LOCALVERSION} is used throughout this | ||
15 | # .bbclass to (apparently) find the full 'uname -r' kernel version, this | ||
16 | # should be the same as UTS_RELEASE or (in this file) KERNEL_VERSION: | ||
17 | # KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION) | ||
18 | # but since this is not certain this overridable setting is used here: | ||
19 | KERNEL_RELEASE ?= "${PV}${KERNEL_LOCALVERSION}" | ||
20 | |||
14 | KERNEL_CCSUFFIX ?= "" | 21 | KERNEL_CCSUFFIX ?= "" |
15 | KERNEL_LDSUFFIX ?= "" | 22 | KERNEL_LDSUFFIX ?= "" |
16 | 23 | ||
@@ -96,9 +103,9 @@ kernel_do_stage() { | |||
96 | cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/ | 103 | cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/ |
97 | fi | 104 | fi |
98 | 105 | ||
99 | install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${PV}${KERNEL_LOCALVERSION} | 106 | install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${KERNEL_RELEASE} |
100 | ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/.config | 107 | ln -sf config-${KERNEL_RELEASE} ${STAGING_KERNEL_DIR}/.config |
101 | ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/kernel-config | 108 | ln -sf config-${KERNEL_RELEASE} ${STAGING_KERNEL_DIR}/kernel-config |
102 | echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion | 109 | echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion |
103 | echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source | 110 | echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source |
104 | echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix | 111 | echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix |
@@ -113,7 +120,7 @@ kernel_do_stage() { | |||
113 | fi | 120 | fi |
114 | cp -fR include/config* ${STAGING_KERNEL_DIR}/include/ | 121 | cp -fR include/config* ${STAGING_KERNEL_DIR}/include/ |
115 | install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE} | 122 | install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE} |
116 | install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION} | 123 | install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} |
117 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/ | 124 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/ |
118 | 125 | ||
119 | cp -fR scripts ${STAGING_KERNEL_DIR}/ | 126 | cp -fR scripts ${STAGING_KERNEL_DIR}/ |
@@ -129,9 +136,9 @@ kernel_do_install() { | |||
129 | 136 | ||
130 | install -d ${D}/${KERNEL_IMAGEDEST} | 137 | install -d ${D}/${KERNEL_IMAGEDEST} |
131 | install -d ${D}/boot | 138 | install -d ${D}/boot |
132 | install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} | 139 | install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} |
133 | install -m 0644 System.map ${D}/boot/System.map-${PV}${KERNEL_LOCALVERSION} | 140 | install -m 0644 System.map ${D}/boot/System.map-${KERNEL_RELEASE} |
134 | install -m 0644 .config ${D}/boot/config-${PV}${KERNEL_LOCALVERSION} | 141 | install -m 0644 .config ${D}/boot/config-${KERNEL_RELEASE} |
135 | install -d ${D}/etc/modutils | 142 | install -d ${D}/etc/modutils |
136 | 143 | ||
137 | # Check if scripts/genksyms exists and if so, build it | 144 | # Check if scripts/genksyms exists and if so, build it |
@@ -147,11 +154,11 @@ kernel_do_configure() { | |||
147 | } | 154 | } |
148 | 155 | ||
149 | pkg_postinst_kernel () { | 156 | pkg_postinst_kernel () { |
150 | update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} ${KERNEL_PRIORITY} || true | 157 | update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} ${KERNEL_PRIORITY} || true |
151 | } | 158 | } |
152 | 159 | ||
153 | pkg_postrm_kernel () { | 160 | pkg_postrm_kernel () { |
154 | update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} || true | 161 | update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} || true |
155 | } | 162 | } |
156 | 163 | ||
157 | inherit cml1 | 164 | inherit cml1 |
@@ -169,7 +176,7 @@ ALLOW_EMPTY_kernel-image = "1" | |||
169 | 176 | ||
170 | pkg_postinst_modules () { | 177 | pkg_postinst_modules () { |
171 | if [ -n "$D" ]; then | 178 | if [ -n "$D" ]; then |
172 | ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION} ${KERNEL_VERSION} | 179 | ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION} |
173 | else | 180 | else |
174 | depmod -A | 181 | depmod -A |
175 | update-modules || true | 182 | update-modules || true |
@@ -230,7 +237,7 @@ python populate_packages_prepend () { | |||
230 | bb.error("D not defined") | 237 | bb.error("D not defined") |
231 | return | 238 | return |
232 | 239 | ||
233 | kernelver = bb.data.getVar('PV', d, 1) + bb.data.getVar('KERNEL_LOCALVERSION', d, 1) | 240 | kernelver = bb.data.getVar('KERNEL_RELEASE', d, 1) |
234 | kernelver_stripped = kernelver | 241 | kernelver_stripped = kernelver |
235 | m = re.match('^(.*-hh.*)[\.\+].*$', kernelver) | 242 | m = re.match('^(.*-hh.*)[\.\+].*$', kernelver) |
236 | if m: | 243 | if m: |