[BPI-M64] Kernel Development 2019

Hello, I will be receiving my M64 device soon.

I would like to know who is maintaining the Linux kernel for M64 ? I see Sinovoip’s official kernel which 4.19.

I see that the pine64-plus dtb works with this device, So I hope I can use the dtb from there but will the same kernel work as well?

Anyone else maintaining kernel for this device ? Please let me know.

I use for the moment some sources from pine and as far as I can tell Sinovoip is basing most of their work on Pine64 too (or at least did in the past). I think they only did some minor modifications on the kernel, mainly regarding peripherie like audio, wifi or hdmi output, but the main kernel should run.

Do you want me to try a particular Pine64 SD image on my M64?

Some got apparently the Armbian running on this SoC, but my particular board seems to be incompatible (HW ver. 1.1)

As this is my main board of interest I am tinkering as well with the kernel, but started actually on the 4.4.x, with main focus on periphery like i2c and i2s. Now that we recently got some versions with newer kernels, I was considering moving up.

1 Like

Hey.

I wanted to know if anyone have any idea about the pre-loader or the bootloader needed to make sd-card boot? I can try pine64+ built but I am not sure it will use the same pre-loader. As far as I can read it uses same dtb but again that wont help if users want to user all the hardware I/O

@sinovoip Can you look into this ?

I have received my device and was going through the getting started wiki guide. I would like to know more about the pre-loader, bootloader, and uboot for this device.

I found this on wiki but its not so clear.

Update your image
  * After built bsp code, you could find "SD" directory in project, "cd SD" you could find the generated bootloader, rootfs
  * execute “bpi-tools”, to update your bpi tools;
  * execute “bpi-update -c bpi-m64.conf -d /dev/sdX”, to download new driver to update your image
  * execute “file *.tgz”, to check download files’ type is compressed data
  * execute “bpi-bootsel”, you will see the bootloader path, “/usr/lib/u-boot/bananapi/bpi-m64/u-boot-with-dtb-bpi-m64-720P-8k.img.gz”
  * execute “bpi-bootsel /usr/lib/u-boot/bananapi/bpi-m64/u-boot-with-dtb-bpi-m64-720P-8k.img.gz”, to update your bootloader
  * reboot

R2 guides by Frank was very much clear.

Someone please advice.

yes I was chewing on that too (see Banana PI BPI-M64 Debian 9.5 Image update attempt)

I think this part is mainly a copy & past from bpi1 to bpi3 and I meanwhile try to avoid those scripts.

U-boot sits in the first 100MB of the boot partition. So I essentially dd the content of ./SD/bpi-m64/100MB/BPI-M64-720P-linux4.4-8k.img.gz in the build folder to this partition. This however is essentially packed together from from the files in e.g. ./out/tulip-m64/.

When I get home I will try to precise that a bit more clear…

So the only thing I need in boot is the bootloader like in the case of R2.

and then now I need to find a kernel source for m64.

Yes,

I usually just copy over an existing boot SD card, as @frank-w suggested for the R2.

Unfortunatly the only source available for now is the 4.4-kernel here:

which is the base for this kernel:

But I hope we soon see the sources of either of the following:

Thanks for the reply. I see the device doesn’t have any os by default and it doesn’t have a uboot or bootloader of its own when i try to power up. Nothing comes on. Will try with uart.

Also will try pine64+ img tonight and see how it responds

After bulding all files you end up with something like:

./SD/
     bpi-m65/
             100MB/
                   BPI-M64-720P-linux4.4-8k.img.gz
                   ...
             BPI-BOOT/
                   bananapi/
                            bpi-m64/
                                    linux4.4/
                                             720p/
                                                  bootlogo.bmp
                                                  sun50i-a64-bpi-m64-720p.dtb
                                                  uEnv.txt
                                             uImage
                                             uInitrd
             BPI-ROOT/
                      lib/
                          ...
                      usr/
                          ...
             4.4.89-BPI-M64-Kernel.tgz
             4.4.89-BPI-M64-Kernel-net.tgz
             BOOTLOADER-bpi-m64-linux4.4.tgz
             BPI-BOOT-bpi-m64-linux4.4.tgz
             linux-headers-4.4.89-BPI-M64-Kernel.tgz

The packed file BPI-BOOT-*.tgz essentially is what belong on the boot partition, including uImage and uInitrd. Usually you only need to take care of the files in the SD folder, where all the packed files are copied over from the build folders.

Files related to boot partition, bootstrap and u-boot are prepared in the foloowing folder

./out/
      100MB/
                   BPI-M64-720P-linux4.4-8k.img.gz
                   ...
      host/
           bin/
               ...
           tulip-m64/
                     image/
                           *.fex
                     boot.img
                     rootfs.img
                     tina_tulip-m64_uart0.img
                     tulip-m64-uImage
           tulip-noma/
                     ...

Most notworthy here are the *.fex files and boot.img which includes the vFAT root partition.

Configurations should be here:

./sunxi-pack/
      allwinner/
             tulip-m64/
                     base-files/
                           ...
                     configs/
                           BPI-M64-720P/
                                  bootlogo.bmp
                                  env-4.4.cfg
                                  sys_config.fex
                                  sys_partition.fex
                                  test_config.fex
                     configs.org/
                           ...
                     image/
                           ...
                     BoardConfig.mk
                     config-3.10
                     Makefile
                     tulip_m64.mk
                     ...

Hope this is helping.

1 Like

Indeed, the M64 comes naked without anything pre-installed.

You might try the Armbian images, but I had to stick till now with the 4.4-kernel build as this was the only one with sources available that booted for me.

I am trying the Arch Linux version from pine64 A64+ will report if it boots.

Also I would need someone from bananapi team to advice me on the bootloader files needed to boot. frank have made a good guide and a single 1MB bootloader img instead of 3 imgs to be flashed. Thanks for your response and support.

What do you use your device for?

My goal for this board is a Media Streaming Server using a PiFi DAC+ v2 via i2s for audio output and a 320x240 LCD via i2c as display. Additionally it is planned to be able to stream to BT headphones.

The M64 might be a bit overkill for this particular usecase, but I wanted enough headroom for future extensions. Additionally I try to get back to Linux programming as I haven’t made much use of them since 2000.

I was considering to also get something like the R2 board as Home Automation and Security Box.

Thanks for this directory structure. It helped me. I was able to boot into Arch with pine64 A64+. Lol this looks like the same device.

I am not much surprised, I told you from the code it seemed just minor changes happened :wink:

Need something is fstab I guess, Not able to login.

did you try with root or pi?

Yes, I had the same issue with R2. Looking for the log. Maybe rootfs is on read only. Trying passwordless It works on UART but not on DE.

Thanks. Will try new thing and get a working Manjaro Image ready.

Well quite often those builds have root without password, but I guess you already looked up here for the defaults:

  • User Name: alarm, Password: alarm
  • User Name: root, Password: root
1 Like

Ok, good luck & have fun, will call it a night for today.

BPI-M64-bsp-4.4(kernel 4.4) is the only bsp code support by bpi, it’s base on allwinner official release souce code(https://github.com/Allwinner-Homlet). Actually allwinner does not support linux, and this code have the special structure of bootloader, some binary code for bootloader build and pack, you can check BPI-M64-bsp-4.4/scripts/pack_img.sh for more detail.

In wiki, kernel 4.19 image is armbian build, which is base on mainline kernel 4.19, and other kernel 5.x image is mainline build.