Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: Saphrano on September 21, 2010, 03:59:26 PM

Title: Using UI Simulator under Linux, no audio playback
Post by: Saphrano on September 21, 2010, 03:59:26 PM
Hello!

I'm trying to play with UI simulator of sansa clip+. I started from sources, checked out the latest svn revision (using git-svn) and built the simulator. It went fine, except few same errors:
Code: [Select]
fatal: ambiguous argument 'HEAD^..': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions

Despite of these fatal errors it built rockboxui anyways. Then I extracted the latest sansa clip+ build (http://build.rockbox.org/data/rockbox-sansaclipplus.zip) to simdisk directory. Also, I copied some audio files there, and when I tried to play I got:
Code: [Select]
failed to load /.rockbox/codecs/mpa.codec
lc_open(/.rockbox/codecs/mpa.codec): simdisk/.rockbox/codecs/mpa.codec: invalid ELF header
Codec load error
failed to load /.rockbox/libtemp_binary_0.dll
lc_open(/.rockbox/libtemp_binary_0.dll): simdisk/.rockbox/libtemp_binary_0.dll: invalid ELF header
error loading codec

It immediately created this libtemp_binary_0.dll, which didn't exist before I run rockboxui the first time. This is a Windows library, why was it created when I use linux?
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: saratoga on September 21, 2010, 04:09:10 PM
Then I extracted the latest sansa clip+ build (http://build.rockbox.org/data/rockbox-sansaclipplus.zip) to simdisk directory.

You can't run a build for the Clip+ on your PC unless your PC is also a clip+.  The clip has an ARM9 CPU, your PC probably has an Intel or AMD processor :)

You need to install a simulator build (a build of rockbox compiled for a linux PC).  To do that do:

make
make install
./rockboxui
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: Saphrano on September 21, 2010, 04:18:48 PM
Quote
The clip has an ARM9 CPU
but there is no Windows for ARM9, and I hardly believe there is one for sansa clip :) Why it tries to use dll's?

I did "make install", but nothing changed, I get the same errors.

UPD: Oh, i think I got it now. Besides the simulator, I need to build rockbox for x86 too :)

UPD2: But what do I choose in configure? (N)ormal build, (A)dvanced or something else? I tried with Normal:
Code: [Select]
$ ../tools/configure
...
62
Platform set to sansaclipplus
Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (M)anual: (Defaults to N)
N
Normal build selected
Using source code root directory: ~/rockbox.svn.git
../tools/configure: 2970: arm-elf-eabi-gcc: not found
../tools/configure: 2978: arm-elf-eabi-ld: not found
[WARNING] The compiler you must use (arm-elf-eabi-gcc) is not in your path!
[WARNING] this may cause your build to fail since we cannot do the
[WARNING] checks we want now.
Using arm-elf-eabi-ld
Created Makefile
$ make
/bin/sh: arm-elf-eabi-gcc: not found
fatal: ambiguous argument 'HEAD^..': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
/bin/sh: arm-elf-eabi-gcc: not found
...
make: arm-elf-eabi-gcc: Command not found
make: *** [~/rockbox.svn.git/rockbox-build/firmware/common/config.o] Error 127
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: saratoga on September 21, 2010, 04:31:28 PM
Quote
The clip has an ARM9 CPU
but there is no Windows for ARM9, and I hardly believe there is one for sansa clip :) Why it tries to use dll's?

It doesn't use Windows dlls, just some files have that file extension. 

I did "make install", but nothing changed, I get the same errors.

Thats because you can only install a sim build, and thats not a sim build you configured.  Rerun configure and this time choose sim. 

UPD2: But what do I choose in configure? (N)ormal build, (A)dvanced or something else? I tried with Normal:

Sim == Simulator build (runs on PCs)
Normal == Build for your player
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: Saphrano on September 21, 2010, 04:45:25 PM
Rerun configure and this time choose sim.

But I did it the first time. Let's start from scratch:
Code: [Select]
$ mkdir simulator-build-2
$ cd simulator-build-2
$ ../tools/configure
...
Platform set to sansaclipplus
Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (M)anual: (Defaults to N)
S
Simulator build selected
Using source code root directory: ~/rockbox.svn.git
Linux host detected
Enabling MMX support
Simulator environment deemed little endian
Created a 'simdisk' subdirectory for simulating the hard disk
Using gcc 4.4.3 (404)
Using ld 2.20.1.20100303
Created Makefile
$ make
...
$ make install
$ ./rockboxui
Can't open font: /.rockbox/fonts/08-Rockfont.fnt
read_bmp_file: can't open '/.rockbox/icons/viewers.bmp', rc: -1

Now trying to play some mp3. In UI it showed something like "Can't find .rockbox, installation incomplete". And again:
Code: [Select]
lc_open(/.rockbox/codecs/mpa.codec): simdisk/.rockbox/codecs/mpa.codec: cannot open shared object file: No such file or directory
Codec load error

Title: Re: Using UI Simulator under Linux, no audio playback
Post by: saratoga on September 21, 2010, 04:53:40 PM
Did make actually succeed? 
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: Saphrano on September 21, 2010, 05:04:51 PM
Yes, there were no errors related ti build process, only this "ambiguous argument 'HEAD^..'". I attached the output from make.
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: saratoga on September 21, 2010, 05:29:00 PM
I've never seen that error before, but since it says FATAL, i think theres a good chance that means the build didn't finish, which is probably why the install fails at the next step.
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: kugel. on September 21, 2010, 05:36:46 PM
I suspect your checkout is broken due to the svn commit message editing that happened in r28078, and that version.sh errors out because it asks git for the revision.

"git svn reset -r 28077 && git svn rebase" should do it.
Title: Re: Using UI Simulator under Linux, no audio playback
Post by: Saphrano on September 22, 2010, 03:13:14 PM
Thanks, now it works.