Skip to content

Instantly share code, notes, and snippets.

@Scott31393
Last active December 15, 2023 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Scott31393/de51f45b0b3c8522fb3b3d48ce363899 to your computer and use it in GitHub Desktop.
Save Scott31393/de51f45b0b3c8522fb3b3d48ce363899 to your computer and use it in GitHub Desktop.
Linux Media Subsystem Notes

Linux Media Subsystem Notes

This document resume some notes to start on contributing to the Linux Media Subsystem. Below some good references links from where to start:

Work with Linux Kernel media_stage tree

Some development workflow notes:

 git clone git://linuxtv.org/media_stage.git
 git checkout -b tm/master/media_stage

Pull updates from remote man media_stage tree:

git remote update
git rebase origin/master

Test your tree using build-script

We take as reference the following repo:

https://gitlab.com/tomm.merciai/linux_media_stage

We can test the following repo to check some warning/erro on our dev tree doing the following.

Install required packages:

sudo apt-get install gcc-multilib g++-multilib libgmp-dev libmpfr-dev libmpc-dev \
make texinfo bison flex gettext pahole abi-dumper libssl-dev \
libelf-dev libsqlite3-dev python3-sphinx-rtd-theme dvipng \
meson libasound2-dev libjpeg-dev libudev-dev pkg-config libjson-c-dev \
libqt5opengl5-dev libsdl2-dev libbpf-dev clang doxygen emscripten \
rsync llvm clang libgtk-3-dev

Clone build-scripts repo:

git clone git://linuxtv.org/hverkuil/build-scripts.git

Then:

cp env.tmpl env.sh

Modify env.sh as following:

#!/bin/bash

# Copy this file to env.sh and update this information

# Your main git tree where you keep your in-progress work.
# This will be named 'main'.
myrepo=https://gitlab.com/tomm.merciai/linux_media_stage.git

# Optional: your local git tree where you do your development
# This will be named 'local', so to build a branch from your
# local tree, just specifiy that. E.g.: ./build.sh -test all local/branch
# mylocalrepo=/home/user/path-to-git-repo

# Your name (used in your Signed-off-by)
name="Tommaso Merciai"
# Your email (used in your Signed-off-by)
email="tomm.merciai@gmail.com"

Setup:

./cross.sh setup
./cross.sh all
./build.sh setup

Run test against your main dev branch:

./build.sh -test all main/tm/media_stage/v6.5.0/alvium_drv/v7

Send patchset

Create first a series:

$ git format-patch HEAD -N --subject-prefix="PATCH" --cover-letter -o patches/

If you are fixing first patch resend using v2..vN:

$ git format-patch HEAD -N --subject-prefix="PATCH vN" --cover-letter -o patches/

Then send the series using:

git send-email --cc-cmd='./scripts/get_maintainer.pl --norolestats <patch>' --cc <mail> ./patches/*.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment