Showing posts with label raspberrypi. Show all posts
Showing posts with label raspberrypi. Show all posts

Wednesday, 11 July 2012

Enough Space

The point of a RaspberryPI is, largely, to program it. Getting your code from the PC onto the PI, building it, and getting it back from the PI to PC can be done easily with hg (aka mercurial), the distributed version control system. This makes headless usage of a PI over a network via ssh a bit easier. Mercurial is readily available to debian based linux on the PI via    
    sudo apt-get install mercurial
There are two aspects of this: getting code onto the PI, and from the PI, pushing the code / build artefacts back to the original machine. It seems sensible not to trust a cheap SD card overmuch.
Mercurial includes a builtin webserver that can permit remote access to your code, both read access and write access.
Assuming you have already an hg repository created, you can serve this as follows (from the hg repository directory) on your development PC
    hg serve
You can then view the repository in the web browser at http://localhost:8000

This is also now visible to the PI (and any other machines on the same network, not a secure practice!). 
The initial clone can be done as follows
    hg clone http://192.168.1.71:8000 destdir
Subsequently, changes made on the PC can be fetched via hg as well, from within the hg repo dir on the PI
    hg pull
Since the PI is a full Linux machine, its quite practical to make changes locally on the PI (say, from an ssh session or remote X11 setup). By default, however hg will not let a push occur to a repository served via hg serve

This is possible, however. On the PC (in the .hgrc or Mercurial.ini file, depending on OS) add the following section.
   [web]
   allow_push = *
   push_ssl = false
Changes made on the PI can then be pushed via hg, from within the hg repo dir on the PI
    hg push



Thursday, 21 June 2012

Counting

The RaspberryPI is a small, credit card sized, ARM based PC that can run Linux. Love2D is a game framework for 2D games in Lua, with physics via box2d and all round quite nice for writing small games in across Windows, OSX, and Linux. 

I have built the current Love2D on the RaspberryPI using the current suggested release of Linux for the pi (based on Debian Squeeze). This was just following the instructions on building Love2D from source at the Love2D wiki. There is an outdated build of Love2D in the debian repo but this is 0.5.0 vs the current 0.8.0 release.

Current status: the demos seem to run, just very, very, slowly. This is probably attributable to softfp being used throughout the whole OS build, and non-optimized X11 drivers on the PI. With luck, all that is needed to make Love2D good for use is the system being built with hardfp as is done on the raspbian project.