Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Booting UEFI for Network Booting Kernel #3

Closed
gordan-bobic opened this issue Oct 18, 2019 · 3 comments
Closed

Network Booting UEFI for Network Booting Kernel #3

gordan-bobic opened this issue Oct 18, 2019 · 3 comments
Assignees

Comments

@gordan-bobic
Copy link

Thanks for an awesomely useful project to give the Pi a standards compliant boot loader.

I have UEFI booting via DHCP+TFTP without a local storage device on the Pi. This works great, but I would like to, from there, TFTP download and boot the dtb/kernel/inirtd. This leads me to two issues:

  1. There appears to be no TFTP command in the shell. Is there a way to gain that?

  2. Once I can get past 1), I still have the issue of instructing the TFTP booted Tianocore to "do stuff", either
    2.1) via the configuration menu which has no local storage to save the NVRAM to (does it?)
    2.2) via sending a custom startup.nsh via TFTP

How do I go about pushing out a custom startup.nsh script that makes use of TFTP (or httpboot) to fetch and boot a dtb/kernel/initrd?

@pbatard pbatard self-assigned this Oct 18, 2019
@pbatard
Copy link
Member

pbatard commented Oct 18, 2019

  1. There appears to be no TFTP command in the shell. Is there a way to gain that?

There is: https://github.com/tianocore/edk2/tree/master/ShellPkg/DynamicCommand/TftpDynamicCommand

I guess I'll need to send a patch to edk2-platforms so that we add TFTP support to the RPi3 Shell. Then I'll publish a new firmware that includes the command here.

  1. Once I can get past 1), I still have the issue of instructing the TFTP booted Tianocore to "do stuff", either
    2.1) via the configuration menu which has no local storage to save the NVRAM to (does it?)

Currently the 'NVRAM' is the RPI-EFI.fd file itself. In other words, there's a dedicated area of the file that acts as NVRAM, and that you can use as such. So if needed, we can add network configuration options there, and they will be preserved between reboots (but not when "upgrading" the firmware).

2.2) via sending a custom startup.nsh via TFTP

No idea if/how that would work. You may want to have a look at what other platforms are doing when it comes to TFTP boot.

@pbatard
Copy link
Member

pbatard commented Oct 18, 2019

That went faster than expected.

TFTP support for the Pi 3 has now been added in mainline, so, once firmware 1.9 has been built and uploaded (this is a semi-automated process, so, provided everything goes well, it will take a few minutes), you should be able to use that command.

This issue will be closed as a result, as I consider that the other questions are up to you to look into at this stage, and then let me know if you think the firmware needs to be altered further, and if so, how.

@kailiu42
Copy link

kailiu42 commented May 6, 2020

Currently the 'NVRAM' is the RPI-EFI.fd file itself. In other words, there's a dedicated area of the file that acts as NVRAM, and that you can use as such. So if needed, we can add network configuration options there, and they will be preserved between reboots (but not when "upgrading" the firmware).

Is there a way to tell the offset and size of the block for NVRAM storage in the file? I would like to preserve my NVRAM when upgrading the firmware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants