Setup Cross Compile For ARM/id: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Setup Cross Compile For ARM/id
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ## Kompilasi Silang dengan FPC untuk ARM (misalnya Zaurus) | |
| 2 | + | ||
| 3 | + | - Pertama, siapkan lingkungan kompilasi silang; anda bisa memperoleh informasi mengenai ini di sini [1](http://www.cartel-securite.fr/pbiondi/zaurus/crosscompile.html), di sini [2](http://www.nautilus6.org/operation/doc/wide-memo-nautilus6-zaurus-ccenv-setup-00.txt) dan di sini [3](http://projects.buici.com/arm/cross/). | |
| 4 | + | - Instalasi fpc asli terbaru [dari sourceforge](http://sourceforge.net/project/showfiles.php?group_id=89339) | |
| 5 | + | - dapatkan arm fpc snapshot dari halaman download pada [FPC Qt Binding untuk Zaurus](http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qtedemo.html) | |
| 6 | + | - Download ke somedir. Nama file tar bisa berbeda tentunya | |
| 7 | + | ||
| 8 | + | `cd somedir`\ | |
| 9 | + | `tar zxvf arm-linux-fpc.i386-linux-20050217.tar.gz` | |
| 10 | + | ||
| 11 | + | - anda akan menemukan 'lib/fpc/1.9.7/units/arm-linux/...' dir. Versinya mungkin '1.9.8' atau lebih tinggi. | |
| 12 | + | - buat struktur direktori librari FPC untuk fpc dalam direktori lib pada sistem anda | |
| 13 | + | - kebanyakan sistem menggunakan '/usr/local/lib', yang lainnya '/usr' | |
| 14 | + | ||
| 15 | + | `mkdir -p /usr/local/lib/fpc/1.9.7/units`\ | |
| 16 | + | `cp -fr lib/fpc/1.9.7/units/arm-linux /usr/local/lib/fpc/1.9.7/units/` | |
| 17 | + | ||
| 18 | + | - copy kompilator silang fpc ke tempat standarnya | |
| 19 | + | ||
| 20 | + | `cp lib/fpc/1.9.7/ppcarm /usr/local/lib/fpc/1.9.7` | |
| 21 | + | ||
| 22 | + | - set link lembut kepadanya dalam direktori bin dalam path anda | |
| 23 | + | - kebanyakan distribusi menggunakan '/usr/local/bin', yang lainnya '/usr/bin' | |
| 24 | + | ||
| 25 | + | `ln -sf /usr/local/lib/fpc/1.9.7/ppcarm /usr/local/bin/ppcarm` | |
| 26 | + | ||
| 27 | + | - verifikasi anda bisa memanggil ppcarm, ia seharusnya mengembalikan sesuatu mirip '1.9.7' dan bukan 'command not found' | |
| 28 | + | ||
| 29 | + | `ppcarm -iV` | |
| 30 | + | ||
| 31 | + | - download [FPC 1.9.x ARM binutils](ftp://ftp.freepascal.org/pub/fpc/snapshot/v19/arm-linux/binutils.tar.gz) ke somedir | |
| 32 | + | ||
| 33 | + | `cd somedir`\ | |
| 34 | + | `tar zxvf binutils.tar.gz`\ | |
| 35 | + | ||
| 36 | + | - copy 2 program dalam tar ke direktori bin dalam path anda | |
| 37 | + | ||
| 38 | + | `cp arm-linux-* /usr/local/bin`\ | |
| 39 | + | ||
| 40 | + | - buat program 'Hello World' dan kompilasi | |
| 41 | + | ||
| 42 | + | `echo "program hello; begin writeln('Hello World'); end." > hello.pas`\ | |
| 43 | + | `ppcarm -XParm-linux- hello.pas`\ | |
| 44 | + | ||
| 45 | + | - output seharusnya berupa seperti ini: | |
| 46 | + | ||
| 47 | + | ` # ppcarm -XParm-linux- hello.pas`\ | |
| 48 | + | ` Free Pascal Compiler version 1.9.7 [2005/02/17] for arm`\ | |
| 49 | + | ` Copyright (c) 1993-2005 by Florian Klaempfl`\ | |
| 50 | + | ` Target OS: Linux for ARM`\ | |
| 51 | + | ` Compiling hello.pas`\ | |
| 52 | + | ` Assembling hello`\ | |
| 53 | + | ` Linking hello`\ | |
| 54 | + | ` 1 Lines compiled, 0.2 sec`\ | |
| 55 | + | ||
| 56 | + | - Copy ke direktori home dari pengguna 'zaurus' pada piranti zaurus anda. | |
| 57 | + | - Dengan penyiapan ssh ini bisa sesederhana: | |
| 58 | + | ||
| 59 | + | `scp hello zaurus:/home/zaurus` | |
| 60 | + | ||
| 61 | + | - Instalasi program terminal pada Zaurus anda. Untuk Zaurus SL6000: lihat manual pada CD. | |
| 62 | + | - Jalankan program terminal. Pada SL6000 konsol akan mengarahkan pengguna 'zaurus' standarnya ke dalam direktori home /home/zaurus | |
| 63 | + | - Jalankan program | |
| 64 | + | ||
| 65 | + | `./hello` | |
| 66 | + | ||
| 67 | + | - Output seharusnya berupa seperti ini: | |
| 68 | + | ||
| 69 | + | `Hello World` | |
| 70 | + | ||
| 71 | + | --- | |
| 72 | + | *From the Free Pascal wiki, page "Setup Cross Compile For ARM/id", as it stood on 2015-07-14 after a change by FTurtle, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
