Where small furry rodents roam free.

This is my little pied-a-terre on the web where I can give my 2 euro-cents about the world.
Feel free to roam around, everything here is cool.
Reducing AVR program size with AVR-GCC July 15, 2009
Filed under: Technical — Gabe @ 8:47 am

I was hacking on my AtTiny13 this afternoon, having some trouble getting my .hex file small enough to flash. I looked around to find some details about reducing the final binary size so I could get my .hex down a couple lines, and finally figured out the following (which reduced my .hex by about 0.6k, or 16 lines).

When you link together the .o files that you compiled the first time around, a bunch of trash comes along. Especially for me I was using a software OWI (One Wire Interface) lib for only 1 or 2 of its functions, but all the other crap comes along for the ride. I needed to tell avr-gcc to not include those instructions since they were never actually getting called.

The magic happens with the ‘-Wl,–relax,–gc-sections‘ options added to avr-gcc when it is linking (stick it in your Makefile at the EDLFLAGS line perhaps).

Add in ‘-ffunction-sections -fdata-sections‘ to avr-gcc when it is compiling the object files (CPPFLAGS line), and you will probably (hopefully?) see a reduction in code size if you have some unused functions.

I’m no GCC expert, but it looks like the -fdata-sections and -ffunction-sections will cut up the data and functions into seperate sections. By using the linker options above you are telling the linker to only link sections that are referenced, and you ignore the rest. A quick search for these options will give you much more detail as to what actually happens if you are interested.

NFS with VFAT July 10, 2009
Filed under: Technical — Gabe @ 9:42 am

So I was having a bunch of problems with an NFSv4 (or v3 for that matter) export on my NSLU2. It was giving me a lot of ’stale file handle’ errors, and sometimes downright telling me that files had disappeared.

It would seem that this was all stemming from the use of a VFAT FS on my exported drive. It’s a USB HD that I also sometimes use on WinXP for photo stuff, so I stuck with vfat (back when I chose this NTFS read/write wasn’t *yet* clear). The NFS FAQ has this to say about NFS on FAT shares:

Second, it is a poor idea to export a FAT or VFAT (i.e., MS-DOS or Windows 95/98) filesystem with NFS. FAT is not designed for use on a multi-user machine, and as a result, operations that depend on permissions will not work well. Moreover, some of the underlying filesystem design is reported to work poorly with NFS’s expectations.

After some more googling it would seem that the lack of enough metadata capability in FAT file systems does not make NFS happy.

Incidentally it’s not clear to me whether you can export NTFS read/write over NFS yet since the most recent drivers seem to still be on FUSE.

NTFS-3g has the following to say about that:

Can I export NTFS via NFS?

Yes. There are two solutions depending on the Linux kernel version:

1. Obsolete: Use the FUSE kernel module from the FUSE 2.7.4 software package and please read the FUSE README.NFS file.

2. Preferred: Use the FUSE kernel module included in the Linux 2.6.27 and later kernels.

On their FAQ

So I finally settled with simply using Samba to export the VFAT partition, and that seems to work without issue, and actually has decent throughput (watching some really high bitrate episodes over the network works fine, even from a 266MHz ARM server).

Trying out gnome-blog. July 7, 2009
Filed under: Musings — Gabe @ 12:54 am

This is a post from gnome-blog. I really liked gnome-do’s twitter integration, and I’m hoping that gnome-blog will encourage to make more more posts to this blog. I’m deffinitely aiming at a more twitter-esque posting scheme (albeit with actual technical info snippets, and not random mind diarrhea).

Scan for ssh servers on subnet with NMAP.
Filed under: Technical — Gabe @ 12:22 am

Look for servers running with a certain port open (ssh for example) on a range of IP addresses:

nmap -p 22 –open 192.168.0.1-255

chrooting with udev July 6, 2009
Filed under: Technical — Tags: , , — Gabe @ 11:34 pm

If you’re having issues about commands failing with “function not implemented” when you’re in a chroot, make sure you’ve:

mounted dev:

mount -o bind /dev /mnt/chroot/dev

mounted proc:

mount proc -t proc /mnt/chroot/proc

That should be enough to get stuff working with (as root):

chroot /mnt/chroot/ /bin/bash
Back to life?
Filed under: Musings, Technical — Tags: , — Gabe @ 11:30 pm

I’ve kind of neglected this blog for a while, but I think I should at least use it for my personal note-taking and log-keeping on experiments, so it may just have more technical mumbo-jumbo than most people like, but you can filter that out by only nooking at non-technical categories in the post.

I’m also moving to India in about 2 weeks (end of July 2009) in case someone reads this and is wondering where I’m at.

Vends Voiture November 12, 2008
Filed under: Musings — Gabe @ 8:22 am



Vends Voiture

Originally uploaded by tehf0x

…it could sell…

Prop. 8 October 27, 2008
Filed under: Musings — Gabe @ 5:19 pm

I don’t get it.  If people were campaigning to abbolish interracial marriages, they would be labeled as racist bigots.  If they campaign to abbolish same-sex marriage it’s excused as defending our societal morals?!

“Intermarriage between whites and blacks is repulsive and averse to every sentiment of pure American spirit. It is abhorrent and repugnant to the very principles of Saxon government. It is subversive of social peace.”

Congressional Record, 62d. Congr., 3d. Sess., December 11, 1912, pp. 502-503.

This sounds like so many of the arguments I’ve heard against gay marriage that I can’t even cite them anymore.  Does the analogy simply never cross these people’s minds?  If we were talking about banning interracial marriage I’m sure there would be a shitload less support, but blatant segregation based on sexual orientation? That’s OK.

Maybe they’re just that dull.

As an aside the ‘pedia has a good section on the parallels with interracial marriage, and the section right afterward has some shameful situations where even a legal (Massachusetts) marriage wasn’t equivalent to a ‘hetero’ marriage (thanks DOMA).

And finally, this piece draws out more literal comparisons between the arguments in each case (a very ‘history reapeats itself’ analysis).

ZOMG RETARD! September 26, 2008
Filed under: Musings — Gabe @ 3:16 am

I don’t think I even need to say anything.

Check palin. This is even better than South Carolina Girl.

Not a one time thing, either:

facetaggr on flickr September 16, 2008
Filed under: Technical — Gabe @ 3:50 pm

Yahoo Open Hack Day ‘08 took place this weekend, and although employees & interns aren’t supposed to produce a hack, I did it anyways (take that!).  It’s nothing big, I wrote a greasemonkey script that will add a list of your contacts on a flickr photo page.  When you click on the person’s name, a machine tag of their flickr username will be added to the photo.  I call it facetaggr

You need greasemonkey, and this script file.

If you have any questions, feel free to contact me.  I’m thinking of adding a script so you can see all pictures of a certain user by clicking on a link on your contacts page.

Newer Posts »

Gabe 2008