This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4378: Starting touchscreen before Weston

Part Number: AM4378


Tool/software: Linux

Dear,

We have designed a board broadly based on AM437X-gp-evm and our SDK is 4.01. Our product is touch screen based.

We all know, weston window require usb based device(mouse, touch screen,etc) to execute.  I have installed touch screen driver in our product. 

The problem is, touch module executes only after weston window executed. So weston window does not open/execute.

How do i execute touch screen module before weston execute?

Regards,

Winiston.P

  • Hello Winiston,

    1) Please clarify what issue you are seeing. (e.g., weston should start during bootup but it does not, touchscreen should work but it does not, etc).
    2) Can you replicate the issue on the AM437X-gp-evm?

    Regards,
    Nick
  • Dear Nick,

    Weston starts at bootup normally when i connect usb mouse. USB devices(mouse / touch screen) should be mounted or initiated before weston startup. Then only weston will start.

    We do not want to connect mouse in our product. So we connected usb touch screen.

    We added the touch screen module as given below.

    1. Add the following lines to the touchscreen.sh file
      #!/bin/sh
      /usr/bin/eGtouchD            (this is touch screen driver file)
    2. Give the init script executable permissions so that it can be run
      chmod +x touchscreen.sh
    3. The init script has been created, but it has not been linked into the list of scripts to run on boot. To do so you will need to create a symlink to the script in the proper run level directory. The default run level is 5 so the symlink will be created there.
      cd /etc/rc5.d
      ln -s ../init.d/touchscreen.sh S01touch
       
       

    We dis connected mouse and connected touch screen. Now weston does not startup. But If touchscreen initiated  before weston startup,the weston will also start up.

    How do i initiate/start touchscreen module before weston startup?

    Regards,

    Winiston.P

  • Hello Winiston,

    I am still looking into your question on this end. I think you should be using systemd or systemV instead of the rcX.d lists at this point, but I am not sure.

    If rcX.d still works for you, I would check if weston is getting called in an rcX.d with a lower number. E.g., if you have S01touch in rc5.d but S09weston exists in both rc2.d and rc5.d, I would expect weston to get called in rc2 before your touchscreen gets called in rc5.

    Regards,
    Nick
  • Dear Nick,

    You are right. I am using rcX.d method. But if "systemd and systemV" method solves my problem, I am ready to use "systemd and systemV" method. Kindly give a guidelines. how to use "systemd and systemV"  to solve my problem ?

    You gave a example as given below:

    E.g., if you have S01touch in rc5.d but S09weston exists in both rc2.d and rc5.d, I would expect weston to get called in rc2 before your touchscreen gets called in rc5.

    My lab excercise as given below:

    I checked in rc2.d which has S20weston and rc5.d has S01touch and S20 weston. So your point seems to be correct. But if i copy S01touch to rc2.d also, weston is getting called first. Then checking purpose,  i have deleted S20weston from rc2.d and rc5.d. Still weston is getting called at startup when i connect mouse. I think weston is getting called from some other directory. Now also touchscreen always getting called after weston executes.

    If i connect mouse, system works normally. If i remove mouse, display says  "please wait" and weston does not start. Ultimately i want to start weston without mouse. 

    If you provide the way to start weston without mouse, it will solve my problem.Or else if you provide the way to execute touch screen before weston execute, it will also solve my problem.

    Regards,

    Winiston.P

  • Hello Winiston, 

    Ok, I was able to verify that SDK 4.01 does use systemd rather than the rcX scripts & init used by the older systemV model. systemd is supposed to be able to use SysV init scripts, but I am not sure if the TI SDK setup does that by default, or what would be required in order to do it.

    Google searches will give you the best information for systemd in general and how it is different from systemV.

    See the basics of starting a service with systemd here.

    Building in a startup sequence (first touchscreen, then weston) here.

    This post might also be helpful.

    Regards, 

    Nick