Rebuilding Ubuntu on BeagleV-Fire

I need to add a few kernel drivers to the Ubuntu distribution on the BeagleV-Fire in order to support a custom CAPE. All of the fabric is now working but the sw side needs the kernel drivers (and potentially some other parts).

@RobertCNelson , I see that you have documented a number of build steps in BeagleV-Fire / BeagleV-Fire-ubuntu · GitLab

  • However it is not clear what the build platform is for these steps
    (on the target or via cross-compilation on some other system… personally I tend to use Linux VMs).
  • What the dependencies are (for instance my attempt at cross-compilation fails due to missing riscv tools, elf tools, genimage and few other bits).

And for the list of steps that you have covered, what is the anticipated sequence to rebuild, run menuconfig to add kernels modules and spit out an image suitable for reprogramming the mmc?

I think that you have just noted working sequences but I am trying to find a sequence that will achieve the desired output. Cyril suggested contacting you via the forum…

Thanks in advance…

So we build everything in a docker container tied to our GitLab instance: .gitlab-ci.yml · main · BeagleV-Fire / BeagleV-Fire-ubuntu · GitLab

image: robertcnelson/beagle-devscripts-kernel-debian-12-amd64:latest

Here’s the docker build: docker/beagle-devscripts-kernel-debian-12-amd64/Dockerfile · main · / ci-docker-images · GitLab

Then for this project, other dependcies added are:

bc bison bmap-tools cpio debhelper dosfstools flex genimage kmod libelf-dev libssl-dev libyaml-dev lz4 mtools

the order of build is located here: .gitlab-ci.yml · main · BeagleV-Fire / BeagleV-Fire-ubuntu · GitLab

(ignore the caching and touch .gitlab-runner that’s just hints to use local s3 server to grab/update cache artifacts)

You can see a daily build here: Jobs · BeagleV-Fire / BeagleV-Fire-ubuntu · GitLab

(incase it’s not obvious, you can also fork ^ above and then in your ci settings, enable ci, and you’ll get builds on every commit)…


1 Like

Thanks, that was really helpful… looking through the docket scripts now…

[Basically, I really just want to run the build steps manually on my local development host… modifying the kernel to include some drivers that I would like… and ultimately generating a new mmc image ready for burning onto the target… KISS … the neat but elaborate docker process can end up obfuscating some of what should/could/may be a simple process]…


So as long as your system is close to Debian 12.x era, and install

sudo apt update ; \
sudo apt-get install -yq bc bison bmap-tools cpio debhelper dosfstools flex genimage kmod libelf-dev libssl-dev libyaml-dev lz4 mtools

If you clone torvalds’s tree here: will use it for references

git clone ~/linux-src

Generic build steps

sudo ./
sudo ./

You find the sdcard.img under: deploy/images/