News for hackers. Stuff that matters.
Re:Porting Python to GRUB: “Networking without an operating ... by JoshTriplett on Wednesday July 13, 2016 @03:30PM (#12088969)
> How big is the base image, e.g. printing "hello world" to the console?

46MB. However, that image includes three separate complete copies of all the compiled code (4.5-6MB each), so that it simultaneously boots on 32-bit BIOS, 32-bit EFI, and 64-bit EFI. It also includes the complete source code (24MB) needed to reproduce the image, to make it self-contained and redistributable without needing to have a separate distribution of source. And it includes .py files for all the BITS .pyc files (other than the Python standard library), to simplify debugging and hacking. A quick check suggests that you could pretty easily build an 8.4MB image, if you cared about the size.

> Is it modular, e.g. if you don't need networking[1] how hard is it to not include networking?

No. We haven't needed a smaller image, so we haven't worked on that. Typically, we boot it from a USB drive or hard drive, so storage space isn't a concern.

Networking, though, consists almost exclusively of Python code, and the compiled .pyc files for that don't take up much space; not a good target to start with if you wanted to reduce size.

There are no comments on this comment yet.