Articles
Apple Said My MacBook Was Obsolete. Nobody Told the MacBook.
Turning a 2017 MacBook Pro into a Yocto-based Linux workstation, from a black screen and an unexpected SSD layout to Xfce and native BitBake builds.
I have a perfectly good 2017 MacBook Pro. It’s an Intel machine with a Retina display, a decent amount of processing power, and rather more life left in it than Apple would have you believe.
Unfortunately, Apple and I have different opinions about how long a computer should remain useful.
The machine no longer receives the latest macOS releases, but the hardware still works. So, rather than retire it, I decided to give it a new operating system.
Not Ubuntu. Not Debian. Something a little more interesting.
I wanted to build my own Linux distribution for it using the Yocto Project.
The aim wasn’t simply to demonstrate that Linux could boot on an old MacBook. I wanted a genuinely useful workstation: a graphical desktop, a browser, office applications, networking, external display support for presentations, and enough development tools to run BitBake and build Yocto images directly on the machine.
This also became the basis of my presentation, Just Because You Can: Repurposing Obsolete Hardware with Yocto, for the December 2026 Yocto Summit.
I’m not going to turn this into a step-by-step tutorial. The interesting part is the engineering journey: what worked, what didn’t, and the occasional surprise along the way. The complete project repository is public for anyone who wants to explore the implementation.
As it turned out, getting Linux onto the MacBook was only the beginning.
Building a BSP for a MacBook
The machine is a MacBookPro14,3, a 2017 15-inch MacBook Pro with Intel and AMD graphics.
I’d already successfully installed Debian 13 on it, so I knew that Linux could run on the hardware.
The MacBook is fundamentally an Intel-based laptop, and a standard Linux distribution had already worked. With that in mind, genericx86-64 from meta-yocto-bsp seemed a sensible starting point. There was no reason to build an entirely new x86 machine configuration when I could start with an existing one and add the MacBook-specific hardware support as required.
I created two custom layers:
meta-macfor the MacBook board support package.meta-mac-distrofor the distribution, images and workstation configuration.
The machine was named macbookpro14-3, and the distribution mac-distro.
For the kernel, I used meta-linux-mainline and Linux 6.18.63. One objective was to use a mainline kernel rather than depend on a collection of old, vendor-specific patches.
That decision immediately produced the first build failure.
The first kernel build
BitBake stopped during kernel metadata processing:
ERROR: linux-stable-6.18.63-r0 do_kernel_metadata:
A KBUILD_DEFCONFIG 'defconfig' was specified,
but not present in the source tree
The problem was straightforward once I inspected the kernel source. The recipe expected a configuration called defconfig, but the upstream x86 kernel supplied x86_64_defconfig.
The solution was to specify the correct configuration explicitly:
KBUILD_DEFCONFIG = "x86_64_defconfig"
With that change, the kernel built successfully.
The next milestone was core-image-minimal, followed by a custom mac-image containing the components needed to boot the MacBook. The image used GRUB EFI and Wic to produce a bootable disk image.
Now I had something to try on the hardware.
First Boot. First Problems.
For the initial experiments, I wanted to preserve the internal SSD. The safest approach was to boot from USB until I knew the distribution worked.
The first problem was that the MacBook didn’t recognise the USB stick as bootable.
The image had a GPT partition table and an EFI boot partition, but the partition type wasn’t what Apple’s Startup Manager expected. I corrected the partition type to EFI System using sgdisk.
There was also a second USB cable connected to provide power to the MacBook, which complicated the testing. After changing the partition type and simplifying the connections, the USB appeared in Startup Manager. Because both conditions changed, I couldn’t say with certainty which had been responsible for the original failure.
Still, the MacBook now found GRUB.
Progress!
Unfortunately, selecting Linux produced a black screen.
A black screen doesn’t necessarily mean a failed boot
I suspected a display problem rather than a kernel boot failure.
The MacBook’s trackpad uses haptic feedback to simulate a physical click, and that feedback disappears when the machine is powered off. Even though the screen was black, I could still feel the trackpad clicking.
That told me something was running. It didn’t prove Linux had booted successfully, but it was a useful indication that the machine hadn’t simply shut down.
I experimented with the framebuffer and DRM configuration, enabling options including:
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_SIMPLEDRM=y
CONFIG_FB_CORE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
None of them solved the problem.
Even editing the GRUB command line was awkward. Apple’s Touch Bar keyboard arrangement made the usual function-key and boot-editing workflow rather less convenient than on a conventional PC. I ended up editing the GRUB configuration on the USB stick from the build server.
Later, pressing the MacBook’s power button briefly caused a clean shutdown. That provided further evidence that Linux was running and the problem was with the display.
Instead of repeatedly trying to repair a supposedly broken boot process, I needed a way to inspect a running Linux system without relying on its display.
Debugging a Black Screen Over SSH
The image already contained OpenSSH and systemd-networkd. That didn’t mean networking was configured.
When I connected an Ethernet adapter, the MacBook didn’t obtain a DHCP address. The package manifest showed that the necessary software was present, but there was no suitable network configuration to bring up the interface automatically.
I added a systemd-networkd configuration requesting IPv4 DHCP, enabled the relevant services, and configured SSH access using a normal user account and public-key authentication.
Once that was working, I could connect from another machine.
This was a major improvement. I could now inspect dmesg, PCI devices, kernel modules and DRM state without repeatedly rebuilding USB images just to change boot parameters.
And the graphics problem was becoming rather interesting.
I Picked the Wrong GPU
The MacBook has two graphics devices:
- Intel Kaby Lake integrated graphics, using the
i915driver. - AMD Radeon Polaris graphics, using
amdgpu.
I assumed the internal Retina display was connected to the Intel GPU.
I guessed wrong.
I spent some time investigating the Intel i915 driver, checking DRM configuration, firmware and kernel messages. The messages weren’t encouraging:
failed to retrieve link info, disabling eDP
Cannot find any crtc or sizes
I investigated Intel display initialisation, firmware, DRM configuration and kernel parameters. Disabling Intel modesetting didn’t solve the problem.
Eventually, I investigated the AMD GPU instead. Once I enabled AMDGPU support in the kernel, the display worked.
CONFIG_DRM_AMDGPU=m
The system subsequently reported the internal display as card1-eDP-1, with its native resolution of 2880 × 1800.
The internal panel was connected to the AMD GPU all along.
Sometimes the most useful debugging discovery is that your original assumption was wrong.
With the AMD driver working, I finally had a visible Linux console on the MacBook.
Getting Apple’s SPI Hardware Working
With the display working, the next problem was the keyboard and trackpad.
Apple’s keyboard and trackpad on this MacBook use an SPI interface rather than the more conventional USB or PS/2 interfaces.
Investigating how Linux supported these devices led me to the applespi driver, which was already present in the mainline kernel.
That was encouraging. I didn’t need to find an out-of-tree driver or maintain another kernel patch. I just needed to enable it.
Of course, it wasn’t quite that simple.
The driver depended on the Intel SPI controller and LPSS infrastructure, and my first attempt used a kernel configuration symbol that was no longer valid. After inspecting the kernel’s actual configuration symbols, I corrected the SPI and Intel LPSS settings.
The effective configuration included:
CONFIG_SPI=y
CONFIG_SPI_PXA2XX=y
CONFIG_SPI_PXA2XX_PCI=y
CONFIG_MFD_INTEL_LPSS_PCI=y
CONFIG_KEYBOARD_APPLESPI=y
The kernel then registered both the Apple SPI keyboard and Apple SPI touchpad as input devices. Later, when the graphical desktop was running, I could verify the trackpad through actual pointer movement.
The SSD Had Other Ideas
With the system booting successfully from USB, I was ready to install it on the internal SSD.
I expected this to be fairly straightforward. After all, I already had a working Wic image with an EFI partition, GRUB and a root filesystem.
Then I discovered that Apple’s internal SSD uses 4096-byte logical sectors.
That came as a surprise.
The Wic image had been generated for a disk with 512-byte logical sectors. Simply writing it to the SSD wasn’t going to produce the partition layout I needed.
What had started as an exercise in installing an existing image turned into writing a proper installer.
A proper installer, not just a bootable image
Rather than modify the workstation image to accommodate the installation process, I created a separate USB installer image.
The project now has:
mac-image— the installed workstation.mac-image-installer— the USB installation and recovery environment.
Both share the common system configuration through mac-image-common.inc.
The installer image adds the utilities needed to partition disks, create filesystems, decompress images and perform the installation. The installation script is packaged as /usr/sbin/install-macbookpro14-3.
It reads the partition layout from the source Wic image, supports compressed .wic.zst images, creates a native 4Kn GPT on the Apple SSD, and installs the EFI and root filesystems. It also updates GRUB to reference the installed root partition using its PARTUUID.
The EFI filesystem is created with settings appropriate for the target SSD rather than blindly copying the original filesystem geometry.
Preserving Apple’s EFI files
From my earlier Debian installation, I knew that I needed to preserve Apple’s existing EFI files.
The installer therefore had two jobs beyond copying the operating system: handle the SSD’s unusual sector size and preserve the Apple EFI contents.
My first implementation expected an external backup of those files. That worked as a design assumption, but it made the installation unnecessarily awkward.
I wanted the installer to handle the backup itself, so I extended it to locate, copy and verify the existing EFI files before modifying the disk.
Where a persistent backup wasn’t available, the script could use a RAM-backed backup, but only with an explicit warning and confirmation because losing power would also lose that backup.
The installer also included checks for mounted partitions, active swap and the selected target device before making destructive changes.
After testing the dry-run behaviour and installation process, the MacBook successfully booted from its internal SSD.
The USB stick was no longer required for normal operation.
Building Yocto on Yocto
One of my requirements from the beginning was that the MacBook should be capable of running BitBake and building Yocto packages natively.
I spend a fair amount of time travelling, and I wanted to be able to develop and build packages while on the road, without needing access to my main build server.
Of course, I wasn’t expecting the MacBook to compete with a dedicated build server. But being able to modify a recipe, build a package and test it locally would make it a genuinely useful development machine.
That meant the Yocto image needed more than the usual target development tools. It needed the dependencies required to run BitBake and OpenEmbedded as a build host.
I needed GCC and G++, Python, Perl, GNU build tools and a range of supporting packages. There were also compatibility details to address, including the conventional dynamic linker path /lib64/ld-linux-x86-64.so.2.
Rather than install everything manually and hope I remembered it for the next image, I created a dedicated packagegroup, packagegroup-mac-development.
This brought the development environment under Yocto’s package management and image configuration. If I rebuilt and reinstalled the image, the development tools should be there without another afternoon of manual configuration.
When a full disk becomes a compiler problem
During the build work, the build server, Dingle, ran out of disk space.
I recovered space, but the ncurses build subsequently failed with a collection of compiler errors. One of the earliest was:
../include/curses.h:38: error: unterminated #ifndef
There were also errors about missing types and definitions.
At first glance, it looked like a source-code or configuration problem. But the compiler errors didn’t really make sense for a well-established package like ncurses.
So I inspected the generated header.
It ended abruptly:
#define BUTTON3_RELEASED NCURSES_MOUSE_
The file had been truncated in the middle of a macro definition.
Suddenly, the compiler errors made much more sense.
The likely explanation was that the filesystem had filled while build files were being generated, leaving an incomplete header behind. Freeing disk space hadn’t repaired the damaged file.
Recovering the build
The recovery was less straightforward than simply rerunning BitBake.
I tried cleaning and regenerating the ncurses artifacts. Some attempts didn’t resolve the problem. During troubleshooting, manually removing build directories also introduced an inconsistency between BitBake’s recorded task state and the actual files on disk.
At one point, forcing the configuration task reported success, but the expected build directory was empty.
That wasn’t much use.
Eventually, I returned to BitBake’s own cleaning and rebuilding mechanisms so that the recipe could be reconstructed through its normal task dependencies.
There was another configuration detail worth addressing: the project needed explicit defaults for both its machine and distribution. Otherwise, a perfectly reasonable command could end up targeting qemux86-64 rather than the MacBook.
With the environment recovered and the development dependencies in place, the native build succeeded.
The MacBook completed approximately 5,150 BitBake tasks building core-image-minimal.
I now had a MacBook running a Yocto distribution that could build another Yocto distribution.
That was rather satisfying.
From Console to Desktop
A command-line development workstation was useful, but I also wanted to use the MacBook for everyday tasks and conference presentations.
The next challenge was getting a graphical environment running.
Weston first
I started with Weston as a relatively straightforward way to prove that the graphics stack worked.
The Weston recipe was available in OpenEmbedded-Core, but initially BitBake refused to build it because the distribution was missing the pam feature.
After adding PAM support and the necessary Weston packages, I encountered an installation-time service problem involving weston-init and a missing systemd service dependency. That required investigating the service configuration and package contents before continuing.
Eventually, Weston started successfully on tty7.
I had a visible Weston session and a working mouse pointer.
This confirmed several important pieces of the system at once: the AMD graphics driver, DRM, the Wayland compositor and the input devices were working together.
But Weston was only a stepping stone. For a practical workstation, I wanted a more conventional desktop.
Switching to Xfce
Having established that the graphical stack worked with Weston, I experimented with labwc.
It worked, but I wasn’t particularly keen on its look and feel.
I’ve used Xfce on numerous embedded Linux systems over the years. It’s relatively lightweight, provides a conventional desktop environment, and has always been a good fit for systems where I don’t want the desktop consuming unnecessary resources.
So I decided to use Xfce instead.
I added meta-xfce and its dependencies to the Yocto configuration, along with Xorg and the necessary input and graphics components.
Rather than introduce a display manager, I kept things simple: log in at the console and start Xfce using startx. Other virtual consoles and SSH remain available.
There were some package and deployment details to resolve during the transition, but eventually the new session started.
I had Xfce running on the MacBook.
The Xorg logs also confirmed accelerated rendering through the AMD driver, including glamor, DRI3 and the radeonsi OpenGL implementation.
The machine was beginning to feel like a normal Linux laptop.
Adding Desktop Applications
With Xfce running, I wanted Firefox and LibreOffice installed.
Firefox was available through Yocto, but using Flatpak was more convenient. LibreOffice was a different matter: there wasn’t a suitable Yocto recipe available.
Flatpak provided a straightforward solution for both applications.
Getting Flatpak itself working required a little more effort. In particular, I needed to enable Polkit support and kernel user namespaces before Firefox would launch successfully.
Initially, Firefox failed with:
bwrap: Creating new namespace failed,
likely because the kernel does not support user namespaces
Once those dependencies were resolved, Firefox launched successfully. It also reported WebRender, confirming that its graphics rendering was using the accelerated graphics stack.
LibreOffice was installed through Flatpak as well.
I now had the applications I needed without having to create and maintain a LibreOffice recipe.
HDMI Just Worked. Really.
External display support was important because I wanted to use the MacBook for presentations.
After the effort required to get the internal Retina display working, I was prepared for another round of graphics debugging.
Fortunately, none was necessary.
I connected an external display through HDMI.
It just worked.
Xfce and Xorg handled the display without additional configuration.
Occasionally, computers do something helpful.
The Remaining Hardware
Getting the desktop running didn’t mean every component of the MacBook was automatically supported. There were still several pieces of Apple-specific hardware to investigate, mainly one after another. There is only one of me.
Wi-Fi
The Broadcom BCM43602 wireless adapter was detected, and the mainline brcmfmac driver was available.
However, the initial kernel logs showed firmware-loading failures, including requests for MacBook-specific firmware and configuration files.
The driver being present wasn’t enough; the firmware and device configuration also needed attention.
After working through those requirements, Wi-Fi became operational. The MacBook no longer depended on its Ethernet adapter for network access.
Bluetooth
Bluetooth was more complicated.
Initially, Linux didn’t expose an hci0 controller.
The hardware investigation showed that the internal Broadcom BCM2E7C controller was connected through an Intel UART, rather than appearing as a conventional USB Bluetooth adapter.
That directed the investigation towards the DesignWare UART, serial-device support and the Bluetooth HCI UART driver.
After updating the kernel configuration and installing the new kernel and modules, hci0 appeared.
Bluetooth LE scanning worked, and I could discover and connect to devices. I haven’t yet tested sustained operation with a Bluetooth peripheral, so I regard Bluetooth as partially verified rather than completely finished.
The Touch Bar
One slightly unusual feature of this MacBook is that it doesn’t have a physical Escape key. Apple put it on the Touch Bar instead.
As someone who uses vi regularly, having no Escape key is rather inconvenient.
Getting the Touch Bar working was therefore more than an exercise in supporting every piece of Apple hardware. It was an important part of making the machine usable.
I investigated the Apple iBridge hardware and found Linux driver code originally packaged for Arch Linux. After integrating the necessary support into the Yocto build, the Touch Bar worked.
More importantly, I had my Escape key back.
The FaceTime camera
The camera also appeared through Apple’s iBridge hardware.
Linux registered V4L2 video devices, but that alone wasn’t proof that the camera was usable.
The practical test was to run Cheese.
It worked.
The FaceTime camera is therefore another functioning component of the workstation.
Audio: Not Quite Everything
Audio remains unfinished.
Firefox can play video, and the desktop graphics work correctly, but there is currently no functioning audio output.
It’s something I intend to return to, but it doesn’t prevent the machine from fulfilling its primary roles as a development and presentation workstation.
I don’t intend to delay the entire project until every last peripheral is perfect.
The Final Configuration
The MacBook now runs Yocto Project 6.0 Wrynose with Linux 6.18.63, booting through GRUB EFI directly from its internal SSD.
The custom meta-mac BSP and meta-mac-distro layers define the hardware support and distribution. Xorg and Xfce provide the desktop, Flatpak supplies Firefox and LibreOffice, and a dedicated development packagegroup makes native BitBake builds possible.
The USB installer remains available for installation and recovery.
The Project Repository
The complete project is available on GitHub:
Project-Mac — Yocto for a 2017 MacBook Pro
I’ve made the repository public so that anyone interested can explore the Yocto configuration, custom layers, image recipes and installation scripts.
This article describes the journey rather than providing a step-by-step tutorial. The repository contains the implementation for anyone wanting to investigate further or try something similar.
An Obsolete MacBook?
The MacBook is now a working Linux development machine, complete with a graphical desktop, browser, office applications and external display support.
It can even run BitBake and build its own Linux images.
There are still things to improve. Audio isn’t working yet, and Bluetooth needs more testing. But neither prevents it from being a useful workstation.
Apple may have finished supporting this MacBook, but I’m not finished using it.


