[BPI-R64] PCIe issues

as far as i see you use official image (e.g. debian jessie), i don’t think you can upgrade to a recent glibc here…

afair linux-kernel also compiles a libc-package as deb…maybe this helps else you could try with my debian buster

but please move this in new thread…it’s no PCIe Issue :wink:

Yes, sure, I can move this thread once I can confirm it.

As per the support team from Google Coral, they also suggest Debian Buster. Is this 5.8-r64 branch a debian buster.

Also additionally please suggest the commands to compile libc-package using the linux kernel

My repo is only kernel (and some tools).

My buster-image is on my gdrive

I see libc deb when using pack_debs option from build.sh

Hi,

Can you please share the buster image. Does it have the pcie related changes from mtk that is included in the 5.8-rc version I am using. Also while compiing the 5.8-rc image I had enable the CONFIG_DMA_SHARED_BUFFER.

Alternatively if I can recompile my 5.8-rc kernel for debian-buster what all I need to set up in the config and build.sh.

Also as per the build.sh following is the pack_debs

function pack_debs {
	get_version
	echo "pack linux-headers, linux-image, linux-libc-dev debs..."
    echo "LOCALVERSION=${gitbranch} board=$board ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE"
	LOCALVERSION="${gitbranch}" board="$board" make bindeb-pkg
	ls ../*.deb
}

Is there a way we can add a specific version like 2.27.

Link to gdrive is in first post of that thread. You have to replace kernel like you did it with your current image

Compiling with pack_debs creates a libc deb,but i don’t know if this enough. So i suggest using debian buster and install your currrent built kernel there

I have a new issue compiing the kernel for R64. It seems to exist across all versions in this repo:

I have tried 5.4 through to 5.10 and to the latest. The R64 boots fine with any Ubuntu pre-built image. I am currently trying with this one: https://download.banana-pi.dev/d/3ebbfa04265d4dddb81b/files/?p=%2FImages%2FBPI-R64%2FUbuntu18.04%2F2020-12-20-ubuntu-18.04.3-bpi-r64-5.4-sd-emmc.img.zip

The R64 boots fine with the above image but as soon as I create a new kernel (even with no additional config options just what importconfig creates), I get the following booting into BPI:

'Unsupported Architecture 0x16 ERROR: can’t get kernel image! bootm flag=0, states=70f

Booting kernel from Legacy Image at 4007ff28 …

Image Name: Linux Kernel 5.10.34-main Image Type: AArch64 Linux Kernel Image (uncompressed) Data Size: 15165448 Bytes = 14.5 MiB Load Address: 40080000 Entry Point: 40080000 Verifying Checksum … OK Unsupported Architecture 0x16 ERROR: can’t get kernel image!’

I have re-compiled on different trees and branches with default and different options to no avail. When changes uENV back to Uimage and standard dtb all goes well, but I need some addidiontal kernel configs. Anyone had this issue before?

For images with old bootchain (imho all except my new debian image) you need to generate armhf (32bit) uImage (with aarch64 kernel) and load dtb separately. So only change board in build.conf and not uimagearch

Then install not fit but uImage and dtb

Have tried new way with fit in last time…need to look if i have an old card somewhere ready

But it looks like you have enabled the uimagearch=aarch64 option,so uImage container is 64bit instead of 32bit

Just for explaination:

Old uboot (and my if built for old bootchain) is 32bit,unpacks uImage (container) into memory,elevates to 64bit-mode (jumparch target in old atf) and the boot 64bit linux kernel.

New bootchain is always in 64bit mode (uboot itself is packed as fip). So there is no elevation and here container (fit image) is 64bit too.

Another way was using a other atf which can boot 64bit uboot that can load only 64bit uimage

1 Like

Thank you very much for the detailed explanation. Your solution worked perfectly.

On the BPI-R64 specification confused me, telling only one mini PCIe interface. Does the both mini PCIe port works, if I attach the 4G modem and WIFI module on both ports, or two wifi mini pcie modules?

first r64 had only one pcie-slot (second was used for builtin mt7615 which was dropped due heat), i guess it is an old information…

you can use both pcie-slots, if you do not use sata-port (shared with cn8)

Thank you for your reply, good to know that sata and cn8 use same pcie lanes

You need to configure this in dts. There is a gpio-hog for gpio90 to choose the mode…in my repo it is set to sata,so cn8 is disabled

To use cn8 set it to output-high;