Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Some glitches in Rockbox source code on MIPS...
« previous next »
  • Print
Pages: [1]

Author Topic: Some glitches in Rockbox source code on MIPS...  (Read 1919 times)

Offline victor

  • Member
  • *
  • Posts: 2
Some glitches in Rockbox source code on MIPS...
« on: March 16, 2011, 09:01:37 AM »
Hi,
Currently the MIPS toolchain for Rockbox (gcc 4.1.2) seems to be a little outdated.Today I tried to compile Rockbox for Onda VX747 using mips-sde-elf-gcc 4.5.1. The compilation was not smooth, and I found some small glitches in the source code. With some efforts I fixed those problems and finally built Rockbox successfully.
Here is the list of problems I encountered:

@rockbox/apps/codecs/libmad/fixed.h,line 299
#  define MAD_F_MLX(hi, lo, x, y)  \
    asm ("mult  %2,%3"  \
         : "=l" (lo), "=h" (hi)  \
         : "%r" (x), "r" (y))
Since gcc 4.4 the MIPS port no longer recognizes the "h" asm constraint.
It was necessary to remove this constraint in order to avoid generating unpredictable code sequences.
You can achieve the same effect using 128-bit types:
typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
# define MAD_F_MLX(hi, lo, x, y) \
do { \
   u64_di_t __ll = (u64_di_t) (x) * (y); \
   hi = __ll >> 32; \
   lo = __ll; \
}while(0)

@rockbox/apps/codecs/libmusepack/requant.h,line 50
@rockbox/apps/plugins/fft/const.h, line 1-10
@rockbox/apps/plugins/goban/display.h, line 41, line 44
@rockbox/apps/plugins/rockboy/rockmacros.h, line 100
missing "extern". The linker will complain about duplicate symbols.

@rockbox/firmware/target/mips/ingenic_jz47xx/app.lds, line 3
@rockbox/firmware/target/mips/ingenic_jz47xx/boot.lds, line 3
@rockbox/apps/plugins/plugin.lds, line 12
OUTPUT_FORMAT("elf32-littlemips")
Binutil had given up elf32-littlemips since 2.11.90.04.
It Changed Linux/MIPS to use the SVR4 MIPS ABI instead of the IRIX ABI.
The current Linux/MIPS targets are elf32-tradlittlemips for little endian MIPS32.

@rockbox_fix/apps/codecs/libwma/SOURCES, line 3
@rockbox_fix/apps/codecs/libwmapro/SOURCES, line 3
"../lib/ffmpeg_bitstream.c" seems to be unnecessary in SOURCES file.

The attachment is a diff patch.

PS: The link time optimization (-flto) feature of gcc 4.5.1 was still buggy.
When enabled I got "internal compiler error: Segmentation fault" at /apps/plugins/mpegplayer/mpeg_settings.c:1281:6...
Hope it can be fixed in the new release 4.6.0. :)

Regards,
Victor.
* rb_mips.diff.txt (6.91 kB - downloaded 140 times.)
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Some glitches in Rockbox source code on MIPS...
« Reply #1 on: March 16, 2011, 10:32:38 AM »
Generally speaking, we tell people to use the exact version of compilers our script installs, rather than the newest one.

Newer compilers can always introduce incompatibilities or difficulties.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Some glitches in Rockbox source code on MIPS...
« Reply #2 on: March 16, 2011, 11:43:23 AM »
Quote from: victor on March 16, 2011, 09:01:37 AM
Here is the list of problems I encountered:

Post a patch with your changes and an explanation of what they do on the tracker.  

They'll probably be missed on the forums.
« Last Edit: March 16, 2011, 11:55:19 AM by saratoga »
Logged

Offline victor

  • Member
  • *
  • Posts: 2
Re: Some glitches in Rockbox source code on MIPS...
« Reply #3 on: March 16, 2011, 01:36:15 PM »
Reported in #FS12013 and #FS12014. Please confirm.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Some glitches in Rockbox source code on MIPS...
« Reply #4 on: March 16, 2011, 02:07:57 PM »
Thanks, hopefully one of the MIPS people can review and commit that.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Some glitches in Rockbox source code on MIPS...
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.072 seconds with 15 queries.