Pass parameter from UBoot to UEFI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pass parameter from UBoot to UEFI

1,071 Views
zutter
Contributor II

Hello,

we use Windows 10 IoT with some of our boards equipped with imx8mp. It works fine so far.
In our production line we can easily automatic configure UBoot environment with special data (like Network Address, board name, HW revision and so on).
Is there an easy way to pass (this) data from UBoot to UEFI while launch it? We don’t want to use an EPROM or similar.

Many thanks zutter

0 Kudos
Reply
5 Replies

1,051 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You can create and script to pass the data in uboot, there is no other way.

Regards

0 Kudos
Reply

1,042 Views
zutter
Contributor II

Hello Bio_TICFSL,

many thanks for your answer. I am newbie in UBoot as well as in UEFI. Can you give me a helping hand about what you meant in detail?
I print out some environment variables below. We use the bootcmd below in the UBoot script to launch the UEFI image. When UEFI is running I would like to know the values of “ethaddr” (our unique serial number) and “platform”. Is this possible using your suggestion? At the time I have no idea how to transfer these data from UBoot to UEFI.

UBoot CLI:
armStoneMX8MP # env print

bootcmd=mmc read 40480000 0x3a00 680; bootm 40480000

ethaddr=00:05:51:07:55:83

platform=armstonemx8mp

Environment size: 1507/16379 bytes

Many thanks again

Zutter

0 Kudos
Reply

1,021 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

No, you just have to save the env variable and thats it, apply saveenv and print and you will see is there.

Regards

0 Kudos
Reply

1,017 Views
zutter
Contributor II

Hello Bio_TICFSL,

of course, the enviroment variables are already saved and available after each reboot. But this is not my question. After UBoot execute the bootm command it is away and UEFI takes control. Here I want to know the values (without raw Flash read or EPROM buffering)!

0 Kudos
Reply

1,002 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

At UEFI runtime U-Boot does not have any device drivers (except for reboot/poweroff on some boards).

One implementation of UEFI variables in U-Boot uses the Replay Protected Memory Block (RPMB) of an eMMC for storage. StandaloneMM used as an OP-TEE module implements the necessary logic. See https://u-boot.readthedocs.io/en/latest/develop/uefi/uefi.html#using-op-tee-for-efi-variables

UEFI variables cannot be set at runtime. The U-Boot command 'efidebug' can be used to set the variables

https://docs.u-boot.org/en/v2021.07/develop/uefi/uefi.html

Regards

0 Kudos
Reply