Is anybody succeeded in building Mini6410 working rootfs?

Ann R. (Russia)
I've already tried buildroot, ptxdist, angstrom tools. 
But the problem is in touchscreen. Touchscreen (4.3) doesn't work with
standart /usr/lib/ts/plugins/input.so plugin. Replacement with
friendlyarm-ts-input.so also doesn't work. I've modifyed the function
ts_read_input in input.so source in order it could work with my
touchscreen. With modifyed input.so ts_calibrate and ts_test tools work
fine.
But in QT application the cursor is very slow and application has no
reaction on click.

So, is anybody succedded in building rootfs with working touchscreen in QT
applications for mini6410 with 4.3 screen?
If yes, can you share your rootfs with me?

--
Best wishes,
Anna Rassudova,
Tomsk, Russian Federation

davef
If it doesn't work with PTXdist then maybe trying on their mailing lists:

http://community.pengutronix.de/mailinglists/index_en.html

I'd suggest the mini2440 mailing list first then the main PTXdist list, if
that doesn't get a response.

Did you manage to build your Qt application using PTXdist?

Ann R. (Russia)
>>Did you manage to build your Qt application using PTXdist?

Yes. But it doesn't react on touchscreen clicks.

davef
Thanks for answering my question, in the previous posting you didn't!

Just checking . . . your application is not one of the examples?  In which
case you had to work out how to do a "custom" project using the qt4-demo as
an example.  Right?

Are you having problems "clicking" with a USB mouse?

Which boxes did you tick in PTXdist in the Qt section? Specifically, in the
features section.  What options did you enable in the kernel for the mouse.

If it is any help I have a document at home which describes all the options
in PTXdist and the kernel I had to enable to get the cursor, USB mouse and
USB keyboard to work with the /demos/browser application.

One other problem it is for the mini2440.  Your specific touchscreen
problem may still remain.  In which case you are back to sorting that out
:(

Juergen Beisert
Anna,

can you show us your modification on the ts_read_input function in
input.so? Maybe this could help. Please note: The Mini6410 BSP is still
work in progress and it seems there are various touchscreen adaptions
around with this board. My Mini6410 here uses the CPU internal ADC to
calculate the touch position and it uses the 4.3 " 480 x 272 display. So, I
can only test this combination.

Ann R. (Russia)
>>can you show us your modification on the ts_read_input function in
>>input.so?

http://pastebin.com/JZfJGzjq

I suppose my screen also uses the CPU internal ADC to
calculate the touch position and it is  4.3 " 480 x 272 display. It is a
standart friendlyARM touchscreen. In /dev it is "с 10 181".

Juergen, can you share your rootfs with me? May be it will work...

--
Best wishes,
Anna Rassudova,
Tomsk, Russian Federation

Juergen Beisert
First: I asked for the modifications in your "ts_read_input" function, So,
a diff would be more impressive.. ;-)

If you build my Mini6410 BSP with the intended PTXdist and toolchain there
will be no need to share any binary root filesystems: You already have my
root filesystem in this case.

1) What does the change in the "ts_read_input" function intend?
2) When the touch works more ore less with the ts_lib tools, and the Qt
   application does not, does Qt use the ts_lib as its touchscreen input
   event source?

Juergen Beisert
BTW: In my 3.0 kernel the touchscreen device has no device node. Only an
input event node in "/dev/input/event1":

root@mini6410:~ evtest /dev/input/event1
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0xdead product 0xbeef version 0x102
Input device name: "S3C24XX TouchScreen"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value   1513
      Min        0
      Max     1023
    Event code 1 (Y)
      Value   2104
      Min        0
      Max     1023
Testing ... (interrupt to exit)
Event: time 1314219568.324385, type 3 (Absolute), code 0 (X), value 2097
Event: time 1314219568.324406, type 3 (Absolute), code 1 (Y), value 1703
Event: time 1314219568.324420, type 1 (Key), code 330 (Touch), value 1
Event: time 1314219568.324433, -------------- Report Sync ------------
Event: time 1314219568.334422, type 3 (Absolute), code 0 (X), value 2261
Event: time 1314219568.334442, type 3 (Absolute), code 1 (Y), value 1625
Event: time 1314219568.334465, -------------- Report Sync ------------
Event: time 1314219568.344424, type 3 (Absolute), code 0 (X), value 2599
Event: time 1314219568.344444, type 3 (Absolute), code 1 (Y), value 1457
Event: time 1314219568.344467, -------------- Report Sync ------------
Event: time 1314219568.354435, type 3 (Absolute), code 1 (Y), value 1461
[...]

Ann R. (Russia)
Well, can you share your kernel image?

Ann R. (Russia)
>>does Qt use the ts_lib as its touchscreen input
>>event source?

i use this "export QWS_MOUSE_PROTO=tslib:/dev/touchscreen-1wire"


>>evtest /dev/input/event1

This hangs on Tesing. And Input device name is not "S3C24XX TouchScreen".
It is named as touchscreen pipe

Juergen Beisert
Anna,

send me your email address to jbe at pengutronix dot de I will send you my
current kernel image.

Juergen Beisert
> i use this "export QWS_MOUSE_PROTO=tslib:/dev/touchscreen-1wire"

Then you are using a different driver.

>>evtest /dev/input/event1
> This hangs on Tesing. And Input device name is not "S3C24XX
> TouchScreen".
> It is named as touchscreen pipe

I guess now, you are not using the internal ADC for touch detection. Can
you send me also your kernel image for a quick test? (and a link to its
sources)

Ann R. (Russia)
Ok. I've just sent it to you

Ann R. (Russia)
>>I guess now, you are not using the internal ADC for touch detection

And can you give me a link to 4.3 touchscreen, that uses internal ADC?

I will order one, as i need a working touchscreen as soon as possible

--
--
Best wishes,
Anna Rassudova,
Tomsk, Russian Federation

Juergen Beisert
Hi Anna,

I opened my Mini6410 display: The PCB is marked with:

    LCD-N43 
     1020

The display is a NEC:

 Model: NL4827HC10-01B
 SERIAL: <some numbers>
 Panel: A25A7Y1925035
          07.12.08

Ann R. (Russia)
My display is LCD-N43i
1043

Juergen Beisert
Hi Anna,

you can find the matching schematics for your display here:
http://www.friendlyarm.net/dl.php?file=lcd43_schematic.zip

Juergen Beisert
Hi Anna,

it seems they are using U6 for the touch events (whatever it is). It
reports via SPI to the U5 microcontroller and this microcontroller reports
via OneWire protocol via the PWM line to the main S3C6410 processor.
Strange.

Maybe you can check the resistors R28 .. R31 and R34 ... R37. With R28 ...
R31 you should get the same physical connections than me with my LCD-N43
(without the 'i'). Time to heat the soldering-iron... ;-)

Ann R. (Russia)
>>Time to heat the soldering-iron... ;-)

Do you mean i need to remove R34 ... R37 resistors and solder R28..R31?
))) Great! But i have no skills in soldering SMD-components :)

Are there any other ways to make it working?

Juergen Beisert
> Do you mean i need to remove R34 ... R37 resistors and solder R28..R31?

Sure. ;-)

I think the 1wire bus is very slow when it transfers data. It is intended
to query data from some temperature sensors or unique ID devices.
But to get a touchscreen to work, you need many samples per second to
detect touches or moves of your fingers.

No-one near to you with soldering experience and calm fingers?

Ann R. (Russia)
I'll try to find someone on Monday. The resistance of R28...R31 is the same
as R34 ... R37? 

Hope it will solve the problem!

Juergen Beisert
These resistors are used like jumpers: If R34 ... R37 are soldered the four
touchscreen signals are connected to the on-board U6. If R28 ... R31 are
soldered, the four touchscreen signals are connected to ADC of the CPU. But
I hope the schematics corresponds to your PCB...

Ann R. (Russia)
Done. And now i get the following error, when i touch screen after command
"cat /dev/input/event0": mini6410-ts: touch event buffer full

Juergen Beisert
What kernel? What settings? Can you use the "evtest" tool instead the "cat"
command?

Ann R. (Russia)
Kernel 2.6.36

root@mini6410:~ evtest /dev/input/event0                                   
                                          
Input driver version is 1.0.1                                              
                                          
Input device ID: bus 0x13 vendor 0xdead product 0xbeef version 0x101       
                                          
Input device name: "TouchScreen Pipe"                                      
                                          
Supported events:                                                          
                                          
  Event type 0 (Sync)                                                      
                                          
  Event type 1 (Key)                                                       
                                          
    Event code 330 (Touch)                                                 
                                          
  Event type 3 (Absolute)                                                  
                                          
    Event code 0 (X)                                                       
                                          
      Value      0                                                         
                                          
      Min        0                                                         
                                          
      Max      480                                                         
                                          
    Event code 1 (Y)                                                       
                                          
      Value      0                                                         
                                          
      Min        0                                                         
                                          
      Max      272                                                         
                                          
    Event code 24 (Pressure)                                               
                                          
      Value      0                                                         
                                          
      Min        0                                                         
                                          
      Max        1                                                         
                                          
Testing ... (interrupt to exit)

Juergen Beisert
If I compare the output of my 3.0 kernel with your kernel, it seems
somebody changed the S3C2440 ADC driver in your kernel.

root@mini6410:~ evtest /dev/input/event1
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0xdead product 0xbeef version 0x102
Input device name: "S3C24XX TouchScreen"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value   1513
      Min        0
      Max     1023
    Event code 1 (Y)
      Value   2104
      Min        0
      Max     1023

Can you try with my kernel instead?

Ann R. (Russia)
Your kernel doesn't load.

VFS: Unable to mount root fs via NFS, trying floppy.                       
                                  
VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)             
                                  
Please append a correct "root=" boot option; here are the available
partitions:                               
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(2,0)                                
[<c002ae38>] (unwind_backtrace+0x0/0xe4) from [<c021c768>]
(panic+0x68/0x180)                                 
[<c021c768>] (panic+0x68/0x180) from [<c0008cdc>]
(mount_block_root+0x1b8/0x1f8)                              
[<c0008cdc>] (mount_block_root+0x1b8/0x1f8) from [<c0008dbc>]
(mount_root+0xa0/0xc0)                          
[<c0008dbc>] (mount_root+0xa0/0xc0) from [<c0008ef8>]
(prepare_namespace+0x11c/0x17c)                         
[<c0008ef8>] (prepare_namespace+0x11c/0x17c) from [<c0008944>]
(kernel_init+0xe4/0x118)                       
[<c0008944>] (kernel_init+0xe4/0x118) from [<c0026594>]
(kernel_thread_exit+0x0/0x8)

Juergen Beisert
Ups, no NFS possible? But NFS root support is enabled in my kernel config.
And what filesystem do you use in "mtdblock2"? What is your full kernel
command line string when you try to boot my kernel?

Ann R. (Russia)
Linux-CommandLine = root=/dev/mtdblock2 rootfstype=yaffs2 init=/sbin/init
console=ttySAC0,115200

Juergen Beisert
Ahh, my kernel has no YAFFS2 support (only JFFS2). Try a NFS root instead
(if possible).

Ann R. (Russia)
Can you give me your kernel .config file? I'll try to build image with
yaffs2 support

Juergen Beisert
You can find my kernel config in my BSP in
"configs/platform-friendlyarm-mini2440/kernelconfig-3.0". But YAFFS didn't
hit mainline yet. So, you cannot enable it. You still need a patch to add
it to the kernel.

Ann R. (Russia)
Is their any way  to avoid mounting rootfs  via NFS?
I have a jffs2 image of rootfs, what should i do with it?

Seems that u-boot accepts only yaffs images.

Installing OS 'LINUX'                                                      
                                                                           
                   
Download bootloader...                                                     
                                                                           
                            
Download bootloader succeed                                                
                                                                           
                            
Download kernel...                                                         
                                                                           
                            
Download kernel succeed                                                    
                                                                           
                            
Download yaffs-image ...                                                   
                                                                           
                            
Download yaffs-image failed

Juergen Beisert
> Is there any way to avoid mounting rootfs via NFS?

Its only a fall back used by the kernel if the intended mount fails.
But you really should use NFS root while your are still developing. It will
simplify any work with your target.

Ann R. (Russia)
Well, how can  i connect my PC and mini6410 together with D-Link 1160?
I connect mini6410 cable to D-Link but there is no connection - even
indicator on D-Link is switched off

Juergen Beisert
The Mini2440 comes with a regular 10/100 network feature. Do you still run
uboot on it as the bootloader? If yes, run the tftpboot command. This
should switch on the network controller for a test. But I guess at least
when the kernel starts the network controller will be initialized and you
should get a link.