An unofficial method to solve instability problem

With this method, my bpi_m2u was able to normally run for 10 days since last manually restart. Many thanks to @charles. He suggested me the right way to work out this method.

This method is unofficial because @sinovoip or any other stuff of bpi_m2u maker never give any solution to solve instability problem, but instability seems to be a common problem among customers. See frequent-freeze-ups-of-m2u and what-can-i-do-with-a-defect-board.

#Principle We have to tweak frequency of ram in sys_config.fex. Someone says the default frequency of ram is to high(648MHz). The max frequency shoud be 576MHz. See

Besides frequency, voltage should also be tweak a litte higher. See frequent-freeze-ups-of-m2u.

#Solution The frequency of ram and voltage can only be tweaked by changing their values in sys_config.fex of source code, compiling the source code and writing it to SD card.

##Step 1. (I have pushed my revised source code to facat/BPI-M2U-bsp, you may skip this step)

First, you have to fetch kernel source from official code repository. At the time this article is written, it’s 3.10.65 version.

Go to sunxi-pack/allwinner/azalea-m2ultra/configs. You will see 7 folders.

I recommend you edit sys_config.fex in each of these folders.

For example, go to BPI_M2U_720P and edit sys_config.fex with any editor you like.


dcdc2_vol                  = 1001160
dcdc3_vol                  = 1001100
dcdc4_vol                  = 1100
dc5ldo_vol                 = 1100


dcdc2_vol                  = 1001280
dcdc3_vol                  = 1001150
dcdc4_vol                  = 1160
dc5ldo_vol                 = 1200

This is for tweaking voltage of ram.

Also, replace

dram_clk			= 648


dram_clk			= 576

This is for tweaking frequency of ram. #Step 2. Compile the source code as described in BPI-M2Ultra_Compiler_SOP.pdf When choosing what to compile, choose 1. Build all, uboot, kernel, and pack to download images. #Step 3. Write new images bach to your SD card as described in BPI-M2Ultra_Compiler_SOP.pdf

!Important: You must write back files in 100MB, BPI-BOOT-bpi-m2u.tgz and 3.10.65-BPI-M2U-Kernel.tgz. Do it as the pdf file says.

###For those who are not good at compiling kernel, I supply my kernel (my BPI-M2U kernel image).

Only to give an acknowledge I can confirm the effcet of the upper procedure with my BananaPi M2Ultra. Currently the branch form dan-and has it also impemented and I have tested it now with 4 different processes running memtester 450 10 which executes the test with 450MB on all 4 cores of the board(=1800MB). As long as it is not certified by the manufacturer I have spend a heatsink on the R40 but not for the DDR-SDRAM-Chips, because it was originally specific for a RasberryPi and there the sizes for the other chips were incomatible. Without this change in the .fex-Files the board was running not longer than 15 minutes. With the change it is running up to now for a complete day. Additionally I coud oberve the running processes from another ssh-shell and HTOP. It seems that the stage from the current 3.10.107 is good enough to run the board in reliability application. Good job of the community :wink:

Confirmed: board stable as rock. Later I’ll try to patch original Raspbian imageswith the fixed bootloader and kernel.

Thanks. I am trying this.

Can I compile this using my BPI-M2U or do I need to use a different system?

when trying to install the tool chain at top of BPI-M2Ultra_Compiler_SOP.pdf four of the packages are not available when i try to apt-get install gcc-arm-linux-gnueabihf g+±arm-linux-gnueabihf gcc-arm-linux-gnueabi g+±arm-linux-gnueabi libssl-de

try using the official docker bpi-build on your pc. Or just using my kernel (my BPI-M2U kernel image).

Thank you.

Can you help me a little more? Is the following correct? What are the correct locations for the files?

Change BPI-M2Ultra Uboot: sudo bpi-bootsel BOOTLOADER-bpi-m2u.tar <???>

Change BPI-M2Ultra uImage: sudo tar –xvf BPI-BOOT-bpi-m2u.tar -C /dev/mmcblk0p1

Change BPI-M2Ultra Kernel: sudo tar -xvf 3.10.65-BPI-M2U-Kernel.tar -C /dev/root

#First, take out SD card from your m2u and insert it in a PC. Second, mount your SD card. Remember there are tow partitions on the SD. On your condition, sudo mount /dev/mmcblk0p0 /mnt/BPI-BOOT && mount /dev/mmcblk0p1 /mnt/BPI-ROOT


sudo bpi-bootsel BOOTLOADER-bpi-m2u.tar /dev/mmcblk0

sudo tar –xvf BPI-BOOT-bpi-m2u.tar -C /mnt/BPI-BOOT

sudo tar -xvf 3.10.65-BPI-M2U-Kernel.tar -C /mnt/BPI-ROOT

Thanks so much. I have been trying to do this directly on my running M2U. Hadn’t even thought about turning it off and using another computer.

The only other computer I have is a Mac so I don’t think I can do this without quite a bit of work and installing all the build tools etc.

I will wait for the next jessie img to be released by the BPI team (might need to wait some time I guess).

Can you explain the difference between your build and the one released by dan-and:

Thanks again and really great that you are helping to move this project/board forward.

My kernel only solves the instability problem. From dan-and’s commitment I can see he adopts my code end keeps up with official kernel. Besides, he makes his kernel to 3.10.107 when official kernel is still 3.10.65.

OK. thanks for the info. Being really cheeky but is there any possibility that you could compile and upload dan-and’s kernel?

I am so close to getting a new kernel installed on my m2u, i really would like to make it work as I don’t expect anything good from the BPI team any time soon.

You can ask dan-and to share his compiled kernel by posting an issue on his git repository. Also I can compile his kernel if I’m free.

OK. Thanks. I understand and really appreciate your help.

I am very close to getting the kernel to compile myself on my M2U. It seems to work fine but there is one or 2 errors:

/bin/sh: 1: bc: not found /mnt/mmc/BPI-M2U-bsp/linux-sunxi/kernel/Makefile:141: recipe for target ‘kernel/timeconst.h’ failed make[2]: *** [kernel/timeconst.h] Error 127 Makefile:798: recipe for target ‘kernel’ failed make[1]: *** [kernel] Error 2

and then later:

make[1]: Leaving directory ‘/mnt/mmc/BPI-M2U-bsp/linux-sunxi’ Makefile:49: recipe for target ‘kernel’ failed make: *** [kernel] Error 2

Any idea what could be causing these?

OK - I have found and solved the compile issue on my M2U. So now I have a 3.10.107 kernel.

I’m super happy right now!!!

Is it possible to copy kernel directly onto my M2U while it is running or do I need to connect the SD card to a PC?

You need to connect the SD card to a PC.

haha. Thanks but too late and I have broken my install. No problem though as I am only using the m2u to learn more about linux etc.

Will wait for the next BPI image release and take it from there.

You can update Kernel and modules from BPI. You dont need PC. Last kernel can be found there: 3.10.107-BPI-M2U-Kernel!bc9VzLbS!hmo4D-ZxzBWE4nHl6uF8rQ

How install you can find there:

Its contain all changes from dan-and & facat. Also have modules mali.ko and ump.ko

1 Like

Hi Oleksandr, I follow your guide but I get this error when I have to install modules:

root@bpi-iot-ros-ai:/home/pi# insmod /lib/modules/3.10.107-BPI-M2U-Kernel/kernel/drivers/gpu/umplock.ko

insmod: ERROR: could not insert module /lib/modules/3.10.107-BPI-M2U-Kernel/kernel/drivers/gpu/umplock.ko: Invalid module format

modules are copied here:

root@bpi-iot-ros-ai:/lib/modules/3.10.107-BPI-M2U-Kernel/kernel/drivers/gpu# ls -l

** total 4208 -rw-r–r-- 1 root root 3573676 Aug 10 00:34 mali.ko -rw-r–r-- 1 root root 607012 Aug 10 00:34 ump.ko -rw-r–r-- 1 root root 121624 Aug 10 00:33 umplock.ko

here dmesg output:

[ 3262.178491] ump: disagrees about version of symbol module_layout

[ 3621.399535] umplock: disagrees about version of symbol module_layout

[ 4183.485093] mali: disagrees about version of symbol module_layout

could you help me please ?