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

Build Issue: no bootable option or device was found on re-built image #14

Open
shaunhurley opened this issue Nov 27, 2021 · 12 comments
Open

Comments

@shaunhurley
Copy link

Hi,

When I flash a sd card with the prebuilt image everything works as expected, my pi boots through in the iPXE environment and starts looking for something to connect to on net0.

After I spun up a clean Ubuntu 20.04 environment, cloned and rebuilt the image from scratch (appears to be a clean build, no build errors reports, etc. and the generated sdcard.img is the same size as the pre-built image, however I get the following:

BdsDxe: No bootable option or device was found.
BdsDxe: Press any key to enter the Boot Manager Menu.

Pressing any key doesn't go any further i.e. no boot manager menu.

Would appreciate any thoughts...

Thanks

Shaun

@mcb30
Copy link
Member

mcb30 commented Nov 29, 2021

What do you see as the filesystem contents of sdcard.img?

@pide2000
Copy link

pide2000 commented Dec 1, 2021

Same here.
See the sdcard,img filetree attached.
I build it on gcc7 on debian.
files.txt

@shaunhurley
Copy link
Author

Quick screenshot, sorry, running out the door for a week!

sdcard contents

@pide2000
Copy link

pide2000 commented Dec 1, 2021

Hi,
I just released pipxe-builder
In this project I try to provide a docker container to setup a clean and controlled build environment for pipxe. With the provided Docker image you can reproduce the problem.
Before I decided to use gcc Docker image I tried using fedora 35 but with gcc 10 you get a whole lot of problems esepcially in edk2. Tried to fix this without success.

Maybe this helps.

@pide2000
Copy link

pide2000 commented Dec 2, 2021

I've found the follwing issue.
In the Makefile

FW_URL := https://github.com/raspberrypi/firmware/branches/stable/boot

there is a url to load the firmware -> https://github.com/raspberrypi/firmware/branches/stable/boot
If you browse this url, there is an http error 401 -> Feature not found

@mcb30
Copy link
Member

mcb30 commented Dec 2, 2021

I've found the follwing issue. In the Makefile

FW_URL := https://github.com/raspberrypi/firmware/branches/stable/boot

there is a url to load the firmware -> https://github.com/raspberrypi/firmware/branches/stable/boot
If you browse this url, there is an http error 401 -> Feature not found

However, the svn export command at

pipxe/Makefile

Line 29 in a93262a

svn export $(FW_URL) firmware-tmp && \
that uses this URL does succeed, as I verified just now.

(The reason for using svn export is to avoid downloading the entire raspberrypi/firmware tree, which contains a lot of stuff that we don't need.)

Michael

@pide2000
Copy link

pide2000 commented Dec 2, 2021

Magic. :)
Okay, just a guess.

Any Idea on the build problem? Can you verify it?

If I can provide Information or help somehow, just let me know.

@pide2000
Copy link

pide2000 commented Dec 3, 2021

The following works for me:

  1. Build image from scratch with a tweak in /ipxe/src/config/branding.h (to check if it really works)
  2. dd the prebuild sdcard.img to an sd card
  3. Replace the file /efi/boot/bootaa64.efi with the one of step 1)
    and et voilá it works, ipxe is running with the tweak

Maybe this gives you a hint where the problem is located.

@mcb30
Copy link
Member

mcb30 commented Dec 6, 2021

3. Replace the file /efi/boot/bootaa64.efi with the one of step 1)
   and et voilá it works, ipxe is running with the tweak

Interesting. The prebuilt SD card should already contain this image as /efi/boot/bootaa64.efi, built from the ipxe submodule.

@pide2000
Copy link

pide2000 commented Dec 6, 2021

3. Replace the file /efi/boot/bootaa64.efi with the one of step 1)
   and et voilá it works, ipxe is running with the tweak

Interesting. The prebuilt SD card should already contain this image as /efi/boot/bootaa64.efi, built from the ipxe submodule.

It contains the file, shure but I replaced it. Let me explain that in more detail.

Assume I want to use the DOWNLOAD_PROTO_HTTPS and I want to integrate a little script to load my image from a certain domain.
Therefore I want to build my own sdcard_.img with the customized ipxe on it (I placed an underscore in it to differentiate between my own image file and the prebuild image file sdcard.img).
So I customized the ipxe and built the pipxe sdcard_.img on my own as described in the README. But the resulting sdcard_.img doesn't boot ipxe as @shaunhurley reported in this Issue.
I tried to figure out how to fix this Issue, with no result. So I had the idea to replace the /efi/boot/bootaa64.efi file on the prebuild sdcard.img by the one located on my sdcard_.img. So I take the file copied it to the prebuild sdcard.img place the card in my pi and it works.

But I guess this it not the way it used to be. I have the hope this will give you a hint where the problem is located. Personally I think there is some issue with the sdk2 but its just a guess. I can't verify that.

Thank you very much for keeping up with this issue. 👍🏽

@mcb30
Copy link
Member

mcb30 commented Dec 7, 2021

You have several components in the SD card image:

  • The iPXE image at /efi/boot/bootaa64.efi
  • The EDK2 firmware image at /RPI_EFI.fd
  • The configuration files config.txt
  • The VC4 firmware components (i.e. almost everything else on the card)

Since you have both a known-working and a known-broken SD card image, you can try swapping out each component in turn to figure out which one doesn't work when rebuilt from source.

@rohrbachger
Copy link

I'm having the same issues, so I hope I will figure it out.
Iḿ using Raspi 3B.
Can pipxe also work with an Raspi Zero, with an POE Ethernet adapter
https://www.waveshare.com/poe-eth-usb-hub-hat.htm

We would like to use the PI Zero with POE in production as small, simple terminals with a 4*20 LCD.
We are using iPXE since some years, but not for PI yet.

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

4 participants