Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

GPIO SIM #46

wants to merge 5 commits into from

Conversation

Trenton-Ruf
Copy link

  • 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.

Trenton-Ruf and others added 3 commits June 7, 2024 15:00
@Trenton-Ruf Trenton-Ruf self-assigned this Jun 8, 2024
@Trenton-Ruf Trenton-Ruf linked an issue Jun 8, 2024 that may be closed by this pull request
@dmitri-mcguckin dmitri-mcguckin requested a review from ryanpdx June 10, 2024 11:21
@dmitri-mcguckin dmitri-mcguckin added the enhancement New feature or request label Jun 10, 2024
@ThirteenFish ThirteenFish self-requested a review June 10, 2024 18:34
Comment on lines 8 to 14
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
Copy link
Member

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

Copy link
Author

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.

Copy link
Author

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

Comment on lines 8 to 14
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
Copy link
Member

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.

Copy link
Author

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
Copy link
Member

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

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPIO-Sim for development machines
3 participants