• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

developing for the DSTL1 / N21

Status
Not open for further replies.
Search This thread

crzyruski

Senior Member
Sep 8, 2009
200
12
I want to try developing for the DSTL1 / N21

There are quite a few interesting things we can do...
Success has been been seen by xda-devs such as JesusFreke, Amon_RA, Haykuro, and Cyanogen (yes there others) in the field of Android ROMs. The ground work is there, porting and developing can commence.

Why do this?
Current ROM 1.5 - has many problems...
Unofficial ROM 1.6 - is a GREAT improvement, but makes one hungry for something better...

It would be awesome to have some success in this field. I know this device is capable of so much more, but I believe the implementation of the system is the issue. This is not the phone developers fault, as they have their own company agenda, but we could improve our own performance and satisfaction :).
For example, my device (1.6 rooted) lags with having only ~50% CPU utilization and ~50MB RAM free...
Overclocking (i mean forcing full CPU capacity - 624Mhz) the CPU has barely helped and only aided battery drain...

Relevant comparison of G1 vs DSTL1 (N21) are
RAM - G1: 192MB vs DSTL1: 128MB
CPU - G1: 528Mhz vs DSTL1: 624Mhz

These specification comparisons say that G1 can run a better ROM than DSTL1? I don't think so. DSTL1 only loses in RAM, which can be made up for using swap!

Devs had success with techniques using: App2SD, swap, ext3, and BFS (faster file system). I believe we could do something impressive here! There are pros and cons to this.

Developers and Testers would be needed. A team of 5 developers and a few testers should be able to get us on the right track. We would definitely need Linux experience, or the desire and ability to soak up all the info on Google ;)

A Linux kernel is a must for this phone, we would have to compile our own... It would be nice to preserve DUAL SIM, but in reality we might have to give up this luxury, as it is proprietary code, unless a new ROM is made backwards compatible (which is possible).

Cyanogen's Github is available for knowledge osmosis http://github.com/cyanogen

A DSTL1 Recovery by Amon_RA (based on Cyanogen's Recovery) is already in Beta...

Cool things are possible. Could I find some developers willing to donate their free time?
Please limit responses to dev talk.
 
Last edited:

chrismotto

Member
Nov 6, 2009
27
1
crzyruski,
Believe it or not the very luxury you talk about giving up(dual sim) is the reason why may of us bother to buy these phones(DSTL1\N21) in the first place. Other wise we might as well go with a mainstream phone such as hero etc.
 

crzyruski

Senior Member
Sep 8, 2009
200
12
crzyruski,
Believe it or not the very luxury you talk about giving up(dual sim) is the reason why may of us bother to buy these phones(DSTL1\N21) in the first place. Other wise we might as well go with a mainstream phone such as hero etc.

Its a possibility that I'm not going to ignore, so I stated it.

The point is that the current OS is lacking. Initially we would want to port and learn from porting of the quality ROMs available now. Those obviously don't support dual-SIM.

Progress needs to start from somewhere. When someone releases a new port or ROM not all pieces work... look at the Eclair (2.0) port, half the features don't work!

If enough heads came together we could probably retain dual-SIM, common this is linux and I've seen the most amazing development come to realization. I just need the teamwork because it might take me a whole year in my spare time...
 

sfabris

Member
Oct 28, 2009
13
0
Having a kernel working

Hi,

the most important IMHO is having a kernel working, built from sources.

Obviously, some closed source drivers must be rewritten, notably the NXP5209 (the GSM modem), if we want the device to be useful (i.e. if we want to make phone call).

My first attempt of booting with a custom kernel was unsucessfull (black screen), which brings to the second point: the lack of some sort of console for kernel debuging.

Any idea regarding the NXP? Anyone is aware of some opensource driver or specs?
Any idea also regarding kernel debugging in the N21/DSTL1?

sfabris
 

crzyruski

Senior Member
Sep 8, 2009
200
12
@sfabris
I will try to find info for the questions you have.
My initial work will be to make an emulator so we can test on PC and not our devices (because we need them functional for every day life :D)

Have you checked out how other modders have done kernel modifications?
Namely JF and Cyanogen?
I can't begin to comprehend so I'm glad you took the initiative with this.

Lets make some progress :)
 

crzyruski

Senior Member
Sep 8, 2009
200
12
Obviously, some closed source drivers must be rewritten, notably the NXP5209 (the GSM modem), if we want the device to be useful (i.e. if we want to make phone call).

Any idea regarding the NXP? Anyone is aware of some opensource driver or specs?

Maybe we have it all wrong???? Maybe its PNX?

PDA DB reports DSTL1 as having Nexperia PNX5209 (ARM946) Phone Controller.
http://pdadb.net/index.php?m=specs&id=1714&view=1&c=general_mobile_dstl1

A similar Android with this phone controller is WayteQ X-Phone (TechFaith Lancer)
http://pdadb.net/index.php?m=specs&id=1801&view=1&c=wayteq_x-phone_android_techfaith_lancer
 

sfabris

Member
Oct 28, 2009
13
0
@sfabris
Have you checked out how other modders have done kernel modifications?
Namely JF and Cyanogen?
I can't begin to comprehend so I'm glad you took the initiative with this.

Lets make some progress :)

As I'm forced to HTC G1 until I'll wait the replacement for my N21 :mad: I'll go in detail on the kernel boot process on other hardware.

A fast way to test kernel in our every day device is kexec which should work also on ARM.
 

sfabris

Member
Oct 28, 2009
13
0
As far as I understand, kexec is a program that can run a new kernel on the fly...
So I could try a new kernel right from my device without reflashing?
have you tried this? Or is this still theory?

I've tried it on x86, never on arm.
Support is there also for arm, but this not imply that also the Marvell PXA is supported.
It's basically the same way of booting Android from WM via haret.

Fastest way to boot your new kernel or to crash your machine:)
 

crzyruski

Senior Member
Sep 8, 2009
200
12
I have created an emulator.
FYI, LCD density should be 120.

Edit: Technically the density is 133...
 
Last edited:

crzyruski

Senior Member
Sep 8, 2009
200
12
files prevent recovery-RA-DSTL1-v1.2.3 from loading

I have been wrestling with the beta recovery-RA-DSTL1-v1.2.3
Amon_RA retrofitted his own recovery image to work for the DSTL1 (N21)...
IT HAS AWESOME POTENTIAL.
Currently ADB RECOVERY SHELL + ROOT is the only thing that is functional.

But I haven't been able to get in touch with him to continue work on it.

The following files prevent me from booting into RA's Recovery, so I remove them:
- e2fsck
- mke2fs
- parted
- tune2fs

Once I am in ADB RECOVERY SHELL I can push them back on ;) and do what I need to do.
Unfortunately the changes are persistent so if I were to reboot and try Recovery Mode again, it won't load :(

What is so special about those four programs that prevent my recovery from loading?????
 

Attachments

  • snapshot1.png
    snapshot1.png
    9.1 KB · Views: 64
Last edited:

leventefarkas

Member
Nov 17, 2009
24
0
is there any ways to update the firmware of N21

hi,
i'm just buy a sciphone n21 (actually is already in our office for 2 weeks but find it now:-( )
and i've to face myself in a situation that i can't use this phone:-( since i buy this phone because:
- i assume that google apps auto sync contact and calendars. unfortunately this phone has not google apps by default.
- and has dual sim support.

so my question: is there any way to upgrade it to a firmware which support is?

can i do anything to use my phone?

thanks in advance.
regards.
 

andferno

Member
Nov 18, 2009
7
0
I have been wrestling with the beta recovery-RA-DSTL1-v1.2.3
Amon_RA retrofitted his own recovery image to work for the DSTL1 (N21)...
IT HAS AWESOME POTENTIAL.
Currently ADB RECOVERY SHELL + ROOT is the only thing that is functional.

But I haven't been able to get in touch with him to continue work on it.

The following files prevent me from booting into RA's Recovery, so I remove them:
- e2fsck
- mke2fs
- parted
- tune2fs

Once I am in ADB RECOVERY SHELL I can push them back on ;) and do what I need to do.
Unfortunately the changes are persistent so if I were to reboot and try Recovery Mode again, it won't load :(

What is so special about those four programs that prevent my recovery from loading?????

e2fsck is a filesystem check utility for ext2
mke2fs is for ext2 filesystem creation
parted is a partitioning tool
tune2fs is for change some filesystem parameters (usually checking interval)

I've read that recovery from Amon-Ra creates automatically 3 partitions (ext2, swap and FAT32). So those commands whould probably mean ext2 filesystem creation. I'm sure Amon-Ra could give us more information on this subject because he added them to the image.

Have you checked your SD card?.

PD: I'm waiting for my N21 :(. So I can't test yet.
 

crzyruski

Senior Member
Sep 8, 2009
200
12
e2fsck is a filesystem check utility for ext2
mke2fs is for ext2 filesystem creation
parted is a partitioning tool
tune2fs is for change some filesystem parameters (usually checking interval)

I've read that recovery from Amon-Ra creates automatically 3 partitions (ext2, swap and FAT32). So those commands whould probably mean ext2 filesystem creation. I'm sure Amon-Ra could give us more information on this subject because he added them to the image.

Have you checked your SD card?.

PD: I'm waiting for my N21 :(. So I can't test yet.

Thank you for that insight.
I am not sure what RA's recovery would have done on its own...
but I have initiated and completed successfully a partition of my SDCard that includes FAT32, swap, and ext2.
Now that I have done this, for experimentation really, I don't know how to use it and what it gives me.

Obviously the swap is useless because I would need a cooked Android ROM that would actually utilize swap.

ext2 is probably for apps2sd... which I tried unsuccessfully - probably because of my own mistake.

I will continue trying and report again later.

As far as Amon_RA, he mentioned he was working on upgrading all the recovery images he has put out to the next version - thus we will be in queue until this comes to pass. Maybe we can just skip this version and go to the next :)
 

crzyruski

Senior Member
Sep 8, 2009
200
12
N21 vs DSTL1: stock comparisons

I have completed the comparison of recovery images of the DSTL1 and N21.
For this test I used an original mtd2.img from my DSTL1 and an original mtd2.img from Slemmen's N21.

The recovery images are identical:
  • Both mt2.img are 4,194,304 bytes
  • Both mtd2.img-kernel are 2,141,616 bytes
  • Both mtd2.img-ramdisk.gz are 386,645 bytes

What is also interesting to note is that the two boot images i inspected were also identical.
The DSTL1 boot image is one that came with the 1502 update from General Mobile (which may or may not be identical to the original).

The original N21 boot image, thanks to ikarishinjisan, is identical to the DSTL1 boot image:
  • Both mt1.img are 4,194,304 bytes
  • Both mtd1.img-kernel are 2,141,816 bytes
  • Both mtd1.img-ramdisk.gz are 148,671 bytes

*Notice how both recovery and boot are the same size... must be padded?
*Notice how boot kernel is 200 bytes more than recovery kernel.... interesting...

On a side note:

Bootloader is identical as expected: both ikarishinjisan's and my mtd0.img are 1,048,576 bytes.
 

Attachments

  • recovery_compare.jpg
    recovery_compare.jpg
    105.2 KB · Views: 69

dnfm

Senior Member
Nov 24, 2009
73
16
If things are going to go custom, it might make some sense to put ext3 filesystems on these things.. ext3 is just ext2 with journalling, which could be helpful since phones can just die/get dropped/lose connection with battery/whatever.
 

dnfm

Senior Member
Nov 24, 2009
73
16
Also, this can be done with the tools already there..
mkfs.ext2
tune2fs -j
 

crzyruski

Senior Member
Sep 8, 2009
200
12
Also, this can be done with the tools already there..
mkfs.ext2
tune2fs -j

Are you referring to the Amon_RA's custom recovery?
I can't get tune2fs onto the recovery without trickery, definitely not noob friendly... until we figure out why.

But great suggestion :)
I'm guessing the ROM must be coded to make use of ext3, otherwise its worthless?
 
Status
Not open for further replies.