Automated EFI and Python scripts
by Simon.Goodson@dell.com
Hello,
I'd need to send a network message upon boot, but I need to do a couple of things to make this possible. First I need to issue a "connect -r" command in the UEFI shell to load the network drivers. After that I need to run a python script to send the message. The script is:
import socket # Import socket module
s = socket.socket() # create socket object
host = "100.82.161.99" # The IP address of the listening machine
port = 50505 # Listening port
message="Message1" # The message
s.connect((host,port)) # Connect
s.sendall(message) # Send a message (Python2)
s.close() # Close the connection
I've verified it works in the interpreter.
Alternatively, is there a way to pull the python implementation off and stick it on a generic EFI boot key?
Any help would be greatly appreciate. My programming skills are minimal and I haven't been able to successfully build a python environment with the UDK/EDK2 tools yet.
Thanks,
Simon
1 year, 10 months