BeagleBoard/GSoC/2022 Proposal/BeagleBone Cape add-on board compatibility layer

< BeagleBoard‎ | GSoC
Revision as of 19:23, 11 April 2022 by Gpioblink (talk | contribs) (Created page with "Category: BeagleBoard Category: GSoC Category: GSoCProposal2022 =ProposalTemplate = ''Student'': [")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Student: Kai Yamada
Mentors: Not yet


This project is currently just a proposal.


Please complete the requirements listed on the ideas page and fill out this template.

About you

Github: gpioblink
School: University of Aizu
Country: Japan
Primary language (We have mentors who speak multiple languages): Japanese
Typical work hours (We have mentors in various time zones): 10AM-7PM Japan Standard Time
Previous GSoC participation: This is my first time attending GSoC.
Reason for participation: I have a strong interest in the Linux kernel's low-layer mechanism for abstracting devices on hardware and providing them to applications. Therefore, I would like to be involved in Linux BSP development in the future. I have been playing around with rewriting the GPL source code for embedded Linux in an attempt to learn a bit about BSP development. However, my knowledge of BSP development was lacking and I was limited to small modifications. I would like to hone my BSP development skills by participating in GSoC and taking the time to participate in its development. I would also like to be involved with the community through GSoC as a starting point for ongoing contribution activities.

About your project

Project name: Apply device tree overlay for AI to librobotcontrol and create demo code for each BeagleBone device


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.)

I will add a new compatibility layer for Cape to the device tree for BeagleBone AI.

BeagleBone has sold a module called Cape, which connects to the BeagleBoard. Deepak Khatri, a 2020 GSoC contributor, had created a Cape compatibility layer for the BeagleBoneAI that can use the script for other BeagleBoard like BeaglBboneBlack. However, some Capes are not yet compatible with the compatibility layer, and an Example for the overlay needs to be developed to help users understand the compatibility layer.

In this proposal, I propose to implement "applying a device tree overlay for AI to librobotcontrol" and "creating a demo code for each BeagleBone device".

Applying a device tree overlay for AI to librobotcontrol

librobotcontrol provide the software implementation for BagleBone Robotics Cape.

This library is compatible with BeagleBone Black and BeagleBone Wireless, but not BeagleBone AI. The Compatible Layer of the device tree in [1] must be compatible with BeagleBone AI.

TODO: Write a detailed description of what I am going to do specifically.

story plot

  • Write device tree for AI based on BeagleBone code
  • Rewrite addresses and create overlays using BeagleBone Black code as a reference
  • Example BealgBone device tree code
  • Modifying this while looking at the link, on the memory allocation page
  • Correlate the peripheral numbers with those in the wiki and make corrections

Creating a demo code for each BeagleBone device

To use the Compatible Layer, you must be prepared to rewrite uEnv.txt, run the specified script, etc. At this time, there is not yet a demo code that is easy to understand.

In this section, for each BeagleBone device, we will create demo code to run each of the modules in Robotics Cape and the external peripherals that can be connected.

TODO: Write a detailed description of what I am going to do specifically.

story plot

  • List each module listed in librobotcontrol and write which ones to do in which order.

Prerequisite Knowledge

What is Device Tree

A device tree is data that tells the kernel about the configuration of hardware in ARM and other embedded Linuxes. For each component in the hardware, you can set its name, memory address, label, and interrupt, etc.

The device tree must be specified at Linux boot time, and it is basically impossible to change the configuration during boot.

TODO: write more detail with my experience

What is Device Tree Overlay

Device tree overlay is a device tree mechanism that allows configuration changes in user space during boot. This allows you to change the pin assignments used without having to reboot Linux.

TODO: write more detail

What is Device Tree Overlay with Cape Universal

Cape additionally has a mechanism called Universal Cape Overlay. This allows pin assignments to be managed with a simple command line call.

TODO: write more detail


Provide a development timeline with a milestone each of the 11 weeks and any pre-work. (A realistic timeline is critical to our selection process.)

TODO: write the table when I decide on specifics

Mar 29 Applications open, Students register with GSoC, work on proposal with mentors
Apr 13 Proposal complete, Submitted to
May 17 Proposal accepted or rejected
Jun 07 Pre-work complete, Coding officially begins!
Jun 17 Milestone #1, Introductory YouTube video
June 24 Milestone #2
June 30 Milestone #3
July 12 18:00 UTC Milestone #4, Mentors and students can begin submitting Phase 1 evaluations
July 16 18:00 UTC Phase 1 Evaluation deadline
July 23 Milestone #5
July 30 Milestone #6:@:@^
Aug 06 Milestone #7
August 10 Milestone #8, Completion YouTube video
August 16 - 26 18:00 UTC Final week: Students submit their final work product and their final mentor evaluation
August 23 - 30 18:00 UTC Mentors submit final student evaluations

Experience and approach

In 5-15 sentences, convince us you will be able to successfully complete your project in the timeline you have described.

Experience: To achieve my goal of porting BSP for embedded Linux, I modified the GPL source code to change the behavior during init and I have been using eBPF to check USB sending and receiving. I have also participated in a board design internship and developed hardware. These tasks have been basically done by myself, with some help from the community. I intend to run the project on my own this time as well as in the past.

Approach: From our experience, hardware requires considerably more time for debugging than software. Since there is little information available as a tutorial, I have also set aside a generous amount of time to read the relevant data sheets and specifications to understand how it works. I believe that this content can be completed without any problems.


What will you do if you get stuck on your project and your mentor isn’t around?

Unexplained problems are common in doing hardware. In such cases, I will do the following:

  1. If the problem is with the Compatible Layer, first try with the BeagleBone Black or try with the regular device tree to roughly isolate where the problem occurs.
  2. If possible, use an oscilloscope to check for correct waveforms, or use a debugger on Linux to determine the details of the problem.
  3. If the problem is likely to be component-dependent, consult the datasheet for the chip in question.
  4. Check the embedded Linux primer, Mastering Embedded Linux Programming Third Edition. Also, check BeagleBone Black Cookbook for similar symptoms on BeagleBone.
  5. If the problem is likely to be Soc-dependent, refer to the datasheets for AM5729 on BeagleBone AI and AM3358 on BeagleBone Black and many other boards.


If successfully completed, what will its impact be on the community? Include quotes from community members who can be found on and

  • A Compatibility Layer for BeagleBoe AI will be added to librobotcontrol, allowing Robotics Cape to be handled by AI. Also, librobotcontrol code written for BeagleBone Black will work on BeagleBone AI without modification.
  • Various tutorials will be added to librobotcontrol to help you understand how to use it.


Please complete the requirements listed on the ideas page. Provide link to pull request.


Is there anything else we should have asked you?