* [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE
@ 2016-10-21 12:07 Nathan Rossi
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks Nathan Rossi
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Nathan Rossi @ 2016-10-21 12:07 UTC (permalink / raw)
To: openembedded-core
Check the value of UBOOT_SIGN_ENABLE, as it is defaulted to "0" which
for matches as True in python due to being a non-empty string.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
meta/classes/kernel-fitimage.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 8580247f82..3bbf91f65a 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -26,7 +26,7 @@ python __anonymous () {
# Verified boot will sign the fitImage and append the public key to
# U-boot dtb. We ensure the U-Boot dtb is deployed before assembling
# the fitImage:
- if d.getVar('UBOOT_SIGN_ENABLE', True):
+ if d.getVar('UBOOT_SIGN_ENABLE', True) == "1":
uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot'
d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn)
}
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks
2016-10-21 12:07 [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE Nathan Rossi
@ 2016-10-21 12:07 ` Nathan Rossi
2016-11-23 5:29 ` Nathan Rossi
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Don't assume KERNEL_IMAGETYPE == fitImage Nathan Rossi
2016-11-23 5:29 ` [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE Nathan Rossi
2 siblings, 1 reply; 7+ messages in thread
From: Nathan Rossi @ 2016-10-21 12:07 UTC (permalink / raw)
To: openembedded-core
Allow the load and entry addresses to remain unset if the UBOOT_RD_*
variables are also unset for ramdisk entries in the image tree. This
allows for U-Boot to decide dynamically where to load the ramdisk.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
meta/classes/kernel-fitimage.bbclass | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 3bbf91f65a..5c9e76b9ac 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -178,6 +178,15 @@ EOF
fitimage_emit_section_ramdisk() {
ramdisk_csum="sha1"
+ ramdisk_loadline=""
+ ramdisk_entryline=""
+
+ if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then
+ ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;"
+ fi
+ if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then
+ ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
+ fi
cat << EOF >> ${1}
ramdisk@${2} {
@@ -187,8 +196,8 @@ fitimage_emit_section_ramdisk() {
arch = "${UBOOT_ARCH}";
os = "linux";
compression = "none";
- load = <${UBOOT_RD_LOADADDRESS}>;
- entry = <${UBOOT_RD_ENTRYPOINT}>;
+ ${ramdisk_loadline}
+ ${ramdisk_entryline}
hash@1 {
algo = "${ramdisk_csum}";
};
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] kernel-fitimage.bbclass: Don't assume KERNEL_IMAGETYPE == fitImage
2016-10-21 12:07 [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE Nathan Rossi
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks Nathan Rossi
@ 2016-10-21 12:07 ` Nathan Rossi
2016-11-23 5:28 ` Nathan Rossi
2016-11-23 5:29 ` [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE Nathan Rossi
2 siblings, 1 reply; 7+ messages in thread
From: Nathan Rossi @ 2016-10-21 12:07 UTC (permalink / raw)
To: openembedded-core
The name of the output image for a fitImage that contains a ramdisk
should match the same as for the fitImage that does not contain a
ramdisk. As such it should not be assumed that KERNEL_IMAGETYPE is
"fitImage". This change explicitly sets the name of the output
ramdisk/initramfs to start with fitImage as does the non-ramdisk output.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
meta/classes/kernel-fitimage.bbclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 5c9e76b9ac..55529b161f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -419,11 +419,11 @@ kernel_do_deploy_append() {
if [ -n "${INITRAMFS_IMAGE}" ]; then
echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..."
- its_initramfs_base_name="${KERNEL_IMAGETYPE}-its-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
- its_initramfs_symlink_name=${KERNEL_IMAGETYPE}-its-${INITRAMFS_IMAGE}-${MACHINE}
+ its_initramfs_base_name="fitImage-its-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
+ its_initramfs_symlink_name=fitImage-its-${INITRAMFS_IMAGE}-${MACHINE}
install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its
- fit_initramfs_base_name="${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
- fit_initramfs_symlink_name=${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}
+ fit_initramfs_base_name="fitImage-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
+ fit_initramfs_symlink_name=fitImage-${INITRAMFS_IMAGE}-${MACHINE}
install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin
fi
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] kernel-fitimage.bbclass: Don't assume KERNEL_IMAGETYPE == fitImage
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Don't assume KERNEL_IMAGETYPE == fitImage Nathan Rossi
@ 2016-11-23 5:28 ` Nathan Rossi
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Rossi @ 2016-11-23 5:28 UTC (permalink / raw)
To: openembedded-core
Just pinging these patches, to see if there were any issues or
comments. I realize I sent them just before a release so it was very
likely they would get lost in the noise.
Thanks,
Nathan
On 21 October 2016 at 22:07, Nathan Rossi <nathan@nathanrossi.com> wrote:
> The name of the output image for a fitImage that contains a ramdisk
> should match the same as for the fitImage that does not contain a
> ramdisk. As such it should not be assumed that KERNEL_IMAGETYPE is
> "fitImage". This change explicitly sets the name of the output
> ramdisk/initramfs to start with fitImage as does the non-ramdisk output.
>
> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
> ---
> meta/classes/kernel-fitimage.bbclass | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> index 5c9e76b9ac..55529b161f 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -419,11 +419,11 @@ kernel_do_deploy_append() {
>
> if [ -n "${INITRAMFS_IMAGE}" ]; then
> echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..."
> - its_initramfs_base_name="${KERNEL_IMAGETYPE}-its-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
> - its_initramfs_symlink_name=${KERNEL_IMAGETYPE}-its-${INITRAMFS_IMAGE}-${MACHINE}
> + its_initramfs_base_name="fitImage-its-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
> + its_initramfs_symlink_name=fitImage-its-${INITRAMFS_IMAGE}-${MACHINE}
> install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its
> - fit_initramfs_base_name="${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
> - fit_initramfs_symlink_name=${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}
> + fit_initramfs_base_name="fitImage-${INITRAMFS_IMAGE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
> + fit_initramfs_symlink_name=fitImage-${INITRAMFS_IMAGE}-${MACHINE}
> install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin
> fi
>
> --
> 2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks Nathan Rossi
@ 2016-11-23 5:29 ` Nathan Rossi
2017-01-12 3:27 ` Nathan Rossi
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Rossi @ 2016-11-23 5:29 UTC (permalink / raw)
To: openembedded-core
Just pinging these patches, to see if there were any issues or
comments. I realize I sent them just before a release so it was very
likely they would get lost in the noise.
Thanks,
Nathan
On 21 October 2016 at 22:07, Nathan Rossi <nathan@nathanrossi.com> wrote:
> Allow the load and entry addresses to remain unset if the UBOOT_RD_*
> variables are also unset for ramdisk entries in the image tree. This
> allows for U-Boot to decide dynamically where to load the ramdisk.
>
> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
> ---
> meta/classes/kernel-fitimage.bbclass | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> index 3bbf91f65a..5c9e76b9ac 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -178,6 +178,15 @@ EOF
> fitimage_emit_section_ramdisk() {
>
> ramdisk_csum="sha1"
> + ramdisk_loadline=""
> + ramdisk_entryline=""
> +
> + if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then
> + ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;"
> + fi
> + if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then
> + ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
> + fi
>
> cat << EOF >> ${1}
> ramdisk@${2} {
> @@ -187,8 +196,8 @@ fitimage_emit_section_ramdisk() {
> arch = "${UBOOT_ARCH}";
> os = "linux";
> compression = "none";
> - load = <${UBOOT_RD_LOADADDRESS}>;
> - entry = <${UBOOT_RD_ENTRYPOINT}>;
> + ${ramdisk_loadline}
> + ${ramdisk_entryline}
> hash@1 {
> algo = "${ramdisk_csum}";
> };
> --
> 2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE
2016-10-21 12:07 [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE Nathan Rossi
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks Nathan Rossi
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Don't assume KERNEL_IMAGETYPE == fitImage Nathan Rossi
@ 2016-11-23 5:29 ` Nathan Rossi
2 siblings, 0 replies; 7+ messages in thread
From: Nathan Rossi @ 2016-11-23 5:29 UTC (permalink / raw)
To: openembedded-core
Just pinging these patches, to see if there were any issues or
comments. I realize I sent them just before a release so it was very
likely they would get lost in the noise.
Thanks,
Nathan
On 21 October 2016 at 22:07, Nathan Rossi <nathan@nathanrossi.com> wrote:
> Check the value of UBOOT_SIGN_ENABLE, as it is defaulted to "0" which
> for matches as True in python due to being a non-empty string.
>
> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
> ---
> meta/classes/kernel-fitimage.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> index 8580247f82..3bbf91f65a 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -26,7 +26,7 @@ python __anonymous () {
> # Verified boot will sign the fitImage and append the public key to
> # U-boot dtb. We ensure the U-Boot dtb is deployed before assembling
> # the fitImage:
> - if d.getVar('UBOOT_SIGN_ENABLE', True):
> + if d.getVar('UBOOT_SIGN_ENABLE', True) == "1":
> uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot'
> d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn)
> }
> --
> 2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks
2016-11-23 5:29 ` Nathan Rossi
@ 2017-01-12 3:27 ` Nathan Rossi
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Rossi @ 2017-01-12 3:27 UTC (permalink / raw)
To: openembedded-core
On 23 November 2016 at 15:29, Nathan Rossi <nathan@nathanrossi.com> wrote:
> Just pinging these patches, to see if there were any issues or
> comments. I realize I sent them just before a release so it was very
> likely they would get lost in the noise.
Pinging these three patches again.
https://patchwork.openembedded.org/patch/133134/
https://patchwork.openembedded.org/patch/133135/ (another patch was
just sent by someone else which does the same change,
https://lists.yoctoproject.org/pipermail/yocto/2017-January/033840.html)
And I've updated the third one, sent a v2 so that it applies cleanly to master.
https://patchwork.openembedded.org/patch/135805/
Thanks,
Nathan
>
> Thanks,
> Nathan
>
> On 21 October 2016 at 22:07, Nathan Rossi <nathan@nathanrossi.com> wrote:
>> Allow the load and entry addresses to remain unset if the UBOOT_RD_*
>> variables are also unset for ramdisk entries in the image tree. This
>> allows for U-Boot to decide dynamically where to load the ramdisk.
>>
>> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
>> ---
>> meta/classes/kernel-fitimage.bbclass | 13 +++++++++++--
>> 1 file changed, 11 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
>> index 3bbf91f65a..5c9e76b9ac 100644
>> --- a/meta/classes/kernel-fitimage.bbclass
>> +++ b/meta/classes/kernel-fitimage.bbclass
>> @@ -178,6 +178,15 @@ EOF
>> fitimage_emit_section_ramdisk() {
>>
>> ramdisk_csum="sha1"
>> + ramdisk_loadline=""
>> + ramdisk_entryline=""
>> +
>> + if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then
>> + ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;"
>> + fi
>> + if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then
>> + ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;"
>> + fi
>>
>> cat << EOF >> ${1}
>> ramdisk@${2} {
>> @@ -187,8 +196,8 @@ fitimage_emit_section_ramdisk() {
>> arch = "${UBOOT_ARCH}";
>> os = "linux";
>> compression = "none";
>> - load = <${UBOOT_RD_LOADADDRESS}>;
>> - entry = <${UBOOT_RD_ENTRYPOINT}>;
>> + ${ramdisk_loadline}
>> + ${ramdisk_entryline}
>> hash@1 {
>> algo = "${ramdisk_csum}";
>> };
>> --
>> 2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-12 3:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 12:07 [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE Nathan Rossi
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Allow unset load/entry addresses for ramdisks Nathan Rossi
2016-11-23 5:29 ` Nathan Rossi
2017-01-12 3:27 ` Nathan Rossi
2016-10-21 12:07 ` [PATCH] kernel-fitimage.bbclass: Don't assume KERNEL_IMAGETYPE == fitImage Nathan Rossi
2016-11-23 5:28 ` Nathan Rossi
2016-11-23 5:29 ` [PATCH] kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLE Nathan Rossi
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.