-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPIO SIM #46
base: master
Are you sure you want to change the base?
GPIO SIM #46
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid apt-get
in scripts. A better place would be in the README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll move them out later today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved all apt-get
commands to the README 43fb2a9
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this will be running on a development machine rather than the C3 it needs to grab the dts file.