forked from WiringPi/WiringPi
-
Notifications
You must be signed in to change notification settings - Fork 29
Porting a New Board
Banana Pi -BPI edited this page Jul 19, 2026
·
2 revisions
Before editing code, obtain all of the following:
- Exact product/module/carrier names and PCB revisions.
- Authoritative schematic or machine-readable pin table.
- Exact kernel DTS/DTB and board
model/compatiblestrings. - Physical pin → net → SoC pad/bank/line → Linux gpiochip/offset mapping.
- Voltage, boot-strap, reserved, board-owned and output-unsafe pin annotations.
If any mapping is ambiguous, record a blocked row instead of guessing.
- Use an alias only when official evidence proves identical carrier wiring and backend behavior.
- Add a new internal model when the header map, bus metadata, backend, voltage or limitations differ.
- Treat module + carrier as the target. Never alias modules solely because they share a connector form factor.
- Detection aliases:
wiringPi/wiringPi_bpi.c - Model IDs and Banana Pi interface declarations:
wiringPi/wiringPi_bpi.h - Model names and backend selection:
wiringPi/wiringPi.c - Header readout:
gpio/readall.c - SoC register/backend code: the relevant source under
wiringPi/
Keep physical, wiringPi and BCM-style arrays aligned with the companion RPi.GPIO repository.
python3 tools/audit-bpi-support.py --peer ../RPi.GPIO
make -C wiringPi
make -C devLib
make -C gpio clean
make -C gpio \
INCLUDE='-I../wiringPi -I../devLib' \
LDFLAGS='' \
LIBS='../wiringPi/libwiringPi.so.3.19 ../devLib/libwiringPiDev.so.3.19 -lpthread -lrt -lm -lcrypt'- Canonical product name plus aliases are documented.
- The product row and status in Complete Board Catalog are updated.
- Detection tests include real Device Tree strings.
-
gpio readallpower/GND/non-GPIO positions match the exact header. - Unsafe pins stay unavailable.
- Unsupported pull/alt/PWM paths return a clear limitation and do not pretend success.
- The companion RPi.GPIO map is updated in the same work unit.
- Hardware evidence names image, kernel, DTB, board and carrier revision.
Continue with Hardware Validation.
Documentation for BPI-SINOVOIP/BPI-WiringPi2 · Verify the exact board, carrier, revision and voltage before driving GPIO.