[OE-core] [PATCH 1/2] kernel.bbclass: handle embedding of initramfs images

Andrea Adami andrea.adami at gmail.com
Fri Jul 8 00:00:47 UTC 2011


Ehm,
some cruft slipped in :/

On Fri, Jul 8, 2011 at 1:11 AM, Andrea Adami <andrea.adami at gmail.com> wrote:
> * from org.openembedded.dev (oe-classic)
>
> Signed-off-by: Andrea Adami <andrea.adami at gmail.com>
> ---
>  meta/classes/kernel.bbclass |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 943252a..03b321d 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -14,8 +14,20 @@ python __anonymous () {
>        depends = bb.data.getVar("DEPENDS", d, 1)
>        depends = "%s u-boot-mkimage-native" % depends
>        bb.data.setVar("DEPENDS", depends, d)
> +
> +    image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
> +    if image != '' and image is not None:
> +        bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
> +


> +    machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
> +
> +    if machine_kernel_pr:
> +        bb.data.setVar('PR', machine_kernel_pr, d)

Those bits are extraneous and copied and pasted by mistake.



>  }
>
> +INITRAMFS_IMAGE ?= ""
> +INITRAMFS_TASK ?= ""
> +
>  inherit kernel-arch deploy
>
>  PACKAGES_DYNAMIC += "kernel-module-*"
> @@ -179,8 +191,18 @@ kernel_do_configure() {
>                cp "${WORKDIR}/defconfig" "${S}/.config"
>        fi
>         yes '' | oe_runmake oldconfig
> +
> +       if [ ! -z "${INITRAMFS_IMAGE}" ]; then

> +               for img in cpio.gz cpio.lzo cpio.lzma; do

We'll have to add cpio.xz as bonus too, being there is support for it
in image_types.bbclass


> +               if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img"
> +                       cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$i
> +               fi
> +               done
> +       fi
>  }
>
> +kernel_do_configure[depends] += "${INITRAMFS_TASK}"
> +
>  do_menuconfig() {
>         export DISPLAY='${DISPLAY}'
>         export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
> --
> 1.7.3.4
>
>

If you mind, I'll resend a corrected V2 of the patch

Regards

Andrea




More information about the Openembedded-core mailing list