Until you commit the source code to the public branch of AGL (Automotive Grade Linux)

Purpose

This is a memorandum until you commit the source code to the public branch of AGL (Automotive Grade Linux).

Please refer to the following website for AGL.

automotivelinux.org

Last time I launched the public binary of AGL on Raspberry Pi, This time I tried to commit the source code.

Launch AGL UCB 8.0.0 announced on August 22, 2019 with Raspberry Pi 3B +

Preparation

The source code of AGL is open to the public, and anyone can become a Contributor.

Contributor Guidelines Want to Contribute?

First, do the following as described in the Guideline above.

    1. Create an account for linuxfoundation.org
  1. Join the mailing list
    1. Create Gerrit account

Prerequisites

  1. Create an account on identity.linuxfoundation.org to get started.
  2. Join the mailing list.
  3. Setup your Gerrit account, as described in the Gerrit Tutorial from mediawiki

Next, get the source code as follows and read the contents in various ways. Since it is difficult to add functions suddenly, we will check from the perspective of whether we can contribute by fixing expired links or building warnings.

The Easy Way for Commit is also introduced below.

Use-Regression-Testing-to-Make-AGL-Better Easy Way I: • Update outdated documents. Easy Way II: • Remove build error and warning. AGL-REGRESSION-TEST-TEMPLATE

Code acquisition

Repo sync referring to the following.

Repo sync the source code

workflow-download-sw

I was able to get the source code in the following 3 steps. (* Subject to change, please be sure to refer to the above link for details)


1. Define Your Top-Level Directory
$ export AGL_TOP=$HOME/workspace_agl
$ mkdir -p $AGL_TOP

2. Download the repo Tool and Set Permissions
$ mkdir -p ~/bin
$ export PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

3. Download the AGL Source Files: 
$ cd $AGL_TOP
$ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
$ repo sync

Code creation 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.

For example, the following is an example of correcting an expired link. ~ 2. There seems to be.

    1. Prepare a script to check for broken URL links.

Create a python script to check if the link at the specified URL is valid

  1. Get the character string starting with https from the text file on the source code as shown below, Check if the link is broken. You may find broken links in such cases.
$ cd agl-halibut-8.0.1
$ grep -rn "https:" * > out.txt
$ cat out.txt | cut -d '=' -f 2 | cut -d ' ' -f 2 | cut -d '"' -f 2 | grep "https" | grep -v "meta" | grep -v "]" > out2.txt

Preparation for commit

During the AGL code release You will commit to CIAT, a continuous integration rating system.

The following is detailed about CIAT.

Building and testing an automotive platform How to Write Tests for the AGL HW Test Infra 20161210_8th jenkins study session

スクリーンショット 2019-11-09 18.50.57.png

Gerrit Server can be accessed from the following URL.

gerrit.automotivelinux.org Building AGL with the Yocto Project - A Crashcourse -

スクリーンショット 2019-11-09 19.01.35.png

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

commit procedure

As described in the Contributor Guidelines, proceed with the commit of the difference code by referring to the following.

--Prepare to push changes in Gerrit chapter in Contributor Guidelines --Push changes for review to Gerrit chapter in Contributor Guidelines

SSH key generation See Set_Up_SSH_Keys_in_Gerrit

Public key gerrit.automotivelinux.Register with org
 SSH keys
 New SSH key
 add New SSH key
SSH Config Config
 .ssh/Add the following to config
   Host gerrit.automotivelinux.org
     User XXXMyNameXXX
Set the name at the time of git commit
 git config --global user.email "[email protected]"
 git config --global user.name "Your Name"
Commit the difference
 mod
 git add (Modification file)
 git commit --signoff
 > Please sign you commit before you submit the change (otherwise it will not be accepted by gerrit): git commit --signoff
 git review -s
 git review

For the format of the commit message, refer to the rules below (in short, describe the content, JIRA number)

Contributor Guidelines Push changes for review to Gerrit

スクリーンショット 2019-11-09 19.20.22.png

You have successfully approved the commit

When I committed a simple URL link correction, After successfully completing the review, it became a Merged Status.

スクリーンショット 2019-11-09 19.15.56.png

Commit message

It's important to write a Commit message that is a way to tell the other person what changes you have made. It is especially important to communicate your intentions to someone you have never interacted with remotely. How to Write a Git Commit Message

Impressions

While the AGL code is widely available, I think it's great to have a system in place to thoroughly review quality. Also, committing to open source, not just AGL code, will help you broaden your insights. First of all, I think we should gradually contribute from the possible parts.

Error countermeasures

We don't know where your gerrit is. Please manually create a remote
gerrit public key, ssh config

To ssh://gerrit.automotivelinux.org:29418/AGL/meta-agl-devel
 ![remote rejected] HEAD -> refs/publish/master (commit dc81699: not Signed-off-by author/committer/uploader in message footer)
error: failed to push some refs to 

You need to register your public key with gerrit.automotivelinux.org.


Also, please note that if you do not git commit signed off, an error will occur during git review.

git commit signed off

reference

automotivelinux.org Launch AGL UCB 8.0.0 announced on August 22, 2019 with Raspberry Pi 3B + Contributor Guidelines Want to Contribute? Use-Regression-Testing-to-Make-AGL-Better AGL-REGRESSION-TEST-TEMPLATE workflow-download-sw Create a python script to check if the link at the specified URL is valid Building and testing an automotive platform How to Write Tests for the AGL HW Test Infra 20161210_8th jenkins study session gerrit.automotivelinux.org Building AGL with the Yocto Project - A Crashcourse -

Tar.gz and tar.bz2 can be expanded with tar xf. PL2303_64bit_Installer.exe [agl-discussions] Help with SSH password How to Write a Git Commit Message Introduction to Automotive Grade Linux

Summary of how to participate in OSS development that is surprisingly easy to get along with OSS is "another world". That belief changed with my Pull Request.

Recommended Posts

Until you commit the source code to the public branch of AGL (Automotive Grade Linux)
Until you commit the source code to the public branch of AGL (Automotive Grade Linux) 2
Automotive Grade Linux (AGL)
[Introduction to machine learning] Until you run the sample code with chainer
Until you try to let DNN learn the truth of the image using Colab
[Python] Read the source code of Bottle Part 2
[Python] Read the source code of Bottle Part 1
Easy way to check the source of Python modules
A story about porting the code of "Try and understand how Linux works" to Rust