Unable to locate packages for BeagleV-Fire Kernel build

Continuing the discussion from Rebuilding Ubuntu on BeagleV-Fire:

I’m trying to create local build environments to support custom gateware development, and related changes to the Linux kernel such as new interrupt handling and drivers to support the new gateware. I’m using a Hyper-V VM running Ubuntu 20.04, and would like to stick with that if possible because I already have it successfully running Libero and building the Gateware with custom changes.

I just learned about docker today after reading the post referenced above. My current guess from what I see is that I need to build a docker container, and then use it to build the linux kernel image. When I try to run the “docker build …” command from the readme.md file, it gets much of the way through and then fails with this:


9.138 E: Unable to locate package bbb.io-keyring
9.138 E: Couldn’t find any package by glob ‘bbb.io-keyring’
9.138 E: Couldn’t find any package by regex ‘bbb.io-keyring’

Dockerfile:70

69 |
70 | >>> RUN echo “deb [trusted=yes] Index of /debian-amd64 bookworm main” > /etc/apt/sources.list.d/beagle.list
71 | >>> && echo “deb-src [trusted=yes] Index of /debian-amd64 bookworm main” >> /etc/apt/sources.list.d/beagle.list
72 | >>> && apt-get update
73 | >>> && DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
74 | >>> && DEBIAN_FRONTEND=noninteractive apt-get install -y
75 | >>> --no-install-recommends
76 | >>> bbb.io-keyring
77 | >>> && cp -v /etc/bbb.io/templates/apt/sbuild.list /etc/apt/sources.list.d/beagle.list

78
ERROR: failed to solve: process “/bin/sh -c echo "deb [trusted=yes] Index of /debian-amd64 bookworm main" > /etc/apt/sources.list.d/beagle.list \t&& echo "deb-src [trusted=yes] Index of /debian-amd64 bookworm main" >> /etc/apt/sources.list.d/beagle.list \t&& apt-get update \t&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \t&& DEBIAN_FRONTEND=noninteractive apt-get install -y \t\t\t–no-install-recommends \t\tbbb.io-keyring\t\t&& cp -v /etc/bbb.io/templates/apt/sbuild.list /etc/apt/sources.list.d/beagle.list” did not complete successfully: exit code: 100

Going another route, I tried the next recommendation in that post, and I have another issue in locating the “genimage” package:

sudo apt-get install -yq bc bison bmap-tools cpio debhelper dosfstools flex genimage kmod libelf-dev libssl-dev libyaml-dev lz4 mtools
Reading package lists…
Building dependency tree…
Reading state information…
E: Unable to locate package genimage

I’ve also tried creating a Debian 12 VM, and I get the same issue with “bbb.io-keyring” when I run the docker script.

Can someone please tell me if I’m on the right track and just need some small tweaks to get the packages located? Or if it exists, please point me to instructions on how to set up a single environment than can build everything for the BeagleV-Fire? (Maybe I don’t mean everything; like I don’t think I need to rebuild u-boot or some of the custom Polarfire HSS stuff…)

Thanks!

The docker image i’ve setup for building the BeagleV-Fire image is referenced here:

image: robertcnelson/beagle-devscripts-kernel-debian-12-amd64:latest
# https://openbeagle.org/beagleboard/ci-docker-images

You can use it as-is (i’ve pushed it to docker hub), or to tweak as you wish: docker/beagle-devscripts-kernel-debian-12-amd64/Dockerfile · main · BeagleBoard.org / ci-docker-images · GitLab

Just note there are optimizations for our ci environment (caching apt etc)… So if you build it outside, you will have to comment some things out…

Regards,

Thanks for the reply. I’ve made some progress and now the build seems to be stuck at step 6:

$ ./06_generate_ubuntu_console_root.sh
–2024-11-19 17:57:37-- http://192.168.1.98/mirror/rcn-ee.us/rootfs/ubuntu-riscv64-23.04-minimal/2024-11-19/ubuntu-23.04-console-riscv64-2024-11-19.tar.xz
Connecting to 192.168.1.98:80…

It is going through multiple retry attempts and I’m not sure if I should interrupt it or not. Please let me know if there is a simple way to get past this.

Below is some information about how I got this far in case it helps someone who is in a similar boat:

Within the Windows 11 Hyper-V Ubuntu 20.04 virtual machine, I did these things:

Then, from the root of the local BeagleV-Fire-ubuntu folder, I ran

sudo gitlab-runner exec docker build

and it seems to have gotten through the first 5 steps and is now stuck retrying as shown above in step 06.

It finally died after try 9:

–2024-11-19 18:15:35-- (try: 9) http://192.168.1.98/mirror/rcn-ee.us/rootfs/ubuntu-riscv64-23.04-minimal/2024-11-19/ubuntu-23.04-console-riscv64-2024-11-19.tar.xz
Connecting to 192.168.1.98:80… WARNING: Error while executing file based variables removal script error=context deadline exceeded job=1 project=0
ERROR: Job failed: execution took longer than 30m0s seconds

FATAL: execution took longer than 30m0s seconds
abe@CloudSci-AS-VM-U20:~/beagle/BeagleV-Fire-ubuntu$

remove - touch .gitlab-runner your not in openbeagle’s ci…

Thanks for pointing that out.

I never did get the gitlab-runner/docker combination figured out, but after removing that line, I got things building by manually connecting to the docker image and binding the root directory of the repository to a folder in the docker container. The command was:

sudo docker run -it --mount type=bind,source=/home/abe/beagle/BeagleV-Fire-ubuntu,target=/Beagle robertcnelson/beagle-devscripts-kernel-debian-12-amd64

Then, inside the docker image environment, I went into the /Beagle folder and duplicated the steps in the script and everything completed, with sdcard.img.xz in the deploy folder when it finished. I transferred the new image using Balena-etcher, and although it acts a little weird in Windows (varioius explorer popups) and comes up with an error at the end of the load:

it seems to have loaded the image onto the BeagleV-Fire board and it boots and works! On to the next step. :slight_smile: