Rockbox Development > Starting Development and Compiling
Ingenic MIPS GCC 7.2.0 Toolchain to compile m3k native port
korvin:
--- Quote from: vitt13 on June 28, 2022, 02:26:39 PM ---I confirm that the toolchain mips-linux-gnu-ingenic-gcc7.2.0-glibc2.29-fp32-r5.0.4 does not automatically generate code with specific xburst SIMD instructions and optimizations. You need to change source code of codecs and decoders with using specific SIMD assembly instructions (MXU).
I reffer to this https://www.rockbox.org/wiki/IngenicJz47xx , "Ingenic Media Extension Instruction Set" and "MXU User Guide" ftp://ftp.ingenic.com/SOC/X1000/X1000_M200_MXU-User-Guide.pdf
--- End quote ---
I have applied your patches to latest source code from git. (I hope I have done it in a right way :)) And now I should try to find to to configure a latest toolchain and learn how to build with it, update rockboxdev.sh or build with manuals steps...
I don't know exactly how, but I will try and read docs and learn something new for me )
Below is a link to the current sources (30.06.22) with patches (thanks to Vitt13) for the ingenic GCC 7.2.0
rockbox patched sources for ingenic GCC 7.2.0
korvin:
I have succesefully compiled main binary (rockbox.m3k ), but now I have troubles compiling codecs, someting wrong with linking -msoft-float library. This option is activated via CFLAGs
--- Quote ---some codecs build failed so I just changed "-lgcc" in link command to
mips-linux-gnu-ingenic-gcc7.2.0/lib/gcc/mips-linux-gnu/7.2.0/libgcc.a (for two particular compiling failed situation)
and
mips-linux-gnu-ingenic-gcc7.2.0/lib/gcc/mips-linux-gnu/7.2.0/soft-float/libgcc.a (for other files)
for added $(LDGCC720)
--- End quote ---
I think I haven't understand how (and where) should I initialize this variable(constant) "$LDGCC720" and wich value should I set instead of "-gcc" ?
Sorry, I am a NOOB in Linux, GCC, C world... So sorry for my stupid questions )
vitt13:
--- Quote from: korvin on June 30, 2022, 04:35:41 PM ---I think I haven't understand how (and where) should I initialize this variable(constant) "$LDGCC720" and wich value should I set instead of "-gcc" ?
--- End quote ---
I don't remember... since december 2021.
In Makefile I defined "-DGCC720" as GCCOPTS so it must be C preprocessor directive somewhere.
Probably it was obsolete with "nasy hack" in ' rockbox_/apps/debug_menu.c ' and "LDGCC720" renamed to "LGCC520"
#ifdef __linux__1
---
Also attached MXU code example with nothing related to rockbox. (zip archive, rename to mxu_test.zip)
korvin:
--- Quote from: vitt13 on July 01, 2022, 06:09:58 AM ---I don't remember... since december 2021.
In Makefile I defined "-DGCC720" as GCCOPTS so it must be C preprocessor directive somewhere.
Probably it was obsolete with "nasy hack" in ' rockbox_/apps/debug_menu.c ' and "LDGCC720" renamed to "LGCC520"
#ifdef __linux__1
---
Also attached MXU code example with nothing related to rockbox. (zip archive, rename to mxu_test.zip)
--- End quote ---
Thanks a lot ! This should help me, I'll try today, after work :)
amachronic:
Using the Ingenic toolchain is probably a bad idea for several reasons--
- it's a hosted linux toolchain, as opposed to the OS-agnostic "mips-elf" toolchain. That can cause issues, see OSDev wiki Why do I need a cross compiler?
- it's doubtful that Ingenic made many changes or improvements to GCC (but I haven't bothered checking)
- it's old (GCC 12 is now latest, GCC 7.2 was released in mid 2017)
Why not just build a normal GCC 12 cross compiler? It's not that difficult to modify rockboxdev.sh or do it by hand, and then you don't need to patch linker scripts and add special flags.
All the MXU instructions are handled by filtering assembly output through the mxu_as script, and you can do that with any toolchain.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version