[OE-core] [PATCH] classes/image-live.bbclass: Don't hardcode cpio.gz

Böszörményi Zoltán zboszor at pr.hu
Thu Sep 26 17:09:00 UTC 2019


2019. 09. 26. 19:02 keltezéssel, Böszörményi Zoltán via Openembedded-core írta:
> 2019. 09. 26. 18:50 keltezéssel, Böszörményi Zoltán via Openembedded-core írta:
>> 2019. 09. 26. 17:45 keltezéssel, Richard Purdie írta:
>>> On Thu, 2019-09-26 at 11:05 +0200, Böszörményi Zoltán via Openembedded-
>>> core wrote:
>>>> There's INITRAMFS_FSTYPES that can be set differently.
>>>>
>>>> Signed-off-by: Böszörményi Zoltán <zboszor at pr.hu>
>>>> ---
>>>>
>>>> With the hardcoded initrd filename suffix but INITRAMFS_FSTYPES
>>>> set to cpio.lzma, this error occurs:
>>>>
>>>> ERROR: sicom-pos-image-1.0-r0 do_bootimg:
>>>> .../deploy/glibc/images/intel-core2-32/core-image-minimal-initramfs-
>>>> intel-core2-32.cpio.lzma is invalid. initrd image creation failed.
>>>> ERROR: sicom-pos-image-1.0-r0 do_bootimg: Function failed:
>>>> build_hddimg (log file is located at .../tmp-sicom-
>>>> glibc/work/intel_core2_32-sicom-linux/sicom-pos-image/1.0-
>>>> r0/temp/log.do_bootimg.32210)
>>>> ERROR: Logfile of failure stored in: .../tmp-sicom-
>>>> glibc/work/intel_core2_32-sicom-linux/sicom-pos-image/1.0-
>>>> r0/temp/log.do_bootimg.32210
>>>> ERROR: Task (.../layers/meta-sicom/images/sicom-pos-
>>>> image.bb:do_bootimg) failed with exit code '1'
>>>>
>>>>   meta/classes/image-live.bbclass | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-
>>>> live.bbclass
>>>> index af71be5093..54058b350d 100644
>>>> --- a/meta/classes/image-live.bbclass
>>>> +++ b/meta/classes/image-live.bbclass
>>>> @@ -37,7 +37,7 @@ do_bootimg[depends] += "dosfstools-
>>>> native:do_populate_sysroot \
>>>>   LABELS_LIVE ?= "boot install"
>>>>   ROOT_LIVE ?= "root=/dev/ram0"
>>>>   INITRD_IMAGE_LIVE ?= "${MLPREFIX}core-image-minimal-initramfs"
>>>> -INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-
>>>> ${MACHINE}.cpio.gz"
>>>> +INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-
>>>> ${MACHINE}.${INITRAMFS_FSTYPES}"
>>>>   LIVE_ROOTFS_TYPE ?= "ext4"
>>>>   ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${LIVE_ROOTFS_TYPE}"
>>>
>>> I'm a little worried that INITRAMFS_FSTYPES can contain multiple values
>>> by the sounds of its name...
>>
>>  From the looks of the current value, it's already contains multiple values
>> delimited by that dot. "cpio" + "gz".
>>
>> Also, according to meta/conf/documentation.conf, line 228:
>>
>> INITRAMFS_FSTYPES[doc] = "Defines the format for the output image of an initial RAM disk 
>> (initramfs), which is used during boot."
> 
> Also, image-live.bbclass uses this variable this way:
> 
> INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.${INITRAMFS_FSTYPES}"
> 
> The initrd/initramfs file name would definitely look strange if
> this variable could contain multiple space delimited settings.

Also, openembedded-core/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
has that _build_initramfs_path function from line 143. The usage of
the same variable in this python function also points back to the
documentation line, i.e. it's a filename suffix and not multiple
settings delimited by space.

> 
>>
>> Defines the "format", singular. Maybe the variable is a slight misnomer.
>>
>> Cheers,
>> Zoltán Böszörményi
> 



More information about the Openembedded-core mailing list