I tried to compile the kernel using the Ref https://github.com/frank-w/BPI-R2-4.14/tree/5.4-r64-dsa.
The kernel got compiled and using package option, the package was successfully created.
And tried to replace existing /boot/bananapi/bpi-r64/linux/uImage and /boot/bananapi/bpi-r64/linux/dtb/bpi-r64.dtb.
However, the boot folder on my banana pi R64 doesnot contain uImage.
I am a newbie to the linux kernel, so you please let me know the steps to load a kernel image
You have folder-structure in /boot? this depends on the os-image you are using…The first Partition of sdcard (/dev/mmcblk1p1) should be mounted to /boot. If not (and /boot is empty) try to mount it…
mount /dev/mmcblk1p1 /boot
it is more secure using external computer to rename old uImage/dtb and add new…
if folders existing which files are there? Maybe your image is configured to use another file…maybe there is a uEnv.txt where a variable named kernel is set to a filename
If you don’t get it working please make new topic for kernel-replace with infos about image,uenv.txt and kernelversion. I recommend a debug-uart so that you not dig in the dark and see messages from uboot
@frank-w,
I have modified the folders on SD card as suggested. When I try to boot the BananaPi R64 using that SD card, the following error appears.
(Attaching a log file too as the message is appearing on forum in misaligned formbootupLog.txt (2.1 KB) )
Partition Map for MMC device 1 – Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 204800 524288 1f9b70ec-01 0c
2 729088 14211072 1f9b70ec-02 83
mmc1 is available
Interface: MMC
Device 1: Vendor: Man 000003 Snr f7d58e01 Rev: 8.5 Prod: WP256€
Type: Removable Hard Disk
Capacity: 244016.0 MB = 238.2 GB (499744768 x 512)
Filesystem: FAT32 "BPI-BOOT "
Boot from SD
reading bananapi/bpi-r64/linux/uEnv.txt
1016 bytes read in 5 ms (198.2 KiB/s)
Loaded environment from uEnv.txt
Banana Pi bpi-r64 chip: mt7622 Service: linux
reading bananapi/bpi-r64/linux/dtb/mt7622-bananapi-bpi-r64.dtb
24258 bytes read in 8 ms (2.9 MiB/s)
reading bananapi/bpi-r64/linux/uImage_nodt
8716360 bytes read in 570 ms (14.6 MiB/s)
reading bananapi/berryboot.img
** Unable to read file bananapi/berryboot.img **
bootm flag=0, states=70f
Booting kernel from Legacy Image at 44000000 …
Image Name: Linux Kernel 5.4.0
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 8716296 Bytes = 8.3 MiB
Load Address: 40080000
Entry Point: 40080000
Verifying Checksum … OK
Unsupported Architecture 0x16
ERROR: can’t get kernel image!
reading bananapi/bpi-r64/linux/uImage_nodt
FAT: Misaligned buffer address (4007ff28)
8716360 bytes read in 5123 ms (1.6 MiB/s)
bootm flag=0, states=70f
Booting kernel from Legacy Image at 4007ff28 …
Image Name: Linux Kernel 5.4.0
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 8716296 Bytes = 8.3 MiB
Load Address: 40080000
Entry Point: 40080000
Verifying Checksum … OK
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.4.0
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 8716296 Bytes = 8.3 MiB
Load Address: 40080000
Entry Point: 40080000
Verifying Checksum … OK
Unsupported Architecture 0x16
ERROR: can’t get kernel image!
BPI-IoT>
if using old uboot (i guess so because new is in testing state and not available in any ready-to use image) you need a 32bit uImage (arm). On my dsa-tree the option for arm64 exists but is disabled by default…i guess you’ve changed it,right?
But please discuss this in new thread if it is not working after changing mkimage-type
btw. for output of any kind please use code formatting (select text and click on “<>” button) for better readability
I could load the kernel image by commenting uimagearch=arm64 in build.conf .
Have few queries related to this setup.
We wish to load a kernel module gasket.ko & apex.ko which is need by Google coral which we plan to interface on Minipcie slot.When I try to load that module, it gives
“Invalid module format”.
Running a $file apex.ko -> ELF 64bit LSB Relocatable.
Any idea whether this module can be loaded on the compiled kernel 5.4 kernel(32 bit ) .
Can you share a U-boot with 64bit functionality enabled if possible
Please note, I didn’t start a new thread though suggested by you, as my queries are related to your Git repository reference that I have been using
kernel itself is 64bit, but container (mkimage) for uboot have to be 32bit when using old uboot. New uboot is currently in testing (https://github.com/frank-w/u-boot/tree/2020-01-bpi-r64-v2) and without ethernet. you need new ATF to load it directly and you cannot load 32bit containers. imho you should wait till it is ready
Based on our discussion with Google on the PCIe issue on 5.4 kernel, it seems that the BAR0 for the pcie bridge didn’t get memory range assigned, which is preventing the coral from accessing the host’s memory.
can you please suggest how can we fix this?
Below is the dmesg log:
[ 1.604440] pci 0000:01:00.0: [1ac1:089a] type 00 class 0x0000ff [ 1.610743] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit pref] [ 1.618078] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000fffff 64bit pref] [ 1.626285] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5 GT/s x1 link) [ 1.641429] pci_bus 0000:01: fixups for bus [ 1.645617] pci_bus 0000:01: bus scan returning with max=01 [ 1.651195] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01 [ 1.657816] pci_bus 0000:00: bus scan returning with max=01 [ 1.663407] pci 0000:00:00.0: BAR 0: no space for [mem size 0x200000000 64bit pref] [ 1.671071] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x200000000 64bit pref] [ 1.679079] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff] [ 1.685872] pci 0000:00:00.0: PCI bridge to [bus 01] [ 1.690846] pci 0000:00:00.0: bridge window [mem 0x20000000-0x201fffff]
Hi Frank,
I am facing similar issue. I have made modifications to the [mt7622.dtsi|attachment](upload://ljQRVgMu9DidPen3euRbbo4IV4F.dtsi) (25.0 KB)
After making these modifications to the mt7622.dtsi file, it still shows error as
gasket: loading out-of-tree module taints kernel.
[ 183.107996] apex 0000:01:00.0: assign IRQ: got 140
[ 183.108043] pci 0000:00:00.0: enabling device (0000 -> 0002)
[ 183.108058] pci 0000:00:00.0: enabling bus mastering
[ 183.108082] apex 0000:01:00.0: can't enable device: BAR 0 [mem 0x00000000-0x00003fff 64bit pref] not claimed
[ 183.108100] apex 0000:01:00.0: BAR 2: assigned [mem 0x20000000-0x200fffff 64bit pref]
[ 183.108193] apex 0000:01:00.0: BAR 0: assigned [mem 0x20100000-0x20103fff 64bit pref]
[ 183.108310] apex 0000:01:00.0: enabling device (0000 -> 0002)
[ 183.108363] apex 0000:01:00.0: enabling bus mastering
**[ 195.906661] apex 0000:01:00.0: RAM did not enable within timeout (12000 ms)**
@frank-w, which Qualcomm Atheros chip do you have? Have you try the ath10k-ct driver?
I have a Compex WLE900VX QCA9880 pcie wifi module, If I use the ath10k driver, I have the same error with you. If I use the ath10k-ct driver, the driver can startup correctly, but can’t connect to the QCA9880 hardware, it seems WLE900VX need usb interface in the minipcie, but the CN25 minipcie port isn’t have the usb interface.
my tests here are basing on r64 v1. Tested my qualcom card on both slots and it’s only recognized on cn25 and got wifi interface there but have not run hostapd on it
How do you fix that problem? I got the same problem.
openwrt + BPI-R64 + Compex WLE900VX QCA9880.
kmod-ath10k driver and firmware, the system will crash.
I’m not sure whether openwrt include the pci interrupt patch and pci controller splitting.
Could you please give me the patch info to me? My linux kernel is 4.19.72.