The NetBSD/macppc website has a supported system page which was due a review. I was finally able to netboot NetBSD on my first gen G5 iMac, this should come in very handy for pkgsrc work. After discussing with macofcons(4) and the OFB_ENABLE_CACHE option have now been removed, on the basis that though they may have worked at one point they cause more problems that has been working on extending support for the G5 based systems and it is now possible to boot NetBSD on both the early PCI-X based systems as well as the PCIe models thanks to his work. To rule out the kernel working on a G5 but console being an issue, I tried experimenting with different frame buffers and found macofcons(4) broke the build ( port-macppc/53004).
![macallay full size usb wired mac keyboard macallay full size usb wired mac keyboard](https://www.getuscart.com/images/thumbs/0763453_macally-full-size-usb-wired-keyboard-for-mac-and-pc-plug-play-wired-computer-keyboard-compatible-app_550.jpeg)
There are kernel configuration files to support Mambo (theoretically) in NetBSD & FreeBSD but unfortunately, I couldn’t find any binaries to try Mambo, along with that I also found the links for the PowerPC 970FX (G5 CPU) documentation all dead and the documentation removed from the IBM site. Mambo was a full PowerPC system simulator, produced by IBM research. I also learnt of an emulator called Mambo. However I learnt lots about the kernel build process, poked at lowcore.S and the boot process. It was a fun weekend albeit no further progress to seeing even a copyright notice on my part. Some further work also took place on the port-macppc mailing list in 2013. Previous GSoC project participants used a repo in the NetBSD-gsoc sourecforge project to share their work, the two G5 related GSoC projects are there in a single repo. The initial work to bring up NetBSD on the G5 was actually done on a PCI-X based system long ago so I was curious what had diverged since then. Up until very recently there was only support for PCIe based G5 PowerMacs using the POWERMAC_G5_11_2 kernel configuration in NetBSD, I am lacking such a system but do have a first gen G5 iMac which is PCI-X based. The next step now is to extend DDB to show the panic message after the backtrace so that the panic message and the tail end of potentially lengthy trace is visible. With this, setting ddb.onpanic sysctl to 2 for backtraces went away as well as setting the DDB_COMMANDONENTER option to run backtrace explicitly in kernel configuration files. Asking on the tech-kern list to enable this option across the board I learnt of the shortfall of this approach and received suggestion on extending ddb, thus the dumpstack option was born and enabled by default. This was because the macppc kernel was built with the option to execute a backtrace command when entering the debugger and the amd64 one wasn’t. I realised that when running into panics on NetBSD/macppc in the past I’d always have a backtrace to include in my bug report. The one frustration with crash was that when the system panicked, the system would drop to DDB (the kernel debugger) but the keyboard would not be functioning. Unfortunately cross compilation from macOS does not work at the moment ( toolchain/53013) which limited my ability to experiment with different NetBSD kernel configuration while I was trying to look into the MacBook issue. GCC 6 has landed in NetBSD-HEAD and work is in progress to bring things into shape as the next revision of GCC shipped in NetBSD. I found this out through leaving the machine bulk building some of my packages, only to return to a machine that’s powered off.
![macallay full size usb wired mac keyboard macallay full size usb wired mac keyboard](https://m.media-amazon.com/images/I/61gY7dtrn-L.jpg)
Running the system without ACPI was not a good idea, turns out the thermal management does not get initialised and the system eventually switches off as a failsafe measure. The wiki article needed some attention as the syntax for commands did not apply but through this process I discovered a crash in gpt where a missing check in the source means that a null pointer is passed to one of the gpt commands.
Macallay full size usb wired mac keyboard install#
I used the MacBook install wiki article as a rough guide on gpt partitioning and got a daily image installed. I was able to get the system to boot using the conventional (non-UEFI) image by opting to boot without SMP & ACPI enabled. Unfortunately the same issue is still present, the system panics very early in the boot process kern/52229 when using the UEFI image and fails when enumerating CPUs present.
![macallay full size usb wired mac keyboard macallay full size usb wired mac keyboard](https://i.ebayimg.com/images/g/uBUAAOSwJalh0SFe/s-l300.jpg)
I’m still running FreeBSD on my 11″ Air and so was keen to see if there had been any progress in NetBSD with regards to supporting the Intel based Macs. First port of call was to see state of NetBSD support since I last visited it. Things basically came together around the event of a late 2009 13″ MacBook entering my life. I wanted to resume writing up notes about what I’d been working on as with the “A week of pkgsrc” series, this actually spans the last few weeks.