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 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.
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, ist is a good advice to update the operation system with new packages by entrain the command
apt-get update
and
apt-get upgrade
This ensured the the operation system is up do date.
Looking carefully at the output of the apt-get upgrade command, you will recognize that an error occurs upgrading the dnsmasq package. This will result, that communication via the USB interface will not work correctly. To fix the error enter the following commands:
systemctl enable dnsmasq.service 
systemctl restart dnsmasq.service
If you have forgotten to enable the dnsmasq deamon, your host system will not obtain an IP address automatically after the next restart of the BeagleBone Black. In this case you have to assign an IP address manually.
Install additional Packages
The following additional packages are needed:
apt-get install cmake
Kernel Upgrade
at the time of writing this memo, the lastest kernel version of the Debian distribution was 4.4.68-ti-r112. To get the latest stable kernel release, that mostly is a newer kernel than the kernel of the Debian distribution, do the following:
cd /opt/scripts/tools/ git pull ./update_kernel.sh
Unfortunately, the is a bug in the kernel update script, resulting that the configuration file of dnsmasq server is wrong. To continue to use the USB interfaces for Internet access enter the following command:
touch /etc/dnsmasq.d/.SoftAp0
This touch command creates an empty file, indicating not to change the dnsmasq configuration file at the boot process. Now boot the BeagleBone Black once again.
reboot
After the reboot von in again. The cost of the command
uname -a Linux beaglebone 4.4.155-ti-r155 #1 SMP Thu May 23 05:22:53 UTC 2019 armv7l GNU/Linux
Now the kernel version 4.4.155-ti-r155 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. An addition the device tree overlay blobs for the peripheral is helpful.
To install these things go to directory:
cd /opt/source/bb.org-overlays
Now, test if the device tree compiler is installed:
dtc --version
Version: DTC 1.4.4
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. In order to use the SPI, the HDMI pins must be disabled by uncommenting the following line in the file /boot/uEnv.txt:
##BeagleBone Black: HDMI (Audio/Video) disabled: dtb=am335x-boneblack-emmc-overlay.dtb
Disable default pin configuration
Per default the pins of the BeagleBone Black are wired for universal use, meaning the pins are connected to the common used devices. This will result in an error, if loading your own device tree overlay.
To disable universal use, change the following line in the file /boot/uEnv.txt
cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable
to
cmdline=coherent_pool=1M net.ifnames=0 quiet
Reboot and Test
To make the changes effective, reboot.
To test, that the HDMI is disables execute the following command:
grep "pin 41" /sys/kernel/debug/pinctrl/44e10800.pinmux/pins
and look, that the output matches the following:
pin 41 (44e108a4.0) 0000002f pinctrl-single
If the Hex-code is not 0000002f the HDMI is still enabled.
Enable UIO PRU Driver
The communication between ARM host processor an 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 an fresh Debian image an executing the command:
lsmod | grep uio uio_pdrv_genirq 4243 0 uio 10972 1 uio_pdrv_genirq
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:
Device tree modifications to enable UIO PRU driver
Go to the directory:
cd /opt/source/dtb-4.4-ti/
Now, modify the file src/arm/am335x-boneblack-emmc-overlay.dts by uncommenting the UIO PRU part and commenting the the remoterpc part:
/* #include "am33xx-pruss-rproc.dtsi" */ /* line 22 */ #include "am33xx-pruss-uio.dtsi" /* line 32 */
After editing is finished, compile the device tree files by
make
and install the device tree binary by
make install
In the last step, the binary device tree must be enables in the file /boot/uEnv.txt. If not already done look at Disable HDMI.
Disabling the Remoteproc drivers
Finally the UIO PRU driver must be enables and the Remoteproc driver must be disables by editing the file /etc/modprobe.d/pruss-blacklist.conf.
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 pvrsrvkm 445708 0 uio_pruss 4387 0 evdev 14151 1 uio_pdrv_genirq 4243 0 uio 10972 2 uio_pruss,uio_pdrv_genirq usb_f_acm 8681 2 u_serial 14137 3 usb_f_acm usb_f_ecm 11448 2 8021q 24428 0 garp 7497 1 8021q mrp 9351 1 8021q stp 2622 1 garp llc 6287 2 stp,garp usb_f_mass_storage 50793 2 usb_f_rndis 26505 4 u_ether 14733 2 usb_f_ecm,usb_f_rndis libcomposite 54424 18 usb_f_acm,usb_f_ecm,usb_f_rndis,usb_f_mass_storage tieqep 10365 0
Now only uu drivers are loaded and no Remoreproc drivers.




