StudioW Tech Munch

hacks, musings and tutorials on embedded systems and engineering

How to enable composite tv output and proxy on legacy armbian

2 years ago · 2 MIN READ
#arm-linux  #armbian 

Armbian is a debian based distribution of linux for arm. If you want to use tv, you will need to make some modifications to the SD card after writing the image. For proxy, there is no GUI for setting it yet, so you will have to set come configurations manually.

This tutorial is for legacy kernel/u-boot method which uses script.bin for boot. This does not apply to mainline kernel based distro. For more information, visit this link

Let's get to it then.

Enabling TV

1) Copy script.bin from your SD card's /boot folder to a folder of your choice

You can also get fex from http://github.com/igorpecovnik/lib/config

2) Install sunxi-tools

sudo apt-get install sunxi-tools

3) Convert script.bin to editable fex format

cd /path/to/where/you/copied/script.bin bin2fex script.bin script.fex

4) Now open the generated file "script.fex" and edit the "disp_init" and "tv_para" sections to be

[disp_init] disp_init_enable = 1 disp_mode = 0 screen0_output_type = 2 screen0_output_mode = 11 screen1_output_type = 3 screen1_output_mode = 5 fb0_format = 0 fb0_width = 0 fb0_height = 0 fb1_format = 0 fb1_width = 0 fb1_height = 0

[hdmi_para] hdmi_used = 1 hdmi_power = "vcc-hdmi-18"

[tv_para] tv_used = 1 tv_dac_used = 1 tv_dac_src0 = 0

To read more about display settings in fex (dual display etc), visit linux-sunxi

5) rename the old script.bin and compile the new one, and copy it over to SD card

mv script.bin script.bin.old fex2bin script.fex script.bin sudo rm /path/to/sd/card/boot/script.bin sudo cp script.bin /path/to/sd/card/boot/script.bin

6) Step 6 only for armbian version below 5.23 Enable the tv module on boot. copy the file /path/to/sd/card/etc/modules to some folder

now edit it, and add the following line to the end of the file

tv

save, and copy it over

sudo cp ./modules /path/to/sd/card/etc/modules

Enabling Proxy

1) First, clone the repo below to a suitable folder, and checkout the proxy only branch

git clone https://github.com/iwalpola/nanopi-m1-armbian-tv-proxy.git cd nanopi-m1-armbian-tv-proxy git checkout onlyproxy

2) Now open the files /nanopi-m1-armbian-tv-proxy/etc/profile.d/proxy.sh /nanopi-m1-armbian-tv-proxy/etc/apt/apt.conf.d/99HttpProxy

And change the proxy address and port, and set other proxies (socks, ftp etc) if necessary.

3) Copy over the files

cd nanopi-m1-armbian-tv-proxy sudo cp -a ./etc/. /path/to/sd/card/etc/

All done! Run apt-get update and wget a file or two to confirm You can also boot up the armbian machine and type this in the terminal:

printenv http_proxy printenv https_proxy

···

Isuru Walpola

Mechanical engineer who codes, and dabbles in electronics.
comments powered by Disqus


Proudly powered by Canvas · Sign In