Discussion

How to Modify The script.bin File

5 32074
Post Last Edited by tony_zhang at 2014-5-4 12:55

Post Last Edited by tony_zhang at 2014-5-3 13:30

Post Last Edited by tony_zhang at 2014-5-3 13:29

script.bin is a binary configuration file (lubuntu) used by Allwinner SOC core driver or LiveSuit. And it contains the information that how to set the peripherals, port, and I/O pins of A10/A20 target board.
   Because we can not compile the script.bin file directly, we have to modify the corresponding text file whose format is FEX. We can use the sunxi-tools to change binary file into text file or change it back. You can refer to more information as below:
http://linux-sunxi.org/Fex_Guide
1 Download sunxi-tools tool:
  1. git clone git://github.com/linux-sunxi/sunxi-tools.git
Copy the Code
Then go into sunxi-tools menu, and generate fex2bin and bin2fex file through “make” command.
1.png

2 How to get FEX file.
A. Get from AllWinner
Over there, it contains FEX file for different kinds of chipset such as A10 and A20, but currently banana Pi does not put their own FEX file in the Allwinner git,  so the FEX file from Allwinner is just for study. So the FEX file from Allwinner can not be used at this stage.
B. Get from image file.
Take the Cubieboard_For_BananaPi_v1.0 image file as an example. When we burn the image into SD card, we can get the script.bin file from the first folder after the system booting, then we can use bin2fex tool to change it into compiled fex file.
2.png

3 Compile FEX file.
As we known, the Cubieboard_For_BananaPi_v1.0 can not use the Realtek wireless chipset such as rt5370sta, 8188eu, 8189es, 8192 and so on in default mode. Therefore we need modify script.bin file, then we can use the wifi chipset normally. I will show this process as below.
As shown above, we have used bin2fex tool to get the fex file. We can open this fex file with text tool(such as nano). Actually, we just need add several lines codes as below:
3.png
4.png
Save the file, then exit.

4 Generate scrip.bin file.
Use fex2bin tool to re-compile the modified fex file into script.bin file, then copy the new scripy.bin file to the first folder.
5.png
So far, we can insert the SD card to Banana Pi, and reboot. And you can use 8188eu usb wireless module since we have finished modify script.bin file.
Reply 1# tony_zhang


    Great. Can you upload the modified script.bin file here?

I am running 2015-01-31-raspbian-bpi-r1.img on my Banana Pi machines. There is no script.bin file in the boot partition of my SD card. Forum discussions reference this filename. Where do I find script.bin, or is there an alternative filename that I should be looking for?

Edited by Bartus_l at Tue Apr 21, 2015 06:30

You have to mount first SD partition, there you will find script.bin:
screen.JPG

And since bananian 15.01 you don't need to install sunxi-tools cause it is already there

Tonband  
The current beta1 from raspbian image (http://www.bananapi.com/index.php/download?layout=edit&id=29)
with kernel version 3.19-rc5 does not have any script.bin on /mmcblk0p1.

root@(none):/boot#

  1. -rwxr-xr-x  1 root root    9846 Jan 18 20:17 bcm2708-rpi-b.dtb
  2. -rwxr-xr-x  1 root root   10125 Jan 18 20:17 bcm2708-rpi-b-plus.dtb
  3. -rwxr-xr-x  1 root root    9850 Jan 18 20:17 bcm2708-rpi-cm.dtb
  4. -rwxr-xr-x  1 root root   11113 Jan 18 20:17 bcm2709-rpi-2-b.dtb
  5. -rwxr-xr-x  1 root root   17900 Jan 18 20:17 bootcode.bin
  6. -rwxr-xr-x  1 root root     298 Feb  8  2015 boot.scr
  7. -rwxr-xr-x  1 root root   23666 Feb  8  2015 bpi-m1.dtb
  8. -rwxr-xr-x  1 root root   19546 Feb  8  2015 bpi-m2.dtb
  9. -rwxr-xr-x  1 root root   24098 Feb  8  2015 bpi-r1.dtb
  10. -rwxr-xr-x  1 root root     120 Jan 31  2015 cmdline.txt
  11. -rwxr-xr-x  1 root root    1360 Jan 18 19:27 config.txt
  12. -rwxr-xr-x  1 root root   18693 Jan 18 20:16 COPYING.linux
  13. -rwxr-xr-x  1 root root   24098 Feb  8  2015 dtb
  14. -rwxr-xr-x  1 root root    2472 Jan 18 20:17 fixup_cd.dat
  15. -rwxr-xr-x  1 root root    6446 Jan 18 20:17 fixup.dat
  16. -rwxr-xr-x  1 root root    9684 Jan 18 20:17 fixup_db.dat
  17. -rwxr-xr-x  1 root root    9684 Jan 18 20:17 fixup_x.dat
  18. -rwxr-xr-x  1 root root     137 Jan 31  2015 issue.txt
  19. -rwxr-xr-x  1 root root 4035396 Jan 18 20:17 kernel7.img
  20. -rwxr-xr-x  1 root root 4059512 Jan 18 20:17 kernel.img
  21. -rwxr-xr-x  1 root root    1494 Jan 18 20:17 LICENCE.broadcom
  22. -rwxr-xr-x  1 root root   18974 Sep 25  2013 LICENSE.oracle
  23. drwxr-xr-x  2 root root    8192 Jan 18 20:18 overlays
  24. -rwxr-xr-x  1 root root  604376 Jan 18 20:17 start_cd.elf
  25. -rwxr-xr-x  1 root root 4856072 Jan 18 20:17 start_db.elf
  26. -rwxr-xr-x  1 root root 2730232 Jan 18 20:17 start.elf
  27. -rwxr-xr-x  1 root root 3811048 Jan 18 20:17 start_x.elf
  28. -rwxr-xr-x  1 root root   23666 Feb  8  2015 sun7i-a20-bananapi.dtb
  29. drwxr-xr-x  2 root root    8192 Jan 20 19:45 System Volume Information
  30. -rwxr-xr-x  1 root root 4752384 Feb  8  2015 uImage
Copy the Code


so where should i look now?

For the modification for the file of the script you have to discuss first of all with the all members of the group for taking ideas of them then you will modify it easily with the help of them. Compile the binary changes above the file on the https://www.australianessays.org/proofreading-services/ website information for the corresponding time will detailed to minor change after the modifications.

You have to log in before you can reply Login | Sign Up

Points Rules