diff options
| -rw-r--r-- | openembedded/classes/base.bbclass | 15 | ||||
| -rw-r--r-- | openembedded/classes/kernel.bbclass | 29 | ||||
| -rw-r--r-- | openembedded/classes/package.bbclass | 2 |
3 files changed, 34 insertions, 12 deletions
diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass index 18d51a02ed..c5359b20f8 100644 --- a/openembedded/classes/base.bbclass +++ b/openembedded/classes/base.bbclass | |||
| @@ -124,6 +124,7 @@ oe_libinstall() { | |||
| 124 | silent="" | 124 | silent="" |
| 125 | require_static="" | 125 | require_static="" |
| 126 | require_shared="" | 126 | require_shared="" |
| 127 | staging_install="" | ||
| 127 | while [ "$#" -gt 0 ]; do | 128 | while [ "$#" -gt 0 ]; do |
| 128 | case "$1" in | 129 | case "$1" in |
| 129 | -C) | 130 | -C) |
| @@ -155,6 +156,10 @@ oe_libinstall() { | |||
| 155 | if [ -z "$destpath" ]; then | 156 | if [ -z "$destpath" ]; then |
| 156 | oefatal "oe_libinstall: no destination path specified" | 157 | oefatal "oe_libinstall: no destination path specified" |
| 157 | fi | 158 | fi |
| 159 | if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null | ||
| 160 | then | ||
| 161 | staging_install=1 | ||
| 162 | fi | ||
| 158 | 163 | ||
| 159 | __runcmd () { | 164 | __runcmd () { |
| 160 | if [ -z "$silent" ]; then | 165 | if [ -z "$silent" ]; then |
| @@ -188,7 +193,15 @@ oe_libinstall() { | |||
| 188 | fi | 193 | fi |
| 189 | dotlai=$libname.lai | 194 | dotlai=$libname.lai |
| 190 | if [ -f "$dotlai" -a -n "$libtool" ]; then | 195 | if [ -f "$dotlai" -a -n "$libtool" ]; then |
| 191 | __runcmd install -m 0644 $dotlai $destpath/$libname.la | 196 | if test -n "$staging_install" |
| 197 | then | ||
| 198 | # stop libtool using the final directory name for libraries | ||
| 199 | # in staging: | ||
| 200 | __runcmd rm -f $destpath/$libname.la | ||
| 201 | __runcmd sed -e 's/^installed=yes$/installed=no/' $dotlai >$destpath/$libname.la | ||
| 202 | else | ||
| 203 | __runcmd install -m 0644 $dotlai $destpath/$libname.la | ||
| 204 | fi | ||
| 192 | fi | 205 | fi |
| 193 | 206 | ||
| 194 | for name in $library_names; do | 207 | for name in $library_names; do |
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: |
diff --git a/openembedded/classes/package.bbclass b/openembedded/classes/package.bbclass index 90dfec9fa7..db479d5847 100644 --- a/openembedded/classes/package.bbclass +++ b/openembedded/classes/package.bbclass | |||
| @@ -259,6 +259,8 @@ python populate_packages () { | |||
| 259 | write_if_exists(f, pkg, 'FILES') | 259 | write_if_exists(f, pkg, 'FILES') |
| 260 | write_if_exists(f, pkg, 'pkg_postinst') | 260 | write_if_exists(f, pkg, 'pkg_postinst') |
| 261 | write_if_exists(f, pkg, 'pkg_postrm') | 261 | write_if_exists(f, pkg, 'pkg_postrm') |
| 262 | write_if_exists(f, pkg, 'pkg_preinst') | ||
| 263 | write_if_exists(f, pkg, 'pkg_prerm') | ||
| 262 | f.close() | 264 | f.close() |
| 263 | bb.build.exec_func("read_subpackage_metadata", d) | 265 | bb.build.exec_func("read_subpackage_metadata", d) |
| 264 | } | 266 | } |
