Installing linux on an 32bit UEFI only machine

The Baytrail tablets run a 64b processor and a 32b EFI, for reasons best known to Intel.

Grub2 (compiled for 32b EFI) will start a 64b UEFI operating system from a 32b EFI.

Just like a 64b or 32b CPU processor calling into a traditional 16b BIOS, a thunk is needed in the operating system to marshal the arguments from 64b to 32b, change the processor mode, call the firmware, and then restore the processor mode and marshal the arguments from 32b to 64b. A x86-64 Linux kernel built with the option CONFIG_EFI_MIXED=y includes such a thunk to allow the x86-64 kernel to call to a i686 EFI.

At this point in time there is no thunk for AMD's AtomBIOS, and thus the "radeon" module fails. This isn't an issue for the Baytrail tablets, as they use the Intel GPU.

I would look at the Ubuntu operating system when considering Baytrail, as Fedora is yet to build their stock kernels with CONFIG_EFI_MIXED=y. Use a USB stick like Super Grub2 Disk to get to the Grub2 (32b) command line and then load and run the x86-64 installer kernel from the Grub2 command line. Once you have installed Ubuntu go back and install Grub2 32b bootloader to the EFI partition by hand and remove the Grub2 64b bootloader.

The lack of advanced video driver is a showstopper for the MacBookPro2,2 as it uses the AMD Radeon X1600. Linux can boot using the EFI "UGA" driver (roughly equivalent to using the VESA option in BIOS-land). But the result is so much overhead that then fans run at full rate continually. Note that the "radeon" module copies the AtomBIOS contents into RAM, and thus a small change to the driver to allow the AtomBIOS to be loaded from disk is a path to solving this issue. Probably the best approach on a early Mac is to run a 32b operating system, although most of the popular distributions do not support EFI in their i686 32b builds.


This page might be of help, titled: Linux on UEFI: A Quick Installation Guide. Specifically this section:

Ensure that you're using a distribution that's the right bit depth — EFI runs boot loaders that are the same bit depth as the EFI itself. This is normally 64-bit for modern computers, although the first couple generations of Intel-based Macs and a handful of obscure computers use 32-bit EFIs. I have yet to encounter a 32-bit Linux distribution that officially supports EFI, although it is possible to add a 32-bit EFI boot loader to 32-bit distributions. (My Managing EFI Boot Loaders for Linux covers boot loaders generally, and understanding those principles may enable you to modify a 32-bit distribution's installer, although that's not a task for a beginner.) Installing a 32-bit Linux distribution on a computer with a 64-bit EFI is difficult at best, and I don't describe the process here; you should use a 64-bit distribution on a computer with a 64-bit EFI.

So given this I'd probably shy away from attempting to use a 64-bit distro and adding my own 32-bit UEFI loader to start. I'd find a 32-bit distro. There are options here, mainly in the embedded space.

If you're determined and want to do this @RodSmith has provided details in this AskUbuntu Q&A titled: 32-Bit UEFI Boot Support.

Tags:

Linux

Uefi