* [OE-core][PATCH] kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set
@ 2022-06-20 13:40 Raju Kumar Pothuraju
2022-06-20 14:07 ` Jose Quaresma
2022-06-20 14:16 ` Michael Opdenacker
0 siblings, 2 replies; 4+ messages in thread
From: Raju Kumar Pothuraju @ 2022-06-20 13:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Raju Kumar Pothuraju
vmlinux file doesnot have the initramfs image when INITRAMFS_IMAGE_BUNDLE was set.
Use vmlinux.initramfs in uboot_prep_kimage when INITRAMFS_IMAGE_BUNDLE set
based on the implementation in kernel.bbclass do_bundle_initramfs function,
https://github.com/openembedded/openembedded-core/blob/master/meta/classes/kernel.bbclass#L316-L317
to be able to use proper linux.bin file in creation of fitImage.
Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
---
meta/classes/kernel-uboot.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass
index 2daa068298..180e7cf066 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -15,6 +15,12 @@ uboot_prep_kimage() {
linux_comp="none"
else
vmlinux_path="vmlinux"
+ # Use vmlinux.initramfs for linux.bin when INITRAMFS_IMAGE_BUNDLE set
+ # As per the implementation in kernel.bbclass.
+ # See do_bundle_initramfs function
+ if [ x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
+ vmlinux_path="vmlinux.initramfs"
+ fi
linux_suffix="${FIT_KERNEL_COMP_ALG_EXTENSION}"
linux_comp="${FIT_KERNEL_COMP_ALG}"
fi
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core][PATCH] kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set
2022-06-20 13:40 [OE-core][PATCH] kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set Raju Kumar Pothuraju
@ 2022-06-20 14:07 ` Jose Quaresma
2022-06-20 14:16 ` Michael Opdenacker
1 sibling, 0 replies; 4+ messages in thread
From: Jose Quaresma @ 2022-06-20 14:07 UTC (permalink / raw)
To: Raju Kumar Pothuraju; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2230 bytes --]
Hi Raju,
Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com> escreveu no dia
segunda, 20/06/2022 à(s) 14:40:
> vmlinux file doesnot have the initramfs image when INITRAMFS_IMAGE_BUNDLE
> was set.
> Use vmlinux.initramfs in uboot_prep_kimage when INITRAMFS_IMAGE_BUNDLE set
> based on the implementation in kernel.bbclass do_bundle_initramfs function,
>
> https://github.com/openembedded/openembedded-core/blob/master/meta/classes/kernel.bbclass#L316-L317
> to be able to use proper linux.bin file in creation of fitImage.
>
> Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
> ---
> meta/classes/kernel-uboot.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/kernel-uboot.bbclass
> b/meta/classes/kernel-uboot.bbclass
> index 2daa068298..180e7cf066 100644
> --- a/meta/classes/kernel-uboot.bbclass
> +++ b/meta/classes/kernel-uboot.bbclass
> @@ -15,6 +15,12 @@ uboot_prep_kimage() {
> linux_comp="none"
> else
> vmlinux_path="vmlinux"
> + # Use vmlinux.initramfs for linux.bin when
> INITRAMFS_IMAGE_BUNDLE set
> + # As per the implementation in kernel.bbclass.
> + # See do_bundle_initramfs function
> + if [ x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
>
Maybe a check to see if the file exists is better aligned with the reminder
in the bbclass.
[ -e arch/${ARCH}/boot/vmlinux.initramfs ]
Jose
> + vmlinux_path="vmlinux.initramfs"
> + fi
> linux_suffix="${FIT_KERNEL_COMP_ALG_EXTENSION}"
> linux_comp="${FIT_KERNEL_COMP_ALG}"
> fi
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#167108):
> https://lists.openembedded.org/g/openembedded-core/message/167108
> Mute This Topic: https://lists.openembedded.org/mt/91876695/5052612
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> quaresma.jose@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
--
Best regards,
José Quaresma
[-- Attachment #2: Type: text/html, Size: 3751 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core][PATCH] kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set
2022-06-20 13:40 [OE-core][PATCH] kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set Raju Kumar Pothuraju
2022-06-20 14:07 ` Jose Quaresma
@ 2022-06-20 14:16 ` Michael Opdenacker
[not found] ` <DM6PR12MB50077A9029766534FE271F9DE5B09@DM6PR12MB5007.namprd12.prod.outlook.com>
1 sibling, 1 reply; 4+ messages in thread
From: Michael Opdenacker @ 2022-06-20 14:16 UTC (permalink / raw)
To: Raju Kumar Pothuraju, openembedded-core
Hi Raju,
On 6/20/22 15:40, Raju Kumar Pothuraju wrote:
> vmlinux file doesnot have the initramfs image when INITRAMFS_IMAGE_BUNDLE was set.
> Use vmlinux.initramfs in uboot_prep_kimage when INITRAMFS_IMAGE_BUNDLE set
> based on the implementation in kernel.bbclass do_bundle_initramfs function,
> https://github.com/openembedded/openembedded-core/blob/master/meta/classes/kernel.bbclass#L316-L317
> to be able to use proper linux.bin file in creation of fitImage.
>
> Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
> ---
> meta/classes/kernel-uboot.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass
> index 2daa068298..180e7cf066 100644
> --- a/meta/classes/kernel-uboot.bbclass
> +++ b/meta/classes/kernel-uboot.bbclass
> @@ -15,6 +15,12 @@ uboot_prep_kimage() {
> linux_comp="none"
> else
> vmlinux_path="vmlinux"
> + # Use vmlinux.initramfs for linux.bin when INITRAMFS_IMAGE_BUNDLE set
> + # As per the implementation in kernel.bbclass.
> + # See do_bundle_initramfs function
> + if [ x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
Thanks for the patch!
By the way, why this weird x"${VAR}" = x1 trick?
I see it elsewhere in the class code, so I understand why you took it,
but why not just the following?
if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
Thanks again
Michael.
--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core][PATCH] kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set
[not found] ` <DM6PR12MB50077A9029766534FE271F9DE5B09@DM6PR12MB5007.namprd12.prod.outlook.com>
@ 2022-06-20 15:24 ` Michael Opdenacker
0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2022-06-20 15:24 UTC (permalink / raw)
To: Pothuraju, Rajukumar, Raju Kumar Pothuraju, openembedded-core
Cc: Jason Wessel
Hi Raju,
On 6/20/22 16:45, Pothuraju, Rajukumar wrote:
>>
>> Thanks for the patch!
>> By the way, why this weird x"${VAR}" = x1 trick?
>>
>> I see it elsewhere in the class code, so I understand why you took it, but why
>> not just the following?
>>
>> if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
> Both formats will gives the same output when the variable set to "1". This just skips passing empty string to if condition in comparison. And, I think the direct comparison may not work in old shells properly.
>
> Regards,
> Rajukumar P.
Thanks for your opinion. I'm copying Jason Wessel, who first wrote this
kind of test in this file (in 2013!), hoping he can explain. I hope
that's no longer necessary today, because I find this hack a bit ugly.
Cheers
Michael.
--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-20 15:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 13:40 [OE-core][PATCH] kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set Raju Kumar Pothuraju
2022-06-20 14:07 ` Jose Quaresma
2022-06-20 14:16 ` Michael Opdenacker
[not found] ` <DM6PR12MB50077A9029766534FE271F9DE5B09@DM6PR12MB5007.namprd12.prod.outlook.com>
2022-06-20 15:24 ` Michael Opdenacker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.