Project

General

Profile

SciphoneDreamG2 » History » Revision 11

Revision 10 (steve-m, 02/19/2016 10:49 PM) → Revision 11/32 (steve-m, 02/19/2016 10:49 PM)

= Sciphone Dream G2 = 

 The Sciphone Dream G2 is a [wiki:MT6235] based phone running UI software to mimic the look+feel of Android. 

 There is currently an u-boot and Linux port for the MT6235 underway, the primary development platform is the Sciphone G2. 

 OsmocomBB does not yet support any Mediatek chipsets, so this phone is not supported by OsmocomBB.    Nonetheless, we 
 expect to have support for it at some point in the future. 

 More information on the hardware of the device can be found at [http://en.qi-hardware.com/wiki/Sciphone_Dream_G2] 
 == Serial Cable == 

 You can make a serial cable by sacrificing the headset that comes with the phone, by swapping the pins inside the connector. 

 Serial pinout: 

 ||Pin||signal||comment|| 
 ||1||GND|| 
 ||2||GND|| 
 ||5||Rx||(From PC to Phone)|| 
 ||7||Tx||(From Phone to PC)|| 

 [[Image(sciphone_serial.jpg,20%)]] 

 == JTAG == 

 The JTAG port of the MT6235 is accessible on the phone PCB, see the attached picture. 
 You can use [http://openocd.berlios.de/web/ OpenOCD] along with the attached configuration file ([raw-attachment:openocd_mt6235.cfg]) for debugging. 

 [[Image(scig2_front.JPG,20%)]] 
 [[Image(scig2_jtag.jpg,20%)]] 

 == Serial Bootloader ==  

 Like all Mediatek MT62xx !SoCs, the phone uses the [wiki:MTKRomloader]. 

 For executing U-Boot and Linux using the MTK romloader, proceed as follows: 

  * clone osmocom-bb.git and checkout the branch 'steve-m/loader_sciphone' 'steve-m/loader-sciphone' 
  * compile the code, connect the phone and run osmocon: 
    {{{ 
 $ ./osmocon -p /dev/ttyUSB1 -m mtk ../../target/firmware/board/mt62xx/loader.mtkram.bin 
    }}} 
  * press and '''hold''' the powerbutton of the phone, until the loading has finished and you see the following: 
    {{{ 
 [...] 
 Received branch address ack, code should run now 

 Running on mt62xx in environment mtkram 
 HW_CODE = 0x6235 
    }}} 

 '''Uploading U-Boot''' 
  * '''don't''' terminate osmocon and execute: 
  {{{ 
 $ ./osmoload memload 0x500000 u-boot.bin 
 $ ./osmoload jump 0x500000 
  }}} 

  * now terminate osmocon and open a serial terminal of your choice (115200-8N1) 
  * see below for loading Linux with U-Boot 

 == U-Boot == 

 Port of U-Boot for Sciphone G2 can be found at [http://git.osmocom.org/gitweb?p=uboot-mt623x.git;a=summary U-Boot] 

 Building U-Boot: 

 {{{ 
 export CROSS_COMPILE=arm-linux-gnueabi- 
 make sciphone_g2_config 
 make 
 }}} 

 == Linux kernel == 

 Port of Linux kernel for Sciphone G2 can be found at [http://git.osmocom.org/gitweb?p=linux-mt623x.git;a=summary Linux kernel] 

 Building Linux: 

 {{{ 
 export CROSS_COMPILE=arm-linux-gnueabi- 
 make ARCH=arm sciphone_g2_defconfig 
 make ARCH=arm uImage 
 }}} 

 == Building initramfs file system == 

 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]] 

 You need to download [http://www.busybox.net/ Busybox], configure it and build it. 

 {{{ 
 export CROSS_COMPILE=arm-linux-gnueabi- 
 make menuconfig 
 make 
 }}} 

 Additional to that you'll need to create console device in already built filesystem. 

 {{{ 
 sudo mknod dev/console c 5 1 
 }}} 

 Now you can create CPIO archive: 

 {{{ 
 find . | cpio -o -H newc > rootfs.cpio 
 }}} 

 Next step is to point to Linux kernel where initramfs image is located.[[BR]] 

 In menuconfig of Linux kernel you should modify following option: 

 {{{ 
 CONFIG_INITRAMFS_SOURCE=<path_to_cpio> 
 General setup -> Initial RAM filesystem and RAM disk -> Initramfs source file(s) 
 }}} 

 After these steps Linux kernel image will have initramfs built in.[[BR]] 

 '''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). 
 Every time you change initramfs file system you have to rebuild also Linux kernel.[[BR]] 

 To unpack CPIO archive you can use following command: 

 {{{ 
 cpio -i -d -H newc -F <path_to_cpio_archive> --no-absolute-filenames 
 }}} 

 == Reading data files in U-Boot == 

 '''NAND''' 

 Following command will read 256 bytes from NAND address 0 at address 0x800000. 

 {{{ 
 nand read 0x800000 0 0x100 
 }}} 

 '''Serial''' 

 Following command will read data at address 0x800000 from serial at baudrate 115200 (using kermit protocol). 

 {{{ 
 loadb 0x800000 115200 
 }}} 

 '''SD/MMC''' 

 Following command will read uImage file at address 0x800000 from MMC card. 

 {{{ 
 fatload mmc 0 0x800000 uImage 
 }}}
Add picture from clipboard (Maximum size: 48.8 MB)