This is Project Shodan, a project to research the fusion of novel hardware and software architectures to produce a low-power, ambient AI core. For more information, see our internal site at sites/cerebrahardware/shodan.
We've stored our code in Gerrit, and like the Android developers before us, we use repo
to manage the projects in our Gerrit repositories.
To get started, first make sure you have a Git login for all our projects by going to googlesource.com/new-password and pasting the provided script into a terminal.
Now you need to pull down a copy of the repo
tool from our public facing sites and add it to your path:
mkdir -p bin export PATH=$PATH:$HOME/bin curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
Make sure you've initialized git with your name and email address, and have configured it properly for fetching the sources:
git config --global user.name "Your Name" git config --global user.email "you@example.com"
Once you‘ve done this, you’re actually ready to check out the sources. Make a new directory where you'd like it to live, and initialize repo
with the current release branch.
repo init -u https://spacebeaker.googlesource.com/shodan/manifest -g default,internal repo sync -j$(nproc)
In general, working with repo is relatively simple:
repo start ${TOPICNAME}
git add -A
and commit with git commit
.repo upload --re ${REVIEWER} --cc ${CC_LIST}
repo sync -j$(nproc)
to update.repo prune
to remove your topic branch.For more information on how to use repo and git effectively, take a look at the official documentation.
repo sync -j$(nproc)
Then if you have any outstanding branches, a repo rebase
will help.
To upload a branch to gerrit for review, do this:
repo upload --re reviewer1,reviewer2 --cc email@host.com,email2@host2.com
Reviewers can be specified as usernames or full email addresses, likewise for --cc
.
Repo will then output a URL for you to visit that allows you to make comments and abandon and merge the changes into the repository. To make changes during the review process, make your changes to the files, then:
git add -A # To add the files you've changed git commit --amend # To update the previous change repo upload -t --re ${REVIEWER} --cc ${CC_LIST} # To upload the change to Gerrit for review
Our layout is pretty simple:
Contains all of the source code and RTL required to build the Shodan hardware, as well as simulate it in Verilator.
Contains build scripts for the whole tree. This is effectively just an orchestration layer to make building the whole shebang easier. Each subtree may have its own build systems and have their own ways of building.
Contains continuous integration scripts and tooling for Jenkins, our CI/CD tool.
Lots of extra documentation (we hope) about how the repo is laid out, how the build system works, code reviews, licensing, etc.
The repo manifest used to glue all the git repositories together.
Contains utility scripts to help automate a few things.