PCIe Interrupts (BeagleBoard to IGLOO2)

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.

  1. Ran ./01_git_sync.sh and ./02_build_hss.sh with seemingly no errors
  2. 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.

  1. 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)

  1. 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.

  1. 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!