CrossCompiling > MIPS

Für Fragen zur Programmiersprache auf welcher Lazarus aufbaut
Antworten
skydiablo
Beiträge: 9
Registriert: Di 23. Jun 2009, 22:33

CrossCompiling > MIPS

Beitrag von skydiablo »

hi fpc community!

is ne weile her, dass ich was mit FPC gemacht habe, nun is es aber mal wieder so weit. ich habe folgendes vor; habe ein router auf dem ich openWRT aufgespielt habe welcher mit einem MIPS CPU ausgestattet ist. nun will ich mit meiner windows-büchse ein "hello-world" coden und das für mein router compilieren.
kurzerhand mal google gefragt wie das funzen könnte, mit dem ergebnis zu diesem wiki eintrag:

http://wiki.freepascal.org/MIPS_port

daraufhin habe ich folgendes gemacht:

1. Lazarus 1.0.2 (FPC 2.6.0) installiert -> c:\lazarus\
2. Aktuelles Snapshot besorgt: http://www.freepascal.org/develop.html (2.7.X) -> c:\fpctrunk\
3. MIPS compiler erstellt: c:\fpctrunk\compiler\ppmipsel.lpi -> c:\fpctrunk\compiler\mips\pp.exe
4. Crosscompiler erstellen:

Batch File:

Code: Alles auswählen

cd C:\fpctrunc\
set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\fpctrunc\compiler\mipsel
make cycle CPU_TARGET=mipsel OS_TARGET=linux
pause
dies führt zu dem ergebnis:
C:\fpctrunc>make cycle CPU_TARGET=mipsel OS_TARGET=linux
make: *** No rule to make target `cycle'. Stop.
darauf hin habe ich von "cycle" auf "all" gewechselt. nachdem er nun etliche zeilen in die console geballert hat, endet es hiermit:
make -C C:/fpctrunc/rtl 'OPT= ' all
make[4]: Entering directory `C:/fpctrunc/rtl'
make -C linux all
make[5]: Entering directory `C:/fpctrunc/rtl/linux'
mipsel-linux-as -EL -o C:/fpctrunc/rtl/units/mipsel-linux/prt0.o mipsel/prt0.as
process_begin: CreateProcess((null), mipsel-linux-as -EL -o C:/fpctrunc/rtl/unit
s/mipsel-linux/prt0.o mipsel/prt0.as, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
make[5]: *** [prt0.o] Error 2
make[5]: Leaving directory `C:/fpctrunc/rtl/linux'
make[4]: *** [linux_all] Error 2
make[4]: Leaving directory `C:/fpctrunc/rtl'
make[3]: *** [rtl] Error 2
make[3]: Leaving directory `C:/fpctrunc/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `C:/fpctrunc/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `C:/fpctrunc'
make: *** [build-stamp.mipsel-linux] Error 2
darauf hin habe ich das ganze um den "PP" parameter erweitert:

Code: Alles auswählen

make all CPU_TARGET=mipsel OS_TARGET=linux PP=pp.exe
daraus folgte:
make -C C:/fpctrunc/rtl 'OPT= ' all
make[4]: Entering directory `C:/fpctrunc/rtl'
make -C win32 all
make[5]: Entering directory `C:/fpctrunc/rtl/win32'
pp.exe -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../win -FE. -FUC:/fpctrunc/rtl/uni
ts/i386-win32 -di386 -dRELEASE -Us -Sg system.pp -Fi../win
system.inc(242,4) Fatal: Can't open include file "mips.inc"
Fatal: Compilation aborted
make[5]: *** [system.ppu] Error 1
make[5]: Leaving directory `C:/fpctrunc/rtl/win32'
make[4]: *** [win32_all] Error 2
make[4]: Leaving directory `C:/fpctrunc/rtl'
make[3]: *** [rtl] Error 2
make[3]: Leaving directory `C:/fpctrunc/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `C:/fpctrunc/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `C:/fpctrunc'
make: *** [build-stamp.mipsel-linux] Error 2
darauf hin habe ich "PATH" noch um ein paar angaben erweitert wo er "mips.inc" files finden kann, leider ohne ersichtliche änderung. nun habe ich die doku nochmal genauer gelesen und mir ist dieser teil aufgefallen:
Note: This will only possible with make cycle is activated for mips, at the moment this method cannot be used.
da "make" das template "cycle" nicht kennt, gehe ich mal davon aus, dass dieser hinweiß zutrifft und "cycle" nicht aktiviert ist? da ich aber "all" nutzt sollte das doch egal sein, oder ? kurzum, ich stocher hier nur in einer trüben suppe rum ohne wirklich zu wissen was ich hier tue. nun den aufruf an euch, ist mein vorhaben überhaupt möglich? und wenn, wie? alternativ, wenn ich das nicht mit windows machen kann, dann vielleicht mit einer linux-distri (zB ubuntu/debian) ?

greez & thx,
sky...

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Re: CrossCompiling > MIPS

Beitrag von mschnell »

Der MIIPS Compiler wird gerade in der (englisch-sprachlichen) fpc Entwickler-Mailing-List diskutiert. Ich glaube, Du solltest da nachfragen.

-Michael

marcov
Beiträge: 1102
Registriert: Di 5. Aug 2008, 09:37
OS, Lazarus, FPC: Windows ,Linux,FreeBSD,Dos (L trunk FPC trunk)
CPU-Target: 32/64,PPC(+64), ARM
Wohnort: Eindhoven (Niederlande)

Re: CrossCompiling > MIPS

Beitrag von marcov »

MIPS ist nicht nutzbar in 2.6.0 (oder 2.6.2 welche in die kommenden Monate kommt).

Also man braucht unbedingt trunk (2.7.1)

skydiablo
Beiträge: 9
Registriert: Di 23. Jun 2009, 22:33

Re: CrossCompiling > MIPS

Beitrag von skydiablo »

ok, hab nun folgendes gemacht:

1. use lazarus 1.1 with FPC 2.7.1 (i386-win32-win32/win64) SVN-Revision 39124
2. download current fpc-build trunk 2.7.x -> D:\pas\trunc\fpcbuild\
3. compile with lazarus: D:\pas\trunc\fpcbuild\fpcsrc\compiler\ppmipsel.lpi -> D:\pas\trunc\fpcbuild\fpcsrc\compiler\mipsel\pp.exe

und nu ? wie kann ich nun mein hello-world project für linux mit einem MIPS CPU compilieren ?

greez & thx,
sky...

Antworten