Release 260111

This commit is contained in:
Comma Device
2026-01-11 18:23:29 +08:00
commit 3721ecbf8a
2601 changed files with 855070 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
VERSION=0.0.1
obj-m+=panda.o
all: build install
build:
sudo dkms build panda/$(VERSION)
install:
sudo dkms install panda/$(VERSION)
remove:
sudo dkms remove panda/$(VERSION) --all
uninstall:
sudo dkms uninstall panda/$(VERSION)
clean: remove
link:
sudo dkms add `pwd`
unload:
sudo rmmod panda

View File

@@ -0,0 +1,28 @@
# Linux driver
Installs the panda linux kernel driver using DKMS.
This will allow the panda to work with tools such as `can-utils`
## Prerequisites
- `apt-get install dkms gcc linux-headers-$(uname -r) make sudo`
## Installation
- `make all`
- `make link` (optional, setup to build/install when kernel is updated)
## Uninstall
- `make clean`
## Usage
You will need to bring it up using `sudo ifconfig can0 up` or
`sudo ip link set dev can0 up`, depending on your platform.
Note that you may have to setup udev rules for Linux
``` bash
sudo tee /etc/udev/rules.d/11-panda.rules <<EOF
SUBSYSTEM=="usb", ATTRS{idVendor}=="3801", ATTRS{idProduct}=="ddcc", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="3801", ATTRS{idProduct}=="ddee", MODE="0666"
EOF
sudo udevadm control --reload-rules && sudo udevadm trigger
```

View File

@@ -0,0 +1,6 @@
PACKAGE_NAME="panda"
PACKAGE_VERSION="0.0.1"
BUILT_MODULE_NAME[0]="panda"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/panda/"
AUTOINSTALL="yes"

View File

@@ -0,0 +1,2 @@
all:
gcc main.c -o cantest -pthread -lpthread

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
sudo ifconfig can0 up
make
./cantest