引导时自动运行EFI应用程序 [英] Running an EFI application automatically on boot

查看:436
本文介绍了引导时自动运行EFI应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在UEFI环境中构建并手动执行.但是,我想让我的应用程序在启动时自动执行.

I can build and manually execute an EFI application in a UEFI environment. But, I'd like to have my application executed automatically at boot time.

是否可以告诉引导加载程序执行此操作,还是需要将我的应用程序转交给驱动程序以使其自动执行?我缺少的FDF,DEC,DSC或INF文件中可能有某些条目吗?

Is there a way to tell the bootloader to do this or do I need to turn my application in to a driver to have it automatically executed? Is there maybe some entry in an FDF, DEC, DSC, or INF file I'm missing?

推荐答案

您可以将startup.nsh脚本文件添加到UEFI Shell引导驱动器中,以调用您的应用程序.

You can add a startup.nsh script file to your UEFI Shell boot drive that calls you application.

以下链接应作为在Shell中使用脚本的方便参考: UEFI Shell和脚本.专门查看第3节(EFI Shell脚本).

The following link should serve as a handy reference for working with scripts in the shell: UEFI Shells and Scripting. Look at section 3 (EFI Shell Scripts) specifically.

但是,如果您实际上是在构建自己的固件,则还可以考虑创建可启动的EFI映像并将默认启动选项设置为此二进制文件.如果将二进制文件作为ROM的一部分包含在内,这将非常有用,但是设置文件系统可能会有点麻烦,因此将其视为正常的引导选项.

However, if you are actually building your own firmware, you can also look at creating a bootable EFI image and set your default boot option to this binary. This is most useful if you are including the binary as a part of your ROM, but it might be a little involved to set up the filesystem so that it is seen as a normal boot option.

此外,如果您可以完全访问固件源,则还可以从BDS驱动程序加载并调用二进制文件.我不建议您采用这种方法,除非您的目标是创建一个不会启动任何其他映像的独立设备.

Also, if you have complete access to your firmware source, you could also just load and call your binary from your BDS driver. I don't recommend this route, unless you are specifically aiming to create a standalone device that will never boot any other image.

这篇关于引导时自动运行EFI应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆