Setup Cross Compile For ARM/id: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | ## Kompilasi Silang dengan FPC untuk ARM (misalnya Zaurus) | |
| 2 | 2 | ||
| 3 | 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 | 4 | - Instalasi fpc asli terbaru [dari sourceforge](http://sourceforge.net/project/showfiles.php?group_id=89339) | |
| 5 | 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 | 6 | - Download ke somedir. Nama file tar bisa berbeda tentunya | |
| 7 | 7 | ||
| 8 | 8 | `cd somedir`\ | |
| 9 | 9 | `tar zxvf arm-linux-fpc.i386-linux-20050217.tar.gz` | |
| 10 | 10 | ||
| 11 | 11 | - anda akan menemukan 'lib/fpc/1.9.7/units/arm-linux/...' dir. Versinya mungkin '1.9.8' atau lebih tinggi. | |
| 12 | 12 | - buat struktur direktori librari FPC untuk fpc dalam direktori lib pada sistem anda | |
| 13 | 13 | - kebanyakan sistem menggunakan '/usr/local/lib', yang lainnya '/usr' | |
| 14 | 14 | ||
| 15 | 15 | `mkdir -p /usr/local/lib/fpc/1.9.7/units`\ | |
| 16 | 16 | `cp -fr lib/fpc/1.9.7/units/arm-linux /usr/local/lib/fpc/1.9.7/units/` | |
| 17 | 17 | ||
| 18 | 18 | - copy kompilator silang fpc ke tempat standarnya | |
| 19 | 19 | ||
| 20 | 20 | `cp lib/fpc/1.9.7/ppcarm /usr/local/lib/fpc/1.9.7` | |
| 21 | 21 | ||
| 22 | 22 | - set link lembut kepadanya dalam direktori bin dalam path anda | |
| 23 | 23 | - kebanyakan distribusi menggunakan '/usr/local/bin', yang lainnya '/usr/bin' | |
| 24 | 24 | ||
| 25 | 25 | `ln -sf /usr/local/lib/fpc/1.9.7/ppcarm /usr/local/bin/ppcarm` | |
| 26 | 26 | ||
| 27 | 27 | - verifikasi anda bisa memanggil ppcarm, ia seharusnya mengembalikan sesuatu mirip '1.9.7' dan bukan 'command not found' | |
| 28 | 28 | ||
| 29 | 29 | `ppcarm -iV` | |
| 30 | 30 | ||
| 31 | 31 | - download [FPC 1.9.x ARM binutils](ftp://ftp.freepascal.org/pub/fpc/snapshot/v19/arm-linux/binutils.tar.gz) ke somedir | |
| 32 | 32 | ||
| 33 | 33 | `cd somedir`\ | |
| 34 | 34 | `tar zxvf binutils.tar.gz`\ | |
| 35 | 35 | ||
| 36 | 36 | - copy 2 program dalam tar ke direktori bin dalam path anda | |
| 37 | 37 | ||
| 38 | 38 | `cp arm-linux-* /usr/local/bin`\ | |
| 39 | 39 | ||
| 40 | 40 | - buat program 'Hello World' dan kompilasi | |
| 41 | 41 | ||
| 42 | 42 | `echo "program hello; begin writeln('Hello World'); end." > hello.pas`\ | |
| 43 | 43 | `ppcarm -XParm-linux- hello.pas`\ | |
| 44 | 44 | ||
| 45 | 45 | - output seharusnya berupa seperti ini: | |
| 46 | 46 | ||
| 47 | - | ||
| 48 | - | ||
| 49 | - | ||
| 50 | - | ||
| 51 | - | ||
| 52 | - | ||
| 53 | - | ||
| 54 | - | ||
| 47 | + | ```text | |
| 48 | + | # ppcarm -XParm-linux- hello.pas | |
| 49 | + | Free Pascal Compiler version 1.9.7 [2005/02/17] for arm | |
| 50 | + | Copyright (c) 1993-2005 by Florian Klaempfl | |
| 51 | + | Target OS: Linux for ARM | |
| 52 | + | Compiling hello.pas | |
| 53 | + | Assembling hello | |
| 54 | + | Linking hello | |
| 55 | + | 1 Lines compiled, 0.2 sec | |
| 56 | + | ``` | |
| 55 | 57 | ||
| 56 | 58 | - Copy ke direktori home dari pengguna 'zaurus' pada piranti zaurus anda. | |
| 57 | 59 | - Dengan penyiapan ssh ini bisa sesederhana: | |
| 58 | 60 | ||
| 59 | 61 | `scp hello zaurus:/home/zaurus` | |
| 60 | 62 | ||
| 61 | 63 | - Instalasi program terminal pada Zaurus anda. Untuk Zaurus SL6000: lihat manual pada CD. | |
| 62 | 64 | - Jalankan program terminal. Pada SL6000 konsol akan mengarahkan pengguna 'zaurus' standarnya ke dalam direktori home /home/zaurus | |
| 63 | 65 | - Jalankan program | |
| 64 | 66 | ||
| 65 | 67 | `./hello` | |
| 66 | 68 | ||
| 67 | 69 | - Output seharusnya berupa seperti ini: | |
| 68 | 70 | ||
| 69 | - | ||
| 71 | + | ```text | |
| 72 | + | Hello World | |
| 73 | + | ``` | |
| 70 | 74 | ||
| 71 | 75 | --- | |
| 72 | 76 | *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).* |
