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

Khem Raj raj.khem at gmail.com
Fri Jul 8 00:53:38 UTC 2011



On Jul 7, 2011, at 5:00 PM, Andrea Adami <andrea.adami at gmail.com> wrote:

> 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:
                        ^^^
Is this ok ?

>> +        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

Please do 

> 
> Regards
> 
> Andrea
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list