Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling xidel using cross compiler for mips platform ? #36

Closed
Baltazar500 opened this issue Nov 8, 2019 · 7 comments
Closed

Compiling xidel using cross compiler for mips platform ? #36

Baltazar500 opened this issue Nov 8, 2019 · 7 comments

Comments

@Baltazar500
Copy link

Hello.

How to compile the xidel binary for the mips platform using this cross-compiler http://www.codesourcery.com/sgpp/lite/mips/portal/package4432/public/mips-linux-gnu/mips-4.3-154-mips- linux-gnu-i686-pc-linux-gnu.tar.bz2 ? I use debian and I need to build a binary file for the Dune HD media player, which is based on mips. Simple build examples using gcc or make do not cause problems, but xidel uses FreePascal and I don’t know how to build a binary :(

Need to install free pascal? Package "fpc" ? And use build.sh with command line switches ? What are the command line switches ?

Sorry, I'm newbie

@benibela
Copy link
Owner

You need a freepascal cross compiler. Since there is probably no package for that you need to compile freepascal first. Get it with svn clone https://svn.freepascal.org/svn/fpc/trunk

It can be compiled with something like sudo make crossinstall OS_TARGET=linux CPU_TARGET=mips. Or CPU_TARGET=mipsel for little endian

It likely needs ld, as and crt* from the package you have linked. It searchs for files like mips-linux-as and mips-linux-ld, so the easiest way is to copy them to the $PATH and rename them. You can configure the path to crt in ~/.fpc.cfg, like:

 #IFDEF mips
 -Fl/...basepath.../lib/gcc/mips-linux-gnu/4.3.3
 #endif

And use build.sh with
command line switches ? What are the command line switches ?

fpc's compiler is actually called ppc*. The cross compiler probably something like ppcmips, so you need to call it with build.sh --compiler ppcmips. Then it uses the cross compiler. You might need to set -Pmips to set the target cpu, otherwise it might try to use the cross compiler to create a x86 xidel version, but the script has no option for that, then you need to put -Pmips in the script code

@Baltazar500
Copy link
Author

For me, building xidel using free pascal turned out to be impossible :(

I do not have enough experience and knowledge to compile.

Is it possible in the future that xidel will be built for mips from you?

@zpimp
Copy link

zpimp commented Nov 18, 2019

dont have anything useful to contribute to the discussion :)
im just curious about the machine you intend to run it on, if you can share a link

@Baltazar500
Copy link
Author

im just curious about the machine you intend to run it on, if you can share a link

For mips Dune HD TV-102 media player

uname -a

Linux tangox 2.6.32.15-27-sigma #3 PREEMPT Fri Dec 19 09:26:17 UTC 2014 mips GNU/Linux

@Baltazar500
Copy link
Author

cat /proc/cpuinfo

system type : Sigma Designs TangoX
SMP8XXX Chip ID : 8674
SMP8XXX Rev ID : 2
System bus frequency : 351000000 Hz
CPU frequency : 702000000 Hz
DSP frequency : 351000000 Hz

processor : 0
cpu model : MIPS 24Kc V7.12 FPU V0.0
BogoMIPS : 467.96
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
ASEs implemented : mips16
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available

@gnfalex
Copy link

gnfalex commented Dec 16, 2019

Greetings.
Sorry for bad English and ugly code.

In attachment - script for crossbuilding xidel from Debian 10 (Buster) x86 to mipsel-linux.
build_xidel_mipsel.txt

Patch for synapse/ssfpc.inc based on lines 32-39 of socketsh.inc from FPC source - https://svn.freepascal.org/svn/fpc/trunk/packages/rtl-extra/src/inc/socketsh.inc

Best Regards, Alexey.

@benibela
Copy link
Owner

That is a good description, so if someone needs mips they can follow those instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants