peter 发表于 2018-7-2 14:41:35

修改script.bin(适用于Banana pi M2U M3等全志芯片的板子)

原文:http://forum.banana-pi.org/t/how-to-the-final-solution-of-compulsive-modification-of-hdmi-output-resolution/1442

1,install compile sunxi-tools depended-upon packages
sudo apt-get install libusb-1.0-0-dev2,get sunxi-tools new code from github:
git clone https://github.com/linux-sunxi/sunxi-tools.git3,compile sunxi-tools
cd sunxi-tools
make4,backup script.bin
sudo cp /boot/bananapi/script.bin /boot/bananapi/script.bak5,copy script.bin to current dir
cp /boot/bananapi/script.bin ./6,use bin2fex change bin to fex
bin2fex ./script.bin ./script.fex7,edit script.fex file:
nano script.fex可以看到平台配制文件,编译过这个固件的人就知道它有什么用:

disp_init_enable = 1
disp_mode = 0
screen0_output_type = 3
screen0_output_mode = 5
screen1_output_type = 2
screen1_output_mode = 11
fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 1
fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 0
lcd0_backlight = 197
lcd1_backlight = 197
lcd0_bright = 50
lcd0_contrast = 50
lcd0_saturation = 57
lcd0_hue = 50
lcd1_bright = 50
lcd1_contrast = 50
lcd1_saturation = 57
lcd1_hue = 50

just change screen0_output_mode = 5, note , other not do any change.

A20 support as below:
HDMI/TV mode numbers:

0      480i
1      576i
2      480p
3      576p
4      720p 50Hz
5      720p 60Hz
6      1080i 50 Hz
7      1080i 60 Hz
8      1080p 24 Hz
9      1080p 50 Hz
10      1080p 60 Hz
11      PAL
12      PAL SVIDEO
14      NTSC
15      NTSC SVIDEO
17      PAL_M
18      PAL_M SVIDEO
20      PAL_NC
21      PAL_NC SVIDEO
23      1080p 24 Hz 3D
24      720p 50 Hz 3D
25      720p 60 Hz 3D
26      1360x768 60 Hz
27      1280x1024 60 HzPress Ctrl + x , Y ,Enter save and exit edit:
8,use fex2bin change fex to bin
fex2bin ./script.fex ./script.bincopy script.bin to /boot
sudo cp ./script.bin /boot/bananapi/9,reboot and make a try
sudo reboot更简单的改变设置变量的方法:
just edit uEnv.txt file to change it:
bootargs=enforcing=1 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait init=/init vmalloc=384M ion_c ma_list=“120m,176m,512m” loglevel=8 bootmenutimeout=10 datadev=mmcblk0p2 disp.screen0_output_type=3 disp.screen0_o utput_mode=10 disp.screen1_output_type=3 disp.screen1_output_mode=10





页: [1]
查看完整版本: 修改script.bin(适用于Banana pi M2U M3等全志芯片的板子)