Hello everyone. I ended up experimenting more than getting results, so not much to write. Let’s go over everything.
PocketBeagle 2 Examples
Continuing the work from last week, more PocketBeagle 2 examples have been added.
Feel free to create issues regarding the examples you would like to be added.
Button
Simple example to detect button presses. Uses Pin P1_20
by default.
Usage
debian@pocketbeagle2:~/vsx-examples/PocketBeagle2$ cargo run -p button
Compiling button v0.1.0 (/home/debian/vsx-examples/PocketBeagle2/button)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.05s
Running `target/debug/button`
Chip: gpiochip2 [600000.gpio] (92 lines), offset: 50
Button pressed
Button pressed
Button pressed
Button pressed
Fade
Simple example to fade an LED in and out using PWM. Also contains abstractions to use PWM using sysfs.
Uses P1.36
. In case of TechLab Cape, this PIN is connected to RGB.B
Usage
debian@pocketbeagle2:~/vsx-examples/PocketBeagle2$ cargo run -p fade -r
Compiling fade v0.1.0 (/home/debian/vsx-examples/PocketBeagle2/fade)
Finished `release` profile [optimized] target(s) in 3.85s
Running `target/release/fade`
BeagleBoard Image Builder
Currently, the image build process for all BeagleBoard images involves a collection of scripts singlehandedly maintained by Robert Nelson. Thanks to his amazing work on both handling the management of openbeagle runners and image building, things have been working relatively well.
However, this also means that all the burden of pushing and maintaining new images falls on one person. Additionally, the images cannot currently be built in openbeagle, which limits the experimentation and having very special purpose images.
To hopefully improve the current situation, I have been working on trying to get image build working on openbeagle CI. I initially started with trying to get debootstrap directly working in CI, but while I could get it somewhat working (defining working very loosely here), it failed in CI.
Currently, I have 2 possible solutions I am exploring:
- debos: Seems quite promising. Has good performance, and should work fine in CI. Additionally, it also can work with just user-mode-linux, so quite portable. Moreover, it already has a recipe system pretty similar to what I want in the final solution.
- Using docker: This was mostly inspired from yasib. I was able to build rootfs for the most part, but there were quite a few warnings for systemlevel packages like systemd.
I am still experimenting with both of the above approaches. However, I have started leaning more towards debos. It can have much better performance than docker in docker, and already has been tested quite a bit. Additionally, I can always add support for 2nd approach to debos in the future.
Hopefully, I will have working images by next week.
Optimize linux-embedded-hal dependencies
I have been using linux-embedded-hal in some of the PocketBeagle 2 GPIO examples. When working with it, I observed that it was pulling some unnecessary dependencies even when default-features
were disabled. I created a PR to fix it, which has now been merged.
Ending Thoughts
This was it for this week. Hopefully, this helps bring transparency regarding where the development efforts are concentrated, and how the community can help. Look forward to next update.