6 Replies Latest reply on Mar 25, 2014 4:27 PM by radiatortwo

    Reboot of the Linux OS run into segmentation fault

    mzeh

      Hi all,

       

      this week I got my first RIoTboard. I want to use it as a low cost workplace which features a character-terminal with sip-telephone. First I flashed the Linux and set up the system. All worked fine, also the quality of the audio is sufficient for my needs and the sip-phone works very well.

      The only thing which is not working as expected is to reboot the system. If I try to shutdown the board, it always runs into an segmentation fault and stops running. The only way to reboot the system is to push the little reset button on the board or to switch the power off and on.

       

      The serial output of the segmentation fault is in the attachment.

       

      Can anybody help me?

       

      Kind regards and thanks in advance

        • Re: Reboot of the Linux OS run into segmentation fault
          czudekm

          I have the same problem. So if anyone knows how to solve this, please share.

          • Re: Reboot of the Linux OS run into segmentation fault
            mzeh

            I solved the issue by my own. I downloaded the kernel as described in the manual and I changed the core_shutdown function as follows:

             

            file: drivers/input/touchscreen/generic_ts_rel/core_i2c.c line 633

             

            static
            void core_shutdown(struct i2c_client *client)
            {
                 struct struct_core_i2c_var *core_data = i2c_get_clientdata(client);
                 char *buf = (char*)core_data->cdata->pts_data;
            
                 PRINT_CORE_MSG("%s: >>>>>>>>>>>>>>>>>>>\n", __FUNCTION__);
            
                 if ( core_data->state == CORE_STATE_NORMAL ) {
                      if ( core_data->cdata->ops.go_sleep )
                           core_data->cdata->ops.go_sleep(client, buf);
                 }
            }
            

            changed to:

            static
            void core_shutdown(struct i2c_client *client)
            {
                 struct struct_core_i2c_var *core_data = i2c_get_clientdata(client);
                 char *buf;
                 
                    PRINT_CORE_MSG("%s: >>>>>>>>>>>>>>>>>>>\n", __FUNCTION__);      if (core_data != NULL) {          if (core_data->cdata != NULL) {             buf = (char*)core_data->cdata->pts_data;              if ( core_data->state == CORE_STATE_NORMAL ) {                   if ( core_data->cdata->ops.go_sleep )                        core_data->cdata->ops.go_sleep(client, buf);              }          }      } }

            I added checks for NULL pointer and the reboot works without segmentation fault. I guess that the touchscreen is not initialized as expected by the author of this code, because there is no touchscreen available, and the pointer to the core_data or the pointer to cdata is left null.

            Is there anybody who do bug fixing in this driver code. How do I share my changes to others?

             

            Martin Zeh