Rebuilding Ubuntu on BeagleV-Fire

HI,
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
# https://git.beagleboard.org/beagleboard/ci-docker-images

Here’s the docker build: docker/beagle-devscripts-kernel-debian-12-amd64/Dockerfile · main · BeagleBoard.org / 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)…

Regards,

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]…

Cheers…

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: 01_git_sync.sh will use it for references

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ~/linux-src

Generic build steps

./01_git_sync.sh
./02_build_hss.sh
./03_build_u-boot.sh
./04_build_linux.sh
./05_generate_payload.bin.sh
sudo ./06_generate_debian_console_root.sh
sudo ./07_create_sdcard_img.sh

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

Regards,