Building DPDK on Raspberry Pi 3

I’m trying to build DPDK on Raspberry Pi 3 but couldn’t do it on Raspbian since it’s a 32-bit OS. DPDK uses several assembler instructions for ARM 8 that are only valid on 64-bit OS. So my effort starts with installing a 64-bit OS.

I found SUSE has released 64-bit Linux for Raspberry Pi 3:
https://en.opensuse.org/HCL:Raspberry_Pi3

I started with this OS image.

Continue reading “Building DPDK on Raspberry Pi 3”

BeagleBone Green: Enable CAN on Startup

Three steps:

  1. Enable CAN overlay by configuring cape manager
  2. Configure network interface
  3. Install startup program

1. Enable CAN overlay

Add following line in /etc/default/capemgr

2. Configure network interface

Add following lines in /etc/network/interfaces

3. Install startup program

Setting the CAN interface to /etc/network/interface does not enable the CAN interface on startup for some reason. In order to workaround this problem, I installed a startup program as follows.

Following link was helpful:

Running a script on Beaglebone Black boot/ startup

The startup script to run on startup is as follows. This script also turns off wi-fi power management, thus I removed a cron entry I added before to disable the power management.

Following are the steps to create and enable a service that runs on startup.

  • Create the service
  • Edit the above file as necessary to invoke the different functionalities like network. Enable these only if the code needs that particular service. Disable unwanted ones to decrease boot time.
  • Create a symbolic link to let the device know the location of the service.
  • Make systemd reload the configuration file, start the service immediately (helps to see if the service is functioning properly) and enable the unit files specified in the command line.
  • Restart BBB immediately to see if it runs as intended.

 

BeagleBoneGreen: Disabling Wi-Fi Power Management Permanently

The operating system is Debian. This is a dirty solution but it does work anyway.

Test CAN connection between BeagleBone and MIDI/CAN converter

1. Enabled CAN at 1Mbps on BeagleBone:

Following operations seem to be necessary every BeagleBone boot. TBD to setup auto configuration on startup.

2. Wired CAN ports

Used MCP2551 for CAN transceiver.

3. Connected with MIDI/CAN converter via CAN bus

See the picture above.

4. Monitor MIDI/CAN converter via serial interface

5. Monitor packets on BeagleBone and play

Serial port monitor:

Enable CAN on the BeagleBone Green

I’ve tried to enable CAN on my BeagleBone Green board. I had to stop the work before verification, because my logic analyzer is unavailable now. I record what I did in this article to make things reproducible when the logic analyzer is back.

There are several helpful links:

http://www.embedded-things.com/bbb/enable-canbus-on-the-beaglebone-black/

http://electronics.stackexchange.com/questions/195416/beaglebone-black-can-bus-setup

https://groups.google.com/forum/embed/?place=forum/beagleboard&showsearch=true&showpopout=true&showtabs=false&hideforumtitle=true&parenturl=http%3A%2F%2Fbeagleboard.org%2Fdiscuss%23bone_forum_embed#!category-topic/beagleboard/can/SjWwVngIPh8

Readings to understand device tree overlay:

Device Tree for Dummies:
http://events.linuxfoundation.jp/sites/events/files/slides/petazzoni-device-tree-dummies.pdf

Device Tree Overlays (in adafruit)
https://learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/device-tree-overlays

Here are what I did:

Then I have to stop here.

BeagleBone notes

How to login from MacOS:

  1. Connect to the BeagleBone by a USB cable.
  2. MacOS restart is necessary for some reason.
  3. SSH to 192.168.7.2

WiFi setup:

Use connmanctl as described in /etc/network/interfaces.

… and so on

Following links give useful information:
http://xx-prime.hatenablog.com/entry/2016/08/13/012059 (in Japanese)

https://www.mail-archive.com/beagleboard@googlegroups.com/msg40785.html

The wlan0 device power management can be turned off by

TBD how to turn this off permanently.

Take SD backup

  1. Insert the SD into the MacBook
  2. “diskutil list” to know the path to the device.
  3. run “sudo dd if=<device_name> conv=sync,noerror | gzip -c > archive.img.gz

Following link is helpful to know how to backup disks in several styles:

https://wiki.archlinux.org/index.php/disk_cloning

Connecting to the host via serial port

Useful when the SSH access has a problem:

Use USB-UART Bridge on PSoC CY8CKIT-049-42xx Kit

You need miniprog3 to program this, despite typical programming to this kit is via boot loader.

1. Put a SCB UART component. Change baud rate to 9600.
uart_config

2. Assign pins as follows:

UART RX : P4[0]
UART TX : P4[1]

pin_connection

3. And then, here is the main.c source code

4. Build it, program it, and connect the CY8CKIT-049-42xx to the PC.
terminal_screenshot

That’s it.