Originally posted by Finless
View Post
NAILED IT! 



Sorry to derail your thread William but you guys are the most knowledgable when ity comes to ALLWinner. But I fixed it!
BUT... Hopefully this infor will help people that screw up thier FocalTech screen chip like I did.
First you have to find a ft5x_ts.ko module that supports writing to the EEPROM for the screen chip. My MOMO8 ft5x_ts.ko did not. This was why I could never fix it!
You will know if your KO module supports that by seeing this line in the dmesg under
=============ft5x_ts_init=============
ctp_fetch_sysconfig_para: script_parser_fetch firmware_upgrade_used = 0
If you do not see that line, your KO module does not support flashing the touch driver EEPROM.
OK so once you have found a KO that works, then we have to do more work!
We have to mod script.bin (sysconfig1.fex) in bootfs. You actually have to get the linux tools bin2fex and fex2bin. You will take script.bin from bootfs and use fex2bin to convert it to editable text.
Then you will go to the CTP section under [ctp_para]. There you will see something like this:
ctp_int_port = port:PH21<6><default><default><default>
ctp_wakeup = port:PB13<1><default><default><1>
ctp_io_port = port:PH21<0><default><default><default>
We need to tell the script we want to program the EEPROM and we will ADD these 2 lines.
ctp_upgrade_used = 1
ctp_firmware_name = "ft5x_newfw"
Please note, the firmware name you use here must be used in the ADB commands below! You can use whatever name you like but it needs to be whats is used below.
Now use fex2bin and make a new script.bin
OK getting closer.... Now we need to actually FIND the required EEPROM firmware. This was a MAJOR pain in the butt. Only site I found it on was Chinese web sites. But I found a RAR file containing many different firmwares. I am not even sure this contains ALL of them but it had the one I needed.
I have uploaded the firmware files to FreakTab here:
http://video.freaktab.com/?subpath=f...x_firmware.zip
Now you just have to figure out which firmware is for your chip. The files have a resolution in the name so that helps. However I had to do this several times to find my correct version.
OK now that you have a KO file that supports programming the EEPROM, you have a firmware file, and you have a modified script.bin, we can go to town with ADB and get the screen fixed!
For this example we have these files:
ft5x_ts.ko
script.bin
and the firmware file which for me was: ft5406-sc3052-1024X768.bin
In Windows fire up a command shell or you can script this as a .bat file. We will do the following:
adb remount
adb shell cd /
adb shell mount -o remount,rw -t ext4 /dev/root /
adb shell mkdir bootfs
adb shell mount -t vfat /dev/block/nanda /bootfs
OK now we need to puch the files
adb push "script.bin" /bootfs/script.bin
adb push "script.bin" /bootfs/script0.bin
adb push "ft5x_ts.ko" /vendor/modules/ft5x_ts.ko
adb shell chmod 644 /vendor/modules/ft5x_ts.ko
adb push "ft5406-sc3052-1024X768.bin" /vendor/firmware/ft5x_newfw
adb shell chmod 644 /vendor/firmware/ft5x_newfw
adb reboot
OK tablet should reboot and your screen should be fixed! You should make a new script.bin and remve these lines:
ctp_upgrade_used = 1
ctp_firmware_name = "ft5x_newfw"
Then push once again the new script.bin like above.
However, if your screen now works BACKWARDS which it did for me, then once again you need to make a new script.bin. Go in and make these changes under [ctp_para]
If your script originally had this:
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
Then change the 0 to a 1 or visa versa. This should fix the backwards screen.
So..... 2 days of trying to figure this all out and success. I hope this information can help someone.
Bob




Sorry to derail your thread William but you guys are the most knowledgable when ity comes to ALLWinner. But I fixed it!
BUT... Hopefully this infor will help people that screw up thier FocalTech screen chip like I did.
First you have to find a ft5x_ts.ko module that supports writing to the EEPROM for the screen chip. My MOMO8 ft5x_ts.ko did not. This was why I could never fix it!
You will know if your KO module supports that by seeing this line in the dmesg under
=============ft5x_ts_init=============
ctp_fetch_sysconfig_para: script_parser_fetch firmware_upgrade_used = 0
If you do not see that line, your KO module does not support flashing the touch driver EEPROM.
OK so once you have found a KO that works, then we have to do more work!
We have to mod script.bin (sysconfig1.fex) in bootfs. You actually have to get the linux tools bin2fex and fex2bin. You will take script.bin from bootfs and use fex2bin to convert it to editable text.
Then you will go to the CTP section under [ctp_para]. There you will see something like this:
ctp_int_port = port:PH21<6><default><default><default>
ctp_wakeup = port:PB13<1><default><default><1>
ctp_io_port = port:PH21<0><default><default><default>
We need to tell the script we want to program the EEPROM and we will ADD these 2 lines.
ctp_upgrade_used = 1
ctp_firmware_name = "ft5x_newfw"
Please note, the firmware name you use here must be used in the ADB commands below! You can use whatever name you like but it needs to be whats is used below.
Now use fex2bin and make a new script.bin
OK getting closer.... Now we need to actually FIND the required EEPROM firmware. This was a MAJOR pain in the butt. Only site I found it on was Chinese web sites. But I found a RAR file containing many different firmwares. I am not even sure this contains ALL of them but it had the one I needed.
I have uploaded the firmware files to FreakTab here:
http://video.freaktab.com/?subpath=f...x_firmware.zip
Now you just have to figure out which firmware is for your chip. The files have a resolution in the name so that helps. However I had to do this several times to find my correct version.
OK now that you have a KO file that supports programming the EEPROM, you have a firmware file, and you have a modified script.bin, we can go to town with ADB and get the screen fixed!
For this example we have these files:
ft5x_ts.ko
script.bin
and the firmware file which for me was: ft5406-sc3052-1024X768.bin
In Windows fire up a command shell or you can script this as a .bat file. We will do the following:
adb remount
adb shell cd /
adb shell mount -o remount,rw -t ext4 /dev/root /
adb shell mkdir bootfs
adb shell mount -t vfat /dev/block/nanda /bootfs
OK now we need to puch the files
adb push "script.bin" /bootfs/script.bin
adb push "script.bin" /bootfs/script0.bin
adb push "ft5x_ts.ko" /vendor/modules/ft5x_ts.ko
adb shell chmod 644 /vendor/modules/ft5x_ts.ko
adb push "ft5406-sc3052-1024X768.bin" /vendor/firmware/ft5x_newfw
adb shell chmod 644 /vendor/firmware/ft5x_newfw
adb reboot
OK tablet should reboot and your screen should be fixed! You should make a new script.bin and remve these lines:
ctp_upgrade_used = 1
ctp_firmware_name = "ft5x_newfw"
Then push once again the new script.bin like above.
However, if your screen now works BACKWARDS which it did for me, then once again you need to make a new script.bin. Go in and make these changes under [ctp_para]
If your script originally had this:
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
Then change the 0 to a 1 or visa versa. This should fix the backwards screen.
So..... 2 days of trying to figure this all out and success. I hope this information can help someone.
Bob
Comment