I recently tried setting up a netbsd box for fun on an amd64 laptop. There have been/still are several issues I encountered, some of which I've implemented hacky workarounds for.
For the installer:
- sysinst with 9.0 simply wouldn't install, it would abort trap no matter what I did after partitioning (either at partitioning when doing anything but the default full-disk, or at install).
- sysinst with 9.99.71 worked, but only with the default full-disk partitioning, no changes to any filesystem or layouts. This also required wiping the first many bytes off the drive (I took 2048mb, because 1mb and 10mb didn't work).
- if there's an lvm on the drive, prior to install, it has to be destroyed (
gpt destroy wd0
for example, using the utility console), or else sysinst gets lethally confused.
I guess a manual install ought to work far better here...
Next, pkgsrc cannot install anything by default. I have gcc 7.3.0 from the comp set, but it's looking for libstdc++.so.6, which doesn't exist. Comp gives libstdc++.so.9 instead. For pkgsrc, changing mk.conf to require a more recent gcc, and installing said gcc, works. For other tasks (such as build.sh), this doesn't work. I copied libstdc++.so.9 into libstdc++.so.6 as a workaround. This may be addressed by doing a manual install instead of going through sysinst as well, I am assuming. This will probably be my favored workflow from now on.
Battery is currently detected but battery state (powered/discharging) does not seem to be detected (at least I see no messages in /var/log/messages and mate-desktop doesn't see the change). Would enabling acpi power monitor in the kernel help?
Touchpad options are a bit limited but otherwise work well. I couldn't find how to disable pointer acceleration, though, and I have to reset the scale/maxspeed at every boot for now. Probably missing what config file to use here? Or just .xinitrc or such?
Trying to get emul-linux working, I found that the suse13 packages are quite old and the handful of packages I tried did not seem to like it (my "goal test case" is to get portable palemoon working: it's a relatively complex program but doesn't necessarily require the likes of gtk3, pulseaudio, and such, so hopefully it could have worked with the suse13-based core). Palemoon just segfaults (it's a non-PIE linux x86_64 executable and COMPAT_LINUX and EXEC_ELF64 are active in the running kernel), and trying to run linux-ldd on it also causes linux-ldd to segfault (code 139).
I am currently trying to substitute it with a gentoo stage3 tarball, I pull the extra packages I need from the cloveros BINHOST. I setup the emul filesystems in fstab as instructed, but I'm missing something if I want to chroot into the emul root to have an easier time installing dependencies. I haven't investigated further here, although trying to execute binaries from this gentoo-like system fails due to a missing interpreter (e.g. when trying to execute ldd). Probably path-related? I'm half-aware that what I'm doing is crazy,. If someone has a saner solution, I'd like to hear about it. In any case, this should still more or less be in line with https://man.netbsd.org/compat_linux.8 although I'm going with the whole stage3 because of versioned dependency incompatibilities avalanching through the whole stack.
UPDATE: As expected, this did not help. Both the cloveros binary for palemoon and the upstream binary were tried, both segfaulted on launch. gdb
is of no help here because it's not able to work with linux ABI binaries.
The cpu on the device is a kabylake, whose gpu seems to work out of the box. However, it does complain about not being able to find the i915 firmware (kbl_guc_ver9_16.bin
and kbl_dec_ver1.bin
are both mentioned). Said firmware doesn't actually appear to be available. Can I steal this from linux and put it somewhere? (If so: where? messages tells me this is an internal firmware so it has to be put in the initramfs or in-kernel, but I find no instructions to do either in the manual).
The device also features a touchscreen. It seems this is actually detected by netbsd on boot, however:
uts0: autoconfiguration error: touchscreen has no range support
And it fails to work.
Other than that, I'm surprised about how the rest of the system seems to be working for now. I'm not getting audio jack detection on linux, yet on netbsd it works out of the box. Wifi also worked straight away, and so on.