Porting Firefox to Apple Silicon

The release of Apple Silicon-based Macs at the end of last year generated a flurry of news coverage and some surprises at the machine’s performance. This post details some background information on the experience of porting Firefox to run natively on these CPUs.

We’ll start with some background on the Mac transition and give an overview of Firefox internals that needed to know about the new architecture, before moving on to the concept of Universal Binaries.

We’ll then explain how DRM/EME works on the new platform, talk about our experience with macOS Big Sur, and discuss various updater problems we had to deal with. We’ll conclude with the release and an overview of various other improvements that are in the pipeline.

These kinds of articles are very valuable, since Apple isn’t always forthcoming with documentation of specifications, and the new M1-based Macs are no exception. Big, massive projects like Firefox sharing their experiences can be quite useful to other developers.

A visit from the Zune squad

It was weird to own a Zune in 2005. It is even weirder to own a Zune in 2021 — let alone 16 of them. And yet, 27-year-old Conner Woods proudly shows off his lineup on a kitchen table. They come in all different colors, shapes, and sizes, and each can be identified by that telltale black plastic D-pad just below the screen. He owns the entire scope of the brief Zune lineup — from the svelte Zune 4 to the chunky Zune HD — and among the microscopic community of people who still adore Microsoft’s much-derided MP3 player, no collection of dead tech could possibly be more enviable.

[…]

But today, almost a decade after Microsoft terminated the brand, there is a small bastion of diehards who are still loving and listening to their Zunes. If you talk to them, they’ll tell you that these MP3 players are the best pieces of hardware to ever run a Windows operating system. Preserving the Zune legacy has just become another part of the hobby.

I’ve never once seen a Zune in real life.

Apple knew a supplier was using child labor but took 3 years to fully cut ties

Apple is back under the spotlight over labor conditions in its supply chain following an explosive report from The Information on Thursday that revealed new details about the company’s reluctance to cut ties with suppliers who violate its ethics policies.

According to the report, Apple learned in 2013 that Suyin Electronics, a China-based company that (at the time) made parts for its MacBooks, was employing underage workers, and despite telling Suyin to address the issue or risk losing business, Apple discovered additional workers as young as 14 years old during an audit just three months later.

But rather than immediately cutting ties with Suyin for violating its supply chain ethics policies — which prohibit child labor and which Apple claims are the “highest standards” — Apple continued to rely on the company for more than three years, according to The Information.

Any company – and their executives – knowingly and willingly using child labour, slave labour, or forced labour anywhere in the world should be tried as if they are committing these heinous acts in their home countries. The body of evidence that Apple is fully aware of its extensive use of child labour and forced labour in e.g. China’s Uighur concentration camps is extensive, and the fact Tim Cook can get away with this without ever having to face the consequences is disgusting. Tim Cook’s fellow Americans get life sentences for less.

Of course, Apple is far from the only company guilty of this – just look at Nestle or Nike, for instance – but being the largest company in the world with the biggest, most arrogant mouth about how “ethical” they are should be the first to end up in court.

FreeBSD quarterly status report for Q4 2020

This quarter had quite a lot of work done, including but certainly not limited to, in areas relating to everything from multiple architectures such as x86, aarch64, riscv, and ppc64 for both base and ports, over kernel changes such as vectored aio, routing lookups and multipathing, an alternative random(4) implementation, zstd integration for kernel dumps, log compression, zfs and preparations for pkg(8), along with wifi changes, changes to the toolchain like the new elfctl utility, and all the way to big changes like the git migration and moving the documentation from DocBook to Hugo/AsciiDoctor, as well as many other things too numerous to mention in an introduction.

The best way to keep up with FreeBSD development from an outsider’s perspective. FreeBSD is on my radar for the UltraSPARC server-as-a-workstation project – a reader has donated a SunFire V245 that’s currently in shipping to me – so I’m trying to be a bit more in tune than I usually am with the world of FreeBSD.

Exploring swap on FreeBSD

On modern Unix-like systems such as FreeBSD, “swapping” refers to the activity of paging out the contents of memory to a disk and then paging it back in on demand. The page-out activity occurs in response to a lack of free memory in the system: the kernel tries to identify pages of memory that probably will not be accessed in the near future, and copies their contents to a disk for safekeeping until they are needed again. When an application attempts to access memory that has been swapped out, it blocks while the kernel fetches that saved memory from the swap disk, and then resumes execution as if nothing had happened.

[…]

In 2021, cheap SSDs have become commonplace and have performance characteristics much better suited to swapping, so it seems worthwhile to revisit how swapping works in FreeBSD, and try to provide some insight into frequently raised issues.

Some light reading for the weekend.

Genode’s roadmap for 2021

Herein, we lay out our plans for evolving Genode. Progress in addition to this planning will very much depend on the degree of community support the project will receive. The Challenges page collects some of our ideas to advance Genode in various further directions.

The road map is not fixed. If there is commercial interest of pushing the Genode technology to a certain direction, we are willing to revisit our plans.

This is a very detailed roadmap, but as clearly mentioned in the opening paragraphs, this is not set in stone, and things may change. Most of the planned focus seems to be on vastly improving support for ARM, for instance by working on bringing Genode to the PinePhone. They also want to streamline and improve the process for porting Linux device drivers to Genode, which should help in increasing hardware support.

WhatsApp delays privacy changes following backlash

The WhatsApp messaging service announced on Friday that it would delay changes to new business features after people around the world criticized the new policy.

The Facebook-owned company said it is “going to do a lot more to clear up misinformation around how privacy and security works on WhatsApp.”

Privacy rights activists heavily criticized the WhatsApp changes, saying it was the latest step showing Facebook’s poor handling of user data.

The real issue was a far larger than expected exodus of users to services like Signal and Telegram. I doubt Facebook will actually make any meaningful changes – instead, we’ll see a different tone or wording.

Windows 10X is now Microsoft’s true answer to Chrome OS

After years of waiting, it looks like Microsoft now has a true answer to Chrome OS. A new and near-final version of Windows 10X has leaked, and it offers a first look at the changes Microsoft has made to the upcoming operating system to get it ready for laptops. Windows 10X first started off life as a variant of Windows 10 designed for dual-screen devices. It was supposed to launch alongside Microsoft’s Surface Neo, a tablet-like device with two separate nine-inch displays that fold out to a full 13-inch workspace.

Microsoft revealed last year that Windows 10X is now being reworked for “single-screen” devices like laptops, and Surface Neo has been delayed. While the company has spent years differentiating Windows 10X for foldable and dual-screen hardware, it now looks and feels more like Chrome OS than ever before.

This is literally Chrome OS. It looks, feels, and tastes like Chrome OS – and of course, that’s the point. It also points to what we can expect from regular Windows over the coming years.

A week with Plan 9

I spent the first week of 2021 learning an OS called Plan 9 from Bell Labs. This is a fringe operating system, long abandoned by its original authors. It’s also responsible for a great deal of inspiration elsewhere. If you’ve used the Go language, /proc, UTF-8 or Docker, you’ve used Plan 9-designed features. This issue dives into operating system internals and some moderately hard computer science topics.

Sounds like an excellent article for us!

Wine 6.0 released

Among the many highlights for Wine 6.0 are core modules now being implemented in Portable Executable (PE) format, the initial (experimental) Vulkan back-end for WineD3D as an alternative to OpenGL, DirectShow and Media Foundation support, and a redesign of their text console implementation.

Wine is such an integral part of my computing life now, due to Proton and Valve.

Theseus: experimental OS written from scratch in Rust

Theseus is a new OS written from scratch in Rust to experiment with novel OS structure, better state management, and how to shift OS responsibilities like resource management into the compiler.

We are continually working to improve the OS, including its fault recovery abilities for higher system availability without redundancy, as well as easier and more arbitrary live evolution and runtime flexbility. Though still an incomplete prototype, we envision that Theseus will be useful for high-end embedded systems or edge datacenter environments. See our published papers for more information about Theseus’s design principles and implementation philosophy, as well as our goal to avoid the phenomenon of state spill or mitigate its effects as much as possible. Also, see Theseus’s documentation for more.

Definitely an experimental operating system, and it joins the many other Rust-based operating systems projects out there.

WRT54G history: the router that accidentally went open source

In a world where our routers look more and more like upside-down spiders than things you would like to have in your living room, there are only a handful of routers that may be considered “famous.” Steve Jobs’ efforts to sell AirPort—most famously by using a hula hoop during a product demo—definitely deserve notice in this category, and the mesh routers made by the Amazon-owned Eero probably fit in this category as well. But a certain Linksys router, despite being nearly 20 years old at this point, takes the cake—and it’s all because of a feature that initially went undocumented that proved extremely popular with a specific user base. Today’s Tedium talks about the blue-and-black icon of wireless access, the Linksys WRT54G. This is the wireless router that showed the world what a wireless router could do.

I’ve often pondered tinkering with this, but I’m terrible with anything related to networking – it seems like it’s a weird world of technology that exists on its own separate plane, disconnected from everything else. Networking is obtuse, and as long as our home network is functioning, I’m not touching it.

BeagleV is a RISC-V single board PC for $150 or less

The new BeagleV is a little different. It’s a small single-board PC with a RISC-V processor and support for several different GNU/Linux distributions as well as freeRTOS.

With prices ranging from $120 to $150, the BeagleV is pricier than a Raspberry Pi computer, but it’s one of the most affordable and versatile options to feature a RISC-V processor. The makers of the BeagleV plan to begin shipping the first boards in April and you can sign up to apply for a chance to buy one of the first at the BeagleV website.

It’s a good sign that RISC-V hardware is getting more accessible – a truly open source ISA is something we need to compete with the proprietary mess that is ARM.

Mesa 21.0 is now working with Haiku for software OpenGL rendering

A number of patches worked on for Haiku OS back for Mesa 20.x were freshened up and with some extra tweaking and code cleaning those patches have now been merged for Mesa 21.0. This includes factoring out a lot of the OpenGL legacy dispatch code and a lot of cleanups around the Softpipe driver handling.

With Mesa 21.0-devel as of today, it’s at least enough where Mesa Git can now be built on Haiku OS and yield working OpenGL rendering with the LLVMpipe software.

Neat, and a testament to Haiku being in a far better state than many people seem to think.

The confusing world of USB

For decades, my perception of USB was that of a technology both simple and reliable. You plug it and it works. The two first iterations freed PCs from a badly fragmented connector world made of RJ-45 (Ethernet), DA-15 (Joystick), DE-9 (Serial), DIN (PS/2), and DB-25 (Parallel).

When USB-3.0 came out, USB-IF had the good idea to color code its ports. All you had to do was to “check for blue” in the chain to get your 5 Gbit/s. Even better, around the same time were introduced type-C connectors. Not only the world was a faster place, now we could plug things with one try instead of three.

Up to that point in time, it was a good tech stack. Yet in 2013 things started to become confusing.

USB and ThunderBolt have become incredibly complex, and it feels like a lot of this could’ve been avoided with a more sensible naming scheme and clearer, stricter specifications and labeling for cables.

Steam’s login method is kinda interesting

How do you send a password over the internet? You acquire a SSL certificate and let TLS do the job of securely transporting the password from client to server. Of course it’s not as cut-and-dry as I’m making it out to be, but the gist of it holds true and stood the test of time. This hasn’t always been this way though, and one incredibly popular storefront on the world wide web prefers to add a little extra to this day. I’ll be discussing Steam’s unique method of logging in their users, and go down a deep rabbit hole of fascinating implementation details.

Not exactly my cup of tea, but if there’s one thing I’ve learned over the years here at OSNews, it’s that the most obscure stuff can generate a lot of interest. So, here you go.

Apple’s privacy labels reveals Whatsapp and Facebook Messenger’s hunger for user data

When Apple unveiled major privacy upgrades at the WWDC 2020 for its iOS14, a battle royale broke out between the tech giant and Facebook. The social media giant claimed user data was critical to its ability to serve relevant ads and that Apple’s policies would stymie small business. 

As the world now grapples with Facebook’s privacy changes that require users to compulsorily share their Whatsapp data with the social media platform, Apple’s privacy labels update all but confirms what we always knew. That, data collected by Whatsapp and Facebook Messenger is far in excess of what its competitors do.

Apple’s privacy labels are a great idea, and despite Google being a data-hungry company, I wouldn’t be surprised if they make their way to Android soon, too. I love how they make the contrast between various applications to incredible stark and clear.

Good move by Apple.

NVIDIA prepares XWayland OpenGL/Vulkan acceleration support

NVIDIA’s Wayland support is finally coming together albeit long overdue with DMA-BUF passing support and now patches pending against XWayland for supporting OpenGL and Vulkan hardware acceleration with their proprietary driver.

Pending patches to the X.Org Server’s XWayland code paired with a yet-to-be-released proprietary driver update finally allow for hardware accelerated rendering with XWayland.

NVIDIA is really holding Wayland back, so it’s good to see progress on this front.

WhatsApp gives users an ultimatum: share data with Facebook or stop using the app

WhatsApp, the Facebook-owned messenger that claims to have privacy coded into its DNA, is giving its 2 billion plus users an ultimatum: agree to share their personal data with the social network or delete their accounts.

The requirement is being delivered through an in-app alert directing users to agree to sweeping changes in the WhatsApp terms of service. Those who don’t accept the revamped privacy policy by February 8 will no longer be able to use the app.

I pretty much have no choice but to accept. Everybody uses WhatsApp – it’s so entrenched in dutch society the app itself has become a verb. Opting out means making it a lot more difficult to talk with my friends, which is already difficult enough considering I live in Sweden now.

I’ve said it before and I’ll say it again: crucial communication protocols – of which WhatsApp is one in many countries – must be open and free to be implemented by anyone. It’s pure insanity to me that important lines of communication are left to faceless corporations on the other side of the world.