[ipxe-devel] Regression with commit fc87adb46c1395b09302085e9d15fcd8ab3c31fe - [efi] Expose downloaded images via EFI_SIMPLE_FILE_SYSTEM_PROTOCOL on IMAGE_EFI

Joshua C. joshuacov at gmail.com
Wed Apr 10 11:59:32 UTC 2013


2013/4/9 Michael Brown <mbrown at fensystems.co.uk>

> On 09/04/13 15:40, Joshua C. wrote:
>
>> I didn't know this. Up to know I've been using a modified version of
>> ipxe that gives me a shell after initilizing the devices (just a
>> modified main() function),
>>
>
> It would be simpler to embed a script such as:
>
>   #!ipxe
>   shell
>
> That would avoid any need for modifying core/main.c.
>
>
>  so that I can load and boot any image over a
>> network. I've always had all image types enabled in general.h and never
>> had an issues when starting ipxe. Right now my system just reboots
>> regardless of the not supported IMAGE_EFI. From my point of view this is
>> a regression, because befor this commit ipxe started without glitches
>> regardless if an image is supported or not. So even if the image is not
>> supported then ipxe should gracefully continue initilization and not
>> reboot the mashine....
>>
>
> You have enabled an image type which cannot possibly be supported on the
> target platform.  Do not do that.
>
> It's not a regression; the error is in your modifications in general.h.
>  Prior to this commit, this error in your local modifications to general.h
> was not directly visible to you.
>
> Any "fix" to this would be to detect the impossible option and
> deliberately fail the build.  I don't propose to do this, since there are
> several possible build options you could apply which would generate
> impossible code (e.g. explicitly enabling CONSOLE_PCBIOS when building a
> .efirom).
>
> Just remove your erroneous "#define IMAGE_EFI" from your local
> modifications to general.h, and all will be well.
>
>
>  From the shell I can point to and download any efi image over the
>> network, but why it cannot boot the system?
>>
>
> For pretty much exactly the same reason that you can't take a Linux ELF
> binary and run it under Windows.  PC BIOS and EFI are fundamentally
> incompatible platforms.  Binaries for one WILL NOT run on the other.
>
>
> You can build a PC BIOS version of iPXE (e.g. bin/rtl8139.rom).  This will
> work under a PC BIOS, and will be able to run PXE, bzImage, Multiboot, and
> various other (non-EFI) binaries.
>
> You can build an EFI version of iPXE (e.g. bin-x86_64-efi/rtl8139.efirom)*
> *.  This will work under EFI, and will be able to run EFI binaries.
>
> Michael
>


I see, thanks for the clarification! I have one more question: if i build
both binaries and concatenate them with './util/catrom.pl bin/rtl8139.rom
bin-x86_64-efi/rtl8139.efirom > combined.rom' will this new image be
possible to run on both the efi and bios systems? Or there should be some
loader at boot time to determine the system-architecture and load the
corresponding image?


-- 
--joshua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20130410/b945ba5a/attachment.htm>


More information about the ipxe-devel mailing list