Skip to content

Instantly share code, notes, and snippets.

@jfpastrana
Last active October 29, 2023 17:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfpastrana/0251e7dcace8d21beb142d2a9798ae7f to your computer and use it in GitHub Desktop.
Save jfpastrana/0251e7dcace8d21beb142d2a9798ae7f to your computer and use it in GitHub Desktop.
802.11p-on-arm-linux

802.11p on HummingBoard 2 Edge using Yocto

Summary

This is the instructions for the compilation of a Linux Kernel 4.x with Yocto for a Hummingboard 2 Edge supporting 802.11p. It enables only the necessary packets for the 802.11p layer to work in the tested board.

Syncronizing and compiling the image

To get the BSP you need to have repo installed and use it as:

Install the repo utility:

$: mkdir ~/bin
$: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$: chmod a+x ~/bin/repo

In some Linux distributions repo is also available in the official packages repository.

Download the BSP source:

$: PATH=${PATH}:~/bin
$: mkdir gco-bsp
$: cd gco-bsp
$: repo init -u https://github.com/gcoUVa/v2x-platform.git -b sumo
$: repo sync

At the end of the commands you have every metadata you need to start work with.

To start a simple image build:

$: MACHINE=solidrun-imx6 DISTRO=poky source setup-environment build
$: bitbake core-image-v2x-dev

You can use any directory to host your build.

The source code is at sources folder.

Burning the image into a SD card

Once you have a successful compilation

$: cd tmp/deploy/images/solidrun-imx6/
$: gunzip -c core-image-v2x-dev-solidrun-imx6.wic.gz | sudo dd of=/dev/sdX bs=1M  iflag=fullblock oflag=direct conv=fsync

Downloading wireless-regdb and CRDA into the Hummingboard 2

Boot the HummingBoard from the SDcard and enable the internet connection in the board

Wireles regdb

$: git clone -b its-g5_v1 https://github.com/CTU-IIG/802.11p-wireless-regdb.git
$: scp -r 802.11p-wireless-regdb root@solidrun-imx6:/home/root
root@solidrun:~# cd 802.11p-wireless-regdb
root@solidrun:~# make
root@solidrun:~# make install

CRDA

$: git clone git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git
$: scp -r crda root@solidrun-imx6:/home/root
root@solidrun:~# cd crda
root@solidrun:~# cp /lib/crda/pubkeys/root.key.pub.pem pubkeys #It is sometimes in /usr/lib/crda
root@solidrun:~# make
root@solidrun:~# make install

Testing 802.11p

root@solidrun:~# ip link set wlan0 down
root@solidrun:~# iw dev wlan0 interface add ocb0 type ocb
root@solidrun:~# ip link set ocb0 down
root@solidrun:~# iw reg set DE
root@solidrun:~# ip link set ocb0 up
root@solidrun:~# iw dev ocb0 ocb join 5890 10MHZ
root@solidrun:~# iw dev ocb0 info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment