Hello,
I am getting some interrupts when connecting the BeagleBoardV-Fire to an IGLOO2 FPGA.
[ 23.000511] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 23.006016] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 23.011518] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 23.017022] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 23.022525] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 23.028029] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 23.033531] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 24.406770] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[ 24.412716] rcu: 0-ā¦0: (1 GPs behind) idle=cc5c/0/0x1 softirq=34/34 fqs=2626
[ 24.420049] (detected by 1, t=5254 jiffies, g=-1151, q=14 ncpus=4)
[ 24.426334] Task dump for CPU 0:
[ 24.429571] task:swapper/0 state:R running task stack:0 pid:0 ppid:0 flags:0x00000008
[ 24.439517] Call Trace:
[ 24.441976] [] __schedule+0x27c/0x834
[ 27.982775] mc_handle_intx: 575101 callbacks suppressed
[ 27.982786] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
[ 27.993510] microchip-pcie 3000000000.pcie: bad INTx IRQ 0
Iām not sure where to start on solving this issue. I have the default gateware running and I tried installing drivers (https://git.yoctoproject.org/linux-yocto-dev/plain/drivers/pci/controller/pcie-microchip-host.c), but then I get the fatal error. I also tried to install headers but I also get errors:
pcie-microchip-host.c:10:10: fatal error: linux/bitfield.h: No such file or directory
10 | #include <linux/bitfield.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
beagle@BeagleV:~$ sudo apt-get install linux-headers-$(uname -r)
Reading package listsā¦ Done
Building dependency treeā¦ Done
Reading state informationā¦ Done
E: Unable to locate package linux-headers-6.1.33-linux4microchip+fpga-2023.06-20231019
E: Couldnāt find any package by glob ālinux-headers-6.1.33-linux4microchip+fpga-2023.06-20231019ā
E: Couldnāt find any package by regex ālinux-headers-6.1.33-linux4microchip+fpga-2023.06-20231019ā
Does anyone have any suggestions? I am very very new to linux and FPGAs as a whole so apologies for my ignorance.
If Iām not totally mistaken, the DEFAULT has no PCIe hardware built in,
so a peek / poke to that area would explain the stall; thereās no hardware to complete
the AXI transaction.
As for compiling kernel modules, I went with docker and the exact same container
that @RobertCNelson uses to make the sd-image. Take a look here.
I apologize for my ignorance, but are you saying to do the exact steps done in the link? Or a variation of it to install my drivers?
Not even remotely; they donāt pay me enough to tell people what to do.
I can only suggest what to do. Ultimately, the choice is up to you.
Itās just like the Bridge conversation Paul Bettany and Stanley Tucci has near the end of āMargin Callā,
āsome people take the Bridge, some like to take the long way homeāā¦
Should you chose to follow the example, you donāt have to go any further than step 4.
Just do what Robert does in get_kernel_update.sh
once and copy your driver over after that.
Works for meā¦
Hi Iranders,
I appreciate the reply. It took me a couple of days to even comprehend these steps and I am now getting somewhere. I am still getting errors but I will keep trying. I am still very new to Linux so this has been a learning process. If I could describe it in words itās like being a newborn dropped in the middle of an ocean and being asked to swim to shore. Iām going to describe the steps I took and the steps I will take after I debug some more.
I had no idea what Docker was until today, but I stumbled upon your post and was able to figure it out. I pulled Robertās ubuntu-23.04-riscv64 image and once I was in it I cloned the link you provided in your earlier reply.
I ran the apt-get lines in .gitlab-ci.yml and proceeded on to the scripts provided.
- Ran
./01_git_sync.sh
and ./02_build_hss.sh
with seemingly no errors
- Ran
./03_build_u-boot.sh
which did produce errors in the following:
root@5a430003285c:/BeagleV-Fire-ubuntu# ./03_build_u-boot.sh
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: No such file or directory
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
CLEAN scripts/basic
CLEAN scripts/kconfig
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:96: microchip_mpfs_icicle_defconfig] Error 1
make: *** [Makefile:573: microchip_mpfs_icicle_defconfig] Error 2
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
scripts/kconfig/conf --olddefconfig Kconfig
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:75: olddefconfig] Error 1
make: *** [Makefile:573: olddefconfig] Error 2
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:80: savedefconfig] Error 1
make: *** [Makefile:573: savedefconfig] Error 2
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
cp: cannot stat './u-boot/defconfig': No such file or directory
cp: cannot stat './u-boot/defconfig': No such file or directory
make -C u-boot -j4 ARCH=riscv CROSS_COMPILE=/BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux- all
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: No such file or directory
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
scripts/kconfig/conf --syncconfig Kconfig
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[2]: *** [scripts/kconfig/Makefile:75: syncconfig] Error 1
make[1]: *** [Makefile:573: syncconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
cp: cannot stat './u-boot/u-boot.bin': No such file or directory
cp: cannot stat './u-boot/u-boot.bin': No such file or directory
root@5a430003285c:/BeagleV-Fire-ubuntu# ./03_build_u-boot.sh
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: No such file or directory
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
CLEAN scripts/basic
CLEAN scripts/kconfig
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:96: microchip_mpfs_icicle_defconfig] Error 1
make: *** [Makefile:573: microchip_mpfs_icicle_defconfig] Error 2
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
scripts/kconfig/conf --olddefconfig Kconfig
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:75: olddefconfig] Error 1
make: *** [Makefile:573: olddefconfig] Error 2
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[1]: *** [scripts/kconfig/Makefile:80: savedefconfig] Error 1
make: *** [Makefile:573: savedefconfig] Error 2
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
cp: cannot stat './u-boot/defconfig': No such file or directory
cp: cannot stat './u-boot/defconfig': No such file or directory
make -C u-boot -j4 ARCH=riscv CROSS_COMPILE=/BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux- all
make: Entering directory '/BeagleV-Fire-ubuntu/u-boot'
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: No such file or directory
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
/bin/sh: 1: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
scripts/kconfig/conf --syncconfig Kconfig
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 26: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 27: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
./scripts/gcc-version.sh: 29: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
Kconfig:66: syntax error
Kconfig:65: invalid option
./scripts/clang-version.sh: 15: /BeagleV-Fire-ubuntu/riscv-toolchain/bin/riscv64-linux-gcc: not found
make[2]: *** [scripts/kconfig/Makefile:75: syncconfig] Error 1
make[1]: *** [Makefile:573: syncconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
make: Leaving directory '/BeagleV-Fire-ubuntu/u-boot'
cp: cannot stat './u-boot/u-boot.bin': No such file or directory
cp: cannot stat './u-boot/u-boot.bin': No such file or directory
I am currently debugging this step, so by the time you read this maybe I have solved it but most likely not. I will now detail my current thinking in how I will install the PolarFire PCIe drivers.
- I am assuming once I get
./03_build_u-boot.sh
working I go onto:
mkdir -p /root/.cache/ccache/ || true
- time tar --use-compress-program=lz4 -xf ccache.tar.lz4 -C / || true
- ccache -s
- ./04_build_linux.sh
I am not sure what you meant when you said run ./04_build_linux.sh
manually. Do you mean to run the contents of the script one by one? (Even then I am not sure how to do this but I will research)
- After the above I will run the
get_kernel_update.sh
I am also not sure if you mean just running the script or doing all the steps detailed within the script manually.
- Now I can copy the drivers from my local to the container and run the make file after I change the directory like youāve done in your post.
From my understanding, the container is its own separate world. Assuming I do get the drivers installed in the container why are the steps after step 4 not needed here? I would think I would have to make a new image with these new drivers and then flash the eMMc with this new image. Is my thinking here wrong?
Again I am very new to all this, but I really appreciate your help, thanks!
Like the .gitlab-ci.yml states, the docker image you want is:
robertcnelson/beagle-devscripts-kernel-debian-12-amd64:latest
I think what happened is you might have pulled the wrong image,
so you ended up without the cross compiler.
Try pulling the right image, and Iām sure your problems will go away.
If you study 04_build_linux.sh
you will notice that it deletes all the modules
toward the end of the build; you donāt want that to happen, so alternately,
you should comment the rm
command out while you fiddle with your module.
Donāt hesitate to write again if you keep having problems!
I am running Ubuntu 23.04 on my board so I assumed that I would use robertcnelson/beagle-devscripts-ubuntu-23.04-riscv64:latest
. I will try with that image, thanks.
Can I ask if you are doing this all within Linux on the board itself with Ubuntu? Or Linux in something like a VM where you are running Debian?
Yes, I made a seperate builder-vm and slapped Docker on top of it.
Then it was relatively simple to get Robertās image to work; everythingās pretty much there,
and what isnāt, can be gleaned from .gitlab-ci.yml
.
I was finally able to get through everything including 04_build_linux.sh
and get_kernel_update.sh
. Thank you very much!
I am now running into problems actually installing my drivers. Maybe I am skipping a step, but I assumed I run make
after I build Linux. I get the error:
root@a3c3d62f870c:/BeagleV-Fire-ubuntu/linux_pcie_driver# ls
Makefile mdma.c mhardware.h misrdpc.c mpci.mod mpcie.c mpcie.h
root@a3c3d62f870c:/BeagleV-Fire-ubuntu/linux_pcie_driver# make
make -j ARCH=riscv CROSS_COMPILE=cc -C /BeagleV-Fire-ubuntu/deploy/tmp/lib/modules/6.1.33-linux4microchip+fpga-2023.06-20240731+/build M=/BeagleV-Fire-ubuntu/linux_pcie_driver modules
make[1]: Entering directory '/BeagleV-Fire-ubuntu/linux'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: riscv64-linux-gcc (GCC) 11.4.0
You are using:
CC [M] /BeagleV-Fire-ubuntu/linux_pcie_driver/mpcie.o
/bin/sh: 1: ccgcc: not found
make[2]: *** [scripts/Makefile.build:250: /BeagleV-Fire-ubuntu/linux_pcie_driver/mpcie.o] Error 127
make[2]: *** Waiting for unfinished jobs....
CC [M] /BeagleV-Fire-ubuntu/linux_pcie_driver/mdma.o
/bin/sh: 1: ccgcc: not found
make[2]: *** [scripts/Makefile.build:250: /BeagleV-Fire-ubuntu/linux_pcie_driver/mdma.o] Error 127
make[1]: *** [Makefile:2012: /BeagleV-Fire-ubuntu/linux_pcie_driver] Error 2
make[1]: Leaving directory '/BeagleV-Fire-ubuntu/linux'
make: *** [Makefile:13: all] Error 2
I tried installing the riscv tool chain from bustedwingās script to no avail. I am continuing researching the topic and hope that these drivers are indeed the solution to my issue in PCIe interrupts.
This is more of an update than anything but I appreciate your help!
You already have everything you need inside the container, you just need to call make correctly.
From what I can see, your environment variables are all empty.
But never fear, the answer is hiding in the first 5 lines of 04_build_linux.sh
,
so standing in root@a3c3d62f870c:/BeagleV-Fire-ubuntu
,
execute the next 3 lines:
export CORES=$(getconf _NPROCESSORS_ONLN)
export wdir=`pwd`
export CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"}
After those, use make -j${CORES} ARCH=riscv CROSS_COMPILE="ccache ${CC}" modules
and watch it rip.
Youāve come to my rescue yet again! Works great. Canāt thank you enough for walking me through all this!
Unfortunately, it seems like the drivers themselves are spitting out errors now because Iām getting undefined and implicit declaration errors within the source code. Iāve sent an email to Microchip, so hopefully theyāll be able to figure it out.
Apart from that, I really appreciated your help. Youāve saved me a lot of hours of troubleshooting
Hi Iranders,
I was able to get new source code from Microchip, but I had a few questions that maybe you could answer.
-
Are drivers only able to be made running the āmakeā command within a fully setup Docker? That is to generate a .ko that you could then insmod within Linux in your BeagleBoardV?
-
Running a make on the BeagleBoard always generates the error that /build does not exist. Is this a symptom of question 1? Or am I running into a different unrelated error? (the path exists, but it looks like /build itself is symlinked to something else? I am still researching this)
-
I noticed that the kernel version the BeagleBoardV is running is 6.1.33 with the image that is provided. Is that kernel version something that is tied into the image that is given on the website? And therefore able to be changed? Or is the kernel version ālockedā.
I am asking this because I was advised by Microchip to run a .ko file that they generated in kernel version 6.5, but of course insmod will not work since I am on 6.1.33. I would have liked to then just run the make command in my already setup docker, but unfortunately their new code is still throwing errors. I am going to wait on source code revisions, but was wondering if I could create a new image for the BeagleBoard that ran the exact kernel version that Microchip was using to bypass the need to make.
Again, massive thank you.