jc blog - tales of a modern-day nomadic hunter-gatherer

Follow jcomeau_ictx on Twitter This is the weblog of Intrepid Wanderer. You never know what you might find here; graphic descriptions of bodily functions, computer programming secrets, proselytizing for the antichrist, miscellaneous ranting and kvetching, valuable information on living off the land... if you don't share my rather weird interests you may want to try slashdot instead.

You can consider my Del.icio.us links an extension to my blog, as are my LifeTango goals and my other to-do items. My to-buy list is also public, but only for sharing any useful ideas that might be there; I'm not requesting charity, neither do I offer it.

You can find me easily in google searches, as jcomeau, jcomeau_ictx, or jcomeauictx. There are lots of other jcomeaus, but AFAIK I'm the only jcomeau_ictx out there so far.

If you want to comment on anything you see here, try the new Facebook comments, reachable by clicking the "[comment]" link at the end of each post. If for some reason that isn't working, go ahead and email me, jc.unternet.net. You know what to do with the first dot. Make the 'subject' line something reasonably intelligent-looking or it goes plunk! into the spambasket unread.

This RSS feed may or may not work. Haven't fiddled with it in forever. RSS Feed

MrCreditRepair.biz will fix your credit rating!


rant: the range of sizes of tubing available at local and big-box hardware stores seems to be carefully selected such that nobody can fabricate telescoping items such as chair legs. for example, at the Petaluma Friedman's Lumber, you'll find stainless tubing in 1/4", 1/2", 3/4" and 1", all with about a 1/16" wall, which means that they all fit loosely inside the other. looks like I'll have to buy tubing for my projects online and pay a lot for shipping.

I think I found the perfect director for a movie of Stranger in a Strange Land of which the Master himself might approve: Borja Brun. nothing short of this level of explicit erotism would do justice to the book.

getting back into Linux kernel programming after an almost 2 decade hiatus. a lot has changed, but the underlying concepts are still pretty simple. for example, you don't need Modules.symvers to compile a LKM (loadable kernel module) if your system doesn't use modversions; you only need to match the kernel version number.

there's a whole lot of misinformation about building kernel modules out there too. just installing kernel headers won't do it. you need at least the Makefiles. that stuff about /lib/modules/`uname -r`/build is often wrong, as on the ARTIK 710 development board the symlink points to /home/release/artik710_release/linux-artik7, a nonexistent directory. and the kernel-headers package for that Fedora distribution places the headers under /usr, so what I did was mkdir -p /home/release/artik710_release and symlink /usr to linux-artik7 under it. then I had to mkdir /usr/modules to avoid the make[1]: *** No rule to make target 'modules'. Stop. error. then finally make ran without errors in the directory where Derek Molloy's first sample LKM was located:

[root@artik hello]# make
make -C /lib/modules/4.4.19-0710GC0F-44F-01QA/build/ M=/usr/src/exploringBB/extras/kernel/hello modules
make[1]: Entering directory '/usr'
make[1]: Nothing to be done for 'modules'.
make[1]: Leaving directory '/usr'
[root@artik hello]# 

but no output was actually generated, because the kernel Makefiles were not found at /usr. and those depend on a host of other directories, scripts, and includes. so, you really need a chunk of the actual kernel sources too, not just the headers.

and it seems odd that it took almost 7 years for someone to point out to this guy that there's an export directive in GNU Makefiles.

also, I learned how to compile and install Device Tree files.

today, I'm back to work on my port of David Stodolsky's myturnb software. I hadn't made any progress for him all week due to the new job falling into my lap.

both are interesting challenges, but I have to admit I love bare-metal programming better than almost anything else. it's taking huge amounts of self-discipline to stay away from the ARTIK. [comment]


spent an agonizing last 24 hours or so on debugging why my device tree modification wasn't even being added to the sysfs slots directory, let alone work as intended.

it seems there's a hidden, and arbitrary, length for either the "part-number" or for the labels, and it's less than 21: "bb_gpio_test" works, and "bbb_switched_led_test" does not.

only by fiddling with it was I able to determine this. there was no error message I could find anywhere which gave any clue why echoing the "part-number" into $SLOTS was returning a nonzero exit code.

now I've still got to figure out how to take the BeagleBone Black's switch S2 and LED USR1 away from whatever driver now "owns" them. that's my next step. [comment]


in case I forget why I added ldconfig to the libsoc README:

root@beaglebone:~/libsoc# test/gpio_test.py 
Traceback (most recent call last):
  File "test/gpio_test.py", line 5, in <module>
    from libsoc import gpio
  File "/usr/local/lib/python2.7/dist-packages/libsoc/__init__.py", line 1, in <module>
    from ._libsoc import *  # NOQA
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libsoc.so: cannot open shared object file: No such file or directory
root@beaglebone:~/libsoc# ldconfig
root@beaglebone:~/libsoc# test/gpio_test.py 
Traceback (most recent call last):
  File "test/gpio_test.py", line 86, in <module>
    main(gpio_input_id, gpio_output_id)
  File "test/gpio_test.py", line 60, in main
    assert gpio_in.is_high()


sitting here at my computer, and a smallish hawk came right up and hit the window. not too hard, fortunately. he flew to a nearby branch and recovered for a bit before flying off again at the approach of another hawk. what was he doing, anyway? did he want my coffee?

finally got some bits-and-bytes work on firmware for a medical device. so far I'm using Python with libsoc, but may have to switch to C or assembly if I can't get the low-level control I need.

still staying within budget, not paying down my credit cards as much as I'd like, but at least not adding to my debt. I'm way behind on my COS dues, though. I could lose my lots at any time, if someone brings it up on the ballot.

still a lot of good deals to be had for a guy on a $3/day food budget. Safeway sent me an email with a coupon for day-fresh whole wheat French bread, 98 cents off the $1.99 regular price, good until the 11th. bought my 2nd one yesterday, found 2 cans of Amy's organic lentil soup up for grabs at the senior center, and got an 18 ounce pack of organic meatballs with tomato sauce at Grocery Outlet. put the soup and meatballs in my dutch oven, which still had a bunch of bacon grease and burned-on bacon in it, and threw in a 7-ounce pack of pasta shells I'd picked up for 33 cents a while ago. came out pretty good except for the rusty taste due to my abuse of the iron pot's seasoning. one of these days I might finish my solar oven, and season the damned thing properly.

anyway, I could probably get by on even a $1/day food budget if I always used pasta instead of bread, but then I'd spend a lot more time cooking; something I've been avoiding. remember, I mostly make cold-brew camp coffee lately, just pouring water over ground coffee at night, and stirring in the morning until the grounds settle. every now and then I go to the Redwood Credit Union and get a free cup of hot coffee there, or even less often, spend $1.08 at the Tea Room to fill my own cup. both places have excellent coffee. the senior center has coffee for 50 cents, but it's pretty bad. anyway, back to cooking. it's always hard to get my camp stove lit. until recently I'd blow in it to get the flame going, but that always meant the smoke would soak into my clothes and hair. a few days ago, though, I realized I could put the spatter lid over the stove and turn it upside down, the screen holding in the tinder, until it got going good, then right it. after that, just keep lighting little bits of dried redwood sprigs and dropping them in. no more blowing, not nearly as much smoke.

I still haven't experimented much with using 80 proof alcohol, like cheap vodka, in an alcohol stove, with a tea lamp underneath it to drive out the alcohol vapor. I can't see why it wouldn't work, but I couldn't get a very hot flame out of it last year when I tested. I just think it would be really useful when traveling, because cheap booze is almost always easy to find, everywhere, and I hate using toxic alcohols. [comment]


for various reasons I won't go into, I have upstart running on a client's VPS. and whenever I apt-get upgrade, and libc6 gets upgraded, I have these problems:

initctl list, in user mode, gives the error initctl: Name "com.ubuntu.Upstart" does not exist.

initctl list, as root, gives the error initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused.

the problem is caused by the libc6 upgrade replacing libraries upon which upstart depends. the only fix I know of is reboot -f. but it's scary, because I don't even know how the necessary services, like exim4 and apache2, are being restarted, as I can't find anything in /etc/init that seem to have anything to do with these.

but, last time, according to my email exchanges with the client, it worked fine. it just happened again last night, so we'll see. for now I'm making some backups, just in case of disaster. [comment]


got more work than I can handle, again. funny how these things work out.

fireworks display this year was pretty lame. dying days of the empire. it'd be great if a few select blocks of DC and Sacramento went all V for Vendetta, but highly unlikely.

scored two more bottles of that {five ton} Zinfandel at Grocery Outlet. best $3 Zin they've had since that Santino or whatever it was a few years back. [comment]

view blog for 2017-06
view blog for 2017-05
view blog for 2017-04
view blog for 2017-03
view blog for 2017-02
view blog for 2017-01
view blog for 2016-12
view blog for 2016-11
view blog for 2016-10
view blog for 2016-09
view blog for 2016-08
view blog for 2016-07
view blog for 2016-06
view blog for 2016-05
view blog for 2016-04
view blog for 2016-03
view blog for 2016-02
view blog for 2016-01
view blog for 2015-12
view blog for 2015-11
view blog for 2015-10
view blog for 2015-09
view blog for 2015-08
view blog for 2015-07
view blog for 2015-06
view blog for 2015-05
view blog for 2015-04
view blog for 2015-03
view blog for 2015-02
view blog for 2015-01
view blog for 2014-12
view blog for 2014-11
view blog for 2014-10
view blog for 2014-09
view blog for 2014-08
view blog for 2014-07
view blog for 2014-06
view blog for 2014-05
view blog for 2014-04
view blog for 2014-03
view blog for 2014-02
view blog for 2014-01
view blog for 2013-12
view blog for 2013-11
view blog for 2013-10
view blog for 2013-09
view blog for 2013-08
view blog for 2013-07
view blog for 2013-06
view blog for 2013-05
view blog for 2013-04
view blog for 2013-03
view blog for 2013-02
view blog for 2013-01
view blog for 2012-12
view blog for 2012-11
view blog for 2012-10
view blog for 2012-09
view blog for 2012-08
view blog for 2012-07
view blog for 2012-06
view blog for 2012-05
view blog for 2012-04
view blog for 2012-03
view blog for 2012-02
view blog for 2012-01
view blog for 2011-12
view blog for 2011-11
view blog for 2011-10
view blog for 2011-09
view blog for 2011-08
view blog for 2011-07
view blog for 2011-06
view blog for 2011-05
view blog for 2011-04
view blog for 2011-03
view blog for 2011-02
view blog for 2011-01
view blog for 2010-12
view blog for 2010-11
view blog for 2010-10
view blog for 2010-09
view blog for 2010-08
view blog for 2010-07
view blog for 2010-06
view blog for 2010-05
view blog for 2010-04
view blog for 2010-03
view blog for 2010-02
view blog for 2010-01
view blog for 2009-12
view blog for 2009-11
view blog for 2009-10
view blog for 2009-09
view blog for 2009-08
view blog for 2009-07
view blog for 2009-06
view blog for 2009-05
view blog for 2009-04
view blog for 2009-03
view blog for 2009-02
view blog for 2009-01
view blog for 2008-12
view blog for 2008-11
view blog for 2008-10
view blog for 2008-09
view blog for 2008-08
view blog for 2008-07
view blog for 2008-06
view blog for 2008-05
view blog for 2008-04
view blog for 2008-03
view blog for 2008-02
view blog for 2008-01
view blog for 2007-12
view blog for 2007-11
view blog for 2007-10
view blog for 2007-09
view blog for 2007-08
view blog for 2007-07
view blog for 2007-06
view blog for 2007-05
view blog for 2007-04
view blog for 2007-03
view blog for 2007-02
view blog for 2007-01
view blog for 2006-12
view blog for 2006-11
view blog for 2006-10
view blog for 2006-09
view blog for 2006-08
view blog for 2006-07
view blog for 2006-06
view blog for 2006-05
view blog for 2006-04
view blog for 2006-03
view blog for 2006-02
view blog for 2006-01
view blog for 2005-12
view blog for 2005-11
view blog for 2005-10
view blog for 2005-09
view blog for 2005-08
view blog for 2005-07
view blog for 2005-06
view blog for 2005-05
view blog for 2005-04
view blog for 2005-03
view blog for 2005-02
view blog for 2005-01
view blog for 2004-12
view blog for 2004-11
view blog for 2004-10
view blog for 2004-09
view blog for 2004-08
view blog for 2004-07
view blog for 2004-06
view blog for 2004-05
view blog for 2004-04
view blog for 2004-03
view blog for 2004-02
view blog for 2004-01
view blog for 2003-12

Valid HTML 4.01 Transitional

Valid CSS!