script.bin - where should it be located?

Started by mikenycz, March 31, 2014, 11:34:27 PM

Previous topic - Next topic

mikenycz

Up until now I have been using a vanilla load of the debian image to manipulate GPIO's on the A13. I now need to redefine some of the IO's to better suit my needs. I found the script.bin file in the /opt/sunxi-tools directory and was able to use bin2fex to create the text file that I modified with my changes. I then converted this back to script.bin. To be sure, I then did a bin2fex to make sure my changes were in the file (they were). The problem that I am having is that the updated script.bin file does not appear to be used when I reboot the system. I have tried a trivial change where all I did was change the direction of one of the GPIO's. This does not get seen. My question is, does the script.bin file need to reside in a location other than /opt/sunxi-tools for it to be picked up? I have seen some other posts where it was placed into /boot. I tried that as well with no success. Can someone comment on what I may be doing wrong (or not doing)?

Thank you,
Mike Nycz

mikenycz

OK, I mistakenly thought that the copy of script.bin that was located in the directory /opt/sunxi-tools was the script.bin copy that the OS used when starting up. I tried changing this copy and there was no change to the pin definitions. I then tried putting a copy in /boot since I had seen another post in the A10 forum which implied that this was the location that script.bin should be in. There was no effect when I placed the file in /boot.

I then did a find |grep script.bin from the / directory and found that there was a script.bin located in directory... /media/70C9-2E3E. I replaced the copy that was in this directory and amazingly the pin configuration was updated. I don't know if all installs point to the same directory, but if you are having issues getting script.bin to be recognized I would look in the /media/... directory to see if a copy is there.
I hope this helps someone.

Mike Nycz


MBR

The correct script.bin location is the root of first FAT32 partition (device /dev/mmcblk0p1) alongside with the kernel file (uImage). This partition may be mounted somewhere by default, but if does not, you can always mout it manualy with something like mount /dev/mmcblk0p1 /media/somewhere.

mikenycz

Yes, I can see the uImage file in the same location where the script.bin file was located. I guess the debian image that I have mounts the /dev/mm... file on location /media/70C9-2E3E. 

Mike Nycz