Skip to content

Instantly share code, notes, and snippets.

@Zixuan-Qiao
Zixuan-Qiao / bbb_analog_in.md
Created April 1, 2024 22:30
Summary on how to setup analog input on Beaglebone Black

Beaglebone Black - Setting Up Analog Input

Beaglebone Black comes with analog input pins and analog-to-digital converter (ADC) modules. The process I followed to access these pins is documented here.

Required Hardware

Beaglebone Black, PC running on Linux system (Ubuntu ver 20.04)

Serial to USB cable, USB type A to mini B cable

Loading the ADC Device Tree Overlay

@Zixuan-Qiao
Zixuan-Qiao / bbb_gpio_test.md
Created March 21, 2024 19:45
Testing GPIO ports on Beaglebone Black

Beaglebone Black - Testing GPIO Ports with Linux Kernel Module

The GPIO port is one of the main ways to establish connection between the board and external circuit. The process I followed to setup such connnection with a Linux kernel module is documented here.

Required Hardware

Beaglebone Black, PC running on Linux system (Ubuntu ver 20.04)

Serial to USB cable, USB type A to mini B cable

Jump wires, LED, transistor (BC547), resistors

@Zixuan-Qiao
Zixuan-Qiao / bbb_cross_compile.md
Last active March 17, 2024 15:31
Summary on how to setup cross compilation environment for Beaglebone Black

BeagleBone Black - Setting Up Cross Compilation Environment

Having a cross compilation environment on the host PC can bring great convenience to the development of kernel modules. In the process, there are a lot of things that require attention. The process I followed is documented here for future reference.

Necessities for Cross Compiling Out-of-tree Modules

The building of out-of-tree modules depends on many files (configs, kernel Makefile, headers, /scripts directory etc.) from the kernel. They can be obtained by downloading and building a kernel or installing the headers directly. The first approach is introduced here. Note that a full kernel build is not necessary, since the kernel image itself is not required.

To make the setup capable of cross compilation, the kernel source code, configuration and compiler need to match those of the target device.

@Zixuan-Qiao
Zixuan-Qiao / bbb_flash_emmc.md
Created March 15, 2024 16:09
Summary on how to flash the onboard eMMC of Beaglebone Black

Beaglebone Black - Flashing the eMMC with the Latest Image

The kernel image that came with the board is usually outdated. Thus, I decided to update it to the latest image by flashing the onboard eMMc with an SD card. The process I followed is documented here.

Required Hardware

Beaglebone Black, PC running on Ubuntu (ver 20.04)

Serial to USB cable, USB type A to mini B cable, power adapter

Micro SD card and adapter

@Zixuan-Qiao
Zixuan-Qiao / u_boot_sd.md
Created March 14, 2024 20:03
Summary on how to save U-boot configuration to SD cards

Beaglebone Black - Saving U-boot Config to SD Cards

U-boot is an open-source boot loader used in embedded devices such as the Beaglebone Black. Like many other boot loaders, it can be configured to have different behaviors. However, saving the configuration may not be as straightforward as it seems. In this article, the issues I encountered and the corresponding solutions are documented, hopefully they can be helpful for others.

Issue of Saving without an SD Card

The u-boot that came with the board is compiled to save its configurations to the SD card, regardless of the availability. Thus, running saveenv without one will generate a "Card did not respond to voltage selected" error. This problem can be solved by adding an SD card or flashing the firmware. The second solution can be found on Bootlin's github: https://github.com/bootlin/training-materials/tree/master/lab-data/common/bootloader/beaglebone-black

@Zixuan-Qiao
Zixuan-Qiao / bbb_tftp_nfs.md
Last active March 15, 2024 16:11
Summary on how to set up TFTP and NFS on Beaglebone Black

Beaglebone Black - Setting up TFTP and NFS

Sharing data between host computer and the board is crucial in embedded system development. The process I followed to set up TFTP and NFS connection on Beaglebone Black is documented here, hopefully it can be helpful to others.

Required Hardware

Beaglebone Black, PC running on Ubuntu system (ver 20.04 in my case)

serial to USB cable, USB type A to mini B cable

Setup Internet Sharing Through USB Cable