Conversation
Trenton-Ruf
commented
Jun 8, 2024
- Script to build and install the Debian Linux kernel with the GPIO-SIM module support.
- Script to parse the C3 device-tree and setup matching simulated GPIO on a development machine.
- Script to tear down the simulated GPIO.
- Script to give user permissions to the simulated GPIO.
Summary clarification
gpio-sim summary in main README
gpio_sim/kernel_build_debian.sh
Outdated
| sudo apt-get update | ||
| sudo apt-get -y install dpkg-dev | ||
| sudo apt-get -y install build-essential fakeroot | ||
| sudo apt-get -y build-dep linux | ||
|
|
||
| # Get linux source | ||
| sudo apt-get -y install linux-source |
There was a problem hiding this comment.
I would avoid apt-get in scripts. A better place would be in the README
There was a problem hiding this comment.
Sure, I'll move them out later today.
gpio_sim/kernel_build_debian.sh
Outdated
| sudo apt-get update | ||
| sudo apt-get -y install dpkg-dev | ||
| sudo apt-get -y install build-essential fakeroot | ||
| sudo apt-get -y build-dep linux | ||
|
|
||
| # Get linux source | ||
| sudo apt-get -y install linux-source |
There was a problem hiding this comment.
This will be a different kernel from what we use. May not matter at long as it is a 5.10 release?
Depends how this is used.
There was a problem hiding this comment.
This is meant to be run on development machines to simulate the C3 GPIO. Unfortunately we can't have matching kernel version to the real C3 because the GPIO-SIM module requires at least version 5.19. So I had it grab the latest kernel instead.
| script_dir=$(dirname "${BASH_SOURCE[0]}") | ||
|
|
||
| # The device tree file to parse | ||
| FILE=$script_dir/../device_trees/oresat-c3-0601.dts |
There was a problem hiding this comment.
If this is running on an OreSat card, you can read from /boot/dtbs/<kernel_verion>/am335x-pocketbeagle.dtbo (it is symbolically linked to correct device tree) rather than hard-coding this
There was a problem hiding this comment.
Since this will be running on a development machine rather than the C3 it needs to grab the dts file.