openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [Question] u-boot-spl and secure boot support
@ 2021-03-24  3:10 Jamin Lin
  2021-03-24  3:12 ` Jamin Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Jamin Lin @ 2021-03-24  3:10 UTC (permalink / raw)
  To: openbmc; +Cc: Jamin Lin

[-- Attachment #1: Type: text/plain, Size: 2043 bytes --]

Hi all,
May I ask some questions about u-boot-spl and secure boot for ASPEED AST2600 support?


  1.  Refer to the "do_generate_static" and "do_generate_image_uboot_file" tasks from image_types_phosphor.bbclass, both tasks support to add "u-boot-spl.${UBOOT_SUFFIX}" in the image file.

However, I did not find the image file of UBI mode include "u-boot-spl.bin" in do_make_ubi task.

https://github.com/openbmc/openbmc/blob/master/meta-phosphor/classes/image_types_phosphor.bbclass#L210

do_make_ubi() {
        # Concatenate the uboot and ubi partitions

        mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd ${FLASH_SIZE}

        dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \

                if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \

                of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd

        dd bs=1k conv=notrunc seek=${FLASH_UBI_OFFSET} \

                if=ubi-img \

          of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd
}

    Can we change to add u-boot-spl.bin in the image file for UBI mode?


  1.  Refer to the image_types_phosphor.bbclass, it uses the hard code filename of u-boot and u-boot-spl and it is very difficult to change to use the singed files of u-boot-spl and u-boot in the image file.
For example:
I tried to use socsec tool to sing the original u-boot-spl.bin and the generated file was "s-u-boot-spl.bin". I wanted to add "s-u-boot-spl.bin" in the image file and I needed to modify image_types_phosphor.bbclass.
Can we use the variable name of u-boot-spl and u-boot instead of hard code naming?
FLASH_UBOOT_SPL _NAME ?= "u-boot-spl"
FLASH_UBOO_NAME ?= "u-boot"

Thanks-Jamin

************* Email Confidentiality Notice ********************
DISCLAIMER:
This message (and any attachments) may contain legally privileged and/or other confidential information. If you have received it in error, please notify the sender by reply e-mail and immediately delete the e-mail and any attachments without copying or disclosing the contents. Thank you.


[-- Attachment #2: Type: text/html, Size: 12559 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [Question] u-boot-spl and secure boot support
  2021-03-24  3:10 [Question] u-boot-spl and secure boot support Jamin Lin
@ 2021-03-24  3:12 ` Jamin Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Jamin Lin @ 2021-03-24  3:12 UTC (permalink / raw)
  To: openbmc; +Cc: Jamin Lin

Sorry and change the text format.

************* Email Confidentiality Notice ********************
DISCLAIMER:
This message (and any attachments) may contain legally privileged and/or other confidential information. If you have received it in error, please notify the sender by reply e-mail and immediately delete the e-mail and any attachments without copying or disclosing the contents. Thank you.

From: Jamin Lin <jamin_lin@aspeedtech.com> 
Sent: Wednesday, March 24, 2021 11:11 AM
To: openbmc@lists.ozlabs.org
Cc: Jamin Lin <jamin_lin@aspeedtech.com>
Subject: [Question] u-boot-spl and secure boot support

Hi all,
May I ask some questions about u-boot-spl and secure boot for ASPEED AST2600 support?

1. Refer to the “do_generate_static” and “do_generate_image_uboot_file” tasks from image_types_phosphor.bbclass, both tasks support to add “u-boot-spl.${UBOOT_SUFFIX}” in the image file.
However, I did not find the image file of UBI mode include “u-boot-spl.bin” in do_make_ubi task.
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/classes/image_types_phosphor.bbclass#L210
   
 do_make_ubi() {
        # Concatenate the uboot and ubi partitions
        mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd ${FLASH_SIZE}
        dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \
                if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \
                of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd
        dd bs=1k conv=notrunc seek=${FLASH_UBI_OFFSET} \
                if=ubi-img \
          of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd
  }
   
    Can we change to add u-boot-spl.bin in the image file for UBI mode?

2. Refer to the image_types_phosphor.bbclass, it uses the hard code filename of u-boot and u-boot-spl and it is very difficult to change to use the singed files of u-boot-spl and u-boot in the image file.
For example: 
I tried to use socsec tool to sing the original u-boot-spl.bin and the generated file was “s-u-boot-spl.bin”. I wanted to add “s-u-boot-spl.bin” in the image file and I needed to modify image_types_phosphor.bbclass.
Can we use the variable name of u-boot-spl and u-boot instead of hard code naming?
FLASH_UBOOT_SPL _NAME ?= “u-boot-spl”
FLASH_UBOO_NAME ?= “u-boot”

Thanks-Jamin

************* Email Confidentiality Notice ********************
DISCLAIMER:
This message (and any attachments) may contain legally privileged and/or other confidential information. If you have received it in error, please notify the sender by reply e-mail and immediately delete the e-mail and any attachments without copying or disclosing the contents. Thank you.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-24  3:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  3:10 [Question] u-boot-spl and secure boot support Jamin Lin
2021-03-24  3:12 ` Jamin Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).