www.nicecuppa.net |
home totally freeware |
| Still saving for my mid-life crisis | |
A while ago I had a dabble with Scratchbox (www.scratchbox.org) on Linux (Ubuntu 9.10 Karmic Koala). It worked well in the end but was a bit of a mission to get it up and running with various tweaks here and there.
For me Linux installations come and go like the wind so when I wanted to do some cross-compiling onto my IcyBox NAS4220 I was left scratching my head.
Google came to my aid again and it's working but I thought I'd document my experience so others can benefit.
1. Update your repository
Add the following line to the bottom of the file /etc/apt/sources.listdeb http://scratchbox.org/debian/ apophis main
Then from a terminal enter the following: -sudo apt-get update
2. Install Scratchbox
In a terminal enter the following: -sudo apt-get install scratchbox-core scratchbox-devkit-debian scratchbox-libs scratchbox-devkit-cputransp scratchbox-toolchain-arm-linux-ct401-2.3
3. Get grubby
My Ubuntu has Grub2 so I needed to edit /etc/default/grub adding "vdso=0" to GRUB_CMDLINE_LINUX, so it now reads: -GRUB_CMDLINE_LINUX="vdso=0"
Then you have to update your Grub for some reason, I ran the following from the command line: -sudo /usr/sbin/update-grub
It does some stuff but only takes a few seconds. Finally, reboot! This is important otherwise the VDSO=0 won't kick-in.
4. Some other stuff
At this point I was happily compiling and running my c++ programmes, but when I wanted to run them I got the error mmap: permission denied. A quick google and found out I needed to update the file /proc/sys/vm/mmap_min_addr to have the value 4096 in it. I have no idea what this does but it works and I don't care.
5. Resources
I'd love to say I worked all this out for myself but that would be a fib. The following sites were the inspiration for this post and I couldn't have done it without them.
http://en.nas-4220.org/index.php/Compiling_with_scratchbox
http://inz.fi/blog/2008/01/17/scratchbox-on-hardy/
http://balau82.wordpress.com/2010/03/14/scratchbox-on-ubuntu/
Labels: LINUX
