Initial commit - not ready yet
authorPaul Kocialkowski <contact@paulk.fr>
Wed, 1 Jul 2015 10:51:09 +0000 (12:51 +0200)
committerPaul Kocialkowski <contact@paulk.fr>
Wed, 1 Jul 2015 10:51:09 +0000 (12:51 +0200)
42 files changed:
.gitignore [new file with mode: 0644]
Build/Bacon.wti [new file with mode: 0644]
Build/BootableBacon.wti [new file with mode: 0644]
Build/Build.wti [new file with mode: 0644]
CompassCalibration/Akmd.wti [new file with mode: 0644]
CompassCalibration/Footer.wti [new file with mode: 0644]
CompassCalibration/Header.wti [new file with mode: 0644]
Device/Build.wti [new file with mode: 0644]
Device/Development.wti [new file with mode: 0644]
Device/DevelopmentUART.wti [new file with mode: 0644]
Device/FreedomPrivacy.wti [new file with mode: 0644]
Device/Header.wti [new file with mode: 0644]
Device/Installation.wti [new file with mode: 0644]
Device/Status.wti [new file with mode: 0644]
Device/Usage.wti [new file with mode: 0644]
Device/UsageCompassCalibration.wti [new file with mode: 0644]
LoadedFirmwares/Header.wti [new file with mode: 0644]
LoadedFirmwares/PN544Warning.wti [new file with mode: 0644]
NexusSI902x.wt [new file with mode: 0644]
NexusSI902x.wti [new file with mode: 0644]
NexusSI902xBuild.wt [new file with mode: 0644]
NexusSI902xCompassCalibration.wt [new file with mode: 0644]
NexusSI902xLoadedFirmwares.wt [new file with mode: 0644]
NexusSI902xReferences.wti [new file with mode: 0644]
References/S5PC110.wti [new file with mode: 0644]
SDK.wti [new file with mode: 0644]
SDKBuild.wt [new file with mode: 0644]
Tests/Depth.wt [new file with mode: 0644]
WIP-tochange/DreamMagic.wt [new file with mode: 0644]
WIP-tochange/GTA04.wt [new file with mode: 0644]
WIP-tochange/GalaxyNexusI9250.wt [new file with mode: 0644]
WIP-tochange/GalaxyNote2N7100.wt [new file with mode: 0644]
WIP-tochange/GalaxyNoteN7000.wt [new file with mode: 0644]
WIP-tochange/GalaxyS2I9100.wt [new file with mode: 0644]
WIP-tochange/GalaxyS3I9300.wt [new file with mode: 0644]
WIP-tochange/GalaxySI9000.wt [new file with mode: 0644]
WIP-tochange/GalaxyTab2101P51xx.wt [new file with mode: 0644]
WIP-tochange/GalaxyTab270P31xx.wt [new file with mode: 0644]
WIP-tochange/NexusOne.wt [new file with mode: 0644]
send.sh [new file with mode: 0755]
wiki.sh [new file with mode: 0755]
wt.sh [new file with mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..4bf2d2b
--- /dev/null
@@ -0,0 +1 @@
+credentials.sh
diff --git a/Build/Bacon.wti b/Build/Bacon.wti
new file mode 100644 (file)
index 0000000..7b9c975
--- /dev/null
@@ -0,0 +1 @@
+//define BUILD_TARGET  bacon
diff --git a/Build/BootableBacon.wti b/Build/BootableBacon.wti
new file mode 100644 (file)
index 0000000..1be25c5
--- /dev/null
@@ -0,0 +1 @@
+//define BUILD_TARGET  bootable bacon
diff --git a/Build/Build.wti b/Build/Build.wti
new file mode 100644 (file)
index 0000000..abd7fb4
--- /dev/null
@@ -0,0 +1,39 @@
+h1. //print DEVICE_NAME// build
+
+h2. Prerequisites
+
+The following are required to build Replicant for the //print DEVICE_NAME//:
+* [[BuildDependenciesInstallation|Build dependencies installation]]
+* [[ReplicantSourceCode|Replicant //print DEVICE_REPLICANT_VERSION// source code]]
+
+h2. Build
+
+*There is no need to build as root*, building as a regular user should be preferred.
+
+In the source tree root folder, run:
+<pre>
+source build/envsetup.sh
+//ifeq DEVICE_NAME SDK
+lunch sdk-eng
+//else
+lunch replicant_//print DEVICE_CODENAME//-userdebug
+//endif
+</pre>
+
+Then, start the build:
+<pre>
+parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
+make -j$parallel_tasks //print BUILD_TARGET//
+</pre>
+The @-jn@ argument indicates the number of parallel tasks during the build (you can remove it from the command line to have only one task at a time).
+@$parallel_tasks@ holds an optimized number of parallel tasks for your hardware. You may want to reduce this number if e.g. the computer runs out of RAM during the build.
+
+h2. Produced binaries
+
+The produced binaries are located at:
+//ifeq DEVICE_NAME SDK
+* @out/host/linux-x86/sdk/@
+//else
+* @out/target/product///print DEVICE_CODENAME///@ for the target
+* @out/host/linux-x86/bin/@ for the host
+//endif
diff --git a/CompassCalibration/Akmd.wti b/CompassCalibration/Akmd.wti
new file mode 100644 (file)
index 0000000..42f07c7
--- /dev/null
@@ -0,0 +1,6 @@
+Connect to the device via [[ADB]] with sufficient permissions and run:
+<pre>
+adb shell stop zygote
+adb shell rm /data/misc/akmd_set.txt
+adb shell start zygote
+</pre>
diff --git a/CompassCalibration/Footer.wti b/CompassCalibration/Footer.wti
new file mode 100644 (file)
index 0000000..fbbd38b
--- /dev/null
@@ -0,0 +1 @@
+Then start an application using the compass sensor and move the device in every direction, with a rotation around each axis: the device should now be calibrated.
diff --git a/CompassCalibration/Header.wti b/CompassCalibration/Header.wti
new file mode 100644 (file)
index 0000000..29f9331
--- /dev/null
@@ -0,0 +1,4 @@
+h1. //print DEVICE_NAME// compass calibration
+
+The compass sensor is calculated from both the accelerometer and magnetic field sensors, which needs calibration to be accurate.
+If the values reported by the compass sensor are not right, you can recalibrate the magnetic field sensor with the following steps:
diff --git a/Device/Build.wti b/Device/Build.wti
new file mode 100644 (file)
index 0000000..076667c
--- /dev/null
@@ -0,0 +1,3 @@
+h2. Replicant build
+
+[[//print DEVICE_PREFIX//Build|//print DEVICE_NAME// build]]
diff --git a/Device/Development.wti b/Device/Development.wti
new file mode 100644 (file)
index 0000000..6400a4f
--- /dev/null
@@ -0,0 +1 @@
+h2. Replicant development
diff --git a/Device/DevelopmentUART.wti b/Device/DevelopmentUART.wti
new file mode 100644 (file)
index 0000000..cf551f2
--- /dev/null
@@ -0,0 +1 @@
+* [[//print DEVICE_PREFIX//UART|//print DEVICE_NAME// UART]]
diff --git a/Device/FreedomPrivacy.wti b/Device/FreedomPrivacy.wti
new file mode 100644 (file)
index 0000000..134c594
--- /dev/null
@@ -0,0 +1,10 @@
+h2. Freedom and privacy/security issues
+
+//print DEVICE_NAME// freedom issues:
+* Proprietary hardware
+* Proprietary firmwares, some of which are [[//print DEVICE_PREFIX//LoadedFirmwares|firmwares loaded by the system]]
+* Proprietary modem system
+* Proprietary bootrom
+* Proprietary and signed [[//print DEVICE_PREFIX//Bootloader|bootloader]]
+
+[[//print DEVICE_PREFIX//PrivacySecurityIssues|//print DEVICE_NAME// Privacy/security issues]]
diff --git a/Device/Header.wti b/Device/Header.wti
new file mode 100644 (file)
index 0000000..b19a246
--- /dev/null
@@ -0,0 +1,29 @@
+h1. //print DEVICE_NAME//
+
+{{>toc}}
+
+//ifeq DEVICE_STATUS Maintained
+|/8. !//print DEVICE_PICTURE//! | *Device* | //print DEVICE_NAME// |
+//else
+|/7. !//print DEVICE_PICTURE//! | *Device* | //print DEVICE_NAME// |
+//endif
+| *Manufacturer* | //print DEVICE_MANUFACTURER// |
+| *Release date* | //print DEVICE_RELEASE// |
+| *Codename* | @//print DEVICE_CODENAME//@ |
+| *Status* | //print DEVICE_STATUS// |
+//ifeq DEVICE_STATUS Maintained
+| *Maintainer(s)* | //print DEVICE_MAINTAINERS// |
+//endif
+| *Supported models* | //print DEVICE_SUPPORTED_MODELS// |
+//ifeq DEVICE_REPLICANT_VERSION 4.2
+| *Latest images* | [[ReplicantImages#Replicant-42-0003-images|Replicant 4.2 0003]] |
+//endif
+//ifeq DEVICE_REPLICANT_VERSION 4.0
+| *Latest images* | [[ReplicantImages#Replicant-40-0005-images|Replicant 4.0 0005]] |
+//endif
+//ifeq DEVICE_REPLICANT_VERSION 2.3
+| *Latest images* | [[ReplicantImages#Replicant-23-0005-images|Replicant 2.3 0005]] |
+//endif
+//ifeq DEVICE_REPLICANT_VERSION 2.2
+| *Latest images* | [[ReplicantImages#Replicant-22-0009-images|Replicant 2.2 0009]] |
+//endif
diff --git a/Device/Installation.wti b/Device/Installation.wti
new file mode 100644 (file)
index 0000000..19c88be
--- /dev/null
@@ -0,0 +1,3 @@
+h2. Replicant installation
+
+[[//print DEVICE_PREFIX//Installation|//print DEVICE_NAME// installation]]
diff --git a/Device/Status.wti b/Device/Status.wti
new file mode 100644 (file)
index 0000000..bc29df2
--- /dev/null
@@ -0,0 +1,14 @@
+h2. Replicant status
+
+//ifeq DEVICE_REPLICANT_VERSION 4.2
+[[ReplicantStatus#Replicant-42|Replicant 4.2 status]]
+//endif
+//ifeq DEVICE_REPLICANT_VERSION 4.0
+[[ReplicantStatus#Replicant-40|Replicant 4.0 status]]
+//endif
+//ifeq DEVICE_REPLICANT_VERSION 2.3
+[[ReplicantStatus#Replicant-23|Replicant 2.3 status]]
+//endif
+//ifeq DEVICE_REPLICANT_VERSION 2.2
+[[ReplicantStatus#Replicant-22|Replicant 2.2 status]]
+//endif
diff --git a/Device/Usage.wti b/Device/Usage.wti
new file mode 100644 (file)
index 0000000..7637a23
--- /dev/null
@@ -0,0 +1 @@
+h2. Replicant usage
diff --git a/Device/UsageCompassCalibration.wti b/Device/UsageCompassCalibration.wti
new file mode 100644 (file)
index 0000000..2210d68
--- /dev/null
@@ -0,0 +1 @@
+* [[//print DEVICE_PREFIX//CompassCalibration|//print DEVICE_NAME// compass calibration]]
diff --git a/LoadedFirmwares/Header.wti b/LoadedFirmwares/Header.wti
new file mode 100644 (file)
index 0000000..2694987
--- /dev/null
@@ -0,0 +1,7 @@
+h1. //print DEVICE_NAME// loaded firmwares
+
+The various integrated circuits found on a mobile device run small pieces of dedicated software that are called firmwares, when powerful enough.
+Thus, these programs do not run on the main processor: instead, they are executed on other integrated circuits.
+
+Some firmwares come pre-installed on the integrated circuit while some others have to be loaded to the circuit by the main processor and are usually distributed along with the system.
+*When those firmwares are proprietary, they are not distributed along with Replicant, nor do we recommend using them.*
diff --git a/LoadedFirmwares/PN544Warning.wti b/LoadedFirmwares/PN544Warning.wti
new file mode 100644 (file)
index 0000000..13cf414
--- /dev/null
@@ -0,0 +1 @@
+Note that the @libpn544_fw.so@ file is actually a library containing the firmware that *will be executed on the main processor*!
diff --git a/NexusSI902x.wt b/NexusSI902x.wt
new file mode 100644 (file)
index 0000000..ad6e192
--- /dev/null
@@ -0,0 +1,51 @@
+//include NexusSI902x.wti
+//define DEVICE_MANUFACTURER           Google/Samsung
+//define DEVICE_PICTURE                        crespo.png
+//define DEVICE_RELEASE                        December 2010
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: I9020, I9020A, I9023
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+//include Device/Usage.wti
+
+//include Device/UsageCompassCalibration.wti
+
+//include Device/Build.wti
+
+//include Device/Development.wti
+
+//include Device/DevelopmentUART.wti
+
+//include Device/FreedomPrivacy.wti
+
+h2. Research
+
+h3. Hardware table
+
+|_. Component |_. Name |_. Status |_. Documentation |
+| SoC | Samsung S5PC110/S5PV210 | Linux kernel support | |
+| GPU | Imagination Technologies PowerVR SGX540 | Linux kernel support, proprietary userspace | |
+| Audio Codec | Wolfson WM8994 | Linux kernel support (ALSA), free userspace | "WM8994_Rev3.0.pdf":https://mr2857gb.googlecode.com/svn/trunk/data%20sheet/codec/WM8994_Rev3.0.pdf |
+| Modem | Intel XMM6160 | Free userspace implementation: [[Samsung-RIL]]/[[libsamsung-ipc]] | "mobile-xmm-6160-brief.pdf":http://www.intel.com/content/dam/www/public/us/en/documents/platform-briefs/mobile-xmm-6160-brief.pdf |
+| Wi-Fi | Broadcom BCM4329 | Linux kernel support, proprietary loaded firmware | |
+| Bluetooth | Broadcom BCM4329 | Linux kernel support, proprietary loaded firmware | |
+| NFC | NXP PN544 | Linux kernel support, free userspace, proprietary loaded firmware | "75016890.pdf":http://www.nxp.com/documents/leaflet/75016890.pdf |
+| GPS | Broadcom BCM4751 | Proprietary userspace, proprietary loaded firmware, no free implementation: [[BCM4751]] | "BCM4751":http://www.broadcom.com/products/GPS/GPS-Silicon-Solutions/BCM4751 |
+| Accelerometer | STMicroelectronics KR3DM | Linux kernel support, free userspace | |
+| Compass | Asahi Kasei AKM8973 | Linux kernel support, free userspace | "AK8973.pdf":http://www.droid-developers.org/images/b/b2/AK8973.pdf |
+| Gyroscope | STMicroelectronics K3G | Linux kernel support, free userspace | |
+| Light | Sharp GP2A | Linux kernel support, free userspace | |
+| Proximity | Sharp GP2A | Linux kernel support, free userspace | |
+| Camera (back) | Samsung S5K4ECGX | Linux kernel support, free userspace | |
+| Camera (front) | Samsung S5KA3DFX | Linux kernel support, free userspace | |
+| Touchscreen | Atmel MXT224 | Linux kernel support | |
+| Display | NT35580/TL2796 | Linux kernel support | |
+
+h3. References
+
+//include NexusSI902xReferences.wti
diff --git a/NexusSI902x.wti b/NexusSI902x.wti
new file mode 100644 (file)
index 0000000..72b643a
--- /dev/null
@@ -0,0 +1,4 @@
+//define DEVICE_PREFIX                 NexusSI902x
+//define DEVICE_NAME                   Nexus S (I902x)
+//define DEVICE_CODENAME               crespo
+//define DEVICE_REPLICANT_VERSION      4.2
diff --git a/NexusSI902xBuild.wt b/NexusSI902xBuild.wt
new file mode 100644 (file)
index 0000000..8615927
--- /dev/null
@@ -0,0 +1,3 @@
+//include NexusSI902x.wti
+//include Build/Bacon.wti
+//include Build/Build.wti
diff --git a/NexusSI902xCompassCalibration.wt b/NexusSI902xCompassCalibration.wt
new file mode 100644 (file)
index 0000000..655ab0d
--- /dev/null
@@ -0,0 +1,6 @@
+//include NexusSI902x.wti
+//include CompassCalibration/Header.wti
+
+//include CompassCalibration/Akmd.wti
+
+//include CompassCalibration/Footer.wti
diff --git a/NexusSI902xLoadedFirmwares.wt b/NexusSI902xLoadedFirmwares.wt
new file mode 100644 (file)
index 0000000..49583b1
--- /dev/null
@@ -0,0 +1,12 @@
+//include NexusSI902x.wti
+//include LoadedFirmwares/Header.wti
+
+| *Firmware name* | *Related chip* | *Related functionality* |
+| fw_bcmdhd.bin | Broadcom BCM4329 | Wi-Fi |
+| fw_bcmdhd_apsta.bin | Broadcom BCM4329 | Wi-Fi host |
+| nvram_net.txt | Broadcom BCM4329 | Wi-Fi configuration |
+| bcm4329.hcd | Broadcom BCM4329 | Bluetooth |
+| libpn544_fw.so/pn544.bin | NXP PN544 | NFC |
+| samsung_mfc_fw.bin | Samsung S5PC110/S5PV210 MFC | Hardware media encoding/decoding |
+
+//include LoadedFirmwares/PN544Warning.wti
diff --git a/NexusSI902xReferences.wti b/NexusSI902xReferences.wti
new file mode 100644 (file)
index 0000000..ded6c66
--- /dev/null
@@ -0,0 +1,4 @@
+* //print DEVICE_NAME// Service Manual and Schematics: http://mobilcoms.ru/load/1-1-0-4499
+//include References/S5PC110.wti
+
+*These documents are the propriety of Samsung Electronics and are not hosted by the Replicant project.*
diff --git a/References/S5PC110.wti b/References/S5PC110.wti
new file mode 100644 (file)
index 0000000..7e3f0c3
--- /dev/null
@@ -0,0 +1 @@
+* S5PC110 User Manual: http://dl.project-voodoo.org/documentation/S5PC110_EVT1_UM10.pdf
diff --git a/SDK.wti b/SDK.wti
new file mode 100644 (file)
index 0000000..296a197
--- /dev/null
+++ b/SDK.wti
@@ -0,0 +1,3 @@
+//define DEVICE_NAME                   SDK
+//define DEVICE_CODENAME               sdk
+//define DEVICE_REPLICANT_VERSION      4.2
diff --git a/SDKBuild.wt b/SDKBuild.wt
new file mode 100644 (file)
index 0000000..32746f5
--- /dev/null
@@ -0,0 +1,3 @@
+//include SDK.wti
+//include Build/Bacon.wti
+//include Build/Build.wti
diff --git a/Tests/Depth.wt b/Tests/Depth.wt
new file mode 100644 (file)
index 0000000..59ba13b
--- /dev/null
@@ -0,0 +1,27 @@
+//define SOMETHING 2
+//define SOMETHING_ELSE 2
+//ifeq SOMETHING 1
+SOMETHING is right
+//ifeq SOMETHING_ELSE 1
+SOMETHING else is 1
+are we ignoring this or what?
+//ifeq NOT EVEN A VALID VAR
+whatever
+//else
+Sorry but this doesn't exist!
+//endif
+//else
+somethign else really is NOT 1
+//endif
+//else
+Nah, something is wrong
+//endif
+pause in here
+//ifneq SOMETHING 1
+SOMETHING is not 1 as surprising as it may be
+//else
+Nah, it's right
+//ifneq SOMETHING_ELSE 2
+SOMETHING else is wrong
+//endif
+//endif
diff --git a/WIP-tochange/DreamMagic.wt b/WIP-tochange/DreamMagic.wt
new file mode 100644 (file)
index 0000000..c80fd1d
--- /dev/null
@@ -0,0 +1,20 @@
+//define DEVICE_PREFIX                 DreamMagic
+//define DEVICE_NAME                   Dream/Magic
+//define DEVICE_MANUFACTURER           Google/HTC
+//define DEVICE_PICTURE                        htcdream.png
+//define DEVICE_RELEASE                        October 2008
+//define DEVICE_CODENAME               dream_sapphire
+//define DEVICE_STATUS                 Unmaintained
+//define DEVICE_SUPPORTED_MODELS       ADP1, G1, Dream, Magic 32B
+//define DEVICE_REPLICANT_VERSION      2.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant build
+
+[[//print DEVICE_PREFIX//Build|//print DEVICE_NAME// build]]
+
+//include Device/FreedomPrivacy.wti
diff --git a/WIP-tochange/GTA04.wt b/WIP-tochange/GTA04.wt
new file mode 100644 (file)
index 0000000..4c4a01c
--- /dev/null
@@ -0,0 +1,68 @@
+//define DEVICE_PREFIX                 GTA04
+//define DEVICE_NAME                   GTA04
+//define DEVICE_MANUFACTURER           Goldelico
+//define DEVICE_PICTURE                        gta04.png
+//define DEVICE_RELEASE                        January 2012
+//define DEVICE_CODENAME               gta04
+//define DEVICE_STATUS                 Uncompleted
+//define DEVICE_SUPPORTED_MODELS       GTA04 A4
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+//include Device/Build.wti
+
+h2. Replicant development
+
+* GTA04 project: "gta04-main":http://projects.goldelico.com/p/gta04-main/
+* X-Loader project: "gta04-xloader":http://projects.goldelico.com/p/gta04-xloader/
+* U-Boot project: "gta04-uboot":http://projects.goldelico.com/p/gta04-uboot/
+* Kernel project: "gta04-kernel":http://projects.goldelico.com/p/gta04-kernel/
+* Feature list: "FeatureList":http://projects.goldelico.com/p/gta04-main/page/FeatureList/
+* System manual: "Manual":http://projects.goldelico.com/p/gta04-main/page/Manual/
+
+//include Device/FreedomPrivacy.wti
+
+h2. Research
+
+h4. GTA04 A4
+
+|_. Component |_. Name |_. Protocol/implementation |_. Documentation |
+| SoC | TI OMAP DM3730 | Linux kernel | "dm3730":http://focus.ti.com/docs/prod/folders/print/dm3730.html |
+| GPU | PowerVR (SGX530) | Linux kernel and secret userspace | No |
+| Audio Codec | TWL4030 (TPS65950) | Linux kernel | "tps65950":http://focus.ti.com/docs/prod/folders/print/tps65950.html |
+| Modem | GTM601 | AT | No |
+| Wi-Fi | Marvell 8686 (W2CBW003) | Linux kernel | "w2cbw003_datasheet_rev1.pdf":http://www.mangoboard.com/admin/bbs/down.php?code=androidporting&idx=5716&no=1 |
+| Bluetooth | CSR BC04-ROM (W2CBW003) | HCI | "bccmd-commands.pdf":http://himself.files.wordpress.com/2013/05/bccmd-commands.pdf "w2cbw003_datasheet_rev1.pdf":http://www.mangoboard.com/admin/bbs/down.php?code=androidporting&idx=5716&no=1 |
+| GPS | SiRF GSD3 (W2SG0004) | NMEA, SiRF | "GSC3 HW Implementation":http://gps.0xdc.ru/static/sirf/doc/SirfStar/sirf/HWconsiderationsJCinput042105_1.pdf "GPS_Firmware_GSC3_3.5.0_V4.2.pdf":http://www.cooking-hacks.com/skin/frontend/default/cooking/pdf/GPS_Firmware_GSC3_3.5.0_V4.2.pdf "W2SG0004_Datasheet_Rev1.81.pdf":http://www.wi2wi.com/products/datasheets/W2SG0004_Datasheet_Rev1.81.pdf |
+| Accelerometer | BMA180 | Linux kernel | "BST-BMA180-DS000-03.pdf":http://www.spezial.cz/pdf/BST-BMA180-DS000-03.pdf |
+| Compass | HMC5883 | Linux kernel | "HMC5883L":http://media.digikey.com/PDF/Data%20Sheets/Honeywell%20PDFs/HMC5883L.pdf |
+| Gyroscope | ITG-3200 | Linux kernel | "PS-ITG-3200-00-01.4.pdf":http://invensense.com/mems/gyro/documents/PS-ITG-3200-00-01.4.pdf |
+| Barometer | BMP085  | Linux kernel | "BMP085_DataSheet_Rev.1.0_01July2008.pdf":http://www.bosch-sensortec.com/content/language1/downloads/BMP085_DataSheet_Rev.1.0_01July2008.pdf |
+| _Camera_ | OV9655 | Linux kernel | "OV9655- datasheet.pdf":http://www.surveyor.com/blackfin/OV9655-datasheet.pdf |
+| FM Radio | Si4705/4721  | Linux kernel | "Si4704-05-C40.pdf":http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/Si4704-05-C40.pdf |
+| IrDA | TFDU6301 | Linux kernel | "0900766b80ed1faa.pdf":http://docs-europe.electrocomponents.com/webdocs/0ed1/0900766b80ed1faa.pdf |
+
+h4. GTA04 A3
+
+|_. Component |_. Name |_. Protocol/implementation |_. Documentation |
+| SoC | TI OMAP DM3730 | Linux kernel | "dm3730":http://focus.ti.com/docs/prod/folders/print/dm3730.html |
+| GPU | PowerVR SGX530 | Linux kernel and secret userspace | No |
+| Audio Codec | TWL4030 (TPS65950) | Linux kernel | "tps65950":http://focus.ti.com/docs/prod/folders/print/tps65950.html |
+| Modem | GTM601 | AT | No |
+| Wi-Fi | Marvell 8686 (W2CBW003) | Linux kernel | "w2cbw003_datasheet_rev1.pdf":http://www.mangoboard.com/admin/bbs/down.php?code=androidporting&idx=5716&no=1 |
+| Bluetooth | CSR BC04-ROM (W2CBW003) | HCI | "bccmd-commands.pdf":http://himself.files.wordpress.com/2013/05/bccmd-commands.pdf "w2cbw003_datasheet_rev1.pdf":http://www.mangoboard.com/admin/bbs/down.php?code=androidporting&idx=5716&no=1 |
+| GPS | SiRF GSD3 (W2SG0004) | NMEA, SiRF | "GSC3 HW Implementation":http://gps.0xdc.ru/static/sirf/doc/SirfStar/sirf/HWconsiderationsJCinput042105_1.pdf "GPS_Firmware_GSC3_3.5.0_V4.2.pdf":http://www.cooking-hacks.com/skin/frontend/default/cooking/pdf/GPS_Firmware_GSC3_3.5.0_V4.2.pdf "W2SG0004_Datasheet_Rev1.81.pdf":http://www.wi2wi.com/products/datasheets/W2SG0004_Datasheet_Rev1.81.pdf |
+| _Accelerometer_ | BMA180 | Linux kernel | "BST-BMA180-DS000-03.pdf":http://www.spezial.cz/pdf/BST-BMA180-DS000-03.pdf |
+| _Accelerometer_ | LIS302 | Linux kernel | "12726.pdf":http://www.st.com/stonline/products/literature/ds/12726.pdf |
+| _Compass_ | HMC5883 | Linux kernel | "HMC5883L":http://media.digikey.com/PDF/Data%20Sheets/Honeywell%20PDFs/HMC5883L.pdf |
+| _Gyroscope_ | ITG-3200 | Linux kernel | "PS-ITG-3200-00-01.4.pdf":http://invensense.com/mems/gyro/documents/PS-ITG-3200-00-01.4.pdf |
+| _Barometer_ | BMP085  | Linux kernel | "BMP085_DataSheet_Rev.1.0_01July2008.pdf":http://www.bosch-sensortec.com/content/language1/downloads/BMP085_DataSheet_Rev.1.0_01July2008.pdf |
+| _Camera_ | OV9655 | Linux kernel | "OV9655- datasheet.pdf":http://www.surveyor.com/blackfin/OV9655-datasheet.pdf |
+| _FM Radio_ | Si4705/4721  | Linux kernel | "Si4704-05-C40.pdf":http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/Si4704-05-C40.pdf |
+| IrDA | TFDU6301 | Linux kernel | "0900766b80ed1faa.pdf":http://docs-europe.electrocomponents.com/webdocs/0ed1/0900766b80ed1faa.pdf |
+
+Components shown in _italics_ are optional and are not present on every board.
diff --git a/WIP-tochange/GalaxyNexusI9250.wt b/WIP-tochange/GalaxyNexusI9250.wt
new file mode 100644 (file)
index 0000000..57613a7
--- /dev/null
@@ -0,0 +1,39 @@
+//define DEVICE_PREFIX                 GalaxyNexusI9250
+//define DEVICE_NAME                   Galaxy Nexus (I9250)
+//define DEVICE_MANUFACTURER           Google/Samsung
+//define DEVICE_PICTURE                        galaxynexus.png
+//define DEVICE_RELEASE                        November 2011
+//define DEVICE_CODENAME               maguro
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: I9250
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+//include Device/Build.wti
+
+//include Device/Development.wti
+
+//include Device/DevelopmentUART.wti
+
+//include Device/FreedomPrivacy.wti
+
+h2. Research
+
+h3. Hardware table
+
+|_. Component |_. Name |_. Source |_. Status |
+| SoC | TI OMAP 4460 | Linux kernel | Linux kernel support |
+| GPU | PowerVR SGX540 | http://wiki.cyanogenmod.org/w/Maguro_Info | Linux kernel support, proprietary userspace |
+| Audio Codec | TWL6040 | Linux kernel | Linux kernel support (ALSA) |
+| Modem | XMM6260 | Linux kernel | Free userspace implementation: [[Samsung-RIL]]/[[libsamsung-ipc]] |
+| Wi-Fi | BCM4330 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| Bluetooth | BCM4330 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| NFC | PN544 | Android userspace | Linux kernel support |
+| GPS | GSD4t | Android userspace | Proprietary userspace, no free implementation: [[GSD4t]] |
+| Accelerometer | BMA250 | Linux kernel | Linux kernel support, free userspace |
+| Compass | YAS530 | Kernel sources | Linux kernel support, free userspace |
diff --git a/WIP-tochange/GalaxyNote2N7100.wt b/WIP-tochange/GalaxyNote2N7100.wt
new file mode 100644 (file)
index 0000000..a137a73
--- /dev/null
@@ -0,0 +1,27 @@
+//define DEVICE_PREFIX                 GalaxyNote2N7100
+//define DEVICE_NAME                   Galaxy Note 2 (N7100)
+//define DEVICE_MANUFACTURER           Samsung
+//define DEVICE_PICTURE                        galaxynote2.png
+//define DEVICE_RELEASE                        September 2012
+//define DEVICE_CODENAME               n7100
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: N7100
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant usage
+
+* //print DEVICE_NAME// compass calibration: [[//print DEVICE_PREFIX//CompassCalibration]]
+
+//include Device/Build.wti
+
+h2. Replicant development
+
+* //print DEVICE_NAME// UART: [[//print DEVICE_PREFIX//UART]]
+
+//include Device/FreedomPrivacy.wti
diff --git a/WIP-tochange/GalaxyNoteN7000.wt b/WIP-tochange/GalaxyNoteN7000.wt
new file mode 100644 (file)
index 0000000..ed697cd
--- /dev/null
@@ -0,0 +1,44 @@
+//define DEVICE_PREFIX                 GalaxyNoteN7000
+//define DEVICE_NAME                   Galaxy Note (N7000)
+//define DEVICE_MANUFACTURER           Samsung
+//define DEVICE_PICTURE                        galaxynote.png
+//define DEVICE_RELEASE                        October 2011
+//define DEVICE_CODENAME               n7000
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: N7000
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant usage
+
+* //print DEVICE_NAME// compass calibration: [[//print DEVICE_PREFIX//CompassCalibration]]
+
+//include Device/Build.wti
+
+h2. Replicant development
+
+* //print DEVICE_NAME// UART: [[//print DEVICE_PREFIX//UART]]
+
+//include Device/FreedomPrivacy.wti
+
+h2. Research
+
+h3. Hardware table
+
+|_. Component |_. Name |_. Source |_. Status |
+| SoC | Samsung Exynos 4210 | Linux kernel | Linux kernel support |
+| GPU | Mali 400 | https://secure.wikimedia.org/wikipedia/en/wiki/Exynos | Linux kernel support, proprietary userspace |
+| Audio Codec | Yamaha MC1N2 | Linux kernel | Linux kernel support (ALSA), free userspace: Yamaha-MC1N2-Audio/Tinyalsa-Audio |
+| Modem | XMM6260 | Linux kernel | Free userspace implementation: [[Samsung-RIL]]/[[libsamsung-ipc]] |
+| Wi-Fi | BCM4330 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| Bluetooth | BCM4330 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| NFC | PN544 | Linux kernel | Linux kernel support |
+| GPS | BCM4751 | CyanogenMod blob | Proprietary userspace, no free implementation: [[BCM4751]] |
+| Accelerometer | K3DH | Linux kernel | Linux kernel support, free userspace |
+| Compass | AKM8975 | Kernel sources | Linux kernel support, free userspace |
+| Camera | M5MO/S5K5BAFX | Linux kernel | Linux kernel support, free userspace |
diff --git a/WIP-tochange/GalaxyS2I9100.wt b/WIP-tochange/GalaxyS2I9100.wt
new file mode 100644 (file)
index 0000000..5fa6718
--- /dev/null
@@ -0,0 +1,44 @@
+//define DEVICE_PREFIX                 GalaxyS2I9100
+//define DEVICE_NAME                   Galaxy S 2 (I9100)
+//define DEVICE_MANUFACTURER           Samsung
+//define DEVICE_PICTURE                        galaxys2.png
+//define DEVICE_RELEASE                        May 2011
+//define DEVICE_CODENAME               galaxys2, i9100
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: I9100
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant usage
+
+* //print DEVICE_NAME// compass calibration: [[//print DEVICE_PREFIX//CompassCalibration]]
+
+//include Device/Build.wti
+
+h2. Replicant development
+
+* //print DEVICE_NAME// UART: [[//print DEVICE_PREFIX//UART]]
+
+//include Device/FreedomPrivacy.wti
+
+h2. Research
+
+h3. Hardware table
+
+|_. Component |_. Name |_. Source |_. Status |
+| SoC | Samsung Exynos 4210 | Linux kernel | Linux kernel support |
+| GPU | Mali 400 | https://secure.wikimedia.org/wikipedia/en/wiki/Exynos | Linux kernel support, proprietary userspace |
+| Audio Codec | Yamaha MC1N2 | Linux kernel | Linux kernel support (ALSA), free userspace: Yamaha-MC1N2-Audio/Tinyalsa-Audio |
+| Modem | XMM6260 | Linux kernel | Free userspace implementation: [[Samsung-RIL]]/[[libsamsung-ipc]] |
+| Wi-Fi | BCM4330 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| Bluetooth | BCM4330 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| NFC | PN544 | Linux kernel | Linux kernel support |
+| GPS | GSD4t | http://www.csr.com/news/pr/release/455/en | Proprietary userspace, no free implementation: [[GSD4t]] |
+| Accelerometer | K3DH | Linux kernel | Linux kernel support, free userspace |
+| Compass | AKM8975 | Kernel sources | Linux kernel support, free userspace |
+| Camera | M5MO/S5K5BAFX | Linux kernel | Linux kernel support, free userspace |
diff --git a/WIP-tochange/GalaxyS3I9300.wt b/WIP-tochange/GalaxyS3I9300.wt
new file mode 100644 (file)
index 0000000..f11d534
--- /dev/null
@@ -0,0 +1,47 @@
+//define DEVICE_PREFIX                 GalaxyS3I9300
+//define DEVICE_NAME                   Galaxy S 3 (I9300)
+//define DEVICE_MANUFACTURER           Samsung
+//define DEVICE_PICTURE                        galaxys3.png
+//define DEVICE_RELEASE                        May 2012
+//define DEVICE_CODENAME               i9300
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: I9300
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant usage
+
+* //print DEVICE_NAME// compass calibration: [[//print DEVICE_PREFIX//CompassCalibration]]
+
+//include Device/Build.wti
+
+h2. Replicant development
+
+* //print DEVICE_NAME// UART: [[//print DEVICE_PREFIX//UART]]
+
+//include Device/FreedomPrivacy.wti
+
+h2. Research
+
+h3. Hardware table
+
+|_. Component |_. Name |_. Source |_. Status |
+| SoC | Samsung Exynos 4412 | "iFixit":http://www.ifixit.com/Teardown/Samsung+Galaxy+S+III+Teardown/9391/2 | Linux kernel support |
+| GPU | Mali 400 | https://secure.wikimedia.org/wikipedia/en/wiki/Exynos | Linux kernel and secret userspace |
+| Audio Codec | WM8994 | Linux kernel | Linux kernel support (ALSA) |
+| Modem | XMM6260 | Linux kernel | Free userspace implementation: [[Samsung-RIL]]/[[libsamsung-ipc]] |
+| Wi-Fi | BCM4334 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| Bluetooth | BCM4334 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| NFC | PN544 | Linux kernel | Linux kernel support |
+| GPS | BCM4751 | "iFixit":http://www.ifixit.com/Teardown/Samsung+Galaxy+S+III+Teardown/9391/2 | Proprietary userspace, no free implementation: [[BCM4751]] |
+| Accelerometer | LSM330DLC | Linux kernel | Linux kernel support, free userspace |
+| Compass | AKM8975 | Kernel sources | Linux kernel support, free userspace |
+| Light/proximity sensor | CM36651 | Kernel sources | Linux kernel support, free userspace |
+| Gyroscope | LSM330DLC | Kernel sources | Linux kernel support, free userspace |
+| Barometer | LPS331AP | Kernel sources | Linux kernel support, free userspace |
+| Camera | S5C73M3/S5K6A3 | Linux kernel | Linux kernel support, free userspace |
diff --git a/WIP-tochange/GalaxySI9000.wt b/WIP-tochange/GalaxySI9000.wt
new file mode 100644 (file)
index 0000000..b46db3a
--- /dev/null
@@ -0,0 +1,44 @@
+//define DEVICE_PREFIX                 GalaxySI9000
+//define DEVICE_NAME                   Galaxy S (I9000)
+//define DEVICE_MANUFACTURER           Samsung
+//define DEVICE_PICTURE                        galaxys.png
+//define DEVICE_RELEASE                        June 2010
+//define DEVICE_CODENAME               galaxysmtd
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: I9000
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant usage
+
+* //print DEVICE_NAME// compass calibration: [[//print DEVICE_PREFIX//CompassCalibration]]
+
+//include Device/Build.wti
+
+h2. Replicant development
+
+* //print DEVICE_NAME// UART: [[//print DEVICE_PREFIX//UART]]
+
+//include Device/FreedomPrivacy.wti
+
+h2. Research
+
+h3. Hardware table
+
+|_. Component |_. Name |_. Source |_. Status |
+| SoC | Samsung S5PC110/S5PV210 | Linux kernel | Linux kernel support |
+| GPU | PowerVR SGX540 | https://secure.wikimedia.org/wikipedia/en/wiki/Exynos | Linux kernel support, proprietary userspace |
+| Audio Codec | WM8994 | Linux kernel | Linux kernel support (ALSA), free userspace |
+| Modem | XMM6160 | "XDA-Developers":http://forum.xda-developers.com/showthread.php?t=771379 | Free userspace implementation: [[Samsung-RIL]]/[[libsamsung-ipc]] |
+| Wi-Fi | BCM4329 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| Bluetooth | BCM4329 | Linux kernel | Linux kernel support, proprietary loaded firmware |
+| GPS | BCM4751 | https://plus.google.com/+StephenShankland/posts/CJ3bqa1x2Ek | Proprietary userspace, no free implementation: [[BCM4751]] |
+| Accelerometer | SMB380 | Android module |Linux kernel support, free userspace |
+| Compass | MS3C | Android module | Linux kernel support, free userspace |
+| Camera | S5KA3DFX/CE147 | Linux kernel | Linux kernel support, free userspace |
+| FM Radio | SI4709 | Linux kernel | Linux kernel support |
diff --git a/WIP-tochange/GalaxyTab2101P51xx.wt b/WIP-tochange/GalaxyTab2101P51xx.wt
new file mode 100644 (file)
index 0000000..d32fbff
--- /dev/null
@@ -0,0 +1,23 @@
+//define DEVICE_PREFIX                 GalaxyTab2101P51xx
+//define DEVICE_NAME                   Galaxy Tab 2 10.1 (P51xx)
+//define DEVICE_MANUFACTURER           Samsung
+//define DEVICE_PICTURE                        galaxytab210.1.png
+//define DEVICE_RELEASE                        April 2012
+//define DEVICE_CODENAME               p5100 (GSM), p5110 (Wi-Fi)
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: P5100, Wi-Fi: P5110
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant usage
+
+* //print DEVICE_NAME// compass calibration: [[//print DEVICE_PREFIX//CompassCalibration]]
+
+//include Device/Build.wti
+
+//include Device/FreedomPrivacy.wti
diff --git a/WIP-tochange/GalaxyTab270P31xx.wt b/WIP-tochange/GalaxyTab270P31xx.wt
new file mode 100644 (file)
index 0000000..5ad4790
--- /dev/null
@@ -0,0 +1,23 @@
+//define DEVICE_PREFIX                 GalaxyTab270P31xx
+//define DEVICE_NAME                   Galaxy Tab 2 7.0 (P31xx)
+//define DEVICE_MANUFACTURER           Samsung
+//define DEVICE_PICTURE                        galaxytab27.0.png
+//define DEVICE_RELEASE                        April 2012
+//define DEVICE_CODENAME               p3100 (GSM), p3110 (Wi-Fi)
+//define DEVICE_STATUS                 Maintained
+//define DEVICE_MAINTAINERS            [[People|Paul Kocialkowski]]
+//define DEVICE_SUPPORTED_MODELS       GSM: P3100, Wi-Fi: P3110
+//define DEVICE_REPLICANT_VERSION      4.2
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+h2. Replicant usage
+
+* //print DEVICE_NAME// compass calibration: [[//print DEVICE_PREFIX//CompassCalibration]]
+
+//include Device/Build.wti
+
+//include Device/FreedomPrivacy.wti
diff --git a/WIP-tochange/NexusOne.wt b/WIP-tochange/NexusOne.wt
new file mode 100644 (file)
index 0000000..8f440cd
--- /dev/null
@@ -0,0 +1,18 @@
+//define DEVICE_PREFIX                 NexusOne
+//define DEVICE_NAME                   Nexus One
+//define DEVICE_MANUFACTURER           Google/HTC
+//define DEVICE_PICTURE                        nexusone.png
+//define DEVICE_RELEASE                        January 2010
+//define DEVICE_CODENAME               passion
+//define DEVICE_STATUS                 Unmaintained
+//define DEVICE_SUPPORTED_MODELS       PB99100, PB99110
+//define DEVICE_REPLICANT_VERSION      2.3
+//include Device/Header.wti
+
+//include Device/Status.wti
+
+//include Device/Installation.wti
+
+//include Device/Build.wti
+
+//include Device/FreedomPrivacy.wti
diff --git a/send.sh b/send.sh
new file mode 100755 (executable)
index 0000000..615bace
--- /dev/null
+++ b/send.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# Replicant redmine wiki templates
+#
+# Copyright (C) 2014-2015 Paul Kocialkowski <contact@paulk.fr>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. ./credentials.sh
+
+COOKIES=".cookies"
+REDMINE="https://redmine.replicant.us"
+PROJECT="replicant"
+
+extract() {
+       echo "$1" | sed "s/.*<.*name=\"$2\"[^>]*value=\"\([^\"]*\)\".*/\1/g"
+}
+
+login() {
+       if [ "$username" = "" ]
+       then
+               echo "Username:"
+               read username
+       fi
+
+       if [ "$password" = "" ]
+       then
+               echo "Password:"
+               read password
+       fi
+
+       curl -d "username=$username&password=$password&submit=Login" -c $COOKIES "$REDMINE/login"
+}
+
+push() {
+       page=$1
+       comment=$2
+
+       edit=$( curl -b $COOKIES -c $COOKIES -O /dev/stdout "$REDMINE/projects/$PROJECT/wiki/$page/edit" | grep name | tr -d '\n' )
+
+       method=$( extract "$edit" "_method" )
+       authenticity_token=$( extract "$edit" "authenticity_token" )
+       content_version=$( extract "$edit" "content\[version\]" )
+       commit=$( extract "$edit" "commit" )
+
+       curl -b $COOKIES -c $COOKIES -F "_method=$method" -F "authenticity_token=$authenticity_token" -F "content[version]=$content_version" -F "content[comments]=$comment" -F "content[text]=$( cat $page )" -F "commit=$commit" "$REDMINE/projects/$PROJECT/wiki/$page"
+}
+
+cleanup() {
+       rm $COOKIES
+}
+
+case $1 in
+       "login")
+               login
+               ;;
+       "push")
+               push "$2" "$3"
+               ;;
+       "cleanup")
+               cleanup
+               ;;
+esac
diff --git a/wiki.sh b/wiki.sh
new file mode 100755 (executable)
index 0000000..cb0cd97
--- /dev/null
+++ b/wiki.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Replicant redmine wiki templates
+#
+# Copyright (C) 2014-2015 Paul Kocialkowski <contact@paulk.fr>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+gen() {
+       ls *.wt | while read file
+       do
+               page=$( basename -s .wt "$file" )
+               echo $page
+               ./wt.sh $file
+       done
+}
+
+send() {
+       echo "Comment:"
+       read comment
+
+       ./send.sh login
+
+       ls *.wt | while read file
+       do
+               page=$( basename -s .wt "$file" )
+               echo $page
+               ./send.sh push "$page" "$comment"
+       done
+
+       ./send.sh cleanup
+}
+
+cleanup() {
+       ls *.wt | while read file
+       do
+               page=$( basename -s .wt "$file" )
+               rm $page
+       done
+}
+
+usage() {
+       echo "$0: [COMMAND]"
+       echo ""
+       echo "Commands:"
+       echo "  gen     - Generate wiki templates"
+       echo "  send    - Send wiki templates"
+       echo "  cleanup - Cleanup generated files"
+}
+
+case $1 in
+       "gen")
+               gen
+               ;;
+       "send")
+               send
+               ;;
+       "cleanup")
+               cleanup
+               ;;
+       *)
+               usage
+               ;;
+esac
diff --git a/wt.sh b/wt.sh
new file mode 100755 (executable)
index 0000000..7216cdc
--- /dev/null
+++ b/wt.sh
@@ -0,0 +1,157 @@
+#!/bin/sh
+
+# Replicant redmine wiki templates
+#
+# Copyright (C) 2014-2015 Paul Kocialkowski <contact@paulk.fr>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+WT_SOURCE=$1
+WT_DESTINATION=$( basename -s ".wt" $WT_SOURCE )
+WT_DEFINES="\\WT_SOURCE=$WT_SOURCE\\WT_DESTINATION=$WT_DESTINATION"
+
+command_define() {
+       arguments=$1
+       variable=$( echo "$arguments" | sed "s/\([^[:space:]]*\)[[:space:]]*.*/\1/g" )
+       value=$( echo "$arguments" | sed "s/[^[:space:]]*[[:space:]]*\(.*\)/\1/g" )
+
+       WT_DEFINES="$WT_DEFINES\\$variable=$value"
+}
+
+command_print() {
+       arguments=$1
+       start=$( echo "$arguments" | sed "s,\(.*\)//print \([^[:space:]/]*\)//\(.*\),\1,g" )
+       print=$( echo "$arguments" | sed "s,\(.*\)//print \([^[:space:]/]*\)//\(.*\),\2,g" )
+       end=$( echo "$arguments" | sed "s,\(.*\)//print \([^[:space:]/]*\)//\(.*\),\3,g" )
+
+       if [ "$print" != "$arguments" ]
+       then
+               print=$( echo $WT_DEFINES | sed "s,.*\\$print=\([^\]*\).*,\1,g" )
+               command_print "$start$print$end"
+       else
+               echo "$arguments"
+       fi
+}
+
+command_ifeq() {
+       arguments=$1
+       variable=$( echo "$arguments" | sed "s/\([^[:space:]]*\)[[:space:]]*.*/\1/g" )
+       test=$( echo "$arguments" | sed "s/[^[:space:]]*[[:space:]]*\(.*\)/\1/g" )
+       value=$( echo $WT_DEFINES | sed "s,.*\\$variable=\([^\]*\).*,\1,g" )
+
+       if [ "$value" = "$test" ]
+       then
+               return 0
+       else
+               return 1
+       fi
+}
+
+command_ifneq() {
+       arguments=$1
+       variable=$( echo "$arguments" | sed "s/\([^[:space:]]*\)[[:space:]]*.*/\1/g" )
+       test=$( echo "$arguments" | sed "s/[^[:space:]]*[[:space:]]*\(.*\)/\1/g" )
+       value=$( echo $WT_DEFINES | sed "s,.*\\$variable=\([^\]*\).*,\1,g" )
+
+       if [ "$value" = "$test" ]
+       then
+               return 1
+       else
+               return 0
+       fi
+}
+
+command_include() {
+       file=$1
+
+       depth_current=0
+       depth_display=0
+
+       while read line
+       do
+               command=$( echo "$line" | sed "s/^\/\/\([^[:space:]]*\)[[:space:]]*\(.*\)/\1/g" )
+               arguments=$( echo "$line" | sed "s/^\/\/\([^[:space:]]*\)[[:space:]]*\(.*\)/\2/g" )
+
+               case $command in
+                       "ifeq")
+                               if [ $depth_display -ge $depth_current ]
+                               then
+                                       if command_ifeq "$arguments"
+                                       then
+                                               depth_display=$(( $depth_current + 1 ))
+                                       fi
+                               fi
+
+                               depth_current=$(( $depth_current + 1 ))
+
+                               continue
+                               ;;
+                       "ifneq")
+                               if [ $depth_display -ge $depth_current ]
+                               then
+                                       if command_ifneq "$arguments"
+                                       then
+                                               depth_display=$(( $depth_current + 1 ))
+                                       fi
+                               fi
+
+                               depth_current=$(( $depth_current + 1 ))
+
+                               continue
+                               ;;
+                       "else")
+                               if [ $depth_display -ge $depth_current ]
+                               then
+                                       depth_display=$(( $depth_current - 1 ))
+                               else
+                                       if [ $depth_display -eq $(( $depth_current - 1 )) ]
+                                       then
+                                               depth_display=$depth_current
+                                       fi
+                               fi
+
+                               continue
+                               ;;
+                       "endif")
+                               if [ $depth_display -ge $depth_current ]
+                               then
+                                       depth_display=$(( $depth_current - 1 ))
+                               fi
+
+                               depth_current=$(( $depth_current - 1 ))
+
+                               continue
+                               ;;
+               esac
+
+               if [ $depth_current -gt $depth_display ]
+               then
+                       continue
+               fi
+
+               case $command in
+                       "define")
+                               command_define "$arguments"
+                               ;;
+                       "include")
+                               command_include "$arguments"
+                               ;;
+                       *)
+                               command_print "$line"
+                               ;;
+               esac
+       done < "$file"
+}
+
+command_include $WT_SOURCE > $WT_DESTINATION