site  contact  subhomenews

ROX-Filer for ARM CPU

April 24, 2012 — BarryK
This has been very educational. I compiled ROX-Filer in the Mele A1000, which has a A10 chip with Cortex-A8 ARM CPU. Operating system is Ubuntu Lucid Lynx.

Without specifying any CPU-tuning, it seems to have automatically compiled for a 'armv7' CPU, which is what the Cortex-A8 is. Fine, I got a stripped executable of 361KB. Works great.

However, as the Cortex-A8 is backwards-compatible with the arm1176jzf-s CPU (armv6) used in the Raspberry Pi, I had another go at compiling ROX-Filer. This time I did this before the configure step:

# export CFLAGS='-mcpu=arm1176jzf-s'

Note: the 'configure' script in ROX-Filer reads the global CFLAGS and prepends to it's own options. So, CFLAGS is the same in both cases except the latter case has the additional -mcpu option.

The good news is that this works fine on the Cortex-A8 CPU. The bad news is that the stripped executable is 489KB!

Yikes. I think that this is because the armv7 has the 'thumb2' instructions, which greatly reduce executable size. For the first time I am seeing just how much!

I have created a PET package. This is for Lobster to test, as he is the only one who has a RasPi. Lobster, grab this:
http://distro.ibiblio.org/quirky/arm/pet_packages-armv6/rox_filer-20111022-patched2-armv6.pet

Expand it:

# tar -zxf rox_filer-20111022-patched2-armv6.pet

You have to get the files over to your RasPi somehow, and manually install the files. Do not put them in a fat or ntfs partition, only a Linux partition -- might be better to get the pet into the RasPi then run the tar operation.

ROX-Filer is launched via /usr/local/bin/rox, so just open a terminal and type "rox". Please be running as 'root' when you test rox.

Note, I am greatly enhancing the Ubuntu Lucid installation on the Mele -- well, it isn't really an "installation" as it just runs off the SD card. I am thinking of making an image soon and upload it somewhere -- but it will be about 1GB compressed, and I will have to go to a friend's place to do the upload.

For reference, if you want to see the GNU compiler ARM parameters:
http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

Earlier posts about Ubuntu on the Mele:
http://bkhome.org/archive/blog2/201204/mele-installing--dev-packages.html
http://bkhome.org/archive/blog2/201204/running-lucid-ubuntu-on-mele-a1000.html

Comments

ARM puppification
Username: lobster
I am on it. Thanks for the clear instructions. I already have the deb ARM rox in my puppification of Debian Squeeze. I seem to remember a lot of dependencies . . . http://puppylinux.org/wikka/PuppySchoolRaspberryPi

Mele A2000
Username: eternal-sunshine
"Hi Barry, My Mele A2000 just arrived (UK). In case others are interested in getting one I ordered 6 April, it shipped 10 April. I bought it from www.smalltao.com who even refunded excess P&P. Very impressed all round. So I would really appreciate if you would upload your Lucid image someplace.Should have my Pi end of May :-(

downloaded straight to pi
Username: lobster
"[code]root@raspberrypi:/home/pi/Puppi# tar -zxf rox_filer-20111022-patched2-armv6.pet gzip: stdin: decompression OK, trailing garbage ignored tar: Child returned status 2 tar: Error is not recoverable: exiting now root@raspberrypi:/home/pi/Puppi# [/code] uninstalled previous rox-filer from deb downloaded the pet straight to pi did a sudo su ran command

re lobster the long run puppian
Username: K Godt
"[code]root@raspberrypi:/home/pi/Puppi# tar -zxf rox_filer-20111022-patched2-armv6.pet[/code] probably needs to be [code]root@raspberrypi:/home/pi/Puppi# pet2tgz rox_filer-20111022-patched2-armv6.pet[/code] before attempting to umtar it does [code]petget rox_filer-20111022-patched2-armv6.pet [/code] not work ?? ;)

Bigger Executable
Username: Dougal
"Barry, isn't armv7 the (first) one where they have the FPU? Maybe the size difference is since you have to emulate the FPU in software in armv6. A while ago I posted here links to LWN articles about the Fedora ARM port and he mentioned there the things like compiler flags.

Rox-Filer failure
Username: lobster
"OK expanded - permissioned etc I can see all the files on the Rpi . . . and segmentation fault [code]pi@raspberrypi:~/Puppi/rox2/rox_filer-20111022-patched2-armv6/usr/local/apps/ROX-Filer$ sudo su root@raspberrypi:/home/pi/Puppi/rox2/rox_filer-20111022-patched2-armv6/usr/local/apps/ROX-Filer# ./ROX-Filer Segmentation fault root@raspberrypi:/home/pi/Puppi/rox2/rox_filer-20111022-patched2-armv6/usr/local/apps/ROX-Filer#[/code] will try a few more things

Installing Rox PET in Pi
Username: BarryK
"Lobster, This message means that the expansion succeeded: [i]gzip: stdin: decompression OK, trailing garbage ignored[/i] The error message is because PETs have some stuff appended to the file. You just ignore the error message. My instructions were to copy all the files to their destinations, for example, absolute path /usr/local/bin/rox, /usr/local/apps etc. Do as user root. Then after manual installation, just type "rox" to run it.

CUPS compile failure
Username: BarryK
"Compiling in the Mele, I was planning to use this for compiling apps, so they will work in the RasPi: [i]# export CFLAGS='-mcpu=arm1176jzf-s'[/i] Well, I haven't had confirmation from Lobster yet that Rox works. Today I compiled CUPS 1.3.11 with that CFLAGS parameter, and it aborted with a compiler error! Without CFLAGS preset, CUPS compiled ok. So, it might be a bad idea trying to compile for a lower-level CPU. I might just have to compile packages for the armv7 CPU and later on repeat it all for the RasPi.

Healingrebuild from Debian tomorrow
Username: lobster
"[img]http://img406.imageshack.us/img406/9584/puppification2.jpg[/img] I intend to restart and rebuild from Debian Squeeze tomorrow (with no rox - I was not able to uninstall all the dependencies). http://puppylinux.org/wikka/Puppi I will have another go then . . . I did write and ask the Rpi people to send you an early board, which would speed up the process . . .

small image
Username: tret
"It would be great if the image will fit on a 2gb SD card... Thnx for posting all info and all efforts!

Problems sending you PM via Murga
Username: Tony
"Hi Barry, I just went to the Murga board to check and there is nothing in my sent folder so i tried to send it to you again but even though it said it had submitted there is nothing in the sent folder, I will contact John. I have contacted the Raspberry Pi team and offered to pay for one for you as a gift to be sent ASAP. Drop me a message with your email address so I can forward you the details. All the best Tony aka veronicathecow

Re SD size, RasPi enthusiasm
Username: BarryK
"Tony, The expanded size is about 3GB, so you will need a 4GB card -- they only cost about 5-6 dollars. Lobster said that he already put in a good word for me. I'm not as keen about the RasPi as you guys are. I am looking to Puppy working on a armv7+ CPU, which is what I am doing right now with the Mele. However, I probably am obliged to get Puppy basically going on the RasPi.

compiling
Username: lobster
"[i]Well, I haven't had confirmation from Lobster yet that Rox works[/i] Expanded and copied to the right places and . . . [b]segmentation fault[/b] so sadly not working [no sobbing in the ranks please] I hope to have a go compiling native to the board

Floating point
Username: BarryK
"Dougal, I would have thought that the "-mcpu=arm1176jzf-s" would tell the Gnu compiler to use all the features of that CPU, which includes a hardware floating point unit (known as the 'vfp'). ...well, that seems logical. To test further, I tried this: [i]-mcpu=arm1176jzf-s -mhard-float -mfpu=vfp[/i] or: [i]-mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp[/i] However, the compiler reported that it does not support the -mhard-float, -mfpu=vfp and -mfloat-abi=hard options. Those options do apparently work on at least one of the RasPi distros, as that is where I read about using them. I have given up trying to compile for armv6 on the Ubuntu Lucid OS.

hard
Username: Darkcity
"There is a thread about creating a debian version with hardfloat for the RPi http://www.raspberrypi.org/forum/projects-and-collaboration-general/debian-hard-float-armhf-for-rpi

Rasp Pi board
Username: Tony
"Hi Barry, sorry, I didn't make myself clear. I wrote to the Rasp Pi team offering to buy you a board for development purposes to be sent out ASAP (from their own stock). Eben has okayed it, full details in the Murga board PM. If you want to go ahead then just let me know and it should be sent to you soon rather than having to wait for Farnell/R.S. Cheers Tony

I'll wait
Username: BarryK
"Tony, I got in pretty early with Farnell, so I probably won't have to wait too long. Thanks for the offer, but the wait is ok as I am busy with the Mele for now.

My RasPi is coming "soon"
Username: BarryK
"I have just received an email form Element14 Australia, telling me that my RasPi will be shipped to me in week starting May 28. That's fine, I'll be pretty busy next four weeks anyway. I will post to this blog soon (probably this weekend) how others with any armv6 type of system, or an armv6 emulator/compiler environment, can help get ready for porting Puppy to the RasPi -- by compiling some apps for me.

Re BaCon
Username: BarryK
"Yes, I have compiled BaCon for the Mele, I plan to have it in the 'devx' sfs for the first build of Puppy on the Mele.


Tags: puppy