This is an old revision of the document!
Table of Contents
Debian Preparation for PPL
Get Package Updates
All of the following commands assume to be executed by the superuser. To become superuser, you have to enter the command:
sudo -s -H
after booting the BeagleBone Black and logging in into the debian account, whose default password is temppwd.
Otherwise you have to prefix every command with the word sudo. E.g. instead entering the command apt-get update enter the command sudo apt-get update.
Now, after you have become superuser, it is a good advice to update the operating system with new packages by entering the command:
apt-get update
and
apt-get upgrade
This ensures the the operation system is up do date.
Install additional Packages
The following additional packages are needed:
apt-get install cmake
Kernel Upgrade
At the time of writing this memo, the kernel version included in the Debian image was 4.19.94-ti-r42. To update to the latest stable kernel release, that most likely is a newer kernel than the kernel of the Debian image, do the following:
cd /opt/scripts/tools/ git pull ./update_kernel.sh
Now boot the BeagleBone Black once again.
reboot
After the reboot let's check our new upgraded kernel:
uname -a Linux beaglebone 4.19.94-ti-r72 #1buster SMP PREEMPT Tue Mar 8 22:13:06 UTC 2022 armv7l GNU/Linux
Now the kernel version 4.19.94-ti-r72 is installed.
Device tree modifications
Device tree compiler and overlays
In PPL, we need an device tree overlay to enable the SPI controller and the PRU. Therefore a patched device tree compiler is needed. In addition the device tree overlay blobs for the peripherals are helpful.
The device tree overlay reflects the wiring of the BeagleBone Black with the CC1200. In first versions the wireing was made by hand. Today an adapter card is used. The wiring is is shown in Fig. 1 and described here.
Fig. 1: Wireing of BeagleBone Black with CC1200
To install these things go to directory and update the scripts first:
cd /opt/source/bb.org-overlays git pull
Now, test if the device tree compiler is installed:
dtc --version
Version: DTC 1.4.7
Update dtc by executing:
./dtc-overlay.sh
Install the device tree overlay blobs:
./install.sh
Disable HDMI
The pins of HDMI are multiplexed with the pins of the SPI bus. In order to use the SPI bus, the HDMI pins must be disabled by uncommenting the following line in the file /boot/uEnv.txt:
disable_uboot_overlay_video=1
Disable default pin configuration
Per default the pins of the BeagleBone Black are wired for universal use, meaning the pins are connected to the commonly used devices. This will result in an error, if loading your own device tree overlay.
To disable universal use, comment out the following line in the file /boot/uEnv.txt
enable_uboot_cape_universal=1
Reboot and Test
To make the changes effective, reboot.
To test that HDMI is disabled, execute the following command:
grep "pin 41" /sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pins
and look, that the output matches the following:
pin 41 (PIN41) 44e108a4 0000002f pinctrl-single
If the Hex-code is not 0000002f the HDMI is still enabled.
Enable UIO PRU Driver
The communication between the ARM host processor and the PRU (Programmable Realtime Unit) is implemented either by the Remoteproc-Driver or the UIO PRU Driver. Per default the Remoreproc driver is enabled. In this memo, it will be described, how to enable the UIO PRU Driver.
After booting a fresh Debian image and executing the command:
lsmod Module Size Used by usb_f_acm 16384 2 u_serial 20480 3 usb_f_acm usb_f_ecm 20480 2 usb_f_mass_storage 53248 2 usb_f_rndis 32768 4 u_ether 20480 2 usb_f_ecm,usb_f_rndis libcomposite 65536 18 usb_f_ecm,usb_f_acm,usb_f_mass_storage,usb_f_rndis pm33xx 16384 0 wkup_m3_ipc 16384 1 pm33xx wkup_m3_rproc 16384 1 uio_pdrv_genirq 16384 0 uio 20480 1 uio_pdrv_genirq pruss_soc_bus 16384 0 pru_rproc 28672 0 pruss 16384 1 pru_rproc irq_pruss_intc 20480 1 pru_rproc remoteproc 57344 3 pru_rproc,wkup_m3_rproc,wkup_m3_ipc virtio 16384 1 remoteproc virtio_ring 28672 1 remoteproc spidev 20480 0
and looking at the output. It seems, the UIO PRU Driver (uio_pdrv_genirq) is already been enabled. But this Assumption is wrong. It needs several steps to enable the driver
Enable UIO PRU driver
We need to instruct the bootloader to load a device tree overlay blob which enables the UIO driver. This can be done by uncommenting the the following line in the file /boot/uEnv.txt:
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
We should also disable the device tree overlay for the unused rproc driver by commenting out the following line in the same file:
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
Disabling the Remoteproc drivers
Finally the Remoteproc driver must be disabled by editing the file /etc/modprobe.d/pruss-blacklist.conf (create the file if it's not there).
Remove the line 'blacklist uio_pruss' and add the following lines:
blacklist pruss blacklist pruss_intc blacklist pru-rproc blacklist spidev
Afterward reboot the Beaglebone Black.
reboot
Test
To check, if the device tree file has been loaded correctly, execute
lsmod Module Size Used by pm33xx 16384 0 wkup_m3_ipc 16384 1 pm33xx wkup_m3_rproc 16384 1 remoteproc 57344 2 wkup_m3_rproc,wkup_m3_ipc virtio 16384 1 remoteproc virtio_ring 28672 1 remoteproc pvrsrvkm 421888 0 uio_pruss 16384 0 usb_f_acm 16384 2 u_serial 20480 3 usb_f_acm uio_pdrv_genirq 16384 0 usb_f_ncm 28672 2 uio 20480 2 uio_pruss,uio_pdrv_genirq usb_f_mass_storage 53248 2 usb_f_rndis 32768 4 u_ether 20480 2 usb_f_ncm,usb_f_rndis libcomposite 65536 18 usb_f_acm,usb_f_ncm,usb_f_mass_storage,usb_f_rndis
Now only UIO PRU drivers are loaded and no rproc drivers.
