Porting android kernel on mini2440 arm9 board with W35 320X240 LCD display

1,088 views
Skip to first unread message

piyush gupta

unread,
Jul 19, 2012, 1:27:01 AM7/19/12
to mini...@googlegroups.com
Hi all ,

Greeting for the day .


I have ported android on mini 2440 board using following from FriendlyARM website :
http://www.friendlyarm.net/downloads

1) supervivi bootloader
2) android kernel image file named zImage
3) android file system

The problem is that android kernel image supports T35 LCD which has 240X320 display  , while I am using W35 LCD with 320X240 display .

same problem is with touchscreen drivers which support T35 LCD display .

Result: final output screen is not properly aligned along with its touchscreen to W35 display .

how can I make the android kernel to work perfectly for W35 display or if there is any kernel image available which supports LCD W35 display .

Please help me to make it compatible.

Regards
Piyush Gupta











kadir yasar

unread,
Jul 19, 2012, 6:54:41 AM7/19/12
to mini...@googlegroups.com
Hi 

On booting, filesystem gives "Bad eraseblock" and "yaffs chunk"  errors. I can reach the console but there may be some problems in fs. Any idea ?
--
Kadir Yasar
kyas...@gmail.com
Hacettepe University
Beytepe 06532
Ankara / Turkey

chaitanya nandigam

unread,
Jul 19, 2012, 8:46:03 AM7/19/12
to mini...@googlegroups.com

We have tried on this we also failed regarding display driver me to waiting from solution from past 1 year

Thanks & Regards
Chaitanya nandigam

Senacharim

unread,
Jul 19, 2012, 11:37:43 AM7/19/12
to mini...@googlegroups.com
I have compiled the linux-2.6.32.2 kernel and I'm using the W35 display without issues... It is possible.

I'm using uBoot and a uImage, works exactly as it should.

And here's my development notes concerning the embedded-linux kernel (written for my benefit, sorry if they're a bit cryptic at times)
//-------------Begin Notes-------------
++ embedded-kernel
[alias: embedded kernel]
http://www.friendlyarm.net/downloads
_
     These instructions assume you already have the necessary
    software, compilers, et al installed and that you're working on a
    Linux system.
_

(in Linux arm-dev computer)
1. Download and untar kernel\
2. cd <kernel directory>
3. ./setvars #If you haven't already!
4. cp config_mini2440_t35 .config
5. make menuconfig
6. make zImage
_wait_
7. cd ~/mini2440_dev/uboot/mini2440/tools   #or equivalent...
8. ./mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ~/mini2440_dev/linux-2.6.32.2/arch/arm/boot/zImage ~/mini2440_dev/linux-2.6.32.2/arch/arm/boot/uImage

The resulting 'uImage' is your kernel, ready for transplant into NAND flash.

Successfully setup a tftp server, everything in the configured folder
will be available via tftp. Use command 'tftp 0x32000000 uImage' at
the appropriate stage. Or, copy kernel image to SD card.

_
    MINI2440 # dynenv set 40000
    MINI2440 # nand erase kernel
    MINI2440 # mmcinit
    MINI2440 # fatload mmc 0:1 0x31000000 uImage
    MINI2440 # nand write.e 0x31000000 kernel
_

Configure uboot to use kernel:
_
    MINI2440 # setenv bootcmd nboot.e kernel \; bootm
    MINI2440 # saveenv
_

*Setting up NFS boot*
MINI2440 # setenv bootargs_nfs root=/dev/nfs nfsroot=192.168.1.2:/home/target_fs ip=192.168.1.50 console=ttySAC0,115200
MINI2440 # setenv bootnfs setenv bootargs \${bootargs_nfs} \${mtdparts}\; nand read.e 0x32000000 kernel\; bootm 0x32000000
MINI2440 # setenv bootcmd run bootnfs

setvars (file)
    export ARCH=arm
    export CROSS_COMPILE=arm-none-linux-gnueabi-
 
    # Add toolchain's path to your $PATH variable
    export PATH=/usr/local/arm/bin/:$PATH
 
    # This to allows programs compile
    export CFLAGS="-O3 -march=armv4t -mtune=arm920t"
#-------------


Resources:
http://wiki.iface.ch/index.php/Setup_a_testing_environment_for_Mini2440
http://wiki.iface.ch/index.php/How_to_cross_compile_a_working_kernel_for_Mini2440
//-------------End Notes-------------

Hope it helps, I can answer a query or two as well.
Remember, you make your own luck.

Allan Granados

unread,
Jul 19, 2012, 9:52:56 PM7/19/12
to mini...@googlegroups.com
Hi Piyus

Have you tried to modified the mach-mini2440.c under "arch/arm/mach-s3c2440" on your kernel and then compile?.

You will see something like the following lines, where you can set the proper values according to your LCD documentation. I did some modification about a year ago with that image because i have a X35 LCD. In my case the problem was also with the backligth and further work need to be made for android to be displayed correctly but in the end it work.

#elif defined(CONFIG_FB_S3C2410_T240320)
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
#define LCD_PIXCLOCK 70000
#define LCD_RIGHT_MARGIN 68
#define LCD_LEFT_MARGIN 66
#define LCD_HSYNC_LEN 4
#define LCD_UPPER_MARGIN 4
#define LCD_LOWER_MARGIN 4
#define LCD_VSYNC_LEN 9
#define LCD_CON5 (S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_INVVDEN | \
S3C2410_LCDCON5_INVVFRAME | S3C2410_LCDCON5_INVVLINE | \
S3C2410_LCDCON5_INVVCLK | S3C2410_LCDCON5_HWSWP ) 

Also remenber if you get a solution to share that with the community. Thanks!

piyush gupta

unread,
Jul 19, 2012, 11:53:54 PM7/19/12
to mini...@googlegroups.com
Hi Allan

I have modified the file mach-mini2440. now the display is a little better than before . Now the android GUI is working fine with the display .


Thank you for the help .

Regards
Piyush Gupta

On Friday, July 20, 2012 7:22:56 AM UTC+5:30, Allan Granados wrote:
Hi Piyush

piyush gupta

unread,
Jul 20, 2012, 12:02:24 AM7/20/12
to mini...@googlegroups.com
Hi Senacharim

Did your steps ported android in vertical alignment to W35 display ???

I have successfully ported android on mini2440 board with W35 display . However my GUI is in landscape mode(horizontally aligned) which must be in portrait mode (vertically aligned).

I will try your steps and will shortly post the result along with the steps I have performed to port android .

Thank you for replying to the post .

Regards
Piyush Gupta
Message has been deleted

soroosh khoram

unread,
Jul 29, 2013, 6:50:47 AM7/29/13
to mini...@googlegroups.com
Hi
Can you tell me how you set these variables. I need to set them for my A70 display but I don't know where to find them.
thank you
Reply all
Reply to author
Forward
0 new messages