Live data from Hacker News

Linus Torvalds on the new MacBook Air

realworldtech.com

51–60 of 128 posts

Re: Linus Torvalds on the new MacBook Air

#51
post #17
post #2

So it seems that what could be problematic is not getting it to boot but rather how to get proper graphics support. How difficult would it be to reverse engineer the GPU?

Do we even know how to access the GPU? On x86-based systems there would be a standard bus (PCI/AGP/PCIe) to enumerate the the graphics device, but my impression is ARM doesn't have such things. A lot of the recent improvement in graphics on Linux has come from manufacturers deciding to become cooperative rather than there being more people reverse-engineering graphics drivers. (Broadcom is contributing support for th…

ARM does, in fact, use standard buses, PCIe on most high/medium end parts -- although, some low end chips just use a built-in USB controller or SPI/I2C for all peripherals.

What isn't always available is a way to dynamically enumerate a device's, uh, device tree. On PCs, this is usually accomplished through ACPI tables, where the bootloader (BIOS or UEFI) populates a table of data and callbacks to AML bytecode functions which the OS kernel can read and eval. [0]

So on x86, the OS finds the PCIe memory mapped addressed in the MCFG table.

On most ARM devices, this data has to be passed to the kernel at runtime, in what Linux calls a "device tree reference", compiled to a "DTB" file.

So, on a UEFI-based ARM system, it should be possible to just insert, say, an AMD graphics card onto the PCIe bus and get a working GPU.

[0] https://www.kernel.org/doc/html/latest/arm64/acpi_object_usa...

Re: Linus Torvalds on the new MacBook Air

#52

I'm really not holding out much hope that Linux will natively run on these M1s, even if we get it to boot there's all the driver issues for the integrated GPU, audio, wifi etc. I'd imagine there is a lot of power management stuff on there too.

The bootloader and drivers aren't the only problems holding Linux back from being ported to these SoCs, it's that Apple's ARM SoCs have the same challenges all ARM SoCs have when it comes to Linux ports.

ARM servers are similar to x86 machines in that they use UEFI and have enumerable buses for hardware discovery.

ARM SoCs use custom bootloaders, and lack enumerable buses. Hardware configurations are almost always unique between ARM SoCs, and each of those configurations need their own Linux port.

Here's an idea of just some of the work that is required to port Linux to each individual ARM SoC[1].

[1] https://elinux.org/images/a/ad/Arm-soc-checklist.pdf

Re: Linus Torvalds on the new MacBook Air

#53

Honestly, I don't think anyone is holding their breath for the day that corporations like Apple and Microsoft give the world the Linux that they deserve. Imagine if these power brokers didn't exist and a whole generation of children grew up on Linux rather than Mac/PC. Huge opportunity cost for society in my opinion.

I was discussing this with someone yesterday. A materials engineering PhD candidate, who took an engineering coding class during undergrad, but found everything so complicated that she never looked back and actually learned how to write a script. She's not alone, and it's frustrating to see the number of otherwise highly-educated people who seem handicapped in certain tasks because corporate vendors like Microsoft, Mathworks, and (maybe to a lesser degree) Apple create a situation where they're unaware that there's a free, native paradigm where writing a little bit of code isn't a pain in the butt.

I myself didn't really consider how I could use code to speed up mundane tasks until I was forced to copy files over from an embedded Linux system over bash. The introduction from "open up a terminal, and type these commands in, which does these things" to "now just put those commands in a file called script.sh and type ./script.sh, and it will do the thing automatically" was eye-opening, at 22 years old. Looking back, it's the exact same problem that resulted in a company I used to work for doing 100s of GB of data processing in Excel, because writing Excel macros was more accessible than writing a bash script to append two .csv files.

I think a lot of kids would probably really be attracted to it as well. Linux gives you control over your computing environment, in a world where children rarely have any autonomy. I don't think every one of them needs to grow up to be a professional developer, but computer literacy seems like a hugely valuable skill.

Re: Linus Torvalds on the new MacBook Air

#54
post #32

Honestly, I don't think anyone is holding their breath for the day that corporations like Apple and Microsoft give the world the Linux that they deserve. Imagine if these power brokers didn't exist and a whole generation of children grew up on Linux rather than Mac/PC. Huge opportunity cost for society in my opinion.

> Honestly, I don't think anyone is holding their breath for the day that corporations like Apple and Microsoft give the world the Linux that they deserve. I don’t understand this comment. What are you expecting Apple, Microsoft to do? They’re not charities, they make competing OS’s for profit. Why would anyone be waiting for them to bring Linux?

I am referring to the ability for consumers who purchase a hardware product with these Corporation's operating system installed to be able to dual boot, or replace the OS with a Linux distribution.

I believe this is both in line with free-market enterprise as well as core values such as individual liberty and property ownership. Anti-competitive and predatory practices should not be justified by people such as yourself under the guise of "competing for profit".

Re: Linus Torvalds on the new MacBook Air

#55
post #3

One thing I recall is Linus is really big on "absolutely no noise whatsoever". The passively cooled but still reasonably powerful Air seems like ideal hardware for his tastes, at least for a laptop.

Yeah, somehow I am surprised with his cooled down take on this. With the exceptionally good ARM hardware coming in from Apple, I can't see mainstream future for other laptops which will allow OS freedom. As time goes on, Apple should be able to significantly reduce the price of entry level Macbooks. Look at iPad pricing, entry level laptops just for iPad level work on a laptop form factor don't have to cost a lot. I…

What incentive would Apple have to do that? For the most part their products have only gone up in price (as with the yearly iPhone releases). I'd expect exactly the opposite instead (e.g. thinner-bezel macbooks with face ID). A cheaper ARM Macbook would cannibalise their iPad sales.

Laptops with OS freedom have always been a more niche thing, same as dual booting on a desktop machine. Short of selling laptops with no OS at all, most people are going to stick with the default install.

Re: Linus Torvalds on the new MacBook Air

#56
post #40

Earlier quoted context omitted.

Bootcamp only really worked because Apple did the work. I'm sure they could do the same for Linux, but it would be harder because there's less commoditized hardware and possibly less demand because fewer people run Linux on their laptops than Windows.

There's also just less reason to run Linux for most consumers. Bootcamp was valuable because there's a lot of legacy, proprietary software and drivers that some people must use, which bootcamp gives them access to on the same device. On the other hand, notable software on Linux are all FOSS. If there was sufficient demand there's nothing stopping someone from making a MacOS compatible release. And indeed, most FOSS d…

> If there was sufficient demand there's nothing stopping someone from making a MacOS compatible release

That assumes that it's something that can reasonably be ported. Granted, that does cover most software, but there are exceptions that for whatever reason are difficult to port. Docker is the poster child for this since it uses Linux kernel primitives; the way it runs "on" Darwin is to run Linux in a VM.

Re: Linus Torvalds on the new MacBook Air

#58
post #55

Earlier quoted context omitted.

Yeah, somehow I am surprised with his cooled down take on this. With the exceptionally good ARM hardware coming in from Apple, I can't see mainstream future for other laptops which will allow OS freedom. As time goes on, Apple should be able to significantly reduce the price of entry level Macbooks. Look at iPad pricing, entry level laptops just for iPad level work on a laptop form factor don't have to cost a lot. I…

What incentive would Apple have to do that? For the most part their products have only gone up in price (as with the yearly iPhone releases). I'd expect exactly the opposite instead (e.g. thinner-bezel macbooks with face ID). A cheaper ARM Macbook would cannibalise their iPad sales. Laptops with OS freedom have always been a more niche thing, same as dual booting on a desktop machine. Short of selling laptops with no…

> A cheaper ARM Macbook would cannibalise their iPad sales.

I was thinking of it more like. Here's your PC in tablet form for iPad, here's your PC in laptop form for a entry level Macbook. They can keep the internals same for both. Most users are fine with web browser, mail client, photo editor etc. which an iPad internal laptop should very well run.

> Laptops with OS freedom have always been a more niche thing, same as dual booting on a desktop machine. Short of selling laptops with no OS at all, most people are going to stick with the default install.

True, but everything being x86 or x86_64 allowed us to run other OSs and that community kept the threat of a different OS alive for other users. If no one can run other software on these laptops, that fear will go away completely.

Re: Linus Torvalds on the new MacBook Air

#60
post #43

Earlier quoted context omitted.

They don't need to do much - just document things, and make it possible to disable secure boot.

Apple does allow you to disable secure boot, yes even on the M1 Macs, and that's not even Microsoft's job.

> and that's not even Microsoft's job.

Since they're the ones who required NT-on-ARM device vendors to disable user control of secure boot, yes it is their job.

Post reply on HN