Hello, this is a weekly report for my GSoC’22 project Building Bela Images. My mentors are Giulio Moro, Vedant Paranjape,Vaishnav Achath and from now this thread will be updated weekly.
Youtube Video: Introductory Video of the project
Blog Link: https://krvprashanth.in/gsoc2022
Summary of Week 1 & 2
These two week I couldn’t progress much, spent most hours on resolving build errors and downloading source to my build machine and understand the workflows of both bela-image-builder and BeagleBoard Image builder repos to reproduce Bela and BeagleBoard Images and I was not much clear about my project timeline, and struggled a bit to get started and things were not excepted as thought.
After going through both Bela and Beagleboard Image builders workflows. I came to know how useful is to use package management while building these GNU/Linux distributions.
Most of the bela software was distributed this way, as git clone and that required compiling, Installing in build process. In bela image development installing some software manually requires a very conscious effort to and one need to know when changes are made and obtain them in a useful form and be careful during the updates/upgrades in order to not loose custom configuration information or to break the existing configuration and also need to make sure that files that are no longer needed are removed in a timely fashion and the new version does not conflict with other software on the system and also when software is removed, all traces are gone except configuration files that would be hard to replace if the software is later re-installed.
Further more, many libraries and header files may be needed on the system to compile from source. Besides the difficulty in obtaining them, and wasting of disk space, version clashes are quite common and cause one to pull one’s hair out. As in beagleboard Image development debian packaging system taking care of all these issues and packaging system present a far better alternative and it is one of the main roles a linux distribution performs.
bela-image-builder has no package management like beagleboard-image-builder and anyhow, most of the embedded linux distributions were collection of tarballs, of either binaries or sources which required compilation. Embedded distributions ( like bela ) still work this way. However, this method has many disadvantages and updates and upgrades can be very difficult, for a number of reasons files which are no longer needed may remain on the system and in place upgrades done while the system is running may cause difficulties and even system crashes and the software that require simultaneous updating may conflict with each other.
Sophisticated modern package management systems like the one which beagleboard-image-builder and debian has tremendous improvements. Packaging system makes easy for repeatable builds as in my case in first week I’m able to reproduce beagleboard images with ease while it took me so much time on resolving in build errors to reproduce bela image and also packaging system preserve customized and modified configuration files while updates and upgrades. Simple installation and removal methods. That’s were in week 2 I started packaging bela required dependencies to include in the apt package manager that used in beagleboard-image-builder.
Accomplishments
Blockers
- I have not been able to work on makefiles while packaging Bela
Week 5
In weekly meet mentor suggested to work on building sample bela image with omap-image-builder scripts first in order to verify, test and does it possible to build bela Images and later focus on packaging Bela required dependencies.
Accomplishments
Blockers
- Unable to boot the built bela-stretch Image
- Not able to Install bela base packages with debootstrap by using omap-Imap-builder scripts.
Upcoming Targets
- Build latest bela-bullseye Image with omap-image-builder
- flash and boot the image
- copy on the board the Bela repo cd into it and do ‘makelib’
- enable the BB-BELA-00A0.dtbo device tree overlay
- create a
root
user, make it the default user, with no password and also delete the debian
user that would be there as default
-
make EXAMPLE=Fundamentals/sinetone
in the Bela folder and it should work
Week 7
July 25 - July 31
- Had weekly meeting with Giulio Moro on Monday, 25 July, 4:00 pm CEST ( 7:30 pm IST ) and for minutes of meet check here
- Currently, bela-image-builder ships hvcc (heavy hvcc compiler) that has
python2
dependencies of pip2
, enum
, jinja2
and Debian 11 (bullseye) has removed the " python
package and the /usr/bin/python
symlink due to the deprecation of Python 2… though it has minimal support for python 2.7 adjusted everything for python3-<package name>
( updated python3 version of hvcc and added dependency package tox
in bela-bullseye conf ) and also removed enum
package that no more it required.
- Looked at how bela-gadget is different with compared to bb-usb-gadget (what that does and what file it uses) and whether it can be ‘inject’ some of bela changes init.
- bb-usb-gadget, takes over anything to do with usb gadget loading… and it has a systemd script which didn’t exist in prior then bullseye (https://github.com/rcn-ee/repos/blob/master/bb-usb-gadgets/suite/bullseye/debian/bb-usb-gadgets.bb-usb-gadgets.service)
- Started working on to create a bela-customizations debian package.
- Initialized a repo for bela-customizations and copied the /misc/rootfs of bela-image-builder repo ( https://github.com/BelaPlatform/bela-image-builder/tree/master/misc/rootfs ) into it and used this repo as source for debian packaging.
- Studied about systemd System and Service Manager and Lennart Poettering’s blog which has lots of information about
systemd
- Debian packaged bela customizations.
- Used this dh_installsystemd to package the bela systemd files.
- While packaging systemd files learnt a lot about systemd and service manager spent some good time on this and systemd files are fun to deal with… bela had a tone of them!!!
Accomplishments
- update to python3 version of hvcc compiler [PR #205]
- Add debian package configuration of bela customizations [PR #61]
Blockers
Upcoming Targets
- Debian package updated/packaged.
2 package/week (taking a comfortable room, if some package needs more work).
- Build a bela-bullseye Image with all the changes made in upstream repo (omap-image-builder) by Aug 5 and after build test the Image and debug if it needs.
- Make some more Bela specific changes in omap-image-builder scripts and also to make sure Bela Image Development follows the workflow of omap-image builder build process.
- bela_gadget files
- systemd configuration
- Installing Bela, bela kernel, Building kernel module (rtdm_pruss_irq), Setting-up clang
- boot/drivers (BELABOOT)