1

I am trying to build an EFI application that uses socket udp connection to send and receive data. I was following this example (https://stackoverflow.com/a/67076583/19633704). I am able to build the application successfully with EDK2 but when its is executed from a shell, it doesnt send any data. Alternatively, when i tried to run "ifconfig" command in UEFI-Shell, it returns nothing. Is there some files I am missing while making the bootable image, or something has to be changed for UEFI-shell EFI application while building it?

I placed the Shell.EFI application in EFI/boot/bootx64.efi. I renamed the Shell.efi to bootx64.efi

  • Are there any network devices in the output of the 'devices' command? – MiSimon Jul 27 '22 at 14:54
  • no... when I execute ifconfig from EFI shell, I see no output. Initially, I tested with BIOS-BITS, using the python interpreter., It was able to connect and see the eth0 network adapter. But, for some reason, EFI shell application, doesnt seem to connect with any network adapters, or maybe I am missing some files to be included while creating the bootable device. – Nandagoplan V Jul 27 '22 at 17:59
  • On which hardware are you testing? You can try two things, first run the 'connect -r' command before running 'ifconfig -l', second check your uefi menu for a setting called 'fast boot' and disable it. – MiSimon Jul 28 '22 at 05:59
  • I am testing on MSI-GE62QF laptop - 1. Running "connect -r" - Says " Connect - Handle Result success" 2. Running ifconfig -l results nothing again. 3. Fastboot disabled Screenshots attached (https://drive.google.com/drive/folders/1j4ONKm9IXs2FhxNdMUKCyKKp63A8huta?usp=sharing) Thank you for your help. – Nandagoplan V Jul 28 '22 at 11:28
  • Check if any of the network drivers is loaded, use the 'drivers' command and search for (SnpDxe, MnpDxe, Ip4Dxe,...). Can you upload the output of the 'drivers' and 'devices' command? – MiSimon Jul 28 '22 at 13:06
  • I have uploaded the files in the same drive (https://drive.google.com/drive/folders/1j4ONKm9IXs2FhxNdMUKCyKKp63A8huta?usp=sharing) devices.txt and drivers.txt – Nandagoplan V Jul 28 '22 at 14:53
  • Check the existing protocols om the 'Killer PCIe Network Controller' handle using 'openinfo 15e' (15e may change every time you reboot). I think your UEFI provides the IP4ConfigProtocol, but the newer versions of the shell may depend on the IP4Config2Protocol. – MiSimon Jul 28 '22 at 19:29
  • I guess it is Simple Network Protocol that is connected to ethernet card Uploaded the openinfo output to drive. (https://drive.google.com/drive/folders/1j4ONKm9IXs2FhxNdMUKCyKKp63A8huta?usp=sharing) File Name: 15e.txt – Nandagoplan V Jul 29 '22 at 07:29
  • Your UEFI implementation does not provide the IPv4Config2 protocol, it uses the old IPv4Config protocol. The ifconfig command will not work with this protocol. But all required protocols are in place, you can use the DHCPv4ServiceBinding protocol to init the network interface without ifconfig. – MiSimon Jul 29 '22 at 08:07
  • Ah, okay.! Ill attempt it with DHCPv4 as suggested and keep you posted on the progress. If any reference towards DHCPv4 efi application programs could be pointed, it would be of a great help. Once again, thank you for your help :) – Nandagoplan V Jul 31 '22 at 07:27

0 Answers0