what’s this? :)
Another weird LLVM mystery solved!
So, I was porting LDC to FreeBSD/aarch64, wondering why global constructors (you know, the before-
main() code you can make in C using an
__attribute__ thingy) aren’t running… but only when the executable is linked with LLD. Turns out:
.init_arrayis the only supported way to do constructors on AArch64
- and everything in general is moving towards
.init_array— but the default in LLVM is still to emit
- clang has code to enable
.init_arraywhen appropriate, ldc did not
- and the reason it all worked fine with bfd and gold is that these linkers SILENTLY convert
.init_array. For PERFORMANCE REASONS.
It’s almost 2019, so using a SATA SSD as the boot drive for your main development OS is not cool anymore… and I was running out of space on this 128gb one, so I bought an NVMe drive to replace it. Yay.
Because I don’t have anything with two or more M.2 slots and I was too lazy to find/make a bootable FreeBSD USB drive, moving the system involved inserting the new drive into another machine (server) and using ZFS replication to copy the data. (And forgetting to set
bootfs on the pool, of course.)
But the fun part was that my 10G network card stopped working. Moving the card into the middle slot (from the bottom one) fixed it. Reported a FreeBSD bug.
The weirdest discovery of the day though was that MSI mainboards persist the “above 4G” PCIe setting across CMOS clears. What in the actual heck. This is the setting that breaks display output on most GPUs (funnily enough, mine did display non-EFI things such as the network card’s boot prompt and the glitchy way FreeBSD displays the console when booting on UEFI with the EFI framebuffer disabled). It’s a setting you very much need to clear.
Finally got around to actually trying out ZeroTier. It’s pretty awesome!
Okay, it has a couple downsides:
- it’s not automatically a mesh network, you have to designate a node as a “moon” to make it pass traffic between other nodes (that couldn’t punch holes through NAT)
- the Android client is not open source and doesn’t have UI to tell it to orbit a moon
But other than that… the simplicity is lovely. No screwing around with config files, restarts and whatnot. Just a very small & easy set of admin commands. And automatic IP address assignment (especially 6PLANE) is amazing.
Raptor has revealed pricing for their POWER9 “cloud” VPS. Almost AWS levels of complicated pricing. And it’s expensive. Starting with 10$ per month for just 1 core and 256mb (!) RAM…
An SPI flash chip module arrived in the mail today. I ordered that for replicating this basically. To (network) boot the Orange Pi PC without microSD.
Naturally, instead of booting Linux to flash or (?) trying flash from U-Boot itself, time was spent on making flashrom work on FreeBSD :)
Scaleway’s ARM64 VPS has been successfully depenguinated! :) Now you can run FreeBSD on four ThunderX cores, 2GB RAM and 50GB SSD for 3€/month. Awesome!
Also, in the process, I finally discovered the cause of GPT partitions sometimes disappearing on reboot. It was the size of the partition table. It’s 128 by default, but sometimes it’s not — e.g. on the FreeBSD installer memstick image, it’s 2. Creating a third partition with
gpart “succeeded”, but the partition disappeared on reboot.
Building a reader on your website is not too hard when you already have webmention processing (so you have code to parse entries and whatnot). So I kinda have one now. There’s even some Microsub support, but that’s not complete yet.
There’s a funny bug in my feed fetching though: OAuth for the open web is always on top of the feed (its published date gets set to feed fetch time every time) :D
For 0.5 dollars per hour (or currently 0.1/hr if you reserve for 24h?) on packet.net you can get access to a dedicated dual-socket Cavium ThunderX server with 128GB RAM and a 250GB SSD. I took it for a few hours and now lang/crystal, lang/mono and some other ports work on aarch64.
Ironically, these two builds have involved long single-threaded compile processes. In the mono case, parallelism had to be disabled for C# compilation to work around a concurrency bug.
At least building things like WebKitGTK+ (to test a one line patch) and Krita felt awesome :D