Wednesday, February 25, 2009

iPhone toolchain continued

After attending a python talk at SCALE7x, I did some googling, and it turns out there is a port of pyobjc for the iPhone - whilst useful, I wanted to get into some proper 2D graphics coding, especially with the excellent Cocos2d framework. My last attempt at building a toolchain on my Debian Lenny box ended in failure. However, I came accross iphonedevonlinux which gives you a neat little bash script that abstracts out all the pain of building the iPhone toolchain on Linux. Worked pretty well, I've just compiled my first HelloWorld to the iPhone and (after calling ldid to "sign" the binary) it worked perfectly. Only requirements are an apple developer login (free) and the iphone sdk from apple (downloadable from apple). The script does the rest, including grabbing the latest firmware if you give it your apple dev id and pass. Only non-obvious but was when it died immediately trying to build the toolchain with a misplaced @ error - turns out I had to install gcc objc support - once I did that it compiled straight off. Good times.

The move to Vancouver is becoming a bit more real - I have an appointment at the embassy next week. I've been doing my research, and I should have an archery club within reach. Once I'm settled up there, I intend to get some low-poundage limbs and spend the long lonely evenings working on my form; my current Samick Extremes are just too heavy to do any kind of meaningful form adjustment.

Labels: , , , ,

Sunday, February 22, 2009

SCALE7x

Finishing up the last talk of SCALE7x - a worthwhile weekend. Notable talks included "Undermining the Linux Kernel: Malicious Code Injection Via /dev/mem", "BUG Update: Building open source gadgets with Linux", and "Scripting with Python" - very informative talks, as always when it comes to SCALE. I'm typing this from the "Low power Linux" talk, which is giving some really interesting insights into power consumption - I had no idea that the northbridge in my mini 9 uses more power than the atom cpu itself. Good times. "Building, Burning, and Flashing coreboot" was also a very interesting talk, giving some great insight into what it takes to bring a system up - CoreBoot manages to go from real mode to protected mode in 10 instructions, allowing the majority of CoreBoot to be written in C and compiled with gcc. Really interesting work.

Samantha joined me for the second day of SCALE; I wasn't sure she would enjoy it, but she seems happy and is learning a lot. I never thought I'd have a Linux-using (never mind Linux-enjoying) girlfriend. I'm a lucky guy.

Thanks to Orv, foo, Gareth and the rest of the SCALE crew for another excellent conference. Roll on SCALE8x!

Labels: , ,

Wednesday, February 18, 2009

Shot cycle

I went shooting for the first time in over a month today, as my back is feeling pretty serviceable, and I missed it. Shot pretty well; it occurred to me my shot cycle was far too long (on the order of 10+ seconds); I was starting out with the bow arm too high, and I was losing the rhythm of the shot getting the sight into the middle of the target. I concentrated starting with the bowarm lower and concentrating on the expansion, and it appears to work - groups tightened, and my shot timing became more consistent.

Labels: , ,

Tuesday, February 17, 2009

Fear and loathing with the HUR1-SU2LA

So the HUR1-SU2LA turns out to be basically No Use(tm) as a NAS device, but it seems to do pretty decently as a usb attached device, so I've just decided to do that instead. I've successfully created an ext3 fs on the thing with no loopback trickery, and I'm now rysncing my /home dir. If I ever feel the need for actual NAS capability I'll plug into an NSLU2 or something.

Labels: , ,

Monday, February 16, 2009

Dist-upgrading to Lenny

Appears to have been a success. Only casualty upon reboot was my numpad appeared to have stopped working. A quick google turned up this blog entry that details a similar issue under Ubuntu. In essence, it turns on mouse keys by default, so you just have to go into Preferences and turn it off, and your numpad will work again.

Labels: , ,

Sunday, February 15, 2009

More Samba fun

My adventures with Samba continue apace; it appears the real root of the issue is the fact that I was using smbfs, which is apparently out-dated. So, I try cifs, but it doesn't work. After some trolling of a nearby samba irc channel and sending some packet dumps to a samba dev (thankyou Kukks) it appears I need to get my hands on a newer version of cifs than the one that ships with debian edge.
So, I get my hands on the 2.6.24-etchnhalf kernel, except it appears to have a dodgy vesa-mode init or something, because even booting into single mode gives me a corrupted display on my Geforce 6600. Boo.

Now that lenny is out, I'll give dist-upgrading to it a try and see what the fallout is...


In other news, I appear to have Monday off due to it being Presidents Day, or something similar. Might make an appearance at the archery range, now that my back is starting to loosen up a bit. Myself and Samantha have also booked our flights home for the trip in July. Given I won't be able to enter the US for 6 months (God Bless America), I'm flying Vancouver-->Toronto-->Dublin, and Samantha is flying LAX-->JFK-->Dublin. It's her first international flight, so I'm kind of bummed I can't accompany her. Hopefully when I make the trip home for Christmas I'll have a shiny new US visa, and we can make the trip home together.

Labels: , , , , , ,

Thursday, February 5, 2009

Cheap network attached storage

I got my hands on a HUR1-SU2LA NAS device today. It basically looks like a large disk caddy; it holds two SATA disks and has an RJ45 socket on the back.

Which is all very well and good in theory, except in practice it's a cretinous pile of arse I had the stupidity to pay $100 for.

I stuck two 1TB disks I had into it, put the (incorrectly documented) jumpers on the RAID1 setting, powered it up, and went about configuring the in-built samba server to my liking. I set up a user, created some shares, etc. Except it doesn't work. The only way I can get smbmount to work is to mount the default share in the factory settings; it seems to ignore any password I specify. Sigh.

So, I move on, thinking password auth for something that's just going to store my torrents is not that big of a deal. Except every time I try to copy files to the thing, after a couple of file creations it stops responding, and smb gives me an i/o error. It seems to be able to copy large amounts of data without issue, but creating a lot of new files quickly in succession will make it bomb out.

As I type this, I'm using dd to create a zero'd file the size of the available space - I'm then going to call mkfs.ext2 on this file, and mount it as loopback. To the cretinous NAS box, it will look like one large file; to my Linux box, it will look like an ext2 fs. The sanity of mounting a samba-shared file as an ext2 loopback is probably questionable, but it's worth a go.

Labels: , , ,

Tuesday, February 3, 2009

The iPhone Toolchain

Having jailbroken my iphone using quickpwn, I've been busy compiling the toolchain for Linux. The howto is relatively straight-forward, I've run into some issues with the xcode dmgs and extraction of the headers from the pkg - I'll add more when I've figured it all out. It's rather non-obvious.

UPDATE: Once you have the xcode dmg from Apple, use dmg2img to convert it to an img; one can mount this as hpfs loopback. Grab the pkg file the howto specifies. This is an xar archive, you'll need to grab the xar tool to get at the contents.

The command will look something like this:

(I recommend doing this in its own directory, as it just extracts to the current dir)

xar -xf MacOSX10.4.Universal.pkg


Once that's done, one of the resulting files should be called Payload. This is a gzip compressed cpio archive that contains the headers you need. I used this:

mv Payload payload.gz
gunzip -d < payload.gz | cpio -i


This is as far as I've gotten, as it's time for bed. I'll blog some more when I've finished building the toolchain.

Labels: , , , , ,

Monday, February 2, 2009

uPNP

Why is there no general purpose uPNP client for Linux? I've had a look at the sample clients provided with SDK by Intel, to no avail. I noticed that my windows machine is able to see my wrt54g as an "Internet Gateway Device", which allows the windows machine to monitor the traffic going through the wrt. I naturally assumed something similar would be possible under Linux, but all I can find are media browsers. Fail. Perversely, there is a package in apt that allows a Linux box to *act* as an Internet Gateway Device. I may have to break out the packet sniffer some idle evening and come up with my own solution.

UPDATE: After some further googling, I've uncovered MiniUPnP, the source of which contains a client called upnpc (both static and dynamic versions). From this I should be able to create some form of gkrellm module that will do the job. Win.

Labels: , ,

Alternate history and command line hacks

I encountered a blog entry on pipeviewer, a rather interesting utility that provides some metrics on a data being piped through it. I'm not going to parrot the linked blog entry; whilst not an essential tool, I can see it being very useful.

In other news, I spent the weekend studiously ignoring the superbowl, like the filthy un-american that I am. Picked up two books, one (whose title escapes me at present) is a collection by various historians, detailing 20 ways Hitler could have one the war; the other is the The Guns of the South by the master of alternate history, Harry Turtledove. Interesting read so far, around half-way through.

Labels: , , ,