About the 2016 tag that was added to the title. While the header does say 2016, I think it's that the file wasn't made open source by Apple till this weekend.
IoT solution based on XNU? - bit outside of Apple's gamut but I could see it. iotOS
EDIT: Eh, maybe not the copyright is quite old - perhaps more likely some internal test? Run ARM64 XNU tests on Raspberry Pis maybe? They are pretty cheap hardware with lots of ports.
There was a time when it looked like they might switch their Airport and Time Capsule routers, which previously had been running VxWorks and NetBSD, to a variant of iOS. But then they shelved the entire product lines a few years later.
It did turn out to be true that Apple was moving to run iOS (and later on, even APFS) all the way down to watch hardware, and later on the HomePod which is the functional successor to the audio features of the Airport Express.
Had they continued producing routers, it's all but guaranteed that they would be running firmware similar to the HomePod at this point.
The reason they would be building XNU for the bcm2837 however is probably much more "boring", like allowing various teams inside Apple to test some low level change being planned for the kernel, perhaps in the network stack, without the added hassle and potential for leaks that would result from using some other unreleased Apple platform to do it.
I'm still not sure of the history there. I remember one of the selling points of the early OS X was that it was a "Certified UNIX" and I remember that no one I tried to sell one too cared.
Was it just the cost of maintaining the certification? The fact that no other OS went down that route?
This file is from 2016, apparently, so Apple has likely been using this for quite some time. It's possible that Apple found it convenient to run certain things (guesses: some IoT thing or prototyping a small embedded processor like the one inside the Lightning Digital AV Adapter) on a Raspberry Pi rather than a full-blown A-series core or other chip that is inconvenient due to {price, availability, etc.}.
Honest question — why is it horrendous? It's cheap, reasonably capable, can be easily coaxed into doing most of what a person might want, and has enough adoption that advice and code is easy to find. I'm sure you mean horrendous in some more technical sense, but I've found it nothing if not practical. Please teach me.
- I/O is comically limited. Everything talking to the outside world is infamously bottlenecked on USB 2.0. (In comparison, any modern Rockchip or Allwinner SoC has Gigabit Ethernet directly connected to the SoC.)
- The memory subsystem is also a joke. 1 GB of slow LPDDR2 is the limit!?
- The boot process is absurd. A proprietary blob is loaded onto the GPU (!) from the SD card before everything else. An independent FOSS replacement boot stack project was started but not finished.
- And the firmware's support for network booting is very, very unreliable.
- There is a custom interrupt controller instead of the standard ARM GIC. (This was in fact one of the frustrations cited in the post about the open boot stack project's abandonment.)
- CPU crypto extensions (AES+PMULL/SHA1/SHA2) are absent. Other similar (4-core A53) SoCs (A64, RK3328) do have it.
- The GPU does not have memory protection. The VC4 driver does its best to try to validate shaders, but… LOL.
And here we're talking about Apple. They make their own SoCs. If they decided to get into IoT, they'd probably make a development platform based on one of their small chips they use in AirPods or whatever
I highly doubt this is for IoT advances, nor for internal debugging - because they have both already.
The watch, AirPods, all the 40+ processors in an iPhone, the chips in each and every dongle, Apple is way past starting in IoT. AFAIK the vast majority of cores do not run XNU though, which would further make this seem weird.
And for debugging, they just have actual iPhones that simply have the JTAG engine turned on.
I'm having trouble understanding what they could possibly want from any non-Apple SoC at all... unless their intention is really to make XNU on arm64 more open for developers and hackers. But I somehow doubt that.