Work Product Submission

Beagleboard BSP projects - GSoC 2017

About RTEMS


RTEMS is a open source embedded hard real-time operating system, It good at real-time, stability, development speed and multi-processor support. Now RTEMS is already working on Beaglebone Black, As so far, the ADC, PWM, GPIO is supported on BBB, But the BSP support is not enough.

RTEMS official website: https://www.rtems.org/

Team and mentors

Sichen Zhao - Developer
Christian Mauderer  - Mentor
Punit Vara - Mentor


The project - Beagleboard BSP projects: Improvement of I2C, USB and wireless BSP for Beaglebone Black

Project Proposal: GSoC 2017-Beagleboard BSP projects

Project Ticket:  Beagleboard BSP projects

Project wiki: GSoC 2017-Beagleboard BSP projects

Project final code repository: GSoC2017 final code 

Goal:

This project aims to improve the Beaglebone Black  BSP support on RTEMS. Project intends to add the following supports to the Beaglebone Black BSP: I2C support, USB device support, Wireless network card support, USB dongle support.

Project Deliverables:

Phase 1 Evaluation - I2C driver can be test and create the patch to submit .then i will help to merge the branch.

Phase 2 Evaluation - Add the USB hub to nexus Bus, and porting the USB driver from FreeBSD to RTEMS. RTEMS can identify USB devices. and if it goes well, i will create the patch and submit. So RTEMS can use the USB port on BBB at least.

Final Evaluation - Add a kind of USB dongle support, and the wireless network card device can be drivered. Then make some tests on the BBB wireless network.


Work Done

May 24 - June 26 (Phase 1)

Finished the I2C driver support (GSOC 2016 unfinished work). So Beaglebone Black can read EEPROM information via I2C.
The I2C code has been merged.

Merged I2C Patches:




My final I2C repository:


Blog Post:


June 27 - July 23 (Phase 2)

Finished the USB driver support and FDT support for Beaglebone Black BSP. Now RTEMS can manage device tree via FDT, and RTEMS can detect and mount USB devices such as USB disk and USB keyboard.
The USB code has been merged.

Merged USB and FDT Patches:




My USB repository:

Blog Post:

RTEMS USB development roadmap 

Fix the issue about RTEMS-libbsd interrupt install failed 



RTEMS USB support for BBB document 

Video about test USB:

RTEMS on BBB USB test

The git branch of that: RTEMS on BBB USB TEST

The test suite i used: Media01.exe

July 24 - August 23 (Phase 3)

Finish the rtl8188eu chip(USB dongle) driver support, Add  Unencrypted WiFi and Encrypted WiFi: WEP support.
Add openssl lib support and Encrypted WiFi WPA support: wpa_supplicant.

The WiFi code has been merged:

My WiFi repository:




Blog Post:




Video about test WiFi:

RTEMS on BBB connect Unencrypted WiFi and Encrypted WiFi: WPA and WEP

The git branch of that: RTEMS_USB_WiFI_TEST

The test suite i used: Media01.exe

Work Left

1. WPA support
In order to use WPA encrypted WiFi, we need add wpa supplicant software support, this software is widely used in many UNIX system such as Linux and BSD. 
So we need import wpa_supplicant and openssl lib from FreeBSD.
So far, i already made wpa working on RTEMS, including finished the import of wpa and openssl from FreeBSD. And add shell command support for wpa_supplicant. So, RTEMS can connect WiFi via WPA/WPA2.
But there are some issues during the process of WPA implementation:
  • WPA need strnstr.c, which is part of libc in FreeBSD, but RTEMS use newlib as the standard C library. So we need import the strnstr.c in newlib, and wait newlib merged the strnstr.c, then we can use RSB to compile RTEMS.
  • I create a new task/thread for wpa supplicat, but there should be at least some big warning that it can't be started multiple time. In the ideal case, add a lock so that it can only be started once.
The WPA progress repository: 



2. FDT license issue

The FDT source files is in GPL license, which is not supported in RTEMS. So we need find a way to keep GPL code from RTEMS sources. Maybe it downloadable from somewhere e.g. in rtems-tools or from a FTP. The topic is still under discussion in mailing list.

The repository of FDT files: 


The mailing list dicussion about FDT license:



Conclusion

Working with RTEMS was my first experience with open source software development and I really enjoyed it. I learned new programming language(python and assembler ). I knew more about RTEMS and FreeBSD. I got experience about work with people all over the world and work with Git. Contributed to a very worthy cause and worked with many RTEMS people and great mentors from various parts of the world. It was a very enriching experience, which I intend to continue participating. Thanks to allow this.






评论

此博客中的热门博文

RTEMS-libbsd generates drive device firmware

RTEMS Network Transplantation - rtems system initialization process analysis

Add wpa_supplicant_fork command on RTEMS-libbsd