This is a memorandum until you commit the source code to the public branch of AGL (Automotive Grade Linux). For AGL, see here and Automotive Linux Wiki.
This article is the following updated version
Until you commit the source code to the public branch of AGL (Automotive Grade Linux)
Anyone can send an update request to AGL's public code.
Contributing to the AGL Distro The AGL community appreciates feedback, ideas, suggestion, bugs and documentation just as much as code.
The requested code will be tracked and reviewed through gerrit
.
Contributing Code We use Gerrit to track and review changes to AGL software (i.e. projects at gerrit.automotivelinux.org).
Please refer to the following development documents for details.
Welcome to the Automotive Grade Linux (AGL) documentation. 5_How_To_Contribute
Get the source code referring to the following.
1.Define Your Top-Level Directory
export AGL_TOP=$HOME/AGL
echo 'export AGL_TOP=$HOME/AGL' >> $HOME/.bashrc
mkdir -p $AGL_TOP
2.Download the repo Tool and Set Permissions
mkdir -p $HOME/bin
export PATH=$HOME/bin:$PATH
echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/bin/repo
chmod a+x $HOME/bin/repo
The following is to get the master
branch instead of the stable
branch
3.Cutting-Edge Files: Using the "cutting-edge" AGL files gives you a snapshot of the "master" branch.
cd $AGL_TOP
mkdir master
cd master
repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
repo sync
As with the original article, let's create a commit code from the following perspectives.
Create code for commit It is difficult to add functions suddenly, so check from the perspective of whether you can contribute something by fixing expired links or building warnings.
Make preparations by referring to the original article
At the time of AGL code release You will commit to CIAT, a continuous integration rating system. For more information on CIAT, see below. Building and testing an automotive platform How to Write Tests for the AGL HW Test Infra 20161210_8th jenkins study session
Gerrit Server can be accessed from the following URL.
gerrit.automotivelinux.org Building AGL with the Yocto Project - A Crashcourse -
Gerrit is a review system, and commits are finally merged with Expert Member approval. It also performs an automatic evaluation. On Gerrit, it is described as follows.
CR : Code review
V : Verified
CIB : ci-image-build
CIBT : ci-image-boot-test
Create a Linux Foundation account by referring to the following.
Creating Linux Foundation ID Go to the Linux Foundation ID website.
Create according to the above Document and sign in to Gerrit OK
Access Gerrit by selecting Sign In, and use your new Linux Foundation account ID to sign in.
Next, enable ssh communication with gerrit. Required for commit.
Refer to here and do ssh-keygen
.
Of the generated private key
and public key
, register the public key
on the gerrit side.
As with the original article, refer to here and register the generated public key
in gerrit. (Not private key
)
Finally, add the public key of the generated key pair to the Gerrit server, with the following steps: 1.Go to Gerrit. 2.Click on your account name in the upper right corner. 3.From the pop-up menu, select Settings. 4.On the left side menu, click on SSH Public Keys. 5.Paste the contents of your public key ~/.ssh/id_rsa.pub and click Add key.
Write the following in ~/.ssh/config
so that the correct key pair is used for ssh communication with gerrit.
you need to create a ~/.ssh/config file modeled after the one below. host gerrit.automotivelinux.org HostName gerrit.automotivelinux.org IdentityFile ~/.ssh/id_rsa_automotivelinux_gerrit User
is your Linux Foundation ID and the value of IdentityFile is the name of the public key file you generated.
When the above is completed and the correction file is ready, proceed with commit by referring to the following article.
Refer to the following for the command
Go to the repository you want to modify and check if the remote branch is what you intended (The following is an example of committing to meta-agl)
cd meta-agl
git remote -v
agl https://gerrit.automotivelinux.org/gerrit/AGL/meta-agl (fetch)
agl ssh://gerrit.automotivelinux.org:29418/AGL/meta-agl (push)
Git add
, git commit --sign off
the file to be modified.
git add (File to be modified)
git commit --signoff
> Please sign you commit before you submit the change (otherwise it will not be accepted by gerrit): git commit --signoff
Push to the remote review request branch.
The following is when pushing to the master
branch.
git push agl HEAD:refs/for/master
# git push <remote> HEAD:refs/for/<targetbranch>
As shown in the article below, it is OK if you can confirm the committed content from gerrit
You need to write the Commit message firmly. (It is necessary to describe the update content, JIRA number)
It is important to write a Commit message that is a way to tell the other person what changes you have made. It's especially important to communicate your intentions to someone you've never interacted with remotely. How to Write a Git Commit Message
For example, if you find a bug, you need to check if there is a similar bug in JIRA, issue a new JIRA, and write the number in the commit message.
Reporting bugs If you are a user and you have found a bug, please submit an issue using JIRA. Before you create a new JIRA issue, please try to search the existing items to be sure no one else has previously reported it.
Refer to the following description for the format of commit message
4_Submitting_Changes For example: One commit fixes whitespace issues, another renames a function and a third one changes the code's functionality. An example commit file is illustrated below in detail:
When I committed a simple typo fix, After successfully completing the review, it became a Merged Status.
If you have any questions, I would appreciate it if you could give me some advice.
Automotive Linux Wiki Contributing to the AGL Distro Welcome to the Automotive Grade Linux (AGL) documentation.
Recommended Posts