Bananapi Zero Ubuntu Base Minimal Versions Save

BananaPi M2 Zero - Ubuntu Focal Base Minimal Image (Experimental) - U-Boot 2017.09 / Kernel 4.18.y / Kernel 4.19.y / Kernel 4.20.y / Kernel 5.3.y / Kernel 5.6.y / Kernel 5.7.y / Kernel 5.11.y

v3.11

2 years ago

Kernel headers

Extract the files in /usr/src/ path

cd /usr/src/
sudo tar -xf linux-headers-5.11.10-server.tar.gz

v3.10

3 years ago

Ubuntu 20.04 LTS (focal)

This is the Ubuntu 20.04 LTS Image for bpi-m2z with kernel 5.7.10 and 5.11.10, where you can switch between the two in /boot partition:

  • eth0 (if you wired the ethernet connector)
  • wlan0 (wifi)
  • BT (not tested)
  • OV5640 (camera)
  • server like with the minimum size, suitable for robotics/testing/fun with latest features from the stable kernel (kernel.org)

Credentials

ubuntu / ubuntu

Wifi

The wifi / ethernet manager is the netplan which runs great in the focal disto.

  • before you boot:

    edit the file /etc/netplan/01-netcfg.yaml and change your ssid (FIBER-8784) and password, do not change the layout or use TABs

  • first login:

      sudo apt-get update
      sudo apt-get dist-upgrade
      sudo netplan apply
    

PS: watch for any message or error, if you change the layout it will spit some messages

  • Reconfigure locale (Language settings)

      sudo dpkg-reconfigure
    
  • Reconfigure keyboard layout

     sudo dpkg-reconfigure keyboard-configuration
    

Flashing OS Image to SD CARD

You will need a Linux box to flash the image to sd card. Any size of the sd card will fit. Suggested > 8GB.

Instructions:

  • find your sd card device, if you have a USB card reader it will be in the form of /dev/sdX where X is a letter (b,c...), if you have an sd card reader (native), it will be in the form of /dev/mmcblkY where Y is a number from 0,1,2...10 make sure you find the correct device or you may end formatting your hard disk....

  • run the commands:

sudo chmod +x format_sd_mainline.sh (make it exec) sudo chmod +x flash_sdcard_mz2_focal.sh (make it exec)

then

    ./format_sd_mainline.sh /dev/sd**X** or /dev/mmcblk**Y**
    ./flash_sdcard_mz2_focal.sh /dev/sd**X** or /dev/mmcblk**Y**

after it finished, remove the sd card and boot the board with the sd card inserted.

Issues

Yet to find... board runs HOT, around 60 ºC while using wlan and ethernet, use a good heat-sink.

Switching kernel versions

You can choose the kernel by changing the links in /boot file:

To boot with kernel 5.7.10: lrwxrwxrwx 1 root root 32 mar 28 12:46 bpi-m2-zero.dtb -> bpi-m2-zero-v4.dtb_5.7.10-server lrwxrwxrwx 1 root root 20 mar 28 12:46 zImage -> zImage_5.7.10-server*

To boot with kernel 5.11.10: lrwxrwxrwx 1 root root 33 mar 28 18:36 bpi-m2-zero.dtb -> bpi-m2-zero-v4.dtb_5.11.10-server lrwxrwxrwx 1 root root 21 mar 28 18:35 zImage -> zImage_5.11.10-server*

How to change:

     cd /boot
     sudo ln -sf bpi-m2-zero-v4.dtb_5.11.10-server bpi-m2-zero.dtb
     sudo ln -sf zImage_5.11.10-server zImage
     sudo reboot

v3.9

3 years ago

Ubuntu 20.04 LTS (focal)

This is the Ubuntu 20.04 LTS Image for bpi-m2z with kernel 5.11.10 and with the following kernel config enabled:

  • eth0 (if you wired the ethernet connector)
  • wlan0 (wifi)
  • BT (not tested)
  • OV5640 (camera)
  • server like with the minimum size, suitable for robotics / software testing / fun with latest features from the stable kernel (kernel.org)

Credentials

ubuntu / ubuntu

Wifi

The wifi / ethernet manager is the netplan which runs great in the focal disto.

  • before you boot:

    edit the file /etc/netplan/01-netcfg.yaml and change your bsid (FIBER-8784) and password, do not change the layout or use TABs

    PLEASE, use the attached file, edit and copy it to /etc/netplan/01-netcfg.yaml

      network:
          version: 2
          renderer: networkd
          ethernets:
             eth0:
               addresses: []
               dhcp4: true
               optional: true
          wifis:
             wlan0:
               access-points:
                 "FIBER-8784":
                   password: 3qFd6GwzPw
               dhcp4: true
               optional: true
    
  • first login:

      sudo apt-get update
      sudo apt-get dist-upgrade
      sudo netplan apply
    

PS: watch for any message or error, if you change the layout it will spit some messages

  • Reconfigure locale (Language settings)

      sudo dpkg-reconfigure
    
  • Reconfigure keyboard layout

     sudo dpkg-reconfigure keyboard-configuration
    

Flashing OS Image to SD CARD

You will need a Linux box to flash the Image to sd card. Any size of the sd card will fit. Suggested > 8GB.

Instructions:

  • find you sd card device, if you have a USB card reader it will be in the form of /dev/sdX where X is a letter (b,c...), if you have a sd card reader (native), it will be in the form of /dev/mmcblkY where Y is a number from 0,1,2...10 make sure you find the correct device or you may end formatting your hard disk....

  • run the commands:

sudo chmod +x format_sd_mainline.sh (make it exec) sudo chmod +x flash_sdcard_mz2_focal.sh (make it exec)

then

    ./format_sd_mainline.sh /dev/sd**X** or /dev/mmcblk**Y**
    ./flash_sdcard_mz2_focal.sh /dev/sd**X** or /dev/mmcblk**Y**

after it finished, remove the sd card and boot the board with the sd card inserted.

Issues

Currently, there are no issues reported, but bear in mind this kernel runs really HOT, it is like 5 ~ 10 ºC higher when wifi and ethernet are connected / in use. I suspect is the GPU with the wrong frequency and have not found how to solve it, yet.

Latest Fix

The file sources.list (/etc/apt/sources.list) has wrong contents (x86) and should be overwritten with the correct one (armhf). Please copy the correct file sources.list to /etc/apt/ prior to boot first-time. If you already booted, copy the file and issue a:

    sudo apt-get update
    sudo apt-get dist-upgrade

ignore the warnings

v3.8

3 years ago

Kernel 5.7.7-server

deb file for testing.

Installation

    sudo dpkg -i linux-image-5.7.7_1.0-46.deb

v3.7

3 years ago

Kernel 5.7.6

  • Camera support (OV5640)
  • DVFS
  • BT
  • audio
  • HDMI

small footprint

Deb package Installation

    sudo dpkg -i linux-image-5.7.6_1.0-45.deb

Info

		[email protected]'s password: 
		Welcome to Ubuntu 19.10 (GNU/Linux 5.7.6 armv7l)
		
		 * Documentation:  https://help.ubuntu.com
		 * Management:     https://landscape.canonical.com
		 * Support:        https://ubuntu.com/advantage
		
		Last login: Sun Jun 28 04:32:30 2020
		ubuntu@bpi-m2z:~$ hcitool dev
		Devices:
			hci0	CC:B8:A8:A9:E5:67
		ubuntu@bpi-m2z:~$ ifconfig
		eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
		        inet 192.168.254.37  netmask 255.255.0.0  broadcast 192.168.255.255
		        inet6 2804:7f4:3582:76ca:6057:4ff:fee1:2e7  prefixlen 64  scopeid 0x0<global>
		        inet6 fe80::6057:4ff:fee1:2e7  prefixlen 64  scopeid 0x20<link>
		        ether 62:57:04:e1:02:e7  txqueuelen 1000  (Ethernet)
		        RX packets 271  bytes 26580 (26.5 KB)
		        RX errors 0  dropped 0  overruns 0  frame 0
		        TX packets 150  bytes 15743 (15.7 KB)
		        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
		        device interrupt 38  
		
		lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
		        inet 127.0.0.1  netmask 255.0.0.0
		        inet6 ::1  prefixlen 128  scopeid 0x10<host>
		        loop  txqueuelen 1000  (Local Loopback)
		        RX packets 40  bytes 2960 (2.9 KB)
		        RX errors 0  dropped 0  overruns 0  frame 0
		        TX packets 40  bytes 2960 (2.9 KB)
		        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
		
		wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
		        inet 192.168.254.103  netmask 255.255.0.0  broadcast 192.168.255.255
		        inet6 2804:7f4:3582:76ca:ceb8:a8ff:fea9:e566  prefixlen 64  scopeid 0x0<global>
		        inet6 fe80::ceb8:a8ff:fea9:e566  prefixlen 64  scopeid 0x20<link>
		        inet6 2804:7f4:3582:76ca:a4a5:fdb5:7ce4:6d34  prefixlen 64  scopeid 0x0<global>
		        ether cc:b8:a8:a9:e5:66  txqueuelen 1000  (Ethernet)
		        RX packets 189  bytes 13240 (13.2 KB)
		        RX errors 0  dropped 0  overruns 0  frame 0
		        TX packets 94  bytes 12809 (12.8 KB)
		        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
		
		ubuntu@bpi-m2z:~$ lsmod
		Module                  Size  Used by
		lzo_rle                16384  16
		lzo_compress           16384  1 lzo_rle
		bnep                   20480  2
		zram                   28672  4
		snd_soc_hdmi_codec     16384  1
		dw_hdmi_i2s_audio      16384  0
		dw_hdmi_cec            16384  0
		ov5640                 28672  1
		snd_soc_simple_card    16384  1
		snd_soc_simple_card_utils    16384  1 snd_soc_simple_card
		sun8i_drm_hdmi         20480  0
		dw_hdmi                32768  2 sun8i_drm_hdmi,dw_hdmi_i2s_audio
		sun8i_codec_analog     24576  1
		cec                    49152  2 dw_hdmi_cec,dw_hdmi
		sunxi_cir              16384  0
		sun8i_adda_pr_regmap    16384  1 sun8i_codec_analog
		sun6i_csi              24576  0
		v4l2_fwnode            20480  2 ov5640,sun6i_csi
		sunxi_cedrus           36864  0
		sun4i_i2s              20480  2
		sun4i_codec            40960  3
		v4l2_mem2mem           20480  1 sunxi_cedrus
		videobuf2_dma_contig    20480  2 sunxi_cedrus,sun6i_csi
		videobuf2_memops       16384  1 videobuf2_dma_contig
		videobuf2_v4l2         20480  3 sunxi_cedrus,sun6i_csi,v4l2_mem2mem
		videobuf2_common       36864  4 sunxi_cedrus,sun6i_csi,v4l2_mem2mem,videobuf2_v4l2
		videodev              163840  7 ov5640,v4l2_fwnode,sunxi_cedrus,videobuf2_common,sun6i_csi,v4l2_mem2mem,videobuf2_v4l2
		mc                     28672  7 ov5640,sunxi_cedrus,videobuf2_common,videodev,sun6i_csi,v4l2_mem2mem,videobuf2_v4l2
		sun8i_mixer            40960  0
		sun4i_drm              20480  0
		sun4i_frontend         16384  1 sun4i_drm
		sun4i_tcon             28672  1 sun4i_drm
		i2c_gpio               16384  0
		sun8i_tcon_top         16384  3 sun8i_drm_hdmi,sun4i_drm,sun4i_tcon
		rfcomm                 40960  4
		hci_uart               45056  0
		btbcm                  16384  1 hci_uart
		btintel                20480  1 hci_uart
		bluetooth             344064  30 hci_uart,btintel,bnep,btbcm,rfcomm
		ecdh_generic           16384  2 bluetooth
		ecc                    32768  1 ecdh_generic
		brcmfmac              200704  0
		brcmutil               16384  1 brcmfmac
		g_serial               16384  0
		ip_tables              24576  0
		x_tables               24576  1 ip_tables
		ipv6                  438272  34
		nf_defrag_ipv6         16384  1 ipv6

v3.6

3 years ago

BananaPi M2 Zero - Kernel 5.6.13 Server

Linux Image for BananaPi M2Z (Ubuntu 19.10) with Kernel 5.6.13 Server

Server edition is optimized for memory-intensive programs , no VPU / GPU (hardware accelerations)

Fix:

  • CPU Temp
  • DVFS
  • BT
  • minor fixes

Install

sudo dpkg -i linux-image-5.6.13-server_1.0-44.deb

Info

[email protected]'s password: 
Welcome to Ubuntu 19.10 (GNU/Linux 5.6.13-server armv7l)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

Last login: Sun May 17 22:40:03 2020
ubuntu@bpi-m2z:~$ uptime
 11:12:30 up 12:33,  2 users,  load average: 0.10, 0.03, 0.01
ubuntu@bpi-m2z:~$ sudo htop
[sudo] password for ubuntu: 
ubuntu@bpi-m2z:~$ play file_example_MP3_700KB.mp3 

file_example_MP3_700KB.mp3:

 File Size: 764k      Bit Rate: 224k
  Encoding: MPEG audio    
  Channels: 2 @ 16-bit   
Samplerate: 32000Hz      Album: YouTube Audio Library
Replaygain: off         Artist: Kevin MacLeod
  Duration: 00:00:27.29  Title: Impact Moderato

In:8.44% 00:00:02.30 [00:00:24.98] Out:73.7k [======|======] Hd:1.5 Clip:0    
Aborted.
ubuntu@bpi-m2z:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.254.35  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::409a:81ff:fe91:db56  prefixlen 64  scopeid 0x20<link>
        inet6 2804:7f4:3581:a966:409a:81ff:fe91:db56  prefixlen 64  scopeid 0x0<global>
        ether 42:9a:81:91:db:56  txqueuelen 1000  (Ethernet)
        RX packets 11424  bytes 964544 (964.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5287  bytes 493016 (493.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 38  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 40  bytes 2960 (2.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 40  bytes 2960 (2.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.254.103  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::ceb8:a8ff:fea9:e566  prefixlen 64  scopeid 0x20<link>
        inet6 2804:7f4:3581:a966:f949:6ed1:3552:515b  prefixlen 64  scopeid 0x0<global>
        inet6 2804:7f4:3581:a966:ceb8:a8ff:fea9:e566  prefixlen 64  scopeid 0x0<global>
        ether cc:b8:a8:a9:e5:66  txqueuelen 1000  (Ethernet)
        RX packets 10434  bytes 681502 (681.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4525  bytes 605999 (605.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ubuntu@bpi-m2z:~$ 

ubuntu@bpi-m2z:~$ hciconfig all
hci0:	Type: Primary  Bus: UART
	BD Address: CC:B8:A8:A9:E5:67  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING PSCAN 
	RX bytes:2184 acl:0 sco:0 events:214 errors:0
	TX bytes:36815 acl:0 sco:0 commands:215 errors:0

ubuntu@bpi-m2z:~$ 

bpi-m2z

CPU Temp Optimization

The CPU Temp throttling occurs at 75ºC in order to be run inside a case but if you have a good heat-sink you can use the new bpi-m2-zero-v4.dtb_5.6.13-server that starts throttling at 80ºC which has a better performance. Thermal throttling is now at 80ºC.

instructions

1 - Login (shell cmd) 2 - cd /boot 3 - sudo mv bpi-m2-zero-v4.dtb_5.6.13-server bpi-m2-zero-v4.dtb_5.6.13-server-BAK 4 - sudo wget https://github.com/avafinger/bananapi-zero-ubuntu-base-minimal/releases/download/v3.6/bpi-m2-zero-v4.dtb_5.6.13-server 5 - sync && sudo reboot

v3.5

4 years ago

Kernel 5.6.5 Server BananaPi M2 Zero - Ubuntu 19.10 - EOAN

This is the Mainline Kernel 5.6.5 Server, ideal for building packages, developing applications and kernels on board, and installing a small Desktop if you desire.

No cedrus or mail in this kernel. That means, no HW acceleration.

Install instructions

This kernel is meant to be installed in Ubuntu 19.10 Image

  • Make a backup as usual

  • run in the shell

      sudo dpkg -i linux-image-5.6.5-server_1.0-43.deb
    

v3.4

4 years ago

U-boot optimized for M2Z

New U-boot to speed-up boot time.

While running the board type in the shell:

wget https://github.com/avafinger/bananapi-zero-ubuntu-base-minimal/releases/download/v3.4/booloader_m2z.bin
sudo dd if=./booloader_m2z.bin conv=notrunc bs=1k seek=8 of=/dev/mmcblk0
sync
sudo reboot

Speed up login process

If you are not using ethernet (eth0) you can speed up the login process by adjusting the file /etc/network/interfaces with

  • install he'd (sudo apt-get install jed)

  • edit the file and make eth0 static IP like this:

    sudo jed /etc/network/interfaces

change and save the eth0 portion:

auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
broadcast 255.255.1.255    

v3.3

4 years ago

BananaPi M2 Zero - Ubuntu 19.10 - EOAN with Kernel 5.6.5

This is the Mainline Kernel 5.6.5 with Mali GBM support, suitable to run KODI or a Desktop such as Gnome with wayland.

Install

sudo dpkg -i linux-image-5.6.5-r1_1.0-42.deb

v3.2

4 years ago

Kernel 5.6.0-rc5

Release for testing.

Install

  • Use a spare sd card to test this release

or

  • make a backup of your work before you upgrade the kernel

Install

sudo dpkg -i linux-image-5.6.0-rc5+_1.0-41.deb