Compulsive modification of HDMI output resolution

the final solution of compulsive modification of HDMI output resolution.
As you may have discovered the common configuration method in raspberry pi (such as alteration of /boot/config.txt) does not work on BPI, neither does the modification of cmdline.txt and uEnv.txt especially for some display with converter(HDMI->VGA or HDMI ->IDVI) or some old display devices.
Today,we are introducing a new solution to modify the resolution of HDMI, no other risks if you do it according to this document step by step:
1,install compile sunxi-tools depended-upon packages
sudo apt-get install libusb-1.0-0-dev
2,get sunxi-tools new code from github:
git clone https://github.com/linux-sunxi/sunxi-tools.git
3,compile sunxi-tools
cd sunxi-tools
make
4,backup script.bin
sudo cp /boot/bananapi/script.bin /boot/bananapi/script.bak
5,copy script.bin to current dir
cp /boot/bananapi/script.bin ./
6,use bin2fex change bin to fex
bin2fex ./script.bin ./script.fex
7,edit script.fex file:
nano script.fex
see this below:
[disp_init]
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 Hz
Press Ctrl + x , Y ,Enter save and exit edit:
8,use fex2bin change fex to bin
fex2bin ./script.fex ./script.bin
copy script.bin to /boot
sudo cp ./script.bin /boot/bananapi/
9,reboot and make a try
sudo reboot
another easy way: 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