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”

The US Air Force Wants Your 3D Scanner Ideas

One key piece of technology from Star Trek is the replicator, a machine that 3D prints up almost anything using some hazily-defined high technology. You have to wonder though, how did the patterns for Earl Grey tea or a spare part for a shuttlecraft intercooler come to exist in the first place. Maybe someone designed them, or perhaps they scanned the real articles. The US Air Force is betting on the latter, and they’ve asked for white papers and proposals for innovative methods to scan objects for 3D printing.

It isn’t surprising military planners would like to have effective 3D printing. After all, you can’t carry every spare part you might need into a theater of operation. Not to mention spares for your friends in joint operations or for enemy gear you might happen to capture. Having a truck that could turn out whatever your troops need is an attractive proposition. Continue reading “The US Air Force Wants Your 3D Scanner Ideas”

Inflatable Hospital Isolation Wards

The continued spread of Covid-19 has resulted in a worldwide shortage of hospital beds. A temporary hospital isolation ward (translated) was co-developed by the Korea Advanced Institute of Science and Technology (KAIST) and the Korea Institute of Radiological and Medical Sciences (KIRAMS) to help alleviate this problem. We’re not familiar with the logistics and expense of installing traditional temporary hospital facilities, but the figures provided for this inflatable building approach to the problem seem impressive. It takes 14 days to produce one module, a process which presumably could be pipelined. Being 70% lighter and smaller than their rigidly-constructed counterparts, they can be more easily stored and shipped where needed, even by air.

Once on-site, it takes one day to inflate and outfit it with utilities such as electricity, water, and communications. One of these modules, which look like really big inflatable Quonset huts, contains an intensive care unit, four negative-pressure rooms, a nursing station, staff area, changing and bathrooms, and storage. All this in a 450 m2 building 30 m long and 15 m wide. That works out to be almost 2-stories tall, which is confirmed by the photo above.

Now that the design is finished and a functional unit constructed, the goal is to put it into production as soon as possible. Of course, physical hospital facilities are not the only thing in short supply these days — doctors, nursing and support staff, medical supplies, not to mention the vaccinations themselves, are all needed. But hopefully the success of this project can contribute to the global effort of saving lives and getting control of the virus sooner rather than later. The video below is in Korean, but the automatic English subtitles aren’t too bad.

Continue reading “Inflatable Hospital Isolation Wards”

Raspberry Pi Enters Microcontroller Game With $4 Pico

Raspberry Pi was synonymous with single-board Linux computers. No longer. The $4 Raspberry Pi Pico board is their attempt to break into the crowded microcontroller module market.

The microcontroller in question, the RP2040, is also Raspberry Pi’s first foray into custom silicon, and it’s got a dual-core Cortex M0+ with luxurious amounts of SRAM and some very interesting custom I/O peripheral hardware that will likely mean that you never have to bit-bang again. But a bare microcontroller is no fun without a dev board, and the Raspberry Pi Pico adds 2 MB of flash, USB connectivity, and nice power management.

As with the Raspberry Pi Linux machines, the emphasis is on getting you up and running quickly, and there is copious documentation: from “Getting Started” type guides for both the C/C++ and MicroPython SDKs with code examples, to serious datasheets for the Pico and the RP2040 itself, to hardware design notes and KiCAD breakout boards, and even the contents of the on-board Boot ROM. The Pico seems designed to make a friendly introduction to microcontrollers using MicroPython, but there’s enough guidance available for you to go as deep down the rabbit hole as you’d like.

Our quick take: the RP2040 is a very well thought-out microcontroller, with myriad nice design touches throughout, enough power to get most jobs done, and an innovative and very hacker-friendly software-defined hardware I/O peripheral. It’s backed by good documentation and many working examples, and at the end of the day it runs a pair of familiar ARM MO+ CPU cores. If this hits the shelves at the proposed $4 price, we can see it becoming the go-to board for many projects that don’t require wireless connectivity.

But you want more detail, right? Read on.

Continue reading “Raspberry Pi Enters Microcontroller Game With $4 Pico”

Pen Plotter Draws Maps Directly On The Wall

For map-lovers like [Christopher Getschmann], poring over a quality map can be as satisfying as reading a good book. Good maps can be hard to come by, though, especially at a scale worth looking at, or worth using as adornment on a dull, lifeless wall. The solution is obvious: build a wall-mount CNC plotter to draw maps directly on the wall.

[Christopher] began his map quest by scraping world map data from a number of sources, including OpenStreetMap, Natural Earth, and GEBCO. This gave him data for coastlines, terrain, and bathymetry — enough for a map of the world large enough to fill a wall. Since the scale of the map would preclude the use of even a large-format inkjet printer, [Christopher] set about building a wall-covering pen-plotter to render the map. The CoreXY-style plotter is large, but still light enough to hang on the wall while it works, and to be repositioned to cover a larger area.

The plotter runs on steppers driven by ultra-quiet Trinamic TMC5160 drivers, so the plotter wouldn’t be a nuisance while it worked. The map was plotted on eight pieces of cardboard mounted directly to the wall, filling the 2- x 3-meter space almost entirely. Landmasses and elevation contours were plotted as continuous lines in black ink, while bathymetric data was rendered in blue ink as cross-hatching with variable spacing, to make deeper oceans darker blue.

We find [Christopher]’s map breathtaking, all the more so considering the work that went into making it. It would be interesting to find alternate uses for the plotter, which reminds us a little of a cross between a draw-bot and a Maslow vertical CNC router, now that it’s done with its cartographic duties.

Empty Parking Lot

Pandemic Chip Shortages Are Shutting Down Automotive Production

Once upon a time, the automobile was a mostly mechanical beast, but no longer. Advanced electronics have weaved their way into the modern car, from engine to infotainment and climate control to the buttons now sprinkled throughout the passenger cabin. The gains in amenity and efficiency can’t be sniffed at, but it leaves manufacturers reliant on semiconductor suppliers to get cars out the door. Over the past year, it’s become much more complicated — with many automakers having to slow production in the face of integrated circuit shortages that can be traced back to Spring of 2020. Continue reading “Pandemic Chip Shortages Are Shutting Down Automotive Production”