Banana PI BPI-M64 Debian 9.5 Image update attempt

While the existing Debian 9.5 AARCH64 Release 2018 is somewhat working, it is rather old. Not to mention that overlay modules for sound and display adapters arent enabled, nor does the audio jack work.

Unfortunatley the Armbian images don’t seem to work on my BPI-M64 board (rev. 1.1), not even if I attempt to compile them by my own.

So I tried to setup an cross development environment in a VirtualBox, with cross compilers for kernel 4.4.x, which is everything but easy, considering that this is quite an old kernel. Somehow I did manage and I can launch the build, choose kernel parameter, build u-boot and kernel without error.

I had a nice read in the R64 part of the forum about How to build an Ubuntu/Debian SD image from scratch which was quite helpfull. But like others, the folder and file structure is sometimes a bit confusing, not to mention that files are redundant scattered over several places.

So far I understood, only the files in folder SD are meant to be copied to the SD card.

But as one can see, for the M64 we not have a dedicated HEAD or PRELOADER file. If I get it right then files in subfolder 100MB are the different BOOTLOADER files that can be installed via

 $ sudo gunzip -c ./SD/bpi-m64/100MB/BPI-M64-720P-linux4.4-8k.img | sudo dd of=/dev/sdc bs=1024 seek=8

Even though I assume, in the complete image I have downloaded from Banana PI BPI-M64 New Images :Debian 9.5 AARCH64 Release 2018-11-02 all 3 elements are packed together. Nevertheless it seemed to boot when I copy it over the SD card that previously was holding that Debian 9.5 Image.

I wished I however could backup the boot part of that SD card section which I assume would look a bit like

 $ sudo dd if=/dev/sdc bs=1024 skip=8 of=./BOOTLOADER-backup.img

using skip instead of seek to affect the input stream, just that I have no idea how many bytes I actually have to copy…

And why the heck does the bpi-update tool download and copy a bunch of 3.x kernel files on the SD card, but actually fail to copy the kernel headers and activate the just compiled kernel when starting from the build script? Anyhow I guess/hope bpi-bootsel at least switched to the proper kernel?

I would have expected the date of my compilation, but the kernel seems to booting up

dmesg
...
[    0.000000] Linux version 4.4.89-BPI-M64-Kernel (root@JackBpi) (gcc version 4.9.3 20150113 (prerelease) (Linaro GCC 4.9-2015.01-3) ) # 8 SMP PREEMPT Thu Nov 1 15:46:06 CST 2018
...
[    0.000000] Kernel command line: board=bpi-m64 console=earlyprintk=sunnxi-uqt,0x01c28000 console=tty1 console=ttyS0,115200n8 no_console_suspend consoleblank=0 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait bootmenutimeout=10 datadev=mmcblk0p2 service=linux4.4 bpiuser=720p mac_addr= enforcing=1 initcall_debug=0 loglevel=8 init=/sbin/init cma=256M panic=10 fsck.mode=force fsck.repair=yes disp.screen0_output_type=3 disp.screen0_output_mode=5 disp.screen1_output_type=3 disp.screen1_output_mode=5 androidboot.serialno=8417***********0a0f boot_type=1
...
[    0.180062] Brought up 4 CPUs
[    0.180284] SMP: Total of 4 processors activated.
[    0.180310] CPU: All CPU(s) started at EL1
[    0.180350] alternatives: patching kernel code
[    0.180515] Invalid sched_group_energy for CPU3
[    0.180540] CPU3: update max cpu_capacity 1024
[    0.180544] Invalid sched_group_energy for CPU2
[    0.180583] Invalid sched_group_energy for CPU1
[    0.180604] Invalid sched_group_energy for CPU0

ok that seems to be a common warning…

dmesg
[    3.495010] Linux video capture interface: v2.00
[    3.495617] Advanced Linux Sound Architecture Driver Initialized.
[    3.495617] Bluetooth: Core ver 2.21
...
[    3.495617] [axp803] chip id detect 0x51 !
[    3.495617] [axp803] enable dcdc2 dvm.
...
[    3.558116] thermal thermal_zone2: failed to read out thermal zone (-19) 
[    3.560570] Unpacking initramfs...

Ok whatever with the thermal readout…

dmesg
[    3.839305] [DISP]disp_module_init
[    3.840941] [DISP] disp_sys_script_get_item,line:198:
[    3.840962] of_find_compatible_node allwinner,sunxi-lcd1 fail
...
[    4.036318] Console: switching to colour frame buffer device 160x45
[    4.050488] [DISP]disp_module_init finish

… well no LCD device is connected for now

dmesg
[    5.436092] sunxi-bt bt: bt_power_num (1)
[    5.444484] sunxi-bt bt: bt_power_name (vcc-wifi)
[    5.453559] sunxi-bt bt: io_regulator_name (vcc-wifi-io)
[    5.463279] sunxi-bt bt: request pincrtl handle for device [bt] failed
[    5.474406] sunxi-bt bt: bt_rst gpio=356  mul-sel=1  pull=-1  drv_level=-1  data=0
[    5.486768] sunxi-bt bt: clk_name (losc_out)
[    5.495630] sunxi-bt bt: block state already is 1
[    5.505031] sunxi-wlan wlan: wlan_busnum (1)
[    5.513660] sunxi-wlan wlan: wlan_power_num (1)
[    5.522528] sunxi-wlan wlan: wlan_power_name (vcc-wifi)
[    5.532113] sunxi-wlan wlan: io_regulator_name (vcc-wifi-io)
[    5.542177] sunxi-wlan wlan: request pincrtl handle for device [wlan] failed
[    5.553826] sunxi-wlan wlan: wlan_regon gpio=354  mul-sel=1  pull=-1  drv_level=-1  data=0
[    5.566866] sunxi-wlan wlan: get gpio wlan_power_enable failed
[    5.577143] sunxi-wlan wlan: wlan_hostwake gpio=355  mul-sel=6  pull=-1  drv_level=-1  data=0
[    5.590483] sunxi-wlan wlan: clk_name (losc_out)
[    5.599518] Loading iSCSI transport class v2.0-870.
[    5.609184] iscsi: registered transport (tcp)
[    5.619496] spi spi1: master is unqueued, this is deprecated
[    5.629968] spidev spi1.0: buggy DT: spidev listed directly in DT
[    5.640716] ------------[ cut here ]------------
[    5.649717] WARNING: at drivers/spi/spidev.c:719
[    5.650623] Modules linked in:

[    5.650623] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.4.89-BPI-M64-Kernel #8
[    5.650623] Hardware name: sun50iw1 (DT)
[    5.650623] task: ffffffc069588000 ti: ffffffc069590000 task.ti: ffffffc069590000
[    5.650623] PC is at spidev_probe+0x190/0x1b0
[    5.650623] LR is at spidev_probe+0x68/0x1b0
[    5.650623] pc : [<ffffff80086560a4>] lr : [<ffffff8008655f7c>] pstate: 60000045
[    5.650623] sp : ffffffc0695938b0
[    5.650623] x29: ffffffc0695938b0 x28: ffffff80092aac38 
[    5.650623] x27: 0000000000000000 x26: 0000000000000000 
[    5.650623] x25: ffffffc068e72000 x24: ffffff8009194360 
[    5.650623] x23: 0000000000000000 x22: ffffff8009188000 
[    5.650623] x21: ffffff80092aa000 x20: ffffffc067fbf400 
[    5.650623] x19: ffffff8008bacca0 x18: 0000000000000000 
[    5.650623] x17: 0000000044468a40 x16: 0000000000000000 
[    5.650623] x15: 000000004e0811a1 x14: ffffff8009a70480 
[    5.650623] x13: ffffff8009a70480 x12: 0000000000000000 
[    5.650623] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f 
[    5.650623] x9 : 01fefefefefefeff x8 : 7f7f7f7f7f7f7f7f 
[    5.650623] x7 : 756463686f722b67 x6 : 8080808080808000 
[    5.650623] x5 : 0000000000000000 x4 : 63657472ffffffff 
[    5.650623] x3 : 0300000000000000 x2 : 7665646970732c68 
[    5.650623] x1 : ffffffc069590000 x0 : 0000000000000000 
[    5.650623] 
               SP: 0xffffffc069593830:
[    5.650623] 3830  09188000 ffffff80 00000000 00000000 09194360 ffffff80 68e72000 ffffffc0
[    5.650623] 3850  00000000 00000000 00000000 00000000 092aac38 ffffff80 695938b0 ffffffc0
[    5.650623] 3870  08655f7c ffffff80 695938b0 ffffffc0 086560a4 ffffff80 60000045 00000000
[    5.650623] 3890  695938b0 ffffffc0 08655f7c ffffff80 ffffffff ffffffff 67fbf400 ffffffc0
[    5.650623] 38b0  69593900 ffffffc0 0865314c ffffff80 67fbf400 ffffffc0 09194340 ffffff80
[    5.650623] 38d0  092aa000 ffffff80 09188000 ffffff80 00000000 00000000 09194360 ffffff80
[    5.650623] 38f0  68e72000 ffffffc0 08653138 ffffff80 69593920 ffffffc0 085f8308 ffffff80
[    5.650623] 3910  67fbf400 ffffffc0 00000000 00000000 69593960 ffffffc0 085f85f4 ffffff80
[    5.650623] 
               X1: 0xffffffc06958ff80:
[    5.650623] ff80  ffbffdff feffffbf fffbdfff ffff7fff fffffaff ffffffff ffbfffff fffffffe
[    5.650623] ffa0  ffffffff ffbfffff f7ffffff fffdffff ffffffff ffffffff f7ffffff ffffffff
[    5.650623] ffc0  ffff7ffb ffffbfff ffffefff ffffffff ffffffff fffbffff ffefdfff ffffffff
[    5.650623] ffe0  ffffffff ff7fffff ffdff7ff ffffffff ffffffff ff7fffff ffffffff ffdffbff
[    5.650623] 0000  00000002 00000000 ffffffff ffffffff 69588000 ffffffc0 00000000 00000003
[    5.650623] 0020  57ac6e9d 00000000 ffffffff ffdfffff ffffffff ffffffff ffffffff ffffffff
[    5.650623] 0040  ffffffff ffffdfff ffffffff ffffffef ffffffff ffffffff ffffffff ffffffff
[    5.650623] 0060  ffffffff ffffffff ffffffff ffffffff ffff9fff ff7fffff ffffffff ffffffff
[    5.650623] 
               X20: 0xffffffc067fbf380:
[    5.650623] f380  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] f3a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] f3c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] f3e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] f400  68e72000 ffffffc0 1fa61800 ffffffc0 68523080 ffffffc0 6967b080 ffffffc0
[    5.650623] f420  68e72018 ffffffc0 68e72010 ffffffc0 6967b080 ffffffc0 09188788 ffffff80
[    5.650623] f440  68522870 ffffffc0 00000003 00000007 00000000 00000000 00000000 00000000
[    5.650623] f460  00000000 00010001 67fbf468 ffffffc0 67fbf468 ffffffc0 69588000 ffffffc0
[    5.650623] 
               X25: 0xffffffc068e71f80:
[    5.650623] 1f80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] 1fa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] 1fc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] 1fe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.650623] 2000  68dbac10 ffffffc0 1fa61900 ffffffc0 68521d80 ffffffc0 67fbf418 ffffffc0
[    5.650623] 2020  68dbac28 ffffffc0 68521e00 ffffffc0 6967b080 ffffffc0 09188788 ffffff80
[    5.650623] 2040  685203c0 ffffffc0 00000006 00000007 00000000 00000000 00000000 00000000
[    5.650623] 2060  00000001 00000000 68e72068 ffffffc0 68e72068 ffffffc0 00000000 00000000
[    5.650623] 
               X29: 0xffffffc069593830:
[    5.650623] 3830  09188000 ffffff80 00000000 00000000 09194360 ffffff80 68e72000 ffffffc0
[    5.650623] 3850  00000000 00000000 00000000 00000000 092aac38 ffffff80 695938b0 ffffffc0
[    5.650623] 3870  08655f7c ffffff80 695938b0 ffffffc0 086560a4 ffffff80 60000045 00000000
[    5.650623] 3890  695938b0 ffffffc0 08655f7c ffffff80 ffffffff ffffffff 67fbf400 ffffffc0
[    5.650623] 38b0  69593900 ffffffc0 0865314c ffffff80 67fbf400 ffffffc0 09194340 ffffff80
[    5.650623] 38d0  092aa000 ffffff80 09188000 ffffff80 00000000 00000000 09194360 ffffff80
[    5.650623] 38f0  68e72000 ffffffc0 08653138 ffffff80 69593920 ffffffc0 085f8308 ffffff80
[    5.650623] 3910  67fbf400 ffffffc0 00000000 00000000 69593960 ffffffc0 085f85f4 ffffff80

[    5.650623] ---[ end trace 9b3ba9da3bb94eab ]---
[    5.650623] Call trace:
[    5.650623] Exception stack(0xffffffc0695936e0 to 0xffffffc069593810)
[    5.650623] 36e0: ffffff8008bacca0 0000008000000000 ffffffc0695938b0 ffffff80086560a4
[    5.650623] 3700: ffffff80092b7c18 0000000000000000 ffffffc069593750 ffffff80087b0e8c
[    5.650623] 3720: ffffffc06ffbfcf8 ffffff8008ea4aa7 ffffffc0695937f8 ffffffc0695938b0
[    5.650623] 3740: 0000000000000000 ffffff80087b25fc ffffffc069593780 cb88537fdc8ba659
[    5.650623] 3760: ffffffc069593800 ffffff80085f4368 ffffffc067fbf400 0000000000000003
[    5.650623] 3780: 0000000000000000 ffffffc069590000 7665646970732c68 0300000000000000
[    5.650623] 37a0: 63657472ffffffff 0000000000000000 8080808080808000 756463686f722b67
[    5.650623] 37c0: 7f7f7f7f7f7f7f7f 01fefefefefefeff 7f7f7f7f7f7f7f7f 0101010101010101
[    5.650623] 37e0: 0000000000000000 ffffff8009a70480 ffffff8009a70480 000000004e0811a1
[    5.650623] 3800: 0000000000000000 0000000044468a40
[    5.650623] [<ffffff80086560a4>] spidev_probe+0x190/0x1b0
[    5.650623] [<ffffff800865314c>] spi_drv_probe+0x88/0xb0
[    5.650623] [<ffffff80085f8308>] driver_probe_device+0x11c/0x288
[    5.650623] [<ffffff80085f85f4>] __device_attach_driver+0x90/0xa0
[    5.650623] [<ffffff80085f66bc>] bus_for_each_drv+0x84/0x9c
[    5.650623] [<ffffff80085f8124>] __device_attach+0x98/0x100
[    5.650623] [<ffffff80085f875c>] device_initial_probe+0x24/0x30
[    5.650623] [<ffffff80085f7754>] bus_probe_device+0x38/0x98
[    5.650623] [<ffffff80085f5488>] device_add+0x2e0/0x520
[    5.650623] [<ffffff8008655308>] spi_add_device+0x104/0x150
[    5.650623] [<ffffff8008655a70>] spi_register_master+0x60c/0x69c
[    5.650623] [<ffffff800865a374>] sunxi_spi_probe+0x4ec/0x5c8
[    5.650623] [<ffffff80085fa33c>] platform_drv_probe+0x60/0xac
[    5.650623] [<ffffff80085f8308>] driver_probe_device+0x11c/0x288
[    5.650623] [<ffffff80085f84e8>] __driver_attach+0x74/0xa0
[    5.650623] [<ffffff80085f65d8>] bus_for_each_dev+0x70/0x94
[    5.650623] [<ffffff80085f7e18>] driver_attach+0x30/0x3c
[    5.650623] [<ffffff80085f79a4>] bus_add_driver+0xf0/0x1ec
[    5.650623] [<ffffff80085f90fc>] driver_register+0x9c/0xe8
[    5.650623] [<ffffff80085fa23c>] __platform_driver_register+0x5c/0x68
[    5.650623] [<ffffff8008f84d5c>] sunxi_spi_init+0x18/0x20
[    5.650623] [<ffffff8008082bec>] do_one_initcall+0x194/0x1b0
[    5.650623] [<ffffff8008f50da4>] kernel_init_freeable+0x1ac/0x248
[    5.650623] [<ffffff8008a9e70c>] kernel_init+0x18/0x100
[    5.650623] [<ffffff8008082690>] ret_from_fork+0x10/0x40

MMhhh that however does not look so nice, especially the SPI issue, but the log above also explains why WiFi is not working…

dmesg
[    9.832327] usbcore: registered new interface driver snd-usb-audio
[    9.843749] Enter ac108_init
[    9.850728] tas5731_audio_codec_init,l:543
[    9.859498] daudio:can not map codec digitial register
[    9.870482] failed to get gpio-spk gpio from dts,spk_gpio:-2
[    9.881002] [ sndcodec ] err:try to get linein_detect failed!
[    9.892019] adda_com_reg_readl: reg = 0xffffff80080085c0
[    9.901168] adda_com_reg_writel: val = 0x78, reg = 0xffffff80080085c0
[    9.913568] sunxi-codec-machine sndcodec: codec-aif1 <-> i2s mapping ok
[    9.925100] sunxi-codec-machine sndcodec: codec-aif2 <-> bb-dai mapping ok
[    9.936922] sunxi-codec-machine sndcodec: codec-aif2 <-> bb-dai mapping ok
[    9.948733] sunxi-codec-machine sndcodec: codec-aif3 <-> bb-dai mapping ok
[    9.960518] sunxi-codec-machine sndcodec: ASoC: no sink widget found for LINEINL
[    9.972890] sunxi-codec-machine sndcodec: ASoC: Failed to add route Linein_detect -> direct -> LINEINL
[    9.987383] sunxi-codec-machine sndcodec: ASoC: no sink widget found for LINEINR
[    9.999677] sunxi-codec-machine sndcodec: ASoC: Failed to add route Linein_detect -> direct -> LINEINR
[   10.017583] input: audiocodec sunxi Audio Jack as /devices/platform/soc/sndcodec/sound/card0/input6
[   10.035455] sndhdmi sndhdmi: audiohdmi-dai <-> daudio2 mapping ok
...
[   11.034417] axp803_dcdc3: incomplete constraints, leaving on
[   11.043921] axp803_aldo1: incomplete constraints, leaving on
[   11.053203] axp803_dldo2: incomplete constraints, leaving on
[   11.062416] axp803_dldo3: incomplete constraints, leaving on
[   11.071542] axp803_dldo4: incomplete constraints, leaving on
[   11.080613] axp803_eldo3: incomplete constraints, leaving on
[   11.089675] axp803_dc1sw: incomplete constraints, leaving on
[   11.098655] ALSA device list:
[   11.104504]   #0: audiocodec
[   11.110203]   #1: sndhdmi
[   11.116326] Freeing unused kernel memory: 960K

Huchhh Audio Jack is registered as input and line in failed? But now the interesting part

[   27.709773] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[   27.744124] systemd[1]: Detected architecture arm64.
[   27.824214] systemd[1]: Set hostname to <bpi-iot-ros-ai>.
dmesg
[   29.128616] systemd[1]: Starting Load Kernel Modules...
[   29.162958] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[   29.200388] systemd[1]: Reached target Paths.
[   29.230546] systemd[1]: Listening on Syslog Socket.
[   29.262985] systemd[1]: Starting Journal Service...
[   29.296674] systemd[1]: Mounted Debug File System.
[   29.320453] systemd[1]: Mounted POSIX Message Queue File System.
[   29.360573] systemd[1]: Started Restore / save the current clock.
[   29.392804] systemd[1]: Started Set the console keyboard layout.
[   29.421484] systemd[1]: Started Remount Root and Kernel File Systems.
[   29.451180] systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
[   29.466752] systemd[1]: Failed to start Load Kernel Modules.
[   29.520151] systemd[1]: systemd-modules-load.service: Unit entered failed state.
[   29.532112] systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
[   29.545542] systemd[1]: Started Create list of required static device nodes for the current kernel.
[   29.580898] systemd[1]: Started Journal Service.
[   29.827210] Adding 131068k swap on /var/swap.  Priority:-1 extents:2 across:139260k SS
[   30.033250] systemd-journald[1445]: Received request to flush runtime journal from PID 1
[   30.348784] cfg80211: World regulatory domain updated:
[   30.359502] cfg80211:  DFS Master region: unset
[   30.364819] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   30.385682] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
...
[   30.447538] ss: disagrees about version of symbol module_layout
[   30.448086] ss: disagrees about version of symbol module_layout
[   30.760604] input_leds: disagrees about version of symbol module_layout
[   30.865949] sha1_ce: disagrees about version of symbol module_layout
[   30.879183] sha1_ce: disagrees about version of symbol module_layout
[   30.879285] sha1_ce: disagrees about version of symbol module_layout
[   30.882576] sha1_ce: disagrees about version of symbol module_layout
[   30.931654] sha2_ce: disagrees about version of symbol module_layout
[   30.937197] sha2_ce: disagrees about version of symbol module_layout
[   30.938332] sha2_ce: disagrees about version of symbol module_layout
[   30.941029] sha2_ce: disagrees about version of symbol module_layout
[   31.019866] ghash_ce: disagrees about version of symbol module_layout
[   31.019871] ghash_ce: disagrees about version of symbol module_layout
[   31.019875] ghash_ce: disagrees about version of symbol module_layout
[   31.021256] ghash_ce: disagrees about version of symbol module_layout
[   31.035514] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.035517] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.035848] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.044146] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.045233] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.045281] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.110630] crc32_arm64: disagrees about version of symbol module_layout
[   31.110636] crc32_arm64: disagrees about version of symbol module_layout
[   31.111248] crc32_arm64: disagrees about version of symbol module_layout
[   31.158875] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.169983] aes_ce_cipher: disagrees about version of symbol module_layout
[   31.181025] crc32_arm64: disagrees about version of symbol module_layout
[   32.264239] sunxi-bt bt: block state already is 1
[   32.740066] sunxi-mmc sdc0: Wait reg(0x3c),bit(0x200) 10ms timeout
[   33.439554] vfe_io: disagrees about version of symbol module_layout
[   33.457214] vfe_io: disagrees about version of symbol module_layout
[   33.476227] vfe_io: disagrees about version of symbol module_layout
[   33.543224] libphy: gmac0: probed

ouch seems several modules id nt load correctly due to disagrees about version of symbol module_layout … not cool … did after all we start with the wrong kernel?

1 Like

So apparently the step (7) is not doing what one would expect it to do.

It does not copy the actual created build over to the SD card. It just downloads a bunch of unnecessary crap to flood the space on your SD card. Why :confused:?

I also struggled a bit with the bpi-tools. The step (7) above essentially uses bpi-update, while it should probably use bpi-copy instead. At least it list the images:

Ok, what’s up with tulip and noma? So I tried:

pi@vbox-debian:~/build/BPI-M64-bsp-4.4$ sudo bpi-copy ./out/tulip-m64/tina_tulip-m64_uart0.img /dev/sdc1

not sure what is actually in this image but it does not work like that. Instead I tried then:

pi@vbox-debian:~/build/BPI-M64-bsp-4.4/SD/bpi-m64$ sudo bpi-bootsel 100MB/BPI-M64-720P-linux4.4-8k.img.gz /dev/sdc1
pi@vbox-debian:~/build/BPI-M64-bsp-4.4/SD/bpi-m64$ sudo mount /dev/sdc2 /media/pi/BPI-ROOT
pi@vbox-debian:~/build/BPI-M64-bsp-4.4/SD/bpi-m64$ sudo tar -xvzf 4.4.89-BPI-M64-Kernel.tgz -C /media/pi/BPI-ROOT/
pi@vbox-debian:~/build/BPI-M64-bsp-4.4/SD/bpi-m64$ sudo tar -xvzf 4.4.89-BPI-M64-Kernel-net.tgz -C /media/pi/BPI-ROOT/
pi@vbox-debian:~/build/BPI-M64-bsp-4.4/SD/bpi-m64$ sudo tar -xvzf BOOTLOADER-bpi-m64-linux4.4.tgz -C /media/pi/BPI-ROOT/
pi@vbox-debian:~/build/BPI-M64-bsp-4.4/SD/bpi-m64$ sudo tar -xvzf linux-headers-4.4.89-BPI-M64-Kernel.tgz -C /media/pi/BPI-ROOT/
pi@vbox-debian:~/build/BPI-M64-bsp-4.4/SD/bpi-m64$ sync

overriding my previous boot with the kernel I had build.

That indeed boot into my kernel:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.89-BPI-M64-Kernel (root@vbox-debian) (gcc version 4.8.2 20140110 (prerelease) [ibm/gcc-4_8-branch merged from gcc-4_8-branch, revision 205847] (Ubuntu/Linaro 4.8.2-13ubuntu1) ) #5 SMP PREEMPT Fri Oct 11 23:15:37 CEST 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]

Now rebuilding to enable all the fancy modules…

Ok, I got a small little bit further, depsite some smaler setbacks.

I somehow must have screwed up the video driver or something as I get in a loop when starting X window (lightdm) but as I anyway usually work on the console this isn’t really an issue for now. Same way I have messed with the ethernet driver that explodes in a kernel dump if I attempty to do ifconfig eth0 up, but I have WiFi working well. Last but not least I lost onboard sound. Ok sounds nothing is working :scream_cat:

Now to the good stuff. I guess I got the divice tree up and running:

lsmod
root@bpi-iot-ros-ai:~# lsmod
Module                  Size  Used by
bcmdhd                974848  0
vfe_v4l2             1110016  0
crc32_arm64            16384  0
aes_ce_blk             20480  0
ablk_helper            16384  1 aes_ce_blk
videobuf2_dma_contig    24576  1 vfe_v4l2
cryptd                 24576  1 ablk_helper
videobuf2_memops       16384  1 videobuf2_dma_contig
videobuf2_v4l2         32768  1 vfe_v4l2
videobuf2_core         40960  2 vfe_v4l2,videobuf2_v4l2
aes_ce_cipher          16384  2 aes_ce_blk
ov5640                 45056  0
ghash_ce               16384  0
dw9714_act             16384  0
actuator               16384  1 dw9714_act
sha2_ce                16384  0
sha1_ce                16384  0
vfe_io                 53248  3 vfe_v4l2,ov5640,dw9714_act
sun50i_codec_analog    24576  0
sun8i_adda_pr_regmap    16384  1 sun50i_codec_analog
snd_soc_pcm512x_spi    16384  0
snd_soc_pcm512x_i2c    16384  0
snd_soc_pcm512x        32768  2 snd_soc_pcm512x_i2c,snd_soc_pcm512x_spi
input_leds             16384  0
gpio_sunxi             28672  0
root@bpi-iot-ros-ai:~# 
gpio - device
root@bpi-iot-ros-ai:~# ls -l /sys/class/gpio/
total 0
--w------- 1 root root 4096 Oct 20 21:47 export
lrwxrwxrwx 1 root root    0 Oct 20 21:47 gpiochip0 -> ../../devices/platform/soc/pio/gpio/gpiochip0
lrwxrwxrwx 1 root root    0 Oct 20 21:47 gpiochip1024 -> ../../devices/platform/soc/pmu0/axp803-gpio/gpio/gpiochip1024
lrwxrwxrwx 1 root root    0 Oct 20 21:47 gpiochip352 -> ../../devices/platform/soc/r_pio/gpio/gpiochip352
--w------- 1 root root 4096 Oct 20 21:47 unexport
class/gpio/export ; doneor v in 1 2 3 4 5 6 7 8 9 10 11 12; do echo "$v" > /sys/c
root@bpi-iot-ros-ai:~# ls -l /sys/class/gpio/
total 0
--w------- 1 root root 4096 Oct 20 22:05 export
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio1 -> ../../devices/platform/soc/pio/gpio/gpio1
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio10 -> ../../devices/platform/soc/pio/gpio/gpio10
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio11 -> ../../devices/platform/soc/pio/gpio/gpio11
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio12 -> ../../devices/platform/soc/pio/gpio/gpio12
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio2 -> ../../devices/platform/soc/pio/gpio/gpio2
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio3 -> ../../devices/platform/soc/pio/gpio/gpio3
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio4 -> ../../devices/platform/soc/pio/gpio/gpio4
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio5 -> ../../devices/platform/soc/pio/gpio/gpio5
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio6 -> ../../devices/platform/soc/pio/gpio/gpio6
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio7 -> ../../devices/platform/soc/pio/gpio/gpio7
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio8 -> ../../devices/platform/soc/pio/gpio/gpio8
lrwxrwxrwx 1 root root    0 Oct 20 22:06 gpio9 -> ../../devices/platform/soc/pio/gpio/gpio9
lrwxrwxrwx 1 root root    0 Oct 20 22:04 gpiochip0 -> ../../devices/platform/soc/pio/gpio/gpiochip0
lrwxrwxrwx 1 root root    0 Oct 20 22:04 gpiochip1024 -> ../../devices/platform/soc/pmu0/axp803-gpio/gpio/gpiochip1024
lrwxrwxrwx 1 root root    0 Oct 20 22:04 gpiochip352 -> ../../devices/platform/soc/r_pio/gpio/gpiochip352
--w------- 1 root root 4096 Oct 20 22:04 unexport
root@bpi-iot-ros-ai:~# 
root@bpi-iot-ros-ai:~# gpio -v
gpio version: 2.44
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Banana Pi M64[A64], Revision: 01, Memory: 2048MB, Maker: BPI-Sinovoip
  * Device tree is enabled.
  *--> sun50iw1
  * Root or sudo required for GPIO access.
root@bpi-iot-ros-ai:~# gpio readall
 +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 | 227 |   8 |   SDA.1 |  OUT | 0 |  3 || 4  |   |      | 5v      |     |     |
 | 226 |   9 |   SCL.1 |  OUT | 0 |  5 || 6  |   |      | 0v      |     |     |
 | 230 |   7 | GPIO. 7 |  OUT | 0 |  7 || 8  | 0 | OUT  | TxD     | 15  | 32  |
 |     |     |      0v |      |   |  9 || 10 | 0 | OUT  | RxD     | 16  | 33  |
 | 231 |   0 | GPIO. 0 |  OUT | 0 | 11 || 12 | 0 | OUT  | GPIO. 1 | 1   | 35  |
 | 234 |   2 | GPIO. 2 |  OUT | 0 | 13 || 14 |   |      | 0v      |     |     |
 | 235 |   3 | GPIO. 3 |  OUT | 0 | 15 || 16 | 0 | OUT  | GPIO. 4 | 4   | 34  |
 |     |     |    3.3v |      |   | 17 || 18 | 0 | OUT  | GPIO. 5 | 5   | 100 |
 |  98 |  12 |    MOSI |  OUT | 0 | 19 || 20 |   |      | 0v      |     |     |
 |  99 |  13 |    MISO |  OUT | 0 | 21 || 22 | 0 | OUT  | GPIO. 6 | 6   | 64  |
 |  97 |  14 |    SCLK |  OUT | 0 | 23 || 24 | 0 | OUT  | CE0     | 10  | 96  |
 |     |     |      0v |      |   | 25 || 26 | 0 | OUT  | CE1     | 11  | 66  |
 |  68 |  30 |   SDA.0 |  OUT | 0 | 27 || 28 | 0 | OUT  | SCL.0   | 31  | 67  |
 |  71 |  21 | GPIO.21 |  OUT | 0 | 29 || 30 |   |      | 0v      |     |     |
 |  37 |  22 | GPIO.22 |  OUT | 0 | 31 || 32 | 0 | OUT  | GPIO.26 | 26  | 39  |
 |  36 |  23 | GPIO.23 |  OUT | 0 | 33 || 34 |   |      | 0v      |     |     |
 |  38 |  24 | GPIO.24 |  OUT | 0 | 35 || 36 | 0 | OUT  | GPIO.27 | 27  | 361 |
 | 364 |  25 | GPIO.25 |  OUT | 0 | 37 || 38 | 0 | OUT  | GPIO.28 | 28  | 359 |
 |     |     |      0v |      |   | 39 || 40 | 0 | OUT  | GPIO.29 | 29  | 360 |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+
root@bpi-iot-ros-ai:~#

Not sure I can completly trust the table regarding pin placing, but looks quite Ok.

Still have to see how I can actually provide a device tree mapping so that I can use things like the hifiberry/pifi dac. Unfortunatley if I understand that right, the ‘hifiberry-dac-overlay.dts’ is hard wired to the RaspberryPi by requiring a Broadcom chip (brcm,bcm2708). Anyway for starters, I probably will use arm,sun50iw1p1.

… I also have to fix ethernet, video and sound again.