Hacker News new | past | comments | ask | show | jobs | submit login
Upgrading my Chumby 8 kernel part 10: RTC (downtowndougbrown.com)
121 points by todsacerdoti 8 months ago | hide | past | favorite | 17 comments



> If you can solve a problem in userspace, why bother force-fitting it into the kernel? Chumby probably could have figured out a way to make the STM32 show up as an actual /dev/rtc0 device…but what would the advantage have been over the scripts they wrote? None.

For something like the Chumby, where userland is basically fixed and doesn't have a half dozen distros building on top of it, I agree. But if this were commodity hardware that Debian, Ubuntu, Arch, Mint, etc wanted to pull in support for, the extra time spent making /dev/rtc0 would mean the distros don't have to implement their own non-standard implementation of setting the clock.


Author here. That's very much a fair point. I was thinking more from the perspective of firmware developers maintaining fixed userlands when I wrote that.

It would definitely be an interesting challenge to figure out how to multiplex the UART between being a normal UART and accesses from an RTC driver in order to allow it to be a real RTC!


Yeah, I was thinking this too. The benefit of making the STM32 look like a real RTC to the kernel would mean that userspace would Just Work when it came to saving and restoring the time. The kernel would restore it on boot using its normal mechanism, and the 'hwclock' command would actually work properly, like someone unfamiliar with this particular quirk of the hardware would expect.

Likely this was a bit easier and faster to implement from the perspective of the Chumby folks who were building the system. But I've seen enough weird non-standard things done on embedded Linux systems (and have unfortunately been involved in maintaining one or two of them) to believe that this sort of crap is annoying, and wish developers at the manufacturer would do things in ways that the platform expects.


Even still, I'd love to see more low bandwidth devices use CUSE to expose standard device file interfaces.


Interesting, thanks for mentioning CUSE. If I’m understanding it correctly, it seems like it would be a perfect solution for this. Allows leaving the logic in userspace which is much easier to deal with (filesystem access, sharing the UART) but would still show up as an RTC device. I may need to play further with this!


Amazing work, thanks for sharing it! It warms my heart to see someone still hacking on the device after...13 years. It was a crazy idea to open source it back then, but seeing it pop up in the wild long after the company went away is some validation towards the idea that an empowered community has tenacious staying power.

We couldn't figure out how to monetize it, but that's alright with me; not all returns on investment are measurable in dollars.


I got one of the soft, ball-like chumbys when they came out. Really, really amazing design and packaging :) I tried to love it as much as it radiated good vibes but sadly from the very beginning it was kind of janky and at the time the usefulness was not that clear to me. Too bad the cheerfulness of such hardware got lost along the way.


I think the Chumby came out just a little too late. Great idea, but like so many things the post-iPhone-smartphone began to fill all the roles that those things filled

I was thinking about the brief life of the dedicated flash video cameras. They were more capable than phones of the era, but they couldn’t share on their own.


The Chumby also came out early enough that it had to rely on Flash Lite [1] for authoring content. This severely limited the audience that could build content for it; if it had came out a bit later, with better hardware, it could have potentially been used to display HTML content, and things might have gone differently.

[1]: https://www.adobe.com/mena_en/products/flashlite/


I was thinking about the brief life of the dedicated flash video cameras. They were more capable than phones of the era, but they couldn’t share on their own.

Those are still used in environments where that is a feature, not a bug.


I had a Chumby 8 for a while. It was cool - I was able to stream TV shows to it using the TVersity flash interface.

It never really got enough software for it to ever get out of the "janky and promising" stage.


Related:

Upgrading my Chumby 8 kernel part 7: touchscreen - https://news.ycombinator.com/item?id=38136590 - Nov 2023 (1 comment)

Upgrading my Chumby 8 kernel part 5: graphics - https://news.ycombinator.com/item?id=36287963 - June 2023 (13 comments)

Upgrading my Chumby 8 kernel part 4: reboot/poweroff - https://news.ycombinator.com/item?id=35184917 - March 2023 (10 comments)

Upgrading my old Chumby 8 Linux kernel - https://news.ycombinator.com/item?id=34063931 - Dec 2022 (32 comments)


A few years ago I wrote[0] about a similar approach on an RTC-less system (a Raspberry 3B+) by utilising systemd's clock-epoch to set time across reboots to be "reasonably close enough" for DNS-over-TLS and chrony's NTS to take over, and avoid large time jumps being observed by daemons.

To that last point: reading this file is one of the very first things systemd does after being started right in main, so time is set before any services are brought up. Whereas time for the OP isn't set until the `500datetime` service is loaded.

[0]: https://terinstock.com/post/2021/12/Systemds-clock-epoch-for...


Nice systemd solution, it seems very elegant!

To be clear, my init script is named S00datetime, not 500datetime. It's actually the very first one that runs from rcS. So the date is restored very, very early in the boot process before pretty much everything else.


Now that you mention it I can't see anything other than an "S". Yes, that certainly makes it less of a problem.


I have a chumby one, it can be an alarm clock standalone, and you can ssh into it if you put it in developer mode.

Someone has bought the chumby domain and runs a service for it, if you subscribe you can get a bunch of apps that run on it.


Try plugging in a USB keyboard to the back of it :)

That one was fun to write.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: