Difference between revisions of "BeagleBoard/GSoC/2022 Proposal/Building Bela Images"

From eLinux.org
Jump to: navigation, search
(Timeline)
m (Timeline)
(40 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
=[[BeagleBoard/GSoC/ProposalTemplate|Proposal-Building Bela Images]] =
 
=[[BeagleBoard/GSoC/ProposalTemplate|Proposal-Building Bela Images]] =
[Youtube Video] <br>
+
===== About ===== <br>
About<br>
 
 
''Student'': [https://elinux.org/User:Krvprashanth Kurva Prashanth]<br>
 
''Student'': [https://elinux.org/User:Krvprashanth Kurva Prashanth]<br>
''Mentors'': [https://github.com/giuliomoro Giulio Moro]<br>
+
''Mentors'': Giulio Moro, Vedant Paranjape, Vaishnav Achath<br>
 
''Code'': https://github.com/BelaPlatform/bela-image-builder https://github.com/beagleboard/image-builder<br>
 
''Code'': https://github.com/BelaPlatform/bela-image-builder https://github.com/beagleboard/image-builder<br>
''Wiki'': <br>
+
''Wiki'': https://forum.beagleboard.org/t/building-bela-images/32104<br>
''GSoC'': [GSoC entry]<br>
+
''GSoC'': [https://summerofcode.withgoogle.com/programs/2022/projects/ykkMkxcR GSoC entry]<br>
 
<div style="clear:both;"></div>
 
<div style="clear:both;"></div>
  
 
=Status=
 
=Status=
This project is currently just a proposal.
+
This project proposal has been accepted as part of GSoC 2022.
  
 
=Proposal=
 
=Proposal=
Please complete the requirements listed on the [http://bbb.io/gsocideas ideas page] and fill out this template.
+
Completed all the requirements listed on the [https://elinux.org/BeagleBoard/GSoC/Ideas-2022#General_requirements ideas page]. <br>
 +
The code for the cross-compilation task can be found [https://github.com/krvprashanth/gsoc-application here] submitted through pull request [https://github.com/jadonk/gsoc-application/pull/161 #161].
  
 
==About you==
 
==About you==
''IRC'': <br>
+
''IRC Nick'': krvprashanth<br>
 +
''Matrix'': @krvprashanth:matrix.org<br>
 
''Github'': https://github.com/krvprashanth<br>
 
''Github'': https://github.com/krvprashanth<br>
 
''Gitlab'': https://code.swecha.org/krvprashanth<br>
 
''Gitlab'': https://code.swecha.org/krvprashanth<br>
''School'': Vidya Jyothi Institute of Technology<br>
+
''School'': [https://vjit.ac.in/ Vidya Jyothi Institute of Technology]<br>
 
''Country'': India<br>
 
''Country'': India<br>
 
''Primary language'': English, Telugu<br>
 
''Primary language'': English, Telugu<br>
''Typical work hours'': 6AM-11AM, 4PM-10PM Indian Standard Time<br>
+
''Typical work hours'': 6AM-11AM, 4PM-10PM (GMT +5:30) IST<br>
''Previous GSoC participation'': Tell us why you want to participate in GSoC here. Also, provide list of URLs for any previous GSoC participation with any organizations.
+
''Previous GSoC participation'': First time I am participating in GSoC.
  
 
==About your project==
 
==About your project==
''Project name'': My super cool project<br>
+
''Project name'': Building Bela Images<br>
 +
 
 +
<big>'''Project Outcomes:'''</big>
 +
#Semantic rebase of the functionalities in Bela-Image-builder repo to the Image-builder one.
 +
#Add features of the Bela-Image-builder repo to Image-builder repo.
 +
#Improve the maintainability of the Bela Image Development and minimise future development effort.
  
 
===Description===
 
===Description===
In 10-20 sentences, what are you making, for whom, why and with what technologies (programming languages, etc.)? (We are looking for open source SOFTWARE submissions.)
+
====Project Abstract====
 +
Bela is an open hardware and software platform for ultra-low latency audio and sensor processing. The main goal of this project is to Improve the maintainability of the Bela Image development by adding the functionalities of the Bela Image builder repo to the BeagleBoard Image builder repo.
 +
====Overview of Bela Platform====
 +
As given in the [https://bela.io/ official website], Bela is a hardware and software platform for creating beautiful interaction with sensors, sound and it is designed for artists, musicians, researchers and makers, Bela brings the power of ultra-low latency interactive audio and sensors to digital systems.
 +
 
 +
Bela Platform uses the Bela software which is a customised Debian distribution including a custom xenomai kernel, minimal clutter, and custom systemd configurations and It takes advantage of features of the BeagleBone computers and can achieve extremely fast audio and sensor processing times.
 +
 
 +
====Basic Overview of Building Embedded Linux Distributions====
 +
Building custom Linux systems for embedded devices is to use build systems such as Yocto/Open Embeded or Buildroot and using a more conventional binary distribution Debian rootfs has interesting benefits such as powerful package management system, a wide selection of available packages, excellent security updates and more.
 +
 
 +
There are different approaches to build an embedded Linux system. Here, in this project we will be using U-Boot, ARM cross compiler, Debian ARM based rootfs, custom kernal, Debootstrap and build scripts to generate systems for ARM targets such as Bela, BeagleBoards.
 +
 
 +
====Why Building Bela Image again?====
 +
Bela Image development repo is heavily based and which was initially inspired by Beagleboard Image-builder scripts. Currently, the Beagle board Image development repo diverged greatly from a common functionalities of building Images.
 +
 
 +
Now, there is a requirement to "rebase" the functionalities of the Bela Image builder repo to the Beagleboard Image builder one. As the two codebases are drastically different we need to understand and “semantic rebase” the features of the Bela Image builder repo (xenomai kernel building scripts along with a bunch of other stuff) to Beagleboard Image builder repo. After these changes the Bela Image development will follow more closely with the Beagleboard Image development and as a result Bela Image will be updated more often and it minimizes future development effort.
 +
 
 +
====Tech Stack====
 +
Bash Scripting, Build Systems ( U-Boot ), Kernel building, Linux Management( Primarily using linux distribution )
 +
 
 +
===Proposed method of Implementation===
 +
In order to add the Bela Image builder features to BeagleBoard Image builder. Firstly, I try building Bela Image by using BeagleBoard Image builder scripts and making necessary changes in scripts to build Image. After this we will be getting a clear idea to where to change and semantic rebase the features of Bela Image builder to BeagleBoard Image builder one.
 +
 
 +
Here are typical changes need to do in BeagleBoard Image builder repo
 +
* Bela-specific changes will be made conditional in RootStock-NG.sh script in BeagleBoard Image builder repo
 +
** Add Bela Image builder scripts features in RootStock-NG.sh script
 +
*** bootloader, kernel, xenomai, downloads, emmc-flasher-chroot and pre-chroot
 +
* Use config template and create bela-image.conf file and also add bela required packages list to it
 +
* Make necessary changes in build scripts to Optimise boot times as Bela Image has fast boot time campared to BeagleBoard Image
 +
* After building Bela Image using Beagleboard Image builder functionalities make changes to the Image-builder repo
 +
; Workflow for building Bela Image with BeagleBoard Image builder scripts:
 +
 
 +
Generate: Base Debian Bullseye Image:
 +
 
 +
git clone https://github.com/RobertCNelson/omap-image-builder
 +
cd ./omap-image-builder
 +
./RootStock-NG.sh -c bb.org-debian-stretch-lxqt-v4.14
 +
 
 +
Archive will be added to "./deploy/"
 +
 
 +
Finalize: Bela specific version:
 +
 
 +
sudo ./setup_sdcard.sh --img-4gb bela-example --dtb bela --bootloader --enable-eemc-flasher --enable-uboot
 +
 
 +
; Hardware required:
 +
The hardware listed below will be necessary for testing after rebuilding Bela Image.
 +
# [https://www.digikey.in/en/products/detail/beagleboard-by-seeed-studio/102110420/12719590 BeagleBone Black].
 +
# Bela cape: [https://shop.bela.io/bela The original Bela board].
  
 
===Timeline===
 
===Timeline===
I plan to complete all the tasks before the GSoC 2022 coding period ends. Apart from this, I’ll write blogs weekly, reporting my progress and also the experiences I had while contributing this project.
+
I plan to complete all the tasks before the GSoC 2022 coding period ends. Apart from this, I will write blogs weekly, reporting my progress and also the experiences I had while contributing this project.
  
'''During the GSoC 2022 coding period, I’ll do the following things:'''
+
'''During the GSoC 2022 coding period, I will do the following things:'''
 
*Discuss ideas with the mentors, take feedback and work on
 
*Discuss ideas with the mentors, take feedback and work on
 
*On an average i will be able to dedicate 30 to 35 hours per week
 
*On an average i will be able to dedicate 30 to 35 hours per week
*I'm ready to adapt whatever my mentor suggests me and i'll try my best to complete proposed work
+
*I am ready to adapt whatever my mentor suggests me and I will try my best to complete proposed work
 
*Find other features to be added to the Bela Image
 
*Find other features to be added to the Bela Image
  
The GSoC official coding period begins on June 13, 2022, and ends on November 21, 2021.
+
The GSoC official coding period begins on June 13, 2022, and ends on November 21, 2022.
 +
 
 +
'''NOTE ''': In view of my semester exams in June for a maximum period of two weeks, most of the work is scheduled in the second half of the coding period. I can’t work during the exam period. I would make sure to compensate for this by putting extra hours in the remaining period.
 +
 
 +
{| class="wikitable"
 +
| April 4 - 18:00 UTC || Applications open, Students register with GSoC, work on proposal with mentors ||
 +
|-
 +
| April 19 - 18:00 UTC || Proposal complete, Submitted to https://summerofcode.withgoogle.com ||
 +
|-
 +
| May 20 || Proposal accepted or rejected ||
 +
*[https://summerofcode.withgoogle.com/programs/2022/projects/ykkMkxcR Proposal Accepted] &#10003;
 +
*Community bonding period and discussion on the project and resource available
 +
*Read about U-Boot, Debootstrap and Building Beagle-based embedded linux systems
 +
|-
 +
| Jun 13 || Pre-work complete ||
 +
Coding officially begins!
 +
|-
 +
| Jun 20 || Milestone #1 ||
 +
*Introductory video
 +
*Setup the received hardware
 +
*Figure out how can I use arm-based build server setup at git.beagleboard.org for Image development
 +
*Understand the workflows of both bela-image-builder and BeagleBoard Image builder repos and try rebuilding bela, beagleboard Images
 +
|-
 +
| June 27 || Final Exam || No Code
 +
|-
 +
| July 4 || Final Exam || No Code
 +
|-
 +
| July 11 || Milestone #2 ||
 +
*Add Bela Image builder scripts features in RootStock-NG.sh script ( bootloader, kernel, xenomai, downloads, emmc-flasher-chroot and pre-chroot )
 +
|-
 +
| July 18 || Milestone #3 ||
 +
*Use config template and create bela-image.conf file and also add bela required packages list to it
 +
|-
 +
| July 25 || Milestone #4 ||
 +
*Evaluate and Optimise boot times
 +
*Ensuring backwards compatibility in newer kernels
 +
|-
 +
| July 29 - 18:00 UTC || Phase 1 Evaluation deadline ||
 +
* Finalizing everything done till now
 +
* Submitting the first report for evaluation
 +
|-
 +
| Aug 01 || Milestone #5 ||
 +
*Disable some unneeded systemd services
 +
*Build a Bela Image by using the functionalities of BeagleBoard Image repo
 +
*After build test the Image and debug if it needs
 +
|-
 +
| Aug 08 || Milestone #6 ||
 +
* Make changes in BeagleBoard Image builder scripts to make sure Bela Image Development follows the workflow of BeagleBoard Image builder repo
 +
|-
 +
| Aug 15 || Milestone #7 ||
 +
*Make changes to the Image-builder repo to add the features of the bela-Image-builder repo (minimal clutter, custom kernel, custom software, custom systemd configuration).
 +
|-
 +
| Aug 22 || Milestone #8 ||
 +
*Create detailed Documentation about the changes made in Bela Image development
 +
*Create guide about contributing to Bela Image development and how to make use of code base.
 +
|-
 +
| Aug 29 || Milestone #9 ||
 +
*Write the overall project summary and outcomes.
 +
*Write Bela Image Development Tutorial in https://learn.bela.io/
 +
|-
 +
| September 5 - 12,  18:00 UTC || Final week: GSoC contributors submit their final work product and their final mentor evaluation ||
 +
* Completion video
 +
* Submit final work product and final mentor evaluation
 +
|-
 +
| September 12 - 19,  18:00 UTC || Mentors submit final GSoC contributor evaluations
 +
|-
 +
| Nov 21 - 18:00 UTC  || Final date for all GSoC contributors to submit their final work product
 +
|-
 +
|}
  
 
===Experience and approach===
 
===Experience and approach===
To work on this project, it requires experience with bash scripting, build systems and linux management. I have an experience with Debian live build system and customized my low end machine with robotics and networking packages in which it has 2GB RAM and 30GB hard disk installed Debian 11 "Bullseye" with XFCE Desktop environment on it and I'm just curious to work on low end hardware, optimise software to make run very well on resource constrained devices.
+
To work on this project, It requires experience with bash scripting, build systems and linux management. I have an experience with Debian live build system and customized my low end machine with robotics and networking packages in which it has 2GB RAM and 30GB hard disk installed Debian 11 "Bullseye" with XFCE Desktop environment on it and I'm just curious to work on low end hardware, optimise software to make run very well on resource constrained devices.
  
I’m mostly into Systems Programming, Embedded Linux, and Robotics. I use programming languages such as Assembly (x86, RISC-V), C, C++, Python and shell scripting for Installing different packages and applications which I use. I prefer to work in a terminal over GUI and also mostly I use robotics, networking, embedded linux development tools like cross-compiler toolchains, emulators, Assemblers, Debugger, mininet, ns3, ROS, OpenCV, Wireshark, etc.
+
I am mostly into Systems Programming, Embedded Linux, and Robotics. I use programming languages such as Assembly (x86, RISC-V), C, Python and shell scripting for Installing different packages and applications which I use. I prefer to work in a terminal over GUI and also mostly I use robotics, networking, embedded linux development tools like cross-compiler toolchains, emulators, Assemblers, Debugger, mininet, ns3, ROS, OpenCV, Wireshark, etc.
  
 
I also write good reports and blogs, I’ve previously written some blogs about free software and open hardware and experiences I had. [https://krvprashanth.github.io/ Check here]
 
I also write good reports and blogs, I’ve previously written some blogs about free software and open hardware and experiences I had. [https://krvprashanth.github.io/ Check here]
;Contributions!
+
;Contributions
 
Here are technical and non-technical ways where I contributed.
 
Here are technical and non-technical ways where I contributed.
;;Free Software Movement of India
+
;;[https://fsmi.in/ Free Software Movement of India]
 
* Hacktivist: Actively contributing to free software projects, gave talks on Free Software & Open Hardware, Git, Mobile & Desktop Freedom, Dark Patterns  
 
* Hacktivist: Actively contributing to free software projects, gave talks on Free Software & Open Hardware, Git, Mobile & Desktop Freedom, Dark Patterns  
 
* Speaker, [https://debconf21.debconf.org/talks/80-debian-in-retro-computers/ International Debian Conference 2021]
 
* Speaker, [https://debconf21.debconf.org/talks/80-debian-in-retro-computers/ International Debian Conference 2021]
  
;; Swecha Telangana
+
;;[https://www.swecha.org/ Swecha Telangana]
* Hands-on experience 3D Printing, Digital fabrication and maintaining open hardware  prototyping equipment  
+
* Designed, optimized, and sliced 3D models and maintained production line of 3D printed projects and open hardware  prototyping equipment.
 
* In Mobile Autonomous Cart project [https://code.swecha.org/agriculture/mobile-autonomous-cart-with-guided-vision-for-agriculture using ROS + Docker], development tools to advance robotic software design and deployment by utilizing advances in Linux containers.
 
* In Mobile Autonomous Cart project [https://code.swecha.org/agriculture/mobile-autonomous-cart-with-guided-vision-for-agriculture using ROS + Docker], development tools to advance robotic software design and deployment by utilizing advances in Linux containers.
* Organised Debian Bullseye Release Party
+
* Organised Debian Bullseye Release event
 
* Course Manager and Teaching Assistant for Liberating Devices course ( Mobile & Desktop Freedom )
 
* Course Manager and Teaching Assistant for Liberating Devices course ( Mobile & Desktop Freedom )
 +
** Utilized Android Tools ( adb, fastboot ), Bash scripts and command-line tools to remove proprietary malware from mobiles/watches and desktops.
 
* Porting and Enabling the Government School Computer labs in our locality to specific use of free softwares and Installing [https://balaswecha.in/ BalaSwecha OS]( A GNU/Linux distribution based on Debian ).
 
* Porting and Enabling the Government School Computer labs in our locality to specific use of free softwares and Installing [https://balaswecha.in/ BalaSwecha OS]( A GNU/Linux distribution based on Debian ).
  
Line 68: Line 190:
 
If I get stuck on my project and my mentor isn’t around, I will use the following resources:<br>
 
If I get stuck on my project and my mentor isn’t around, I will use the following resources:<br>
 
# Ask on the [https://forum.bela.io/ Bela] and [https://forum.beagleboard.org BeagleBoard] forum
 
# Ask on the [https://forum.bela.io/ Bela] and [https://forum.beagleboard.org BeagleBoard] forum
#
 
  
*Bela BelaPlatform Repositories:  
+
*BelaPlatform and BeagleBoard Repositories:  
 
#[https://github.com/BelaPlatform https://github.com/BelaPlatform]
 
#[https://github.com/BelaPlatform https://github.com/BelaPlatform]
 +
#[https://github.com/beagleboard https://github.com/beagleboard]
  
 
*Documentation and Repositories on Building Images:
 
*Documentation and Repositories on Building Images:
 
#[https://elinux.org/Beagleboard:BeagleBoneBlack_Rebuilding_Software_Image Beagleboard: BeagleBoneBlack Rebuilding Software Image]
 
#[https://elinux.org/Beagleboard:BeagleBoneBlack_Rebuilding_Software_Image Beagleboard: BeagleBoneBlack Rebuilding Software Image]
 
#[https://rcn-ee.com/ https://rcn-ee.com/]
 
#[https://rcn-ee.com/ https://rcn-ee.com/]
 +
#[https://github.com/RobertCNelson/Bootloader-Builder https://github.com/RobertCNelson/Bootloader-Builder]
 
#[https://github.com/RobertCNelson/omap-image-builder https://github.com/RobertCNelson/omap-image-builder]
 
#[https://github.com/RobertCNelson/omap-image-builder https://github.com/RobertCNelson/omap-image-builder]
 
#[http://www.denx.de/wiki/U-Boot http://www.denx.de/wiki/U-Boot]
 
#[http://www.denx.de/wiki/U-Boot http://www.denx.de/wiki/U-Boot]
#[www.angstrom-distribution.org/building-angstrom www.angstrom-distribution.org/building-angstrom]
 
  
 
*Mailing lists:
 
*Mailing lists:
Line 84: Line 206:
 
#[https://www.arm.linux.org.uk/mailinglists/lists.php linux-arm]
 
#[https://www.arm.linux.org.uk/mailinglists/lists.php linux-arm]
  
 +
===Benefit===
 +
Upon successful completion of this project the Bela Image will follow more closely with BeagleBoard Images. I mean after Bela specific changes made conditional to the Image-builder repository. The Bela Image development will be updated more often, more easily in parallel with BeagleBoard Images.
  
 
==Misc==
 
==Misc==
Completed all the requirements listed on the [https://elinux.org/BeagleBoard/GSoC/Ideas-2022#General_requirements ideas page]. <br>
+
Emulation is a necessary aspect of embedded system development and QEMU is the right tool to do so for linux based SBCs. As I tried some ways to boot Bela Image using QEMU emulator and that didn't worked out. After completion of this project I'll work on building
The code for the cross-compilation task can be found [https://github.com/krvprashanth/gsoc-application here] submitted through pull request [https://github.com/jadonk/gsoc-application/pull/161 #161].
+
qemu-bela-kernel. So, that the ready-made kernel can be used to emulate a Bela.

Revision as of 08:50, 23 May 2022


Proposal-Building Bela Images

===== About =====
Student: Kurva Prashanth
Mentors: Giulio Moro, Vedant Paranjape, Vaishnav Achath
Code: https://github.com/BelaPlatform/bela-image-builder https://github.com/beagleboard/image-builder
Wiki: https://forum.beagleboard.org/t/building-bela-images/32104
GSoC: GSoC entry

Status

This project proposal has been accepted as part of GSoC 2022.

Proposal

Completed all the requirements listed on the ideas page.
The code for the cross-compilation task can be found here submitted through pull request #161.

About you

IRC Nick: krvprashanth
Matrix: @krvprashanth:matrix.org
Github: https://github.com/krvprashanth
Gitlab: https://code.swecha.org/krvprashanth
School: Vidya Jyothi Institute of Technology
Country: India
Primary language: English, Telugu
Typical work hours: 6AM-11AM, 4PM-10PM (GMT +5:30) IST
Previous GSoC participation: First time I am participating in GSoC.

About your project

Project name: Building Bela Images

Project Outcomes:

  1. Semantic rebase of the functionalities in Bela-Image-builder repo to the Image-builder one.
  2. Add features of the Bela-Image-builder repo to Image-builder repo.
  3. Improve the maintainability of the Bela Image Development and minimise future development effort.

Description

Project Abstract

Bela is an open hardware and software platform for ultra-low latency audio and sensor processing. The main goal of this project is to Improve the maintainability of the Bela Image development by adding the functionalities of the Bela Image builder repo to the BeagleBoard Image builder repo.

Overview of Bela Platform

As given in the official website, Bela is a hardware and software platform for creating beautiful interaction with sensors, sound and it is designed for artists, musicians, researchers and makers, Bela brings the power of ultra-low latency interactive audio and sensors to digital systems.

Bela Platform uses the Bela software which is a customised Debian distribution including a custom xenomai kernel, minimal clutter, and custom systemd configurations and It takes advantage of features of the BeagleBone computers and can achieve extremely fast audio and sensor processing times.

Basic Overview of Building Embedded Linux Distributions

Building custom Linux systems for embedded devices is to use build systems such as Yocto/Open Embeded or Buildroot and using a more conventional binary distribution Debian rootfs has interesting benefits such as powerful package management system, a wide selection of available packages, excellent security updates and more.

There are different approaches to build an embedded Linux system. Here, in this project we will be using U-Boot, ARM cross compiler, Debian ARM based rootfs, custom kernal, Debootstrap and build scripts to generate systems for ARM targets such as Bela, BeagleBoards.

Why Building Bela Image again?

Bela Image development repo is heavily based and which was initially inspired by Beagleboard Image-builder scripts. Currently, the Beagle board Image development repo diverged greatly from a common functionalities of building Images.

Now, there is a requirement to "rebase" the functionalities of the Bela Image builder repo to the Beagleboard Image builder one. As the two codebases are drastically different we need to understand and “semantic rebase” the features of the Bela Image builder repo (xenomai kernel building scripts along with a bunch of other stuff) to Beagleboard Image builder repo. After these changes the Bela Image development will follow more closely with the Beagleboard Image development and as a result Bela Image will be updated more often and it minimizes future development effort.

Tech Stack

Bash Scripting, Build Systems ( U-Boot ), Kernel building, Linux Management( Primarily using linux distribution )

Proposed method of Implementation

In order to add the Bela Image builder features to BeagleBoard Image builder. Firstly, I try building Bela Image by using BeagleBoard Image builder scripts and making necessary changes in scripts to build Image. After this we will be getting a clear idea to where to change and semantic rebase the features of Bela Image builder to BeagleBoard Image builder one.

Here are typical changes need to do in BeagleBoard Image builder repo

  • Bela-specific changes will be made conditional in RootStock-NG.sh script in BeagleBoard Image builder repo
    • Add Bela Image builder scripts features in RootStock-NG.sh script
      • bootloader, kernel, xenomai, downloads, emmc-flasher-chroot and pre-chroot
  • Use config template and create bela-image.conf file and also add bela required packages list to it
  • Make necessary changes in build scripts to Optimise boot times as Bela Image has fast boot time campared to BeagleBoard Image
  • After building Bela Image using Beagleboard Image builder functionalities make changes to the Image-builder repo
Workflow for building Bela Image with BeagleBoard Image builder scripts

Generate: Base Debian Bullseye Image:

git clone https://github.com/RobertCNelson/omap-image-builder
cd ./omap-image-builder
./RootStock-NG.sh -c bb.org-debian-stretch-lxqt-v4.14

Archive will be added to "./deploy/"

Finalize: Bela specific version:

sudo ./setup_sdcard.sh --img-4gb bela-example --dtb bela --bootloader --enable-eemc-flasher --enable-uboot
Hardware required

The hardware listed below will be necessary for testing after rebuilding Bela Image.

  1. BeagleBone Black.
  2. Bela cape: The original Bela board.

Timeline

I plan to complete all the tasks before the GSoC 2022 coding period ends. Apart from this, I will write blogs weekly, reporting my progress and also the experiences I had while contributing this project.

During the GSoC 2022 coding period, I will do the following things:

  • Discuss ideas with the mentors, take feedback and work on
  • On an average i will be able to dedicate 30 to 35 hours per week
  • I am ready to adapt whatever my mentor suggests me and I will try my best to complete proposed work
  • Find other features to be added to the Bela Image

The GSoC official coding period begins on June 13, 2022, and ends on November 21, 2022.

NOTE : In view of my semester exams in June for a maximum period of two weeks, most of the work is scheduled in the second half of the coding period. I can’t work during the exam period. I would make sure to compensate for this by putting extra hours in the remaining period.

April 4 - 18:00 UTC Applications open, Students register with GSoC, work on proposal with mentors
April 19 - 18:00 UTC Proposal complete, Submitted to https://summerofcode.withgoogle.com
May 20 Proposal accepted or rejected
  • Proposal Accepted
  • Community bonding period and discussion on the project and resource available
  • Read about U-Boot, Debootstrap and Building Beagle-based embedded linux systems
Jun 13 Pre-work complete

Coding officially begins!

Jun 20 Milestone #1
  • Introductory video
  • Setup the received hardware
  • Figure out how can I use arm-based build server setup at git.beagleboard.org for Image development
  • Understand the workflows of both bela-image-builder and BeagleBoard Image builder repos and try rebuilding bela, beagleboard Images
June 27 Final Exam No Code
July 4 Final Exam No Code
July 11 Milestone #2
  • Add Bela Image builder scripts features in RootStock-NG.sh script ( bootloader, kernel, xenomai, downloads, emmc-flasher-chroot and pre-chroot )
July 18 Milestone #3
  • Use config template and create bela-image.conf file and also add bela required packages list to it
July 25 Milestone #4
  • Evaluate and Optimise boot times
  • Ensuring backwards compatibility in newer kernels
July 29 - 18:00 UTC Phase 1 Evaluation deadline
  • Finalizing everything done till now
  • Submitting the first report for evaluation
Aug 01 Milestone #5
  • Disable some unneeded systemd services
  • Build a Bela Image by using the functionalities of BeagleBoard Image repo
  • After build test the Image and debug if it needs
Aug 08 Milestone #6
  • Make changes in BeagleBoard Image builder scripts to make sure Bela Image Development follows the workflow of BeagleBoard Image builder repo
Aug 15 Milestone #7
  • Make changes to the Image-builder repo to add the features of the bela-Image-builder repo (minimal clutter, custom kernel, custom software, custom systemd configuration).
Aug 22 Milestone #8
  • Create detailed Documentation about the changes made in Bela Image development
  • Create guide about contributing to Bela Image development and how to make use of code base.
Aug 29 Milestone #9
  • Write the overall project summary and outcomes.
  • Write Bela Image Development Tutorial in https://learn.bela.io/
September 5 - 12, 18:00 UTC Final week: GSoC contributors submit their final work product and their final mentor evaluation
  • Completion video
  • Submit final work product and final mentor evaluation
September 12 - 19, 18:00 UTC Mentors submit final GSoC contributor evaluations
Nov 21 - 18:00 UTC Final date for all GSoC contributors to submit their final work product

Experience and approach

To work on this project, It requires experience with bash scripting, build systems and linux management. I have an experience with Debian live build system and customized my low end machine with robotics and networking packages in which it has 2GB RAM and 30GB hard disk installed Debian 11 "Bullseye" with XFCE Desktop environment on it and I'm just curious to work on low end hardware, optimise software to make run very well on resource constrained devices.

I am mostly into Systems Programming, Embedded Linux, and Robotics. I use programming languages such as Assembly (x86, RISC-V), C, Python and shell scripting for Installing different packages and applications which I use. I prefer to work in a terminal over GUI and also mostly I use robotics, networking, embedded linux development tools like cross-compiler toolchains, emulators, Assemblers, Debugger, mininet, ns3, ROS, OpenCV, Wireshark, etc.

I also write good reports and blogs, I’ve previously written some blogs about free software and open hardware and experiences I had. Check here

Contributions

Here are technical and non-technical ways where I contributed.

Free Software Movement of India
  • Hacktivist: Actively contributing to free software projects, gave talks on Free Software & Open Hardware, Git, Mobile & Desktop Freedom, Dark Patterns
  • Speaker, International Debian Conference 2021
Swecha Telangana
  • Designed, optimized, and sliced 3D models and maintained production line of 3D printed projects and open hardware prototyping equipment.
  • In Mobile Autonomous Cart project using ROS + Docker, development tools to advance robotic software design and deployment by utilizing advances in Linux containers.
  • Organised Debian Bullseye Release event
  • Course Manager and Teaching Assistant for Liberating Devices course ( Mobile & Desktop Freedom )
    • Utilized Android Tools ( adb, fastboot ), Bash scripts and command-line tools to remove proprietary malware from mobiles/watches and desktops.
  • Porting and Enabling the Government School Computer labs in our locality to specific use of free softwares and Installing BalaSwecha OS( A GNU/Linux distribution based on Debian ).

Contingency

If I get stuck on my project and my mentor isn’t around, I will use the following resources:

  1. Ask on the Bela and BeagleBoard forum
  • BelaPlatform and BeagleBoard Repositories:
  1. https://github.com/BelaPlatform
  2. https://github.com/beagleboard
  • Documentation and Repositories on Building Images:
  1. Beagleboard: BeagleBoneBlack Rebuilding Software Image
  2. https://rcn-ee.com/
  3. https://github.com/RobertCNelson/Bootloader-Builder
  4. https://github.com/RobertCNelson/omap-image-builder
  5. http://www.denx.de/wiki/U-Boot
  • Mailing lists:
  1. debian-arm
  2. linux-arm

Benefit

Upon successful completion of this project the Bela Image will follow more closely with BeagleBoard Images. I mean after Bela specific changes made conditional to the Image-builder repository. The Bela Image development will be updated more often, more easily in parallel with BeagleBoard Images.

Misc

Emulation is a necessary aspect of embedded system development and QEMU is the right tool to do so for linux based SBCs. As I tried some ways to boot Bela Image using QEMU emulator and that didn't worked out. After completion of this project I'll work on building qemu-bela-kernel. So, that the ready-made kernel can be used to emulate a Bela.