Project

General

Profile

SciphoneDreamG2 » History » Version 8

marcin, 02/19/2016 10:49 PM

1 1 laforge
= Sciphone Dream G2 =
2 1 laforge
3 1 laforge
The Sciphone Dream G2 is a [wiki:MT6235] based phone running UI software to mimic the look+feel of Android.
4 1 laforge
5 1 laforge
There is currently an u-boot and Linux port for the MT6235 underway, the primary development platform is the Sciphone G2.
6 1 laforge
7 1 laforge
OsmocomBB does not yet support any Mediatek chipsets, so this phone is not supported by OsmocomBB.  Nonetheless, we
8 1 laforge
expect to have support for it at some point in the future.
9 1 laforge
10 3 laforge
More information on the hardware of the device can be found at [http://en.qi-hardware.com/wiki/Sciphone_Dream_G2]
11 2 steve-m
== Serial Cable ==
12 2 steve-m
13 2 steve-m
You can make a serial cable by sacrificing the headset that comes with the phone, by swapping the pins inside the connector.
14 2 steve-m
15 2 steve-m
Serial pinout:
16 2 steve-m
17 2 steve-m
||Pin||signal||
18 2 steve-m
||1||GND||
19 2 steve-m
||2||GND||
20 2 steve-m
||5||Rx||
21 2 steve-m
||7||Tx||
22 2 steve-m
23 2 steve-m
[[Image(sciphone_serial.jpg,20%)]]
24 2 steve-m
25 1 laforge
== JTAG ==
26 1 laforge
27 1 laforge
The JTAG port of the MT6235 is accessible on the phone PCB, see the attached picture.
28 5 steve-m
You can use [http://openocd.berlios.de/web/ OpenOCD] along with the attached configuration file ([raw-attachment:openocd_mt6235.cfg]) for debugging.
29 4 steve-m
30 6 marcin
[[Image(scig2_front.JPG,20%)]]
31 6 marcin
[[Image(scig2_jtag.jpg,20%)]]
32 6 marcin
33 4 steve-m
== Serial Bootloader == 
34 4 steve-m
35 5 steve-m
Like all Mediatek MT62xx !SoCs, the phone uses the [wiki:MTKRomloader].
36 6 marcin
37 6 marcin
== U-Boot ==
38 6 marcin
39 6 marcin
Port of U-Boot for Sciphone G2 can be found at [http://git.osmocom.org/gitweb?p=uboot-mt623x.git;a=summary U-Boot]
40 6 marcin
41 6 marcin
Building U-Boot:
42 6 marcin
43 6 marcin
{{{
44 6 marcin
export CROSS_COMPILE=arm-linux-gnueabi-
45 6 marcin
make sciphone_g2_config
46 6 marcin
make
47 6 marcin
}}}
48 6 marcin
49 6 marcin
== Linux kernel ==
50 6 marcin
51 6 marcin
Port of Linux kernel for Sciphone G2 can be found at [http://git.osmocom.org/gitweb?p=linux-mt623x.git;a=summary Linux kernel]
52 6 marcin
53 6 marcin
Building Linux:
54 6 marcin
55 6 marcin
{{{
56 6 marcin
export CROSS_COMPILE=arm-linux-gnueabi-
57 7 marcin
make ARCH=arm sciphone_g2_defconfig
58 6 marcin
make ARCH=arm uImage
59 6 marcin
}}}
60 6 marcin
61 8 marcin
== Building initramfs file system ==
62 8 marcin
63 8 marcin
The easiest way to have file system in Linux kernel is to build [http://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt Initramfs image].[[BR]]
64 8 marcin
65 8 marcin
You need to download [http://www.busybox.net/ Busybox], configure it and build it.
66 8 marcin
67 8 marcin
{{{
68 8 marcin
export CROSS_COMPILE=arm-linux-gnueabi-
69 8 marcin
make menuconfig
70 8 marcin
make
71 8 marcin
}}}
72 8 marcin
73 8 marcin
Additional to that you'll need to create console device in already built filesystem.
74 8 marcin
75 8 marcin
{{{
76 8 marcin
sudo mknod dev/console c 5 1
77 8 marcin
}}}
78 8 marcin
79 8 marcin
Now you can create CPIO archive:
80 8 marcin
81 8 marcin
{{{
82 8 marcin
find . | cpio -o -H newc > rootfs.cpio
83 8 marcin
}}}
84 8 marcin
85 8 marcin
Next step is to point to Linux kernel where initramfs image is located.[[BR]]
86 8 marcin
87 8 marcin
In menuconfig of Linux kernel you should modify following option:
88 8 marcin
89 8 marcin
{{{
90 8 marcin
CONFIG_INITRAMFS_SOURCE=<path_to_cpio>
91 8 marcin
General setup -> Initial RAM filesystem and RAM disk -> Initramfs source file(s)
92 8 marcin
}}}
93 8 marcin
94 8 marcin
After these steps Linux kernel image will have initramfs built in.[[BR]]
95 8 marcin
96 8 marcin
'''Important note:''' Initramfs ignores 'init=' variable given in kernel boot parameters list. It always executes /init command at startup and you can't change it. Check if you have /init in your file system (BusyBox has /linuxrc by default, so just change its name to init).
97 8 marcin
Every time you change initramfs file system you have to rebuild also Linux kernel.[[BR]]
98 8 marcin
99 8 marcin
To unpack CPIO archive you can use following command:
100 8 marcin
101 8 marcin
{{{
102 8 marcin
cpio -i -d -H newc -F <path_to_cpio_archive> --no-absolute-filenames
103 8 marcin
}}}
104 8 marcin
105 6 marcin
== Reading data files in U-Boot ==
106 6 marcin
107 6 marcin
'''NAND'''
108 6 marcin
109 7 marcin
Following command will read 256 bytes from NAND address 0 at address 0x800000.
110 6 marcin
111 6 marcin
{{{
112 7 marcin
nand read 0x800000 0 0x100
113 6 marcin
}}}
114 6 marcin
115 6 marcin
'''Serial'''
116 6 marcin
117 7 marcin
Following command will read data at address 0x800000 from serial at baudrate 115200 (using kermit protocol).
118 6 marcin
119 6 marcin
{{{
120 7 marcin
loadb 0x800000 115200
121 6 marcin
}}}
122 6 marcin
123 6 marcin
'''SD/MMC'''
124 6 marcin
125 7 marcin
Following command will read uImage file at address 0x800000 from MMC card.
126 6 marcin
127 6 marcin
{{{
128 7 marcin
fatload mmc 0 0x800000 uImage
129 6 marcin
}}}
Add picture from clipboard (Maximum size: 48.8 MB)