Bpi-M1 Can Bus - Banana Pi BPI-M1 Manual

Table of Contents

Advertisement

BPI-M1 CAN Bus
BPI-M1 CAN Bus
In order to port can4linux to the BananaPi, the CAN module description is needed from the A20 hardware manual.
can4linux is a character-driver-based Linux driver used already on desktop PCs and embedded platforms like Freescale
FlexCAN (the i.MX series of micro controllers) or Xiliny Zynq.
There is a more detailed document about CAN on the A20 at https://dl.linux-sunxi.org/A20/CAN%20Bus1.pdf
This is a tutorial for using CAN BUS on bananapi with bananian 15-01
Thank selqcir share this example:
Download and install "bananian-1501.img" into 8 GB SDCard.
Expand the root file system using "bananian-config"
Install missing package:
apt-get install git
apt-get update
apt-get upgrade
reboot
Get last bananian available, and continu to install missing package:
git clone https://github.com/Bananian/linux-bananapi
apt-get install build-essential u-boot-tools uboot-mkimage
apt-get install libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot kernel-package zlib1g-dev libncurses5-dev
apt-get install subversion
Build kernel:
cd linux-bananapi
make menuconfig
Exit without saving when menu appears
zcat /proc/config.gz > /root/linux-bananapi/.config
make uImage modules
make INSTALL_MOD_PATH=output modules_install
At this step, kernel should be compiled and "Module.symvers" should be available
Then rename modules and firmware provide by Bananian, and replace by the new one.
mv /lib/modules /lib/modules.old
mv /lib/firmware /lib/firmware.old
mv /root/linux-bananapi/output/lib/modules /lib/modules
mv /root/linux-bananapi/output/lib/firmware /lib/firmware
Same for uImage:
mount /dev/mmcblk0p1 /mnt
cd /mnt
mv uImage uImage.old
mv /root/linux-bananapi/arch/arm/boot/uImage /mnt
reboot
Create link for further build:
20

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents