News for hackers. Stuff that matters.
Re:My Business Card Runs Linux by neurostimulant on Tuesday December 24, 2019 @08:22AM (#21871834)
To me it's truly mind-bogging that a tiny $1.42 chip contains almost everything needed to boot Linux: a 500mhz cpu, 32MB SDRAM, 2D GPU, SD/MMC support, and USB controller, all packaged inside a 10mm x 10mm chip? It makes me really want to get into embedded development.
Re:My Business Card Runs Linux by nabla9 on Tuesday December 24, 2019 @11:57AM (#21873286)
Calling this embedded system feels like insult to the spirit of 'running light without overbyte', because it's so comically capable.

My first PC had 66/33 MHz 80486 processor and 8 MB ram, 320 MB HDD. You could run AutoCAD, play Doom, Civilization, have dual boot for Linux, Windows 3.11 etc. It could compile Linux from source.

Re:My Business Card Runs Linux by jbuzbee on Tuesday December 24, 2019 @01:08PM (#21873792)
You were living large! My first Linux computer was a 20Mhz 80386SX with a 40MB hard drive partitioned half for Windows 3.0 and half for Linux (SLS) and swap. It had a whopping 4MB of RAM and I also compiled my own kernel making sure to trim down features as much as possible. It was magic seeing X11 come up for the first time just like the big-bucks Sun boxes!
Re:My Business Card Runs Linux by GordonS on Tuesday December 24, 2019 @02:20PM (#21874279)
Hah, you had it great! My first PC was a 286, which IIRC either had no HDD, OR. 20MB HDD (might be mixing it with our next PC, which was a 386).

I'm pushing 40, and still shake my head in wonder sometimes about just how much is possible at such small scale and cost.

But this is now turning into "when I were a lad..." :)

Re:My Business Card Runs Linux by serf on Tuesday December 24, 2019 @04:40PM (#21875080)
Oh, you kids!

My XT had an 8088 @ ~4mhz in it, and we pushed it uphill to school both ways, in the snow!

It was multi-functional though. The power supply was inefficient enough to heat the room, while simultaneously being heavy enough to bludgeon large creatures for sustenance.

Something inside me misses the radiant heat, sitting here on a cold day with my chilly metallic laptop.

Re:My Business Card Runs Linux by hirundo on Tuesday December 24, 2019 @05:32PM (#21875387)
My Heathkit H89 had a Z80, 16K of RAM and a built in cassette interface. And we liked it.
Re:My Business Card Runs Linux by cubano on Tuesday December 24, 2019 @05:46PM (#21875455)
I just flipped a bank of 16 switches by hand with vacuum tube gates and core memory...punch cards are for sissies!
Re:My Business Card Runs Linux by Filligree on Tuesday December 24, 2019 @06:13PM (#21875570)
You had a computer? Back then I wrote C programs on paper, then executed them by hand...
Re:My Business Card Runs Linux by nabla9 on Tuesday December 24, 2019 @10:36PM (#21876613)
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
Re:My Business Card Runs Linux by int_19h on Wednesday December 25, 2019 @05:51PM (#21880943)
C? All I had was a single book on MS-DOS, so I wrote batch files on paper, then executed them by hand.

(Not even joking, by the way - literally how I got into computers and programming.)

Re:My Business Card Runs Linux by znpy on Tuesday December 24, 2019 @06:14PM (#21875575)
oh kids! i used to crank the wheel by hand on my analytical engine that my hacker friends and me built after there was a leak of babbage's plans! he never knew!

you kids and you petabytes of ram! back in my day....

/s

(i'm looking forward for these comments to be commented on a certain website i'm not supposed to name)

Re:My Business Card Runs Linux by YZF on Tuesday December 24, 2019 @08:18PM (#21876085)
you kids. We calculated with charcoal on the cave's wall while the adults were out hunting for wooly mammoths...

ZX81: Z80/1KB RAM... more recently though PIC12 (C501 IIRC) ...

Re:My Business Card Runs Linux by Sharlin on Wednesday December 25, 2019 @06:36AM (#21878100)
I'm slightly surprised nobody has yet linked https://xkcd.com/505/
Re:My Business Card Runs Linux by BenjiWiebe on Thursday December 26, 2019 @05:21PM (#21887340)
Re:My Business Card Runs Linux by golergka on Wednesday December 25, 2019 @10:12AM (#21878762)
There's a website where people make fun of HN comments? Is it Twitter?
Re:My Business Card Runs Linux by klez on Thursday December 26, 2019 @05:32AM (#21882981)
The prime directive of said website is to never name it on hacker news. But I'm pretty sure you can Google the prime directive itself and figure out where it comes from. As a hint, it starts with "ng".
Re:My Business Card Runs Linux by countername on Friday December 27, 2019 @05:50PM (#21895478)
more hints?
Re:My Business Card Runs Linux by klez on Saturday December 28, 2019 @06:26AM (#21898386)
Webshit, once a week. I won't go further :)
Re:My Business Card Runs Linux by nikanj on Tuesday December 24, 2019 @06:10PM (#21875557)
Start a few Electron apps and it'll warm right up
Re:My Business Card Runs Linux by techie128 on Wednesday December 25, 2019 @03:59AM (#21877671)
Few? You can only run 1! We have to yet invent the technology to run two, let alone a few!
Re:My Business Card Runs Linux by yantrams on Tuesday December 24, 2019 @05:10PM (#21875277)
I honestly thought you were gonna reference the Four Yorkshiremen sketch by Monty Python after the second line!
Re:My Business Card Runs Linux by mattl on Tuesday December 24, 2019 @10:34PM (#21876595)
Predates Python by a couple years. It’s from “At Last The 1948 Show” from the 60s.
Re:My Business Card Runs Linux by yantrams on Wednesday December 25, 2019 @04:45AM (#21877807)
Didn't know that. Thanks for sharing.
Re:My Business Card Runs Linux by brian_herman__ on Thursday December 26, 2019 @02:39PM (#21886113)
Run a threadripper with the window open!
Re:My Business Card Runs Linux by rs23296008n1 on Tuesday December 24, 2019 @04:44PM (#21875108)
laughs in 6502 dances in 68k cries in 486
Re:My Business Card Runs Linux by iso947 on Wednesday December 25, 2019 @04:55AM (#21877832)
Mine was too, albeit 40MB had and a CD tom!

Ran windows 3.1, Civilisation (VGA graphics), railroad tycoon, Star Trek 25th anniversary - and could have them all installed at the same time. Other programs included championship manager 93, and I think day of the tentacle.

But it wouldn’t run Linux - 386 and above.

Re:My Business Card Runs Linux by tarruda on Tuesday December 24, 2019 @02:08PM (#21874211)
I was a kid when my father first acquired a similar computer.

We ran Windows 3.0 and my father configured a boot entry for running Doom or Ultima 7, which required so much memory that it wasn't possible to run Windows, only DOS.

I remember feeling a bit envious about my neighbor having the more powerful 486, which could run Doom much faster than in our PC

Re:My Business Card Runs Linux by shakermakr on Tuesday December 24, 2019 @07:21PM (#21875858)
Made me laugh about “Dad configured a boot entry”...I remember the hours with my Dad trying to stuff whatever device drivers into that 640K via Autoexec.bat and Config.sys. Got the CD-ROM running but damn if sound now doesn’t work. Those were the days trying to get Tie Fighter in my case to work.

Worse part was my Dad in his wisdom bought a family PC without a Pentium, but a Cyrix P166. Had zero floating point processing. Ran like a damn dog on any 3D game.

Any Brits out there might remember Time Computers. On every back page of any newspaper ever selling PoS computers with whatever subpar hardware they could cram into a big beige box ;-)

Re:My Business Card Runs Linux by xenospn on Tuesday December 24, 2019 @02:26PM (#21874303)
Not to brag but I got a 4.77MHz 8086 XT PC for my 8th birthday :) It had a whopping 256KB of RAM, a monochrome display (later upgraded to a 4 color CGA that blew my mind), and two (yes, TWO) Floppy drives.
Re:My Business Card Runs Linux by cubano on Tuesday December 24, 2019 @05:52PM (#21875490)
My dad got one of those for us both to use...what was truly "whopping" about it was its price...

If I remember right it was almost $3k...but that included that blazing fast 300bps Hayes modem for wide-area networking.

And my mind was truly blown when we replaced the 2nd floppy with a more-memory-then-we-will-EVER-need 20MB hard drive...what could we do with all those bits??

Re:My Business Card Runs Linux by nonamenoslogan on Wednesday December 25, 2019 @12:33AM (#21877025)
Yeah the prices were crazy! My first was a 10Mhz AMD 286 clone with 1mb and a 40mb HDD. I recall it being $2600 with a 13” SVGA monitor.
Re:My Business Card Runs Linux by xenospn on Tuesday December 24, 2019 @07:45PM (#21875955)
Same! We got 640kb of ram and a mouse! The HDD didn’t arrive until we got a 286, tho.
Re:My Business Card Runs Linux by a9h74j on Tuesday December 24, 2019 @02:47PM (#21874433)
And a decade before, the distributor DigiKey presented as a one-column advertisement in Popular Electronics, selling 7400 DIP ICs for $0.29 . Inflation-adjusted, that $0.29 now buys a an IC that can run Linux.
Re:My Business Card Runs Linux by lioeters on Wednesday December 25, 2019 @10:31AM (#21878840)
> 8086 XT PC for my 8th birthday

Wow, I admire the far-sightedness of your parents, to give a child a computer at such a young age (and in those early days of PCs).

I was of a similar age when my dad brought home an NEC PC 9801 - with an 8086 CPU (8MHz), 640KB RAM, kanji (~3000 characters) font ROM, even a Japanese word processor. I think it ran MS-DOS 2~3.

"In 1987, NEC announced one million PC-98s were shipped."

That was a big wave, and I'm so glad my parents let me play with a computer as a "toy" - it was a huge influence on my mental development.

Kinda like the monolith moment in 2001: A Space Odyssey. :)

Re:My Business Card Runs Linux by xenospn on Wednesday December 25, 2019 @09:50PM (#21881758)
My parents had no idea, and they couldn't afford it anyway :) My dad asked his cousin, who happened to be working with PCs way, way back and recommended he get a PC instead of a C64 which is what everyone else had. My dad asked his dad and my grandfather forked over what must have been an insane amount back in 1980's Israel.
Re:My Business Card Runs Linux by lioeters on Wednesday December 25, 2019 @11:36PM (#21882048)
Aww, that's so nice that your dad asked around and pulled resources together for you. And I'm sure grandfather knew it was a worthy investment in your future.

My friends around that age all had a wildly popular video game console called Nintendo "Fami-Com". https://en.wikipedia.org/wiki/Nintendo_Entertainment_System

My parents refused to buy it, and instead let me play with the PC-98, where I learned BASIC, Turbo Pascal, even some 8086 assembly language.

I suppose if I have children, I'd discourage mobile phones/apps and instead give them Raspberry Pi, microcomputers, sensors, devices they can build stuff with.

Re:My Business Card Runs Linux by jbuzbee on Tuesday December 24, 2019 @04:54PM (#21875167)
This time of year is ripe for nostalgia. I recall that it was just about this time in 1993 during Christmas break that I loaded Linux version 0.96(?) onto this 386SX machine. This involved taking a stack of 1.44MB floppies and driving to a place where I had access to the internet. I'd choose SLS packages and copy each to an individual floppy. Then I'd drive home and load them one by one until I had a bootable system. And of course with floppies, it was inevitable that you'd get a error now and then. So, back to the car, download, copy and repeat. All to get away from the limitations of Windows 3.0...
Re:My Business Card Runs Linux by klez on Thursday December 26, 2019 @05:41AM (#21883015)
Talking about Christmas, we used to go to my aunt's on Christmas day and I remember the time they bought an Amiga for my cousins. We were very young so between games we used to have a good laugh with the program that did text-to-speech (can't remember the name right now), but it only spoke English and we were easily amused by typing phrases in Italian and having them read back as if it was English (so the pronunciation was all messed up).
Re:My Business Card Runs Linux by sabujp on Tuesday December 24, 2019 @06:03PM (#21875531)
same here, packard bell but iirc it was 20/40Mhz with 40MHz being the turbo, but before that I did have a zenith 8088 dual 5.25" floppy system that had to boot dos with one disk and run programs off the other (mostly written in gwbasic).
Re:My Business Card Runs Linux by ridiculous_fish on Tuesday December 24, 2019 @05:10PM (#21875281)
Mine was a Mac IIsi - 20MHz 68030, 1MB RAM. To run Linux, you needed to install a daughtercard with a hardware FPU.
Re:My Business Card Runs Linux by ljm on Tuesday December 24, 2019 @06:19PM (#21875600)
My first few PCs weren't even PCs, I didn't know what they were until I was a little bit older. Somehow I intuited them naturally though; I liked exploring and being curious about what I was looking at.

First one I remember was a Commodore 64, along with a 600 page book full of BASIC that you could type out and record on cassette to have your own game. The book was total gibberish to anyone else; it was just pure code with no explanation. But that's what the C64 gave you; an interactive environment on boot where you could program a new game and write it to a cassette. By default. If you wanted to play a game you had to type `RUN` or maybe one or two other things to set it up. But you wouldn't know that, because you just had an interpreter on a basic blue and white screen.

Worst bit was the 10 minutes of spasmodic strobe animations that showed you the game was loading. But also each game controlled those loading animations. You had to know what game you wanted to play, and be sure of it, or otherwise you could just flip to the B-side and get a different game.

After that I think we had a BBC Micro at school but I'm not sure. All I remember is an adventure game and one of those classic 5" floppies. I still really love the look and feel of inserting a floppy and manually locking it in. Floppies and cassettes and VHS's minidiscs were truly fantastic for the time. They were still mechanical, unlike CDs.

Then on my dad's side I and my siblings got an Acorn PC and a bunch of random floppies. None of them made any sense but some of them did cool things when you ran them. I remember hiding from my family and putting in the floppies that made flashing colours and watching it until time passed.

Must have been 11 or 12 years old before we first got a PC and by that point I was utterly fascinated. It was some shitty off-the-shelf eMachines thing but it was the best we could get; I managed to retrofit a decent graphics card in it a little bit later.

Re:My Business Card Runs Linux by detaro on Tuesday December 24, 2019 @03:35PM (#21874727)
There's embedded devices with an order of magnitude more CPU and two orders more RAM, if you're being strict about what counts as "embedded". If you're not, probably another order of magnitude on each.
Re:My Business Card Runs Linux by nabla9 on Tuesday December 24, 2019 @04:32PM (#21875048)
For example Nvidia's Jetson AGX Xavier. 512-core NVIDIA Volta™ GPU, 8-core ARM, 16 GB RAM,...
Re:My Business Card Runs Linux by jmull on Wednesday December 25, 2019 @12:32PM (#21879478)
Well now I feel old. I remember buying a 486 with 8MB and thinking "I'm really living in the future now!" The mhz were ridiculous and -- according to my memory -- most instructions ran in a single cycle too! (Warning: my memory is not a reliable gauge of the state of computing at the time.)

8MB was pretty extravagant but it turned out to be a good call even though it could be had for half the price within a few years.

Re:My Business Card Runs Linux by agumonkey on Tuesday December 24, 2019 @03:44PM (#21874784)
'computing progress' seems mostly resolution increase.
Re:My Business Card Runs Linux by 1123581321 on Tuesday December 24, 2019 @08:45PM (#21876168)
Lucky! We had the same 486 system but only a 40MB disk. I had to spend some lawn mowing money to get a 400MB second drive so I could install Sid Meier’s Gettysburg. :)
Re:My Business Card Runs Linux by zimmertr on Tuesday December 24, 2019 @12:16PM (#21873402)
Oh geez I can't imagine how long it would take to compile Linux on that slow of a processor.
Re:My Business Card Runs Linux by TkTech on Tuesday December 24, 2019 @12:38PM (#21873560)
Remember there was a lot less to the Linux kernel at the time. Wasn't too bad. The single-threaded compile time for Linux has stayed fairly consistent for awhile, since the tree grows about as fast as the average desktop improves. The big improvement in compile time has come from being able to compile with 8-32+ threads.
Re:My Business Card Runs Linux by CreRecombinase on Tuesday December 24, 2019 @12:21PM (#21873442)
I once read somewhere that the time to compile Linux from source on high-end desktop hardware has remained remarkably stable over the years.
Re:My Business Card Runs Linux by lisper on Tuesday December 24, 2019 @12:25PM (#21873474)
Yes, that's true. It has been O(1 hour) for pretty much the entire history of Linux. And if you think about it, this makes sense. If it were significantly less than that, the development cycle would speed up so it would be easier to add capabilities, which would slow down the build. If it were significantly longer, the addition of new features would slow down until the hardware started to catch up. So the compile time acts as a sort of natural control mechanism to throttle the addition of new features.
Re:My Business Card Runs Linux by cyphar on Tuesday December 24, 2019 @12:55PM (#21873684)
I'm not sure that is the primary reason -- many other projects have had their compile times explode over many years, even though the same logic should apply.

Not to mention if you build the kernel regularly, you benefit from incremental compilation. If you change a few non-header files the rebuild time can be as little as 2-3 minutes. Oh, and "make localdefconfig" will reduce your from-scratch compile times to the 5-15 minute mark. I highly doubt most kernel devs are building a distro configuration when testing (especially since they'd be testing either in a VM or on their local machine).

Re:My Business Card Runs Linux by lisper on Tuesday December 24, 2019 @01:02PM (#21873744)
> many other projects have had their compile times explode over many years

Like, for example?

Re:My Business Card Runs Linux by brantonb on Tuesday December 24, 2019 @01:09PM (#21873802)
When I worked at Microsoft, Windows took far, far longer than an hour to build from scratch. I remember walking a few buildings over to the burn lab to pick up DVDs of the latest build. I don’t have any hard data, but running a full build on your dev box was very rarely done.
Re:My Business Card Runs Linux by lisper on Tuesday December 24, 2019 @01:32PM (#21873950)
The dynamics of commercial projects can be very different from open-source. You're much more likely to tolerate sitting through long builds if you're being paid to do so.
Re:My Business Card Runs Linux by fest on Tuesday December 24, 2019 @03:10PM (#21874567)
Until management notices, does the X hours saved multiplication by number of developers, and the resources for improvement will be found soon.
Re:My Business Card Runs Linux by cameronbrown on Tuesday December 24, 2019 @03:22PM (#21874643)
Definitely not. People are far more expensive than machines.
Re:My Business Card Runs Linux by pretty_bubbles on Tuesday December 24, 2019 @01:17PM (#21873850)
Was it just the windows kernel? Or did it include all of the utilities in Windows?
Re:My Business Card Runs Linux by lonelappde on Tuesday December 24, 2019 @03:00PM (#21874510)
It's a lower bound for a highly active project.
Re:My Business Card Runs Linux by giancarlostoro on Tuesday December 24, 2019 @01:02PM (#21873745)
I'm convinced that compiler speed is all a matter of how it was initially designed.

Take for example Delphi which can compile millions of lines of code in under a minute or something ridiculous. Then we have D, Go, Rust, and such, they compile rather large codebases that would take C++ a good 30 minutes on high end hardware of today in shorter spans of time (not as familiar with how fast Rust compiles, but I know Go and D do pretty nicely, especially if you enable concurrency for D), which probably takes those same 30 minutes on high end hardware from about a decade ago.

Sadly from what I have heard C / C++ has to run through source files numerous times before it finally compiles the darn thing into anything meaningful. Facebook made a preprocessor in D to speed things up for them, it technically didn't have to be coded in D, but Walter did write the preprocessor for them, so he gets to pick whatever language.

Re:My Business Card Runs Linux by Fronzie on Tuesday December 24, 2019 @03:46PM (#21874804)
The C++ language cannot be parsed with a context-free parser. A large part of the build times, however, is due to optimizations.

In the early days, clang was much faster in compilation than gcc. Over the years, it has improved on optimization output but as a consequence has lost the compilation speed.

There are many examples for https://godbolt.org/ to show how much work the optimizer does. As example, the http://eigen.tuxfamily.org library relies on the optimizer to generate optimized code for all sorts of combinations of algorithms.

Re:My Business Card Runs Linux by anchpop on Tuesday December 24, 2019 @02:10PM (#21874223)
Rust doesn't compile very fast unfortunately, but it's being worked on. General wisdom says it's about as fast as Clang but comparing compile speeds across languages in a meaningful way is difficult
Re:My Business Card Runs Linux by giancarlostoro on Tuesday December 24, 2019 @02:11PM (#21874232)
Fair enough, thanks for that, I wasn't sure, all my Rust programs have been small enough to where I havent noticed. I wonder if it would of made sense for Rust to consider this earlier on in the same way that Pascal did. I believe I heard Pascal was designed to be parsed easily by machine code.
Re:My Business Card Runs Linux by steveklabnik on Tuesday December 24, 2019 @05:00PM (#21875197)
Parsing is not the reason why it takes a while to compile.
Re:My Business Card Runs Linux by Sharlin on Wednesday December 25, 2019 @06:50AM (#21878126)
"Parsing" was probably not the best choice of word on the GP's part, but they meant that Pascal was specifically designed to be implementable with a naive single-pass compiler; of course that would exclude many optimizations we take for granted these days.
Re:My Business Card Runs Linux by cmroanirgo on Tuesday December 24, 2019 @04:14PM (#21874952)
It's the layout of the code that allows Pascal (/Delphi) to compile everything in a single pass. By starting with the main file you easily build the tree of deps and public interfaces/functions vs the private & implementation details.

C and C++ even though they have header files, make no restriction on what goes in a header file, so it takes a bit to figure out the dep graph.

Re:My Business Card Runs Linux by bigcheesegs on Wednesday December 25, 2019 @05:03AM (#21877859)
The best part about Facebook's preprocessor (warp) was that it was slower than Clang (https://news.ycombinator.com/item?id=7489532).

But the preprocessor isn't what makes compiling C++ slow. It's a combination of the complex grammar, and ahead of time optimization of a (mostly) static language. Turns out you can compile code really fast if you don't actually try to optimize it.

Re:My Business Card Runs Linux by pbhjpbhj on Tuesday December 24, 2019 @05:16PM (#21875310)
My first Linux, Slackware, took me a week to download (Slackware), was on something like 12 disks. I compiled a kernel, took two days.

That was on a second-hand Pentium-S. I probably wasn't doing it right.

Re:My Business Card Runs Linux by icedchai on Tuesday December 24, 2019 @05:07PM (#21875247)
Linux in the 90's wasn't as bloated as it was now. It definitely took well under an hour to compile a kernel. My first Linux box was a 386SX-16. I later upgraded to a 486DX4-100.
Re:My Business Card Runs Linux by ce4 on Tuesday December 24, 2019 @09:55PM (#21876450)
That doesn't sound right, it's still not bloated. The majority is drivers then comes the cpu arch folder that takes a big cut. You can check yourself with cloc:

http://cloc.sourceforge.net/

Re:My Business Card Runs Linux by icedchai on Thursday December 26, 2019 @04:18PM (#21886868)
Linux 1.0 was 1 meg, gzipped and less than 200K lines of code, total.

Linux 4.x is over 150 megs, gzipped. Just the lines in the arch/x86 folder are more than the total lines in Linux 1.0.

Re:My Business Card Runs Linux by jlgaddis on Tuesday December 24, 2019 @01:27PM (#21873916)
It used to take me just over two hours to compile a (very minimal stripped down) kernel on my 25 MHz 80486 with 4 MB of RAM (in the late 2.0.x/early 2.2.x days).
Re:My Business Card Runs Linux by anyfoo on Tuesday December 24, 2019 @12:21PM (#21873443)
Long. I remember it being something like an hour or so to compile the kernel, but the kernel was also much smaller then. I specifically remember Linux 2.0.0 coming in a 2MB tar ball. Because it probably took me longer to download with my 28800 baud modem from an over saturated FTP server than it did to compile. 8)
Re:My Business Card Runs Linux by znpy on Tuesday December 24, 2019 @06:17PM (#21875595)
depending on how you configure your kernel and what storage you're using, it might be doable.
Re:My Business Card Runs Linux by XzAeRosho on Tuesday December 24, 2019 @08:38AM (#21871942)
I mainly work in web-dev, but working in embedded systems is kind of my hobby. It's kind of refreshing working on bare-metal, optimizing up-to single bytes of data, when I'm usually working on layers and layers of abstraction everyday.
Re:My Business Card Runs Linux by winrid on Tuesday December 24, 2019 @09:50AM (#21872378)
I just finished Michael Abrash's Black Book. Lots of assembly. You may like it. Like 30 hours of reading.
Re:My Business Card Runs Linux by wcarss on Tuesday December 24, 2019 @03:09PM (#21874561)
http://www.jagregory.com/abrash-black-book/ is an excellent online version of that amazing book that I believe is hosted with Michael Abrash's permission.
Re:My Business Card Runs Linux by nickreese on Tuesday December 24, 2019 @10:13AM (#21872529)
Where does a web-dev turn to to get started in this as a hobby?
Re:My Business Card Runs Linux by linuxlizard on Tuesday December 24, 2019 @10:39AM (#21872682)
Start with an Arduino and the Adafruit tutorials. Very gentle learning curve. https://learn.adafruit.com/category/learn-arduino

From there, can decide where your interests might be. To continue with Arduino hardware but without the IDE, I'd recommend _AVR Programming_ https://www.oreilly.com/library/view/make-avr-programming/97...

For other low level programming, Atmel's AVR Studio and their dev boards are incredibley newcomer friendly. Their source level debugger (with the debug coprocessor) is a miracle.

If you'd like to get into "big iron", Embedded Linux is amazing. Raspberry Pi is a great start (lots of GPIOS programmable from userspace). To get into embedded linux kernel programming, start with a loadable module on the Ras-Pi. Also, build/load your own Ras-Pi kernel.

Other folks suggested the ESP8266 which is also great fun to use.

Edit: Learn C. Lots and lots of C. Embedded dev is almost all C. A teeny bit of ASM, sometimes C++. But almost all of it will be in C.

Re:My Business Card Runs Linux by andoma on Tuesday December 24, 2019 @12:05PM (#21873328)
Can recommend https://buildroot.org/ for building complete Linux system images. Been using it on multiple embedded projects, both personal and professional.

Somewhat related, I've also used buildroot in both AWS and GCP to run workloads from read-only system images. Quite liberating in my opinion. No ssh, no ansible, etc. Build the image, launch it and off it goes. GCE even allows you to use the same boot disk, if mounted read-only, for multiple instances, perfect for these type of images.

Re:My Business Card Runs Linux by PascLeRasc on Tuesday December 24, 2019 @12:16PM (#21873399)
I can second this as well, Arduinos have a bad rep for being too beginner-focused but AVR is a super solid platform and you can do a ton with them. I'd pick Arduino over RasPi for a starter project anytime.
Re:My Business Card Runs Linux by daxaxelrod on Tuesday December 24, 2019 @11:48AM (#21873208)
Very helpful, thank you!
Re:My Business Card Runs Linux by Accacin on Tuesday December 24, 2019 @12:01PM (#21873312)
I'm a React Developer in my day job, but I'm disillusioned with the web as a whole and I've always had an interest in low-level stuff.

At the moment, I'm doing a structured C book course (C: A Modern Approach), and I've also signed up for the edX course "Embedded Systems - Shape The World: Microcontroller Input/Output"

It uses the TM4C123 board, which from a look around seemed to be a decent enough board for a beginner. I'd seen complaints of Arduino, but I'm not experienced enough to know the validity of their claims.

Either way, I'm having fun. Not sure if I'd switch career as Web Dev is full of decent paying jobs but it's nice to have a hobby that's different from the day job.

Re:My Business Card Runs Linux by monocasa on Tuesday December 24, 2019 @01:28PM (#21873924)
FWIW, those TI boards have tons of hardware bugs. Way more than you'd even typically expect from embedded hardware.

And if you don't use the arduino ecosystem, but use an RTOS on an Arduino, it's a perfectly valid dev board for learning real embedded systems development.

Re:My Business Card Runs Linux by Accacin on Wednesday December 25, 2019 @01:17AM (#21877170)
I've heard about the hw bugs a little but couldn't find much information about them.

I'm mostly just using it for the course which was highly recommended in multiple places, so I hope I won't encounter many of these bugs.

To be honest, the whole picking a board thing was quite overwhelming, with many recommendations, boards, variations, etc. Hopefully once I've finished the course I'll have some more knowledge to help me pick the next board.

Re:My Business Card Runs Linux by PascLeRasc on Tuesday December 24, 2019 @12:15PM (#21873387)
I think Micropython is fantastic and you can get an ESP8266 + FTDI cable for around $25. You can make this a web server and do fun hardware integrations with it like flashing LEDs for successful CI builds. Here's a good tutorial: https://docs.micropython.org/en/latest/esp8266/tutorial/inde...

ESP8266's can also run NodeMCU, which is Lua but node.js stuff translates super easily: https://nodemcu.readthedocs.io/en/master/

Re:My Business Card Runs Linux by penagwin on Tuesday December 24, 2019 @10:19AM (#21872564)
I highly recommend the ESP8266 and ESP32 once you're a little more familiar with the arduinos.

They have Wifi, and the ESP32 is actually very powerful and has two cores. They make for great DIY home automation/IOT devices and are pretty easy to work with.

Re:My Business Card Runs Linux by IceWreck on Tuesday December 24, 2019 @11:21AM (#21873013)
> ESP8266

Second this. The ESP8266 (a nodeMCU) is about as powerful as an Arduino Uno, is about half the size of a credit card, is very thin and costs around $3.

The wifi part is the biggest advantage. You can send sensor data directly to your server via simple http requests.

Re:My Business Card Runs Linux by makapuf on Tuesday December 24, 2019 @06:50PM (#21875719)
Esp8266 is way more powerful than an arduino Uno. It's got a 32bit 96MHz proc with 96k of ram and Wifi, often coupled with 4MB flash. Uno has 32k of flash 2k ram and (from memory) 20MHz 8bit cpu.
Re:My Business Card Runs Linux by Tempest1981 on Tuesday December 24, 2019 @12:32PM (#21873523)
The Wemos ESP8266 was a fun start. The only thing I found a bit tricky, iirc, is the limited number of pins, and figuring our the mapping from D0..8 to ESP8266 number. This answer helped: https://community.blynk.cc/t/solved-wemos-d1-not-working-wit...
Re:My Business Card Runs Linux by antoinevg on Tuesday December 24, 2019 @10:21AM (#21872576)
Re:My Business Card Runs Linux by seabird on Tuesday December 24, 2019 @01:27PM (#21873918)
No matter what you do, you NEED tools. I cannot stress this enough. If you can spend $250-$500 on a nice desktop scope, awesome. If you only have $80, you can get a serviceable Hantek USB scope that will at least give you an idea of what you're doing. If you can only spare $20, you can at least get an el cheapo JYETech scope. In addition, you'll want to pick up a multimeter and probably a logic analyzer. Again, no need to go all out; a cheap $20 meter and a $15 Saleae knockoff will get the job done when you're just starting out. DO NOT SKIP OUT ON THESE. Embedded development without being able to see and know what you're doing is miserable, so unless you're doing this because you want to be frustrated, just buy the tools you need upfront.

As for what microcontroller to actually learn on, I would say the MSP430 is a very good starting point. It's a fairly mundane 16-bit RISC microcontroller series with very forgiving electrical design requirements, very good documentation, and very good community support. They make a devboard (TI calls them Launchpads) for the MSP430G2553 that's more than enough to get a beginner started. When you need a little more power, you can either opt to invest in learning the ARM ecosystem, or go for something a little more exotic. Just about every manufacturer makes an ARM microcontroller of some sort, so if that's what you're interested in, take your pick and go with it. If you're looking for something else, the Renesas RL78 and RX series provide a lot of functionality if you're willing to deal with how stodgy Renesas can be.

Some important notes:

1.) Don't bother with Arduino. They were a much more compelling product 15 years ago when you had to pay thousands in tools and compiler/environment licensing to get in on in embedded development. Today, what Arduino nets you is a painfully barren environment that abstracts away a lot of what you're trying to learn when you're starting out. Losing out on the debugging, profiling, tracing, disassembly, memory usage statistics, etc. that modern development environments give you will do nothing but stunt your growth, especially if you're used to having all these tools while writing desktop software

2.) Be careful with (or preferably just avoid) starting with embedded Linux; it's pushing the limits of "embedded". You're going to miss out on a lot of important knowledge and insight jumping straight into using an operating system (and a very heavy one at that), and for many applications, it is MASSIVE overkill. When you start, you're not going to need an RTOS. When you need an RTOS, you're going to reach for something more reasonable, like FreeRTOS. If FreeRTOS doesn't cut it, then you can start looking at Linux.

3.) Don't get tangled up with Raspberry Pis; the microprocessor on these is complex and the documentation is severely lacking/nonexistent. RPis are much closer to a desktop computer than they are an embedded system.

If you really want to get it, I would say one of the most useful exercises is implementing your own microcontroller/processor. You can pick up an FPGA devboard for fairly cheap, and there are plenty of textbooks (Harris & Harris' Digital Design and Computer Architecture comes to mind) that will get you through most of the key concepts. Once you've done this, a lot of the gaps in understanding when dealing with a microcontroller will be filled in. This exercise isn't strictly necessary, but I don't know anybody who has done it that wasn't better off for it.

My final note is to buy or "acquire" Horowitz and Hill's The Art of Electronics. Embedded development is inseparable from electrical engineering, so even if you don't read it front to back, there are some sections that you will definitely be visiting if your background isn't in electronics.

Re:My Business Card Runs Linux by truth_be_told on Wednesday December 25, 2019 @12:30AM (#21877012)
>Don't bother with Arduino

I wouldn't say that. Yes the Arduino "libraries" abstract away a lot of the complexities and hinder true understanding. However for a beginner it is a perfect platform simply because of the huge community i.e. tutorials, code and projects. Once they gain confidence from using this, they can move on to "traditional embedded development" by learning to program the underlying AVR directly i.e. use the toolchains installed by the IDE, delete bootloader and upload your program using the ISP interface (see the book; "Make: AVR Programming"). This gives you the best of both worlds using the same development platform. Another advantage is that many other MCU families also provide a "Arduino-like" interface (eg. Energia for MSP430) and thus all the skills learnt on one can be transferred to another.

Re:My Business Card Runs Linux by seabird on Wednesday December 25, 2019 @12:23PM (#21879431)
My take is driven by me finding the Arduino platform too easy. My first exposure to embedded development was Energia, and I was so underwhelmed that I didn't bother with it again until years afterwards, when I downloaded CCS and got to play in the "big leagues". I know multiple people that had that same experience.

If you're already writing software, you're not going to be struggling with having to learn programming. Translated to Arduino, this is great for engineers who don't write software and just need to get simple shit done fast, but for those with a background in software, it feels equal parts mundane (I called analogRead and... got an ADC value, just as expected) and magic (what did analogRead actually do?). Given, you can go look at the source for these libraries, but a lot of them make very generous use of the preprocessor for the sake of supporting multiple products in one codebase, and it's often not pleasant to read. Working with an MSP430 (or basically any architecture if you're using more capable tooling, like you mentioned with AVR) has a certain clarity to it that the Arduino ecosystem just doesn't seem to capture.

I would make the same argument for AVR and the "real deal" tooling as I do the MSP430; why bother with Arduino when you're probably coming in with decent programming skills?

Re:My Business Card Runs Linux by truth_be_told on Wednesday December 25, 2019 @04:58PM (#21880709)
>why bother with Arduino when you're probably coming in with decent programming skills?

Pure Software programming skills are NOT enough when it comes to embedded programming. You need to know the logical interface to the HW and the EE/Electronics behind the HW itself. This is a huge challenge for people who have only worked with applications software over layers of abstraction. This is where the Arduino shines; hide the overwhelming HW complexities and provide a simple api for software guys to get their job done. This allows them to slowly gain HW knowledge and transition to "traditional embedded programming" as needed. Also, many experienced embedded developers are using the Arduino as a rapid prototyping platform to implement an idea quickly and get clarity on the project before implementation on the actual target using traditional means. Learners can do both on the same Arduino platform.

So here is my recipe for somebody wanting to learn Embedded Development;

1) Get a Arduino Uno, a couple of extra ATmega328Ps, a AVR programmer and a electronic components toolkit.

2) Get a book on Arduino programming and AVR programming. I can recommend "Exploring Arduino" and "Make: AVR Programming". You also need a book on Electronics and "Practical Electronics for Inventors" is a pretty good one.

3) Install the Arduino IDE and go through some blinky tutorials. Do some projects from "Exploring Arduino".

4) Now move on to direct AVR programming. The Arduino IDE has already installed the required toolchains. Setup a Makefile environment using them following instructions in "Make: AVR programming". Do some blinky and other projects from this book. This gives a command-line approach to AVR programming.

5) Next repeat the above using a proper vendor supplied IDE eg. Atmel Studio for AVRs. These IDEs are pretty complex but quite powerful and used extensively in the industry. Go through some tutorials and redo the blinky and other projects using the IDE.

6) Get some test equipment tools to look into the inner workings of the system. I recommend the multi-functional "Analog Discovery 2" which has lots of learning tutorials.

Congratulations; you are now a bare-metal "Embedded Developer"!

To enter the "big boys league", move onto ARM Cortex boards.

Finally you get to "Embedded Linux" and become a "Master Super-Duper Embedded Developer" :-)

Re:My Business Card Runs Linux by 0x5345414e on Tuesday December 24, 2019 @03:11PM (#21874575)
Another good book is https://www.goodreads.com/book/show/4073235-msp430-microcont..., which I'm sure you can find online for free somewhere.
Re:My Business Card Runs Linux by truth_be_told on Wednesday December 25, 2019 @12:38AM (#21877036)
A great book particularly for learners/students is "Introduction to Embedded Systems: Using Microcontrollers and the MSP430" by Jimenez, Palomera et al. For every feature of Embedded Programming it gives a illustrated and platform independent explanation followed by how it is realized in the MSP430. This cements understanding like nothing else.
Re:My Business Card Runs Linux by ngcc_hk on Wednesday December 25, 2019 @04:01AM (#21877674)
Good advice but I actually found FPGA very hard to start or very expensive. May be you can give more hints.
Re:My Business Card Runs Linux by seabird on Wednesday December 25, 2019 @01:21PM (#21879751)
FPGA is pretty challenging to get started with. If you decide to go in on it, you're going to spend quite a bit of your time at the beginning getting your ass kicked. Vendor tooling blows, open source tooling is playing continuous catch-up or is much more focused on VLSI, and resources for beginners feel pretty anemic compared to what you're probably used to coming from the software world.

I can't tell you if this is "the way", but I can tell you how I started. I flipped a coin to decide between Altera and Xilinx and started with a Terasic DE2 board (an Altera Cyclone II devboard) that I borrowed from my university. I don't recommend using this board or something like it (it has actually been superseded by a nearly identical board with a Cyclone IV in place of the dated Cyclone II); the extra peripherals are a headache more than anything, and the simple breakout pins on the Terasic DE0-Nano are greatly appreciated. As for the environment, you can go and download Quartus from Altera basically no-questions-asked.

After pissing with the board for a bit, I decided to pick up a book. Rapid Prototyping of Digital Systems by Hamblen, Hall, and Furman is good, if not a bit out of date. I had this book to thumb through instead of read front-to-back. It is written for older versions of Altera's Quartus software, but with a little bit of exploring the UI I was able to find just about everything I needed. It makes a decent quick reference for Verilog and VHDL syntax, has quite a bit of info on interfacing various things to an FPGA (think PS/2 mouse, VGA, etc.), and a couple chapters on microcontrollers and microprocessors.

An important bit to know is that that a lot of the usage of an FPGA (at least in the way I use them) happens in two phases; the actual logical design, which you'll do on your computer via simulation, and the actual usage of that design on the FPGA. The logical design happens largely in ModelSim (with Quartus only being used to generate libraries at this stage), or some other Verilog/VHDL simulation tool. Altera ships ModelSim free-of-charge with Quartus. It is your run-of-the-mill Tk-based clunker of an EDA tool, but it works and I haven't had it crash on me yet, so I can't really complain, even if I have some gripes with it. This is where most of the work/magic happens, at least for a beginner; you write your logic in your editor of choice, write testbenches, and simulate those testbenches in ModelSim. Having read the Harris and Harris book mentioned in my initial post in the past, I took a quick look at a processor called "Ahmes" on GitHub, and just had a go at it. After getting a primitive processor working/executing instructions, adding some peripherals like some timers is where things started to come full circle, and I started realizing both the power of the FPGA, and why things are the way they are on a microcontroller/processor.

The bit where you actually put it on the FPGA hardware is largely uneventful, or at least it was for me. I didn't have multiple clock domains or anything like that, so I didn't suffer from any timing issues, and basically had the good fortune of just mapping pins and letting it rip. In theory, actually translating the design to the chip doesn't do much, but in practice, a design that exists only on your computer isn't terribly useful. Actually using the hardware adds that "visceral feeling" and lets you play with what you've spent so much time doing, along with getting you familiar with the process if/when the day comes that you actually need to do it. You also get to enjoy/experience the power of bolting on arbitrary hardware to your jalopy processor for the sake of VGA output, GPIO, timers, SPI communication, etc.

I wouldn't consider myself terribly talented or knowledgeable, so if you just throw enough time at it, you can probably end up having just as much fun as I did.

Re:My Business Card Runs Linux by read_if_gay_ on Wednesday December 25, 2019 @02:54PM (#21880118)
>Don't bother with Arduino

What alternatives are there then?

Re:My Business Card Runs Linux by vfronly on Tuesday December 24, 2019 @10:16AM (#21872544)
Buy an Arduino and don't use the provided std lib functions
Re:My Business Card Runs Linux by Rebelgecko on Tuesday December 24, 2019 @02:05PM (#21874185)
I'd recommend an ESP32 (or it's slightly less capable little brother the ESP-8266) using the Arduino environment to get started. If you prefer Javascript, you can program it that way using something like NodeMCU or MongooseOS. Once you get comfortable with that, if you want to get a little lower level you can use PlatformIO with the vendor's SDK directly.

I like the ESP boards from Wemos. The US made ones from Sparkfun and Adafruit are also really good. The advantage of the Wemos ones (and the many counterfeits you'll see on sites like Aliexpress) is that they're so cheap you don't even have to feel bad if you fry one.

Re:My Business Card Runs Linux by jgrantme on Tuesday December 24, 2019 @11:18AM (#21872996)
I’d highly recommend Espruino — a microcontroller that runs JavaScript http://www.espruino.com/
Re:My Business Card Runs Linux by CharlesW on Tuesday December 24, 2019 @01:49PM (#21874074)
For anyone interested in embedded JavaScript but wants broader hardware support and/or modern JavaScript support[1], the XS JavaScript engine is microcontroller-independent[2], and Moddable provides supported ports for ESP8266, ESP32 (the successor to ESP8266), and the Gecko series of processors. (They also sell some hardware kits for folks who want that: https://www.moddable.com/product.php)

[1] Espruino supports ES5, XS supports ECMAScript 2018 [2] https://www.moddable.com/faq.php#microcontrollers

Re:My Business Card Runs Linux by tomcam on Tuesday December 24, 2019 @03:55PM (#21874853)
Thank you! Moddable looks like a dream come true for my embedded systems needs. Did not know they existed.
Re:My Business Card Runs Linux by rrauenza on Tuesday December 24, 2019 @11:44AM (#21873177)
Check out nand2tetris !
Re:My Business Card Runs Linux by joezydeco on Tuesday December 24, 2019 @10:18AM (#21872558)
The roadblock has always been the MMU. Vanilla Linux won't work without it, and uCLinux is always in some strange phase of support for newer architectures if it's supported at all.

I found a decent port of uCLinux to the Cortex-M3 once, but the host core was 120 MHz and it was pretty much a science experiment and not much more.

Re:My Business Card Runs Linux by linuxlizard on Tuesday December 24, 2019 @10:28AM (#21872628)
I can't tell from the datasheets and the description. Does this ucontroller have an MMU?
Re:My Business Card Runs Linux by jng on Tuesday December 24, 2019 @10:30AM (#21872640)
It’s an A9, same as on Xilinx Zynq 7000 series, 32-bit ARM core with full MMU.
Re:My Business Card Runs Linux by xfer on Tuesday December 24, 2019 @03:50PM (#21874828)
No the zynq chips have a cortex-A9, which is armv7, this is armv5. It still does have a MMU.
Re:My Business Card Runs Linux by jng on Wednesday December 25, 2019 @01:31PM (#21879796)
Oh, my bad, I misread the datasheet, read "A9" where it says "ARM9". Thanks for the correction.
Re:My Business Card Runs Linux by carlosperate on Wednesday December 25, 2019 @06:56AM (#21878147)
For comparison, the Raspberry Pi 1 had an armv6 core.
Re:My Business Card Runs Linux by RealityVoid on Tuesday December 24, 2019 @05:31PM (#21875383)
I expect that it being a M3 it had a MPU but not am MMU.
Re:My Business Card Runs Linux by leoc on Tuesday December 24, 2019 @03:03PM (#21874529)
Re:My Business Card Runs Linux by Sharlin on Wednesday December 25, 2019 @06:52AM (#21878129)
I wonder how many Linux instances are running in an average modern automobile.
Re:My Business Card Runs Linux by davidzweig on Tuesday December 24, 2019 @03:26PM (#21874669)
Any numbers on current consumption of F1C100s?
Re:My Business Card Runs Linux by kazinator on Tuesday December 24, 2019 @01:29PM (#21873932)
Not to mention that a tiny chip in a micro-SD case can hold a library of a hundred movies.
Re:My Business Card Runs Linux by aliswe on Tuesday December 24, 2019 @11:58AM (#21873291)
Same. Anyone got a guide for getting it to run Linux? (except this article!)
Re:My Business Card Runs Linux by jokoon on Tuesday December 24, 2019 @04:47PM (#21875126)
I wish raspberrypi could release something similar. Their product are still too powerful for my taste.
Re:My Business Card Runs Linux by paxys on Tuesday December 24, 2019 @08:14PM (#21876065)
Raspberry Pi's goal is computer science and coding education. They aren't going to make anything that isn't beginner friendly, and can't at least run a Linux GUI, have basic networking, support standard peripherals etc.
Re:My Business Card Runs Linux by jokoon on Wednesday December 25, 2019 @12:12PM (#21879372)
I don't understand how that's relevant. You can still release something smaller and less powerful, and still be accessible to beginners.

Why are you arguing about having standard peripherals? It doesn't let people learn about I/O.

I was in highschool and we were given given embedded hardware and were able to program it using assembly and uploading a program into it.

If you give students some very minimal embedded hardware with wifi and some terminal, they should be able to learn using that. Let them install things, maybe setup a 2D interface...

The RPi educational value is only enabled by I/O pins. I'm not sure that's really worthwhile.

The RPi is interesting because it's a powerful but cheap computer. I just wish there was much cheaper hardware to show people you can also do things with smaller stuff.

Re:My Business Card Runs Linux by jchook on Tuesday December 24, 2019 @05:03PM (#21875219)
Reminds me of the (now defunct) CHIP for $9[1].

Have you checked out some of the alt pi boards like Orange Pi or Onion Omega2Plus?

1. https://www.kickstarter.com/projects/1598272670/chip-the-wor...

Re:My Business Card Runs Linux by tyingq on Wednesday December 25, 2019 @12:03AM (#21876927)
There are a lot of tiny travel routers that run Linux. Mostly little MIPS boards inside.
Re:My Business Card Runs Linux by rumanator on Wednesday December 25, 2019 @02:09PM (#21879950)
Why do you feel that a hardware product being too powerful is a problem?
Re:My Business Card Runs Linux by int_19h on Wednesday December 25, 2019 @05:56PM (#21880960)
Because it also means increased power consumption. If you're trying to run something off battery or solar, not using hardware that's more powerful than you actually need can be necessary for the project to be viable.