imagitronics.org


dream it, build it, break it, repeat.

Update: Per this discussion on the remastersys forums, my fix will be included in remastersys 2.0.14.

This week, I was using remastersys to create a custom ubuntu-based distribution (more info on this later). One of the things that I noticed about remastersys version 2.0.13-1 was it’s lack of compatibility with Ubuntu’s USB Startup Disk Creator utility.

I have created a simple patch to address the issue. You can download it at http://www.imagitronics.org/download/ubuntu_creator.patch.

Alternatively, you can edit the file /usr/bin/remastersys and insert the following code immediately before Step 7.

#Step 6.5 - Added by Tim Farley. Make ISO compatible with Ubuntu Startup Disk Creator (Karmic).
echo "Making disk compatible with Ubuntu Startup Disk Creator."
touch $WORKDIR/ISOTMP/ubuntu
touch $WORKDIR/ISOTMP/.disk/base_installable
echo "full_cd/single" > $WORKDIR/ISOTMP/.disk/cd_type
echo $(uname -a) > $WORKDIR/ISOTMP/.disk/info
if [ "$LIVECDURL" = "" ]; then
LIVECDURL="<a href="http://www.geekconnection.org/remastersys" target="_blank">http://www.geekconnection.org/remastersys</a>"
fi
echo $LIVECDURL > $WORKDIR/ISOTMP/.disk/release_notes_url

This version allows you to set an addition variable in your /etc/remastersys.conf called LIVECDURL that points to the address of your custom distribution. The LIVECDURL variable defaults to the remastersys homepage if left unset.

Enjoy!

Tim

No tags

Feb/09

13

ybox2 base64 encoder

I have created a functional base64 encoding method for the ybox.

It’s not ideal as it requires the programmer to declare an output array large enough to hold the result of the encoding procedure. I tried everything I could think of to avoid this by using the size of the input string (strsize(in_ptr)*(4/3)) to store the output, but I couldn’t get it.

Download the updated base64.spin.

Sample usage:

CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000

OBJ
text : "TV_Text"
b64  : "base64"

VAR
byte outstring[25]

PUB start | i
text.start(12)

b64.encode(string("admin:admin"), @outstring)
text.str(@outstring)
text.out(13)

b64.encode(string("admin:password"), @outstring)
text.str(@outstring)
text.out(13)

b64.encode(string("Die SPIN Die!"), @outstring)
text.str(@outstring)
text.out(13)

b64.encode(string("meh"), @outstring)
text.str(@outstring)

repeat

And a sample image from the above code:

If anyone has any tips that can help get rid of the need to declare the output variable’s size, please let me know. Tim

No tags

Well, it’s not very interesting (yet?) but I started working on a uTorrent download monitor using the ybox2. At the moment, it’s really nothing more than a simple hack. The ybox2 is running a slightly modified infowidget. When I say slightly modified, I mean I added one line to insert a Basic base64 authentication header for the uTorrent webserver:

 

tel.txmimeheader(string(“User-Agent”),string(“PropTCP”)) tel.txmimeheader(string(“Connection”),string(“close”)) tel.txmimeheader(string(“Authorization”),string(“Basic YWRtaW46YWRtaW4=”)) tel.str(@CR_LF)

 

I haven’t figured out how to write my own base64 encoding routine in Spin yet, so for the time being, I used python to generate the base64 encoding of the default username/password for the uTorrent web server (admin:admin).

Apart from that, I’m using a uTorrent python library on the web server to generate a properly formatted document for the infowidget and the file is updated every minute by the Windows Task Scheduler: The simple python script can be found at http://pastebin.com/f2a47b927

TODO:

  • There’s a lot that I’d like to do, but I’m currently in the midst of a hate/hate relationship with Spin.
  • Ideally, I’d like to create a base64 encoder routine, and create a set of routines in Spin that can query the uTorrent webui natively without the python proxy.
  • If/when that happens, I’d like to add remote control, scrolling, and the ability to select a download to view details. We’ll see how my relationship with Spin evolves. I’m not exactly a good programmer to begin with, and Spin is shaking me up pretty good.


No tags

Feb/09

3

Spin

The spin language used by the Parallax Propeller chip is pretty brutal. There are quite a few little nuances that go against everything you’ve ever learned in your intro to programming courses. I felt kind of like a hacker in the mid 80’s when I got overly excited to see a simple “Hello World” type application on the screen.

It’s really not the language or the chip that’s difficult, per say, but rather the ybox2 specific libraries that implement the TCP/IP stack. A lot of the code is left up to your application, so even the simplest of the network-enabled widgets work out to around 300 lines of code. That’s a lot to digest when you’re just learning a new architecture and language.

Not to mention I’ve been pretty spoiled by Visual Studio and Eclipse for the past 4-5 years. I’m so used to having all the documentation described to me as I type, that having to find the source files and check what methods/constants/variables are available is a real drag!


No tags

Feb/09

2

ybox2

My wife bought me a ybox2 for Christmas and I just got around to assembling it this weekend. The ybox is a pretty amazing little ethernet enabled set-top box gadget that gives you the ability to create your own widgets which can be displayed on your TV. I have a couple of widgets in mind that I’d like to create, but the ybox uses a proprietary Parallax Propeller chip, which requires you write code in either Spin (which looks like Pascal threw up on win32 asm) or straight assembly code. Oh joy…


No tags

<< Latest posts

Older posts >>

I shop at

Theme Design by devolux.nh2.me

Hosted in the cloud

To top

imagitronics.org is Digg proof thanks to caching by WP Super Cache