Recently due to supply shortage, we have been tasked with replacing a COMe module in our product. It has become necessary to determine which module is inserted since the serial redirection for boot output is different and other reasons. I can use the command lsefisystab from the grub shell to see BIOS information and I can see the differences between boards - one BIOS is Phoenix and the other BIOS is Megatrends. For example:
grub> lsefisystab
Address: 0x79b54f18
Signature: 5453595320494249 revision: 00020028
Vendor: American Megatrends, Version=5000a
...
However I cannot test the differences of the commands because I believe these are print statements and not returned values. For example:
grub> if regexp "\bMegatrends\b" lsefisystab; then echo Found; else echo Not Found; fi
Not Found
In this case, lsefisystab is recognized as a string and not a command. Even commands such as read_dword only print the result. Is there a way to test a grub command 'string response' or is there another way to detect which BIOS is running so that in my grub.cfg, I can choose the correct options to boot?