12/29/2012

How to remove internal mass storage on QRD Android (ICS)

1. remove the "UDISK" partition from the partition table, and correspondingly enlarge the size of Userdata partition:
modem_proc\core\storage\tools\jsdcc\partition_load_pt\partiton.xml
Then regenerate rawprogram0.xml and patch0.xml

2. set the new size for BOARD_USERDATAIMAGE_PARTITION_SIZE in file /device/qcom/msm7626a/boardconfig.mk

3. change persist.sys.emmcpartition property to 0 in the file /device/qcom/msm7627a/system.prop

persist.sys.emmcpartition=0

and make sure persist.sys.emmcsdcard.enabled is disabled(0)

4. remove the USB lun item in file kernel/drivers/usb/gadget/android.c:
function 'mass_storage_function_init':

<...>
#if 0 // modified this line, remove internal stroage.
config->fsg.luns[0].cdrom = 0; // sdcard
config->fsg.luns[1].cdrom = 0; // internal storage
config->fsg.luns[2].cdrom = 1; // cdrom
#else
config->fsg.luns[0].cdrom = 0; // sdcard
config->fsg.luns[1].cdrom = 1; // cdrom

12/20/2012

How to download modem image via fastboot with QRD8x25 platform

Note: it is only for emmc boot.
1.change mbr_fill_name() in the $(AP_CODE)/bootable/bootloader/lk/platform/msm_shared/partition_parser.c
(1).change "memcpy(partition_ent->name, "sbl1", 4);" to "memcpy(partition_ent->name, "qcsblhd_cfgdata", 15);"
(2).change "memcpy(partition_ent->name, "sbl3", 4);" to
"memcpy(partition_ent->name, "qcsbl", 5);"
(3).change "memcpy(partition_ent->name, "rpm", 3);" to
"memcpy(partition_ent->name, "emmc_appsboot", 13);"
(4).change "memcpy(partition_ent->name, "tz", 2);" to "memcpy(partition_ent->name, "oemsbl", 6);"
(5).delete all the functions when the type is "MBR_MODEM_TYPE" or MBR_MODEM_TYPE2, and execute "memcpy(partition_ent->name, "fat", 3);" when the type is "MBR_MODEM_TYPE" or "MBR_MODEM_TYPE" .

2.re-build emmc_appsboot*.mbn and download them into the phone;

3.generate oemsbl.bin and emmc_appsboot.bin
the struct of the oemsbl.bin is
(oemsblhd.mbn + some 0x00) + oemsbl.mbn
|<----------512byte-------->|
the struct of the emmc_appsboot.bin is
(emmc_appsboothd.mbn + some 0x00) + emmc_appsboot.mbn
|<-------------512byte----------->|
you can download the pre-fastboot tool to generate these images.

chick here to download pre-fastboot:
https://docs.google.com/open?id=0B8FEzcDZzbOFZGRtOS1ZMmhPSm8

4.Then you can test to use the following command to download images in the fastboot mode:
fastboot flash qcsblhd_cfgdata qcsblhd_cfgdata.mbn
fastboot flash qcsbl qcsbl.mbn
fastboot flash oemsbl oemsb.bin
fastboot flash fat fat.bin
fastboot flash emmc_appsboot emmc_appsboot.bin

12/19/2012

How to build adb.exe/fastboot.exe on Ubuntu

1.apt-get install mingw32
2. build/envsetup.sh
3.choosecombo. config your settings
4.make USE_MINGW=y adb
make USE_MINGW=y fastboot
5.check out/host/windows-x86/bin for adb.exe/fastboot.exe

How to build AMSS with windows for QRD8x25

If you compile in windows xp, please use a clean PC , please reference build/ms/rvct22.bat for installing path.

1. install cygwin 1.7 (important remove the python contain in cygwin) ,choose "install all".

2. install python 2.6.6.msi for windows

3. install actvie perl 5.8.8

4. install the RVDS 2.2 with patch593,after setup, cd C:\apps\rvds221\RVCT\Programs\2.2\593\win_32-pentium,and execute

cp armcc tcc
cp armcc armcpp
cp armcc tcpp

To check the versions, run armcc --vsn. It should return the following:
ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 593]
Software supplied by: ARM Limited

armcpp --vsn
tcc --vsn
tcpp --vsn
armlink --vsn
armasm --vsn
fromelf --vsn
The version returned should be build 593 for all.

5. modify the windows environment variable path " add cygwin path and python path

6. modify the rvct22.bat in build/ms

7. modify build command such as SSKOLY_FLASH_*.cmd, set $0 to %0, set BUILD_UNIX=no

8. in cmd windows, execute the rvct22.bat next ,execute theSSKOLY_FLASH_*.cmd

There may be some error, please see
http://www.anyclub.org/2012/11/some-error-when-build-qrd8225-modem.html

12/18/2012

enable uart debug in lk on QRD8x25

uart1 is default to use for debug

1.Set uart
bootable/bootloader/lk/platform/msm_shared/uart.c
static unsigned uart_base = MSM_UART1_BASE;

2.Set WITH_DEBUG_UART
bootable\bootloader\lk\project\msm7627a.mk
DEFINES += WITH_DEBUG_UART=1

3.Set debug level
Bootable/bootloader/lk/include/Debug.h
#define DEBUGLEVEL 2

Daisy-chain on primary JTAG, USB Trace32 with QRD8X25

Please make sure the jtag hardware connection is right. mode=0001(ARM9+CORTEX) ,ps_hold=1
In the software To use a primary and auxiliary JTAG configuration and a USB connection to the debugger, perform the following steps.
1. Copy the following files from the release modem_proc\tools\T32 directory to C:\T32.
config-chain-cortex-usb.t32
config-chain-arm9-usb.t32
startup-chain-cortex.cmm
startup-chain-arm9.cmm
2. Create a shortcut to start the ARM9 Trace32 session with the following properties.
Name: Trace32 ARM9
Target: C:\T32\t32marm.exe -c config-chain-arm9-usb.t32, startup-chain-arm9.cmm
Start in: C:\T32
3. Create a shortcut to start the ARM11 Trace32 session with the following properties.
Name: Trace32 CORTEX
Target: C:\T32\t32marm.exe -c config-chain-cortex-usb.t32, startup-chain-cortex.cmm
Start in: C:\T32
4. Start the ARM9 Trace32 session by opening the Trace32 ARM9 shortcut. Then start the CORTEX session by opening the Trace32 CORTEX shortcut.


the jload.cmm can be used in daisy-chain mode.
2. open the ARM9 & CORTEX application at the same time.
3. in the ARM9 window, do jload.cmm, the select the elf and vmlinuz
4. in the CORTEX window, when the CORTEX was bring up, break it.
5. do sync in the ARM9
6. d.load *.elf /nocode /noclear and select the vmlinuz
7. set a breadpoint at CORTEX
8. do sync in the ARM9
9. GO in the CORTEX window.
if the breadpoint is available , the pragram will break at the point.

12/17/2012

How to diable dual-sim card function on QRD8225

1.adb shell setprop persist.dsds.enabled false
2.Set NV04398 -> 1
3.Set NV6907 -> 0
4.Set NV6876 -> 0 0 0 0 0x01