Skip to contentSkip to conversation

kernel-fitimage: uboot-sign: fix missing signature

PATCH In review Jun Nie 2 participants 9 messages Jul 10, 2019 – Sep 2, 2019

lore
Share & tools
lore

Jun Nie

author
#0 lore raw

PATCH 1/1 kernel-fitimage: uboot-sign: fix missing signature

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

---
 meta/classes/uboot-sign.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/uboot-sign.bbclass +3 -1
index 8beafff..1fc2a37 100644
@@ -66,7 +66,7 @@ concat_dtb_helper() {
 		install ${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
 	elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then
 		cd ${DEPLOYDIR}
-		cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${UBOOT_BINARY} > ${UBOOT_IMAGE}
+		cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${B}/${CONFIG_B_PATH}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
 	else
 		bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
 	fi
@@ -77,10 +77,12 @@ concat_dtb() {
 		mkdir -p ${DEPLOYDIR}
 		if [ -n "${UBOOT_CONFIG}" ]; then
 			for config in ${UBOOT_MACHINE}; do
+				CONFIG_B_PATH="${config}"
 				cd ${B}/${config}
 				concat_dtb_helper
 			done
 		else
+			CONFIG_B_PATH=""
 			cd ${B}
 			concat_dtb_helper
 		fi
Signature · 1 line
2.7.4
author
#1 lore raw
Quoted 6 lines · Jun Nie <[email protected]> 于2019年7月10日周三 下午3:11写道:

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

Does anyone have opinion on this patch? Or suppose it can be merged now?

Thanks!
Jun

#2 lore raw
In reply to Jun Nie
Quoted 8 lines · Jun Nie

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

---
 meta/classes/uboot-sign.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

I continue to be very worried we have no test coverage in this area of the code. Since I don't know it particularly well I'm effectively merging patches blindly :(.

Cheers,

Richard

author
#3 lore raw
Quoted 11 lines · <[email protected]> 于2019年7月17日周三 下午7:41写道:
Quoted 8 lines · Jun Nie

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

---
 meta/classes/uboot-sign.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 9 lines

I continue to be very worried we have no test coverage in this area of the code. Since I don't know it particularly well I'm effectively merging patches blindly :(.

Cheers,

Richard

Then I think you can merge it as long as it pass current test coverage. Because I already test the FIT signature feature comes back with this patch :-)

Best Regards.
Jun

#4 lore raw
Quoted 11 lines · Jun Nie
Quoted 10 lines · <[email protected]> 于2019年7月17日周三 下午7:41写道:
Quoted 8 lines · Jun Nie

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

---
 meta/classes/uboot-sign.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 8 lines
Quoted 4 lines

I continue to be very worried we have no test coverage in this area of
the code. Since I don't know it particularly well I'm effectively merging patches blindly :(.

Then I think you can merge it as long as it pass current test coverage. Because I already test the FIT signature feature comes back with this patch :-)

It has merged but my point is we really need better test coverage of these areas of the code.

What I'd really like is for people to help write tests which showed the broken behaviour the patch is fixing.

Cheers,

Richard

author
#5 lore raw
Quoted 25 lines · <[email protected]> 于2019年7月18日周四 下午8:33写道:
Quoted 11 lines · Jun Nie
Quoted 10 lines · <[email protected]> 于2019年7月17日周三 下午7:41写道:
Quoted 8 lines · Jun Nie

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

---
 meta/classes/uboot-sign.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 8 lines
Quoted 4 lines

I continue to be very worried we have no test coverage in this area of
the code. Since I don't know it particularly well I'm effectively merging patches blindly :(.

Then I think you can merge it as long as it pass current test coverage. Because I already test the FIT signature feature comes back with this patch :-)

It has merged but my point is we really need better test coverage of these areas of the code.

Quoted 7 lines

What I'd really like is for people to help write tests which showed the broken behaviour the patch is fixing.

Cheers,

Richard

Just find that there are runqemu script and some qemu test in openembedded-core/script. But it seems that u-boot is not enabled in qemu test yet and current test case is only for kernel feature. So there is huge gap in u-boot test side. I can have a try later, but cannot make any promise.

Best Regards.
Jun

author
#6 lore raw
In reply to Jun Nie
Quoted 6 lines · Jun Nie <[email protected]> 于2019年7月10日周三 下午3:11写道:

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

Hi Richard,

Could you also help to cherry pick this patch to warrior branch?

Thanks!
Jun

author
#7 lore raw

Hi Richard,

Any thoughts on cherry-pick this patch to warrior-dev branch?

Jun

Quoted 15 lines · Jun Nie <[email protected]> 于2019年7月25日周四 下午4:26写道:
Quoted 6 lines · Jun Nie <[email protected]> 于2019年7月10日周三 下午3:11写道:

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

Hi Richard,

Could you also help to cherry pick this patch to warrior branch?

Thanks!
Jun

author
#8 lore raw

Hi Richard,

Any concern on cherry-pick this patch to warrior-dev branch?

Regards,
Jun

Quoted 17 lines
Quoted 15 lines · Jun Nie <[email protected]> 于2019年7月25日周四 下午4:26写道:
Quoted 6 lines · Jun Nie <[email protected]> 于2019年7月10日周三 下午3:11写道:

u-boot.bin with dtb & signature should be placed in ${B} so that it can be deployed by u-boot as expected. Otherwise, the version without signature is installed.

Hi Richard,

Could you also help to cherry pick this patch to warrior branch?

Thanks!
Jun