Pass parameter from UBoot to UEFI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Pass parameter from UBoot to UEFI

958 次查看
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 项奖励
回复
5 回复数

938 次查看
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 项奖励
回复

929 次查看
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 项奖励
回复

908 次查看
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 项奖励
回复

904 次查看
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 项奖励
回复

889 次查看
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 项奖励
回复