mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
oe/classes updates from Openembedded
git-svn-id: https://svn.o-hand.com/repos/poky@187 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -124,6 +124,7 @@ oe_libinstall() {
|
|||||||
silent=""
|
silent=""
|
||||||
require_static=""
|
require_static=""
|
||||||
require_shared=""
|
require_shared=""
|
||||||
|
staging_install=""
|
||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-C)
|
-C)
|
||||||
@@ -155,6 +156,10 @@ oe_libinstall() {
|
|||||||
if [ -z "$destpath" ]; then
|
if [ -z "$destpath" ]; then
|
||||||
oefatal "oe_libinstall: no destination path specified"
|
oefatal "oe_libinstall: no destination path specified"
|
||||||
fi
|
fi
|
||||||
|
if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null
|
||||||
|
then
|
||||||
|
staging_install=1
|
||||||
|
fi
|
||||||
|
|
||||||
__runcmd () {
|
__runcmd () {
|
||||||
if [ -z "$silent" ]; then
|
if [ -z "$silent" ]; then
|
||||||
@@ -188,7 +193,15 @@ oe_libinstall() {
|
|||||||
fi
|
fi
|
||||||
dotlai=$libname.lai
|
dotlai=$libname.lai
|
||||||
if [ -f "$dotlai" -a -n "$libtool" ]; then
|
if [ -f "$dotlai" -a -n "$libtool" ]; then
|
||||||
__runcmd install -m 0644 $dotlai $destpath/$libname.la
|
if test -n "$staging_install"
|
||||||
|
then
|
||||||
|
# stop libtool using the final directory name for libraries
|
||||||
|
# in staging:
|
||||||
|
__runcmd rm -f $destpath/$libname.la
|
||||||
|
__runcmd sed -e 's/^installed=yes$/installed=no/' $dotlai >$destpath/$libname.la
|
||||||
|
else
|
||||||
|
__runcmd install -m 0644 $dotlai $destpath/$libname.la
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for name in $library_names; do
|
for name in $library_names; do
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ KERNEL_IMAGETYPE = "zImage"
|
|||||||
|
|
||||||
KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}"
|
KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}"
|
||||||
|
|
||||||
|
# [jbowler 20051109] ${PV}${KERNEL_LOCALVERSION} is used throughout this
|
||||||
|
# .bbclass to (apparently) find the full 'uname -r' kernel version, this
|
||||||
|
# should be the same as UTS_RELEASE or (in this file) KERNEL_VERSION:
|
||||||
|
# KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)
|
||||||
|
# but since this is not certain this overridable setting is used here:
|
||||||
|
KERNEL_RELEASE ?= "${PV}${KERNEL_LOCALVERSION}"
|
||||||
|
|
||||||
KERNEL_CCSUFFIX ?= ""
|
KERNEL_CCSUFFIX ?= ""
|
||||||
KERNEL_LDSUFFIX ?= ""
|
KERNEL_LDSUFFIX ?= ""
|
||||||
|
|
||||||
@@ -96,9 +103,9 @@ kernel_do_stage() {
|
|||||||
cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/
|
cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${PV}${KERNEL_LOCALVERSION}
|
install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${KERNEL_RELEASE}
|
||||||
ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/.config
|
ln -sf config-${KERNEL_RELEASE} ${STAGING_KERNEL_DIR}/.config
|
||||||
ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/kernel-config
|
ln -sf config-${KERNEL_RELEASE} ${STAGING_KERNEL_DIR}/kernel-config
|
||||||
echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion
|
echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion
|
||||||
echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source
|
echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source
|
||||||
echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix
|
echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix
|
||||||
@@ -113,7 +120,7 @@ kernel_do_stage() {
|
|||||||
fi
|
fi
|
||||||
cp -fR include/config* ${STAGING_KERNEL_DIR}/include/
|
cp -fR include/config* ${STAGING_KERNEL_DIR}/include/
|
||||||
install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}
|
install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}
|
||||||
install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION}
|
install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE}
|
||||||
[ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/
|
[ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/
|
||||||
|
|
||||||
cp -fR scripts ${STAGING_KERNEL_DIR}/
|
cp -fR scripts ${STAGING_KERNEL_DIR}/
|
||||||
@@ -129,9 +136,9 @@ kernel_do_install() {
|
|||||||
|
|
||||||
install -d ${D}/${KERNEL_IMAGEDEST}
|
install -d ${D}/${KERNEL_IMAGEDEST}
|
||||||
install -d ${D}/boot
|
install -d ${D}/boot
|
||||||
install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION}
|
install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE}
|
||||||
install -m 0644 System.map ${D}/boot/System.map-${PV}${KERNEL_LOCALVERSION}
|
install -m 0644 System.map ${D}/boot/System.map-${KERNEL_RELEASE}
|
||||||
install -m 0644 .config ${D}/boot/config-${PV}${KERNEL_LOCALVERSION}
|
install -m 0644 .config ${D}/boot/config-${KERNEL_RELEASE}
|
||||||
install -d ${D}/etc/modutils
|
install -d ${D}/etc/modutils
|
||||||
|
|
||||||
# Check if scripts/genksyms exists and if so, build it
|
# Check if scripts/genksyms exists and if so, build it
|
||||||
@@ -147,11 +154,11 @@ kernel_do_configure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst_kernel () {
|
pkg_postinst_kernel () {
|
||||||
update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} ${KERNEL_PRIORITY} || true
|
update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} ${KERNEL_PRIORITY} || true
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postrm_kernel () {
|
pkg_postrm_kernel () {
|
||||||
update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} || true
|
update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} || true
|
||||||
}
|
}
|
||||||
|
|
||||||
inherit cml1
|
inherit cml1
|
||||||
@@ -169,7 +176,7 @@ ALLOW_EMPTY_kernel-image = "1"
|
|||||||
|
|
||||||
pkg_postinst_modules () {
|
pkg_postinst_modules () {
|
||||||
if [ -n "$D" ]; then
|
if [ -n "$D" ]; then
|
||||||
${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION} ${KERNEL_VERSION}
|
${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION}
|
||||||
else
|
else
|
||||||
depmod -A
|
depmod -A
|
||||||
update-modules || true
|
update-modules || true
|
||||||
@@ -230,7 +237,7 @@ python populate_packages_prepend () {
|
|||||||
bb.error("D not defined")
|
bb.error("D not defined")
|
||||||
return
|
return
|
||||||
|
|
||||||
kernelver = bb.data.getVar('PV', d, 1) + bb.data.getVar('KERNEL_LOCALVERSION', d, 1)
|
kernelver = bb.data.getVar('KERNEL_RELEASE', d, 1)
|
||||||
kernelver_stripped = kernelver
|
kernelver_stripped = kernelver
|
||||||
m = re.match('^(.*-hh.*)[\.\+].*$', kernelver)
|
m = re.match('^(.*-hh.*)[\.\+].*$', kernelver)
|
||||||
if m:
|
if m:
|
||||||
|
|||||||
@@ -259,6 +259,8 @@ python populate_packages () {
|
|||||||
write_if_exists(f, pkg, 'FILES')
|
write_if_exists(f, pkg, 'FILES')
|
||||||
write_if_exists(f, pkg, 'pkg_postinst')
|
write_if_exists(f, pkg, 'pkg_postinst')
|
||||||
write_if_exists(f, pkg, 'pkg_postrm')
|
write_if_exists(f, pkg, 'pkg_postrm')
|
||||||
|
write_if_exists(f, pkg, 'pkg_preinst')
|
||||||
|
write_if_exists(f, pkg, 'pkg_prerm')
|
||||||
f.close()
|
f.close()
|
||||||
bb.build.exec_func("read_subpackage_metadata", d)
|
bb.build.exec_func("read_subpackage_metadata", d)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user