Been powering through Embedded Linux Primer. A few high-level things I’ve learned:
initrd is old, initramfs is new initramfs uses a CPIO image (a type of archive that was new to me) to hold the initial filesystem contents Using TFTP to boot from a remote kernel and ramdisk sounds like fun, not to mention provides great flexibility for debugging. It’s not so hard to add extra items to the kernel config menu Learned some ins and outs of Das U-boot, and that support for using RAM has to be initialized by the bootloader otherwise you can only use stack memory.
Continue reading
Didn’t expect to find any books on our outing yesterday, but I had a pleasant surprise. Last week I finished my previous book on embedded Linux, which was a great case-study-esque intro, and Embedded Linux Primer will likely be a wonderful follow-up. Some of the chapters that caught my eye:
Storage Considerations Systems on Chip Bootloaders Device driver basics Filesystems Busybox Development tools beyond gdb: cscope, strace (and others) Kernel Debugging Techniques Open Source Build Systems udev Test-Driven Development for Embedded C was a surprise as well.
Continue reading
What follows are thoughts while reading Embedded Linux - Hardware, Software and Interfacing. Really enjoyed it.
It walks through planning for an automation system for a winter resort. Currently at chapter 6 and there’ve been a few things I’ve not done before.
Right away I discovered you could use gdb remotely with gdbremote. Great for remote debugging of cross-compiled applications.
I’ve done cross-compilation, albeit indirectly using buildroot, but I was still aware of what went on behind the scenes, aka: compiling gcc and glibc multiple times, the first being a way to bootstrap and create a more “pure” versions tailed specifically for the target platform.
Continue reading
Had the energy and focus to make more progress on my ideas for redis last night. See my previous post here if you don’t remember what those ideas were.
The only things left to do:
Fix freeSetObject() such that it frees intset and/or hash table memory that may have been allocated Fix code in rdb.c that’s responsible for loading the data from disk and writing to it when redis is shut down.
Continue reading
Had an idea for reducing the memory footprint of redis sets. A redis set may be encoded as an intset (if the set contains nothing but integers) or a hash table. But if a set contains integers and other values, you lose out on the benefit of intsets (speed and memory efficiency) and in some cases you have to wait while redis converts your intset to a hash table. This may not be a big penalty, but it all depends on the order in which you add items.
Continue reading
Pieter responded to my thread. He’s worked on compressed sorted sets recently, and while doing that he fixed the issue I was having with intsets. His code should be merged into 2.2 in a few weeks after enough people have tested. Apparently I’m the only one to report the problem with intsets.
His branch’s code is similar to my approach, in that he also extended zsetopsrc with type and encoding variables.
Continue reading
At Thursday night’s PDX Hackathon I worked more on the redis changes I wanted to make. I mostly completed them, and announced my progress on the mailing list that night. Seems no one was aware that zinterstore was broken for a set encoded as an “intset” (a more efficient way to store sets of integers). So yay, I found a bug! But now another programmer has alerted me he’s made progress in another area of the code that should be relevant to me, so I’ve got to check that out.
Continue reading
Spent another hour reading the redis source today, and I’m beginning to feel more enlightened. I’m thankful for the comment at the top of t_zset.c that describes how sorted sets are implemented with a hash and a skiplist. Weighing that knowledge against the t_set.c code for un-sorted sets, it’s now much clearer how the two types are alike and how they differ.
This is all in an effort to teach redis to zinterstore sets against sorted sets.
Continue reading
Moved away from storing individual string values to storing whole objects/documents in redis hashes. Hashes make more sense when you need to store a group of data values like a blog post.
But I’m not making a blog. My task it to create an updated version of my personal journal and information storage system. Daily I use it to log my thoughts, to stage blog posts (like this one), keep track of links to check later (which often doesn’t happen), keep todo lists for projects, and other things.
Continue reading
In my quest to learn new things, specifically the following things, I’ve been both excited and drained:
node.js Redis document database haml sass a micro-framework By “new things” I really mean “some cutting edge stuff that seems pretty cool”, the “cutting edge” portion being the source of most of my struggle. New tools, languages and software have sharp edges.
Since I love fast and light software, node.js is my current casual focus.
Continue reading