[Barrelfish-users] [Barrelfish] Hagfish kernel image structure and latest version

sebastian.scherbel at fau.de sebastian.scherbel at fau.de
Tue Mar 2 22:56:07 CET 2021


 Hello,
>Hagfish definitely supports chainloading over PXE - that's exactly what it was designed for.Which bootloaders have you tested? What does your setup look like?

I have tried:
EDK2 -> iPXE -> Hagfish
 iPXE> chain tftp://x.x.x.x/Hagfish_ETHZ.efi...
Hagfish UEFI loader starting
UEFI vendor: EDK II
Hagfish loaded at 402D9000, size 147456B, by handle 41839B98
Could not connect to shell or not enough parameters, assuming PXE boot.
Connecting to the PXE service that loaded me.
PXE loader at 403ED660, revision 10000, running
Loading "hagfish.cfg.10.0.0.10"
Mtftp: Unsupported, 
file size: Unsupported

EDK2 -> Grub2 -> Hagfish
 grub> boot
Status: 0x0000000E
Failed to initialize ShellLib, aborting.
Hagfish UEFI loader starting
UEFI vendor: EDK II
Hagfish loaded at 402DA000, size 147456B, by handle 41862A18
Could not connect to shell or not enough parameters, assuming PXE boot.
Connecting to the PXE service that loaded me.
OpenProtocol: Unsupported
Failed to initialize loader: Load Error
> The error there seems to be the UEFI implementation not supporting TFTP - did you compile it in?When I load Hagfish directly, everything works fine. On American Megatrends Aptio V and EDK2.
Regards Sebastian
    Am Donnerstag, 28. Januar 2021, 16:36:02 MEZ hat David Cock <david.cock at inf.ethz.ch> Folgendes geschrieben:  
 
  
What you're seeing there is Hagfish trying to load its configuration file over TFTP as it's figured out that it was itself loaded over PXE.  The README might be inconsistent wrt filenames - if in doubt, trust the code.  Hagfish definitely supports chainloading over PXE - that's exactly what it was designed for.
 
 
The error there seems to be the UEFI implementation not supporting TFTP - did you compile it in?
 
David
 
 On 28/1/21 3:53 pm, sebastian.scherbel at fau.de wrote:
  
 
   Hello, 
  sounds good. I have tried to chainload Hagfish after iPXE. However, loading of the cfg fails on QEMU and on the real hardware with the same error.
  
   Hagfish UEFI loader starting
 UEFI vendor: American Megatrends
 Hagfish loaded at F951D000, size 143360B, by handle F6EA1D18
 Could not connect to shell or not enough parameters, assuming PXE boot.
 Connecting to the PXE service that loaded me.
 PXE loader at F5EE1840, revision 10000, running
 Loading "hagfish.cfg.A.B.C.D" (shouldn't the cfg name be hafish.A.B.C.D.cfg according to the readme?)
 Mtftp: Unsupported, 
  file size: Unsupported 
   Is this a known bug? Is chainloading unsupported? Your setup is directly booting into Hagfish?    
  Regards Sebastian  
       Am Donnerstag, 28. Januar 2021, 14:03:36 MEZ hat David Cock <david.cock at inf.ethz.ch> Folgendes geschrieben:  
  
     
Sebastian,
 
Hagfish is a custom loader for the Barrelfish CPU driver, which operates under a few unusual assumptions: Mainly, the CPU driver (kernel) itself is not self-relocating, but relies on the bootloader (Hagfish) to do the relocation for it.
 
It would definitely be possible to modify Hagfish to load an arbitrary ELF, however.  You'd have to make a few changes in the relocation code to not look for Barrelfish-specific segments and so on, but there's nothing particularly weird or non-standard about it.
 
Hagfish is pretty static, and doesn't change much from version to version.  We'll update the repository shortly (which we should have done together with the release).  Feel free to ask more specific questions if you decide to use it - we're happy to help.
 
David
 
  On 27/1/21 5:41 pm, sebastian.scherbel at fau.de wrote:
  
 
      Hello, 
  I'm a CS student trying to port an research operating system from x86_64 to ARMv8 and stumbled across Hagfish. 
  Hagfish should basically be able to load any ELF with its sections into memory with minor modifications? Or is there certain requirement for the kernel image structure that I didn't notice while reading your publication [1] and skimming the source code?
  
  The last commit in the public repository is from March 2017. But in the changelog of your last Barrelfish release from 2020 states "Update Hagfish to latest version". Have there been any bigger changes or improvements in the meantime? 
  Regards Sebastian 
  [0] https://lists.inf.ethz.ch/pipermail/barrelfish-users/2020-March/001597.html [1] http://www.barrelfish.org/publications/TN-022-ARMv8.pdf  
  _______________________________________________
Barrelfish-users mailing list
Barrelfish-users at lists.inf.ethz.ch
https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
    _______________________________________________
 Barrelfish-users mailing list
 Barrelfish-users at lists.inf.ethz.ch
 https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
     
  _______________________________________________
Barrelfish-users mailing list
Barrelfish-users at lists.inf.ethz.ch
https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
 _______________________________________________
Barrelfish-users mailing list
Barrelfish-users at lists.inf.ethz.ch
https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20210302/03d2ee44/attachment.html>


More information about the Barrelfish-users mailing list