Porting Firefox To Apple Silicon: Tales From The Trenches

For any smaller and larger software product that aims to be compatible with Apple’s MacOS, the recent introduction of its ARM-based Apple Silicon processors and MacBooks to go with them came as a bit of a shock. Suddenly one of the major desktop platforms was going to shift processor architectures, and with it likely abandon and change a number of APIs. Over at Mozilla HQ, they assumed that based on past experiences, Apple’s announcement of ‘first Apple Silicon hardware’ would also mean that those systems would be available for sale.

Indeed, one week after the November 10th announcement Apple did in fact do so. By then, Mozilla had worked to ensure that the Firefox codebase could be built for Apple Silicon-based MacOS. Fortunately, through the experiences of running Firefox on Windows-on-ARM, they already had gained a codebase that was compatible with 64-bit ARM. Ultimately, the biggest snag here was the immature Rust language and dependency support for Apple Silicon, which set back the first release.

When it came to the distributing of Firefox on Intel- and ARM-based Macs, the decision was made to package both versions of the application into a so-called Universal Binary. While this pads out the size of the installer, it also means easier distribution and would not affect the built-in updater in Firefox. This also allowed for an easy fix for the Google Widevine DRM module, for which no Apple Silicon version was available at first, allowing the same module for Intel to be used with either Firefox version via the Rosetta 2 binary translator in MacOS (as we covered previously).

After this it was more or less smooth sailing, with some Rosetta 2-based glitches and MacOS Big Sur-related bugs that spoiled some of the fun. What this experience shows is that porting even a big codebase like Firefox to Apple’s new platform is fairly straightforward, with lack of support from toolchains and other dependencies the most likely things that may trip one up.

The Rosetta 2 feature, while helpful, also comes with its share of gotchas as the Firefox developers found out, and of course there is a lot more optimization that can (and should) be done for such a new platform.

This Week In Security: OpenWRT, Favicons, And Steganographia

OpenWRT is one of my absolute favorite projects, but it’s had a rough week. First off, the official OpenWRT forums is carrying a notice that one of the administrator accounts was accessed, and the userlist was downloaded by an unknown malicious actor. That list is known to include email addresses and usernames. It does not appear that password hashes were exposed, but just to be sure, a password expiration has been triggered for all users.

OpenWRT Security Notice

The second OpenWRT problem is a set of recently discovered vulnerabilities in Dnsmasq, a package installed by default in OpenWRT images. Of those vulnerabilities, four are buffer overflows, and three are weaknesses in how DNS responses are checked — potentially allowing cache poisoning. These seven vulnerabilities are collectively known as DNSpooq (Whitepaper PDF). Continue reading “This Week In Security: OpenWRT, Favicons, And Steganographia”

AMD’s Threadripper Is The Beating, Heating Heart Of “Most Powerful” DIY Laptop

There are plenty of powerful, “desktop-replacement” laptops out on the market if you’ve got the money to spend. Sometimes, though, that just doesn’t scratch that crazy itch in the back of your head for true, unbridled computing power. When you’ve got an insatiable thirst for FLOPS, you’ve got to strike out on your own, as [Jeff] did with this Threadripper laptop.

The aim was to pack an AMD Threadripper processor into a nominally portable laptop format. For this build, the AMD 1950X was chosen for its affordability and huge computing power, as well as a TDP of 180W. This high heat output has stopped the chips ending up in portable builds until now, but [Jeff] didn’t see this as a problem, but a challenge.

What results is a wild, lashed together build of high-power parts into what could charitably be called a laptop – though we’d recommend against putting it on your lap. With a 4K 18″ screen, keyboard, touchpad, and many Dell Powerbanks kludged together into an HP Media Center case, it fits the usual form factor, albeit with more exposed heatpipes and cables than the typical consumer may be used to.

[Jeff] claims this is the current most powerful laptop in the world, as builds that use the 3950X throttle it back in their applications. We don’t have the data to compare, but we certainly wouldn’t be stacking our own portable rig up against it in a fight. DIY laptops have a long history at Hackaday, going all the way back to 2007. If you’ve got your own wild build, be sure to drop us a line. Video after the break.

Continue reading “AMD’s Threadripper Is The Beating, Heating Heart Of “Most Powerful” DIY Laptop”

Fixing NRF24L01+ Modules Without Going (Too) Insane

Good old nRF24L01+ wireless modules are inexpensive and effective. Well, they are as long as they work correctly, anyway. The devices themselves are mature and well-understood, but that doesn’t mean bad batches from suppliers can’t cause hair-pulling problems straight from the factory.

[nekromant] recently got a whole batch of units that simply refused to perform as they should, but not because they were counterfeits. The problem was that the antenna and PCB design had been “optimized” by the supplier to the point where the devices simply couldn’t work properly. Fortunately, [nekromant] leveraged an understanding of the problem into a way to fix them without going insane in the process. The test setup is shown in the image above, and the process is explained below. Continue reading “Fixing NRF24L01+ Modules Without Going (Too) Insane”