User Tools

Site Tools


tutorials:common:edit_the_system_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:common:edit_the_system_configuration [2013/09/26 10:56]
soloforce created
tutorials:common:edit_the_system_configuration [2013/12/23 14:50] (current)
Line 5: Line 5:
 ===== Android ===== ===== Android =====
 At first You may need fex2bin and bin2fex: At first You may need fex2bin and bin2fex:
-  $git clone git://​github.com/​linux-sunxi/​sunxi-tools.git +  $ git clone git://​github.com/​linux-sunxi/​sunxi-tools.git 
-  $cd sunxi-tools +  $ cd sunxi-tools 
-  $make +  $ make 
-  $With the using of ls, you can find the fex2bin and bin2fex.+  $ With the using of ls, you can find the fex2bin and bin2fex.
  
 Second copy the script.bin from Android OS: Second copy the script.bin from Android OS:
-  $adb shell +  $ adb shell 
-  $mkdir /mnt/tmp +  $ mkdir /mnt/tmp 
-  $mount -t vfat /​dev/​block/​nanda /mnt/tmp +  $ mount -t vfat /​dev/​block/​nanda /mnt/tmp 
-  $exit +  $ exit 
-  $adb pull /​mnt/​tmp/​script.bin ​+  $ adb pull /​mnt/​tmp/​script.bin ​
 Note : Attention it's different from Linux. Note : Attention it's different from Linux.
  
 Then convert the script.bin to script.fex: Then convert the script.bin to script.fex:
-  $chmod 777 script.bin +  $ chmod 777 script.bin 
-  $./bin2fex script.bin > ./​script.fex +  $ ./bin2fex script.bin > ./​script.fex 
-  $gedit script.fex+  $ gedit script.fex
  
-Now, you can edit the script.fex.Don'​t forget saving the file when you leave it.+Now, you can edit the script.fex. Don't forget saving the file when you leave it.
  
-Finally,​convert the script.fex to script.bin and push it back to the CB +Finally,​convert the script.fex to script.bin and push it back to the CB 
-  $./fex2bin script.fex > ./​script.bin +  $ ./fex2bin script.fex > ./​script.bin 
-  $adb push script.bin /mnt/tmp +  $ adb push script.bin /mnt/tmp 
-  $adb shell +  $ adb shell 
-  $umount /mnt/tmp +  $ umount /mnt/tmp 
-  $reboot+  $ reboot
 It will restart the CB. The new script.bin will come into effect. It will restart the CB. The new script.bin will come into effect.
  
  
-===== Liunx =====+===== Linux =====
 You can edit the script.bin directly\\ You can edit the script.bin directly\\
-Firstly,you must connect network and install compilation Tools: +Firstly, you must connect network and install compilation Tools: 
-  $git clone git://​github.com/​linux-sunxi/​sunxi-tools.git +  $ git clone git://​github.com/​linux-sunxi/​sunxi-tools.git 
-  $cd sunxi-tools +  $ cd sunxi-tools 
-  $make+  $ make
 With the using of ls, you can find the files: fex2bin and bin2fex. With the using of ls, you can find the files: fex2bin and bin2fex.
  
 Copy the script.bin.(boot from sdcard): Copy the script.bin.(boot from sdcard):
-  $mkdir /​mnt/​mmcp1 +  $ mkdir /​mnt/​mmcp1 
-  $mount /​dev/​mmcblk0p1 /​mnt/​mmcp1 ​ (the script.bin is in /dev/nanda if you boot from nand ) +  $ mount /​dev/​mmcblk0p1 /​mnt/​mmcp1 ​ (the script.bin is in /dev/nanda if you boot from nand ) 
-  $cp /​mnt/​mmcp1/​script.bin ./+  $ cp /​mnt/​mmcp1/​script.bin ./
   ​   ​
 Convert the script.bin to script.fex: Convert the script.bin to script.fex:
-  $chmod 777 script.bin +  $ chmod 777 script.bin 
-  $./bin2fex script.bin > ./​script.fex +  $ ./bin2fex script.bin > ./​script.fex 
-  $vi script.fex+  $ vi script.fex
 Now, you can edit the script.fex.Don'​t forget saving the file when you leave it. Now, you can edit the script.fex.Don'​t forget saving the file when you leave it.
  
 Convert the script.fex to script.bin and push it back. Convert the script.fex to script.bin and push it back.
-  $./fex2bin script.fex > ./​script.bin+  $ ./fex2bin script.fex > ./​script.bin
   $cp ./​script.bin /mnt/mmcp1/   $cp ./​script.bin /mnt/mmcp1/
   $umount /mnt/mmcp1   $umount /mnt/mmcp1
Line 60: Line 60:
 It will restart the CB. The new script.bin will come into effect. It will restart the CB. The new script.bin will come into effect.
  
- +**Note**:​When the script.bin is invalid.You must enter the u-boot command line and input 
 +  ​$setenv boot_normal fatload nand 0 43000000 script.bin\;​boota 40007800 
 +  $saveenv 
 +  $reset
  
tutorials/common/edit_the_system_configuration.1380164193.txt.gz · Last modified: 2013/12/23 14:50 (external edit)