Re:Porting Python to GRUB: “Networking without an operating ...
by yitchelle on Wednesday July 13, 2016 @04:37AM
(#12084791)
I am always interested to hear when a language is ported to a new plaform, in this case Python (or a subset of) on GRUB. The question would be why? Is this because you have lots of test cases already in Python and can easily deployed those test cases on using this?
[ Parent
| on HN ]
Re:Porting Python to GRUB: “Networking without an operating ...
by JoshTriplett on Wednesday July 13, 2016 @05:14AM
(#12084923)
Originally, it was because we had a lot of one-off test cases not written in Python. Before BITS, most BIOS test programs consisted of one-off DOS programs, or later one-off EFI programs. If you wanted a new test, or you wanted a customer to quickly gather some information for you, you sent them a new test program, or a bootable image. Now, many of those one-off tests have become Python one-liners, and you can use Python to explore the system with an interactive REPL.
Python also lets us provide additional APIs to make scripting easy. For instance, we include the complete ACPICA interpreter, so you can evaluate an arbitrary ACPI method with arguments and process the result. And we have an FFI with EFI support, so you can locate and call an arbitrary EFI protocol.
Re:Porting Python to GRUB: “Networking without an operating ...
by djsumdog on Wednesday July 13, 2016 @01:43PM
(#12088101)
Wow. I thought this was one of those "just because you can," projects, but it looks like there are some real practical uses for firmware developers/testers.
Re:Porting Python to GRUB: “Networking without an operating ...
by JoshTriplett on Wednesday July 13, 2016 @03:39PM
(#12089041)
Yeah, we wrote BITS almost entirely for practical reasons. Several groups at Intel use it to test both the BIOS and the CPU itself. (You have to have enough functionality to boot an OS, but once you have that, BITS can easily test things like CPU power management or MSR configuration.)
The module that displays presentation slides using EFI_GRAPHICS_OUTPUT_PROTOCOL, on the other hand, was definitely "because we could". https://www.youtube.com/watch?v=bYQ_lq5dcvM#t=22m56s
Re:Porting Python to GRUB: “Networking without an operating ...
by yitchelle on Wednesday July 13, 2016 @04:37PM
(#12089480)
Thanks for the detail answer.
Does your work have a high dependencies on Intel CPUs? ie, have your heard of it being used on other CPU architecture, eg ARM or PowerPC?
Re:Porting Python to GRUB: “Networking without an operating ...
by JoshTriplett on Wednesday July 13, 2016 @05:19PM
(#12089746)
It could be ported to ARM systems running EFI with some effort, if someone wanted to do so. It wouldn't make much sense to port to a completely different BIOS architecture such as those on PowerPC, though.