From patchwork Fri Jan 30 16:02:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26058 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4DC8CC3226 for ; Fri, 30 Jan 2026 16:03:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D294161FD2; Fri, 30 Jan 2026 17:02:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="r5NcM5T9"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C3AE61FC6 for ; Fri, 30 Jan 2026 17:02:57 +0100 (CET) Received: from pb-laptop.local (185.221.142.123.nat.pool.zt.hu [185.221.142.123]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BA6687FA for ; Fri, 30 Jan 2026 17:02:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769788938; bh=JxtA1yPkR9zYQ4tCrWLVsm1VubV1szbBK3wrx0N/Fc8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r5NcM5T9N7FUHnCVG/j4IwMT2CSwBTUBGrZhikEPYZdipsNuf/cnCkvbvHLTNp4Sg S9j69XAgQFdZUxagtxmICVNqPHYcUxILNu0oF6tVEwlg7UhUaE4nRIL33Tci7MLFDH hZUhUpAMzAxYwBrXfRBHoGqWBdpG8Auz3DRnYtFg= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [RFC PATCH v2 1/5] Install `fpm` in the debian 13 container Date: Fri, 30 Jan 2026 17:02:50 +0100 Message-ID: <20260130160254.1770742-2-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> References: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" `fpm` will be used to easily build debian packages. Signed-off-by: Barnabás Pőcze --- .gitlab-ci/setup-container.sh | 6 ++++++ gitlab-ci.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.52.0 diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh index 3506271..c9bae0e 100755 --- a/.gitlab-ci/setup-container.sh +++ b/.gitlab-ci/setup-container.sh @@ -138,6 +138,8 @@ case $FDO_DISTRIBUTION_VERSION in PKGS_LIBCAMERA_RUNTIME+=( g++-13 ) # Sphinx theme for the documentation. PKGS_LIBCAMERA_RUNTIME+=( python3-sphinx-book-theme ) + # For creating debian packages with `fpm` (https://github.com/jordansissel/fpm). + PKGS_LIBCAMERA_RUNTIME+=( ruby ) # libclang-rt-dev for the clang ASan runtime. PKGS_LIBCAMERA_RUNTIME_MULTIARCH+=( libclang-rt-19-dev ) # For the Android camera HAL and the virtual pipeline handler. @@ -277,6 +279,10 @@ Version: ${version} Cflags: -I\${includedir} EOF fi + + if [[ $FDO_DISTRIBUTION_VERSION == 'trixie' ]] ; then + gem install fpm + fi } cbuild_cleanup_pkgs() { diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 3f80cb8..6cc2026 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -70,7 +70,7 @@ include: .libcamera-ci.debian:13: variables: FDO_DISTRIBUTION_VERSION: 'trixie' - FDO_DISTRIBUTION_TAG: '2026-01-23.0' + FDO_DISTRIBUTION_TAG: '2026-01-29.0' .container-debian: extends: From patchwork Fri Jan 30 16:02:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26059 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 43F5DC328F for ; Fri, 30 Jan 2026 16:03:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E1EF461FD6; Fri, 30 Jan 2026 17:03:03 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ko3kXPAq"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 79DFA61FC8 for ; Fri, 30 Jan 2026 17:02:57 +0100 (CET) Received: from pb-laptop.local (185.221.142.123.nat.pool.zt.hu [185.221.142.123]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E9EAA122A for ; Fri, 30 Jan 2026 17:02:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769788939; bh=1nSevJYJ+dbXyVcI7IeB+HP3N/CxOSYSSm/HxXvY3FQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ko3kXPAqO3Clgo7GLHkzXs8C6OHbiuUAwkk8X2hWOiyndwuhaD/BowLjjjZ1xUQ6z Lbiy9qvbdHkhu2sy/0SvTrgX2hPACtyIo6E9mDoHMesMhwd7GGAkcX6bTkj9bLHYGK Yc7AU8yYUF3D3kgVpY8QoD4fZvaNWqE8BjpyWCzA= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [RFC PATCH v2 2/5] Add job to build deb package for libcamera Date: Fri, 30 Jan 2026 17:02:51 +0100 Message-ID: <20260130160254.1770742-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> References: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a job that builds a very specific deb package for testing purposes for the given architectures. Signed-off-by: Barnabás Pőcze --- gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) -- 2.52.0 diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 6cc2026..66f4b5b 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -320,6 +320,54 @@ build-package:cros: - build/build.ninja - libcamera-upstream-9999.tbz2 +# +# Build and package libcamera for the purpose of running tests on a real device. +# + +build-deb-for-lc-compliance-testing: + extends: + - .fdo.distribution-image@debian + - .libcamera-ci.debian:13 + - .libcamera-ci.scripts + stage: build + needs: + - job: container-debian:13 + artifacts: false + variables: + BUILD_TYPE: debug + MESON_OPTIONS: >- + -D prefix=/usr + -D debug=true + -D optimization=2 + -D force_fallback_for="['gtest']" + -D auto_features=disabled + -D udev=enabled + -D lc-compliance=enabled + -D pipelines=rkisp1 + script: + - echo "0.0.0-ci-build-$CI_COMMIT_SHA-job-$CI_JOB_ID-pipeline-$CI_PIPELINE_ID-project-$CI_PROJECT_PATH" > .tarball-version + - $CI_PROJECT_DIR/.gitlab-ci/build-libcamera.sh + - meson install -C build --destdir install + - fpm -s dir -t deb + -C build/install + --architecture "$ARCH" + --package libcamera.deb + --name libcamera + --description "$CI_COMMIT_SHA (job $CI_JOB_ID, pipeline $CI_PIPELINE_ID, project $CI_PROJECT_PATH)" + --version "0.0.0" + artifacts: + when: always + expire_in: 1 week + paths: + - build/meson-logs/ + - build/build.ninja + - "*.deb" + parallel: + matrix: + - ARCH: + - arm64 + + # ------------------------------------------------------------------------------ # Lint stage - Run checkstyle.py and check merge suitability # ------------------------------------------------------------------------------ From patchwork Fri Jan 30 16:02:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26060 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 58577C3226 for ; Fri, 30 Jan 2026 16:03:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0575E61FD2; Fri, 30 Jan 2026 17:03:05 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eQCTNOfQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 931B261FCC for ; Fri, 30 Jan 2026 17:02:57 +0100 (CET) Received: from pb-laptop.local (185.221.142.123.nat.pool.zt.hu [185.221.142.123]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2A81855C for ; Fri, 30 Jan 2026 17:02:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769788939; bh=KnC/Blk0g+5v0j+xZcUdrZ1R3GooZsaoqmUnTvyToVw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eQCTNOfQpUGIjttS0TI04NbsvY9C0fUZPUs9J/3Zb6tC+ENocFIPu1AvUTsNDBQ/Y UlhsOCwI5bpWIp/nB+uWDlmwcpfam7Uy1CdbpRuUmJbAoZhD2iM060AF8G6auftMJy lOyxjU5LdHqMXrr5VAgy/LLeUfTtVE0oLxhJamZQ= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [RFC PATCH v2 3/5] Add job to run lc-compliance via lava Date: Fri, 30 Jan 2026 17:02:52 +0100 Message-ID: <20260130160254.1770742-4-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> References: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a job that runs lc-compliance via lava on real hardware. Signed-off-by: Barnabás Pőcze --- .gitlab-ci/on-device-testing/lava-debix-a.yml | 40 +++++++++++++++++++ gitlab-ci.yml | 36 +++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .gitlab-ci/on-device-testing/lava-debix-a.yml -- 2.52.0 diff --git a/.gitlab-ci/on-device-testing/lava-debix-a.yml b/.gitlab-ci/on-device-testing/lava-debix-a.yml new file mode 100644 index 0000000..4a9b9b6 --- /dev/null +++ b/.gitlab-ci/on-device-testing/lava-debix-a.yml @@ -0,0 +1,40 @@ +device_type: debix-a +job_name: debix-a lc-compliance test + +timeouts: + job: + minutes: 30 + action: + minutes: 5 + connection: + minutes: 6 +priority: medium +visibility: public + +actions: +- boot: + method: minimal + timeout: + minutes: 6 + auto_login: + login_prompt: 'boot2container login:' + username: "root" + password_prompt: "Password:" + password: "root" + prompts: [":~#"] +- test: + interactive: + - name: lc-compliance + prompts: [":~#"] + echo: discard + script: + - command: >- + /opt/test-libcamera.sh + "{{ job.LIBCAMERA_DEB_URL }}" + /base/soc@0/bus@30800000/i2c@30a30000/camera@10 + && echo "lc-compliance test passed" + || echo "lc-compliance test failed" + successes: + - message: "lc-compliance test passed" + failures: + - message: "lc-compliance test failed" diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 66f4b5b..37ffc58 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -355,6 +355,7 @@ build-deb-for-lc-compliance-testing: --name libcamera --description "$CI_COMMIT_SHA (job $CI_JOB_ID, pipeline $CI_PIPELINE_ID, project $CI_PROJECT_PATH)" --version "0.0.0" + - echo "LIBCAMERA_DEB_URL=$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$CI_JOB_ID/artifacts/libcamera.deb" >> env artifacts: when: always expire_in: 1 week @@ -362,11 +363,30 @@ build-deb-for-lc-compliance-testing: - build/meson-logs/ - build/build.ninja - "*.deb" + reports: + dotenv: env parallel: matrix: - ARCH: - arm64 +lava-jobs-as-artifacts: + extends: + - .fdo.distribution-image@debian + - .libcamera-ci.debian:13 + - .libcamera-ci.scripts + stage: build + needs: + - job: container-debian:13 + artifacts: false + variables: + GIT_STRATEGY: none + script: + - echo "saving lava job definitions as artifacts for lava-gitlab-runner" + artifacts: + expire_in: 1w + paths: + - $CI_PROJECT_DIR/.gitlab-ci/on-device-testing/lava-* # ------------------------------------------------------------------------------ # Lint stage - Run checkstyle.py and check merge suitability @@ -470,3 +490,19 @@ test-lc-compliance:virtual: artifacts: reports: junit: build/lc-compliance-report.xml + +test-lc-compliance:rkisp1:debix-a: + stage: test + needs: + - job: lava-jobs-as-artifacts + artifacts: true + - job: build-deb-for-lc-compliance-testing + artifacts: true + parallel: + matrix: + - ARCH: + - arm64 + tags: + - libcamera-lava + script: + - submit .gitlab-ci/on-device-testing/lava-debix-a.yml From patchwork Fri Jan 30 16:02:53 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26061 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9709BC328F for ; Fri, 30 Jan 2026 16:03:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 25A5361FDF; Fri, 30 Jan 2026 17:03:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Q1RlS+HN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C8D6961FCE for ; Fri, 30 Jan 2026 17:02:57 +0100 (CET) Received: from pb-laptop.local (185.221.142.123.nat.pool.zt.hu [185.221.142.123]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 59E467FA for ; Fri, 30 Jan 2026 17:02:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769788939; bh=7nIosdVT1HTFiDkNch7GtjUiPxP9BvOwPLgzHJ2z+Tk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q1RlS+HNCZm3Wzv8Fyvf21bZOAN5EyzE73IS1YJDcHOdnliPuGJfHFCZ9A7reo5rp m6xGxu4lZGjqZ6cvYhn2+1853EMGi+UhTN97rLo7Muhp3sKKWZRJMZ4npYXNk/6ped TFMd0TOUWtxtLeRKWj5edFY3KsPEPLXLp+0W92a8= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [RFC PATCH v2 4/5] Guard hardware testing jobs Date: Fri, 30 Jan 2026 17:02:53 +0100 Message-ID: <20260130160254.1770742-5-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> References: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Use manually triggered jobs, do not run them automatically. Signed-off-by: Barnabás Pőcze --- gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.52.0 diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 37ffc58..5179207 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -57,6 +57,11 @@ include: ref: *templates_sha file: '/templates/debian.yml' +.on-device-testing-guard: + rules: + - if: $ON_DEVICE_TESTING + - when: manual + .libcamera-ci.debian:11: variables: FDO_DISTRIBUTION_VERSION: 'bullseye' @@ -329,6 +334,7 @@ build-deb-for-lc-compliance-testing: - .fdo.distribution-image@debian - .libcamera-ci.debian:13 - .libcamera-ci.scripts + - .on-device-testing-guard stage: build needs: - job: container-debian:13 @@ -375,6 +381,7 @@ lava-jobs-as-artifacts: - .fdo.distribution-image@debian - .libcamera-ci.debian:13 - .libcamera-ci.scripts + - .on-device-testing-guard stage: build needs: - job: container-debian:13 @@ -492,6 +499,8 @@ test-lc-compliance:virtual: junit: build/lc-compliance-report.xml test-lc-compliance:rkisp1:debix-a: + extends: + - .on-device-testing-guard stage: test needs: - job: lava-jobs-as-artifacts From patchwork Fri Jan 30 16:02:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 26062 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E1B7FC3226 for ; Fri, 30 Jan 2026 16:03:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6FBA561FDE; Fri, 30 Jan 2026 17:03:07 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="iHFEVCBe"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0405061FCF for ; Fri, 30 Jan 2026 17:02:58 +0100 (CET) Received: from pb-laptop.local (185.221.142.123.nat.pool.zt.hu [185.221.142.123]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D1AF55C for ; Fri, 30 Jan 2026 17:02:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769788939; bh=B8O1Hzig9CTHv+hyFnQEbslVqByVqv4RDA+lKKCsfjU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iHFEVCBeIX8nMypk6QfT1V8mODouPASr3OORYaS81gS6x07WtuhFXlRbEAKEjsEU7 H68wmg4b+M8tKDkdehT/zOVau/QrAVNwzk1XgQPN5W38/NkP20T+L/4xmma5H/wqjw RWqXaxD5+s7bhel35KPIU0R1Ot6nlAc9Si9rRt/A= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [RFC PATCH v2 5/5] Add description about debian rootfs setup for testing Date: Fri, 30 Jan 2026 17:02:54 +0100 Message-ID: <20260130160254.1770742-6-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> References: <20260130160254.1770742-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a document that describes how the debian based root file system can be built and where it needs to be deployed. Signed-off-by: Barnabás Pőcze --- .../debian-rootfs/build-debian-rootfs.sh | 62 +++++++++++++++++++ containers/debian-rootfs/build.sh | 9 +++ .../overlay/opt/test-libcamera.sh | 18 ++++++ doc/debian-rootfs.rst | 47 ++++++++++++++ 4 files changed, 136 insertions(+) create mode 100755 containers/debian-rootfs/build-debian-rootfs.sh create mode 100755 containers/debian-rootfs/build.sh create mode 100755 containers/debian-rootfs/overlay/opt/test-libcamera.sh create mode 100644 doc/debian-rootfs.rst -- 2.52.0 diff --git a/containers/debian-rootfs/build-debian-rootfs.sh b/containers/debian-rootfs/build-debian-rootfs.sh new file mode 100755 index 0000000..af9db02 --- /dev/null +++ b/containers/debian-rootfs/build-debian-rootfs.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# based on https://gitlab.freedesktop.org/freedesktop/ci-templates/-/blob/fb9d50ccb3cbbb4c6dc5f9ef53a0ad3cb0d8a177/bootstrap/cbuild + +set -ex + +packages=( + # misc. + ca-certificates + coreutils + chrony + curl + iproute2 + kmod + moreutils + openssh-server + v4l-utils + wget + + # runtime dependencies + # ensure that it is in sync with the `build-deb-for-lc-compliance-testing` job + libevent-2.1-7 + libevent-pthreads-2.1-7 + libssl3t64 + libudev1 + libyaml-0-2 + udev +) + +deb_distribution="$1" +deb_arch="$2" +container_image_name="$3" +overlay_dir="$4" + +newcontainer=$(buildah from scratch) +scratchmnt=$(buildah mount "$newcontainer") + +debootstrap --arch="$deb_arch" --variant=minbase "$deb_distribution" "$scratchmnt" + +buildah run --isolation=chroot "$newcontainer" apt update -y +buildah run --isolation=chroot "$newcontainer" apt install -y --no-install-recommends systemd systemd-sysv +buildah run --isolation=chroot "$newcontainer" apt install -y --no-install-recommends "${packages[@]}" +buildah run --isolation=chroot "$newcontainer" bash -c 'printf "root\nroot\n" | passwd root' +buildah run --isolation=chroot "$newcontainer" bash -c 'echo "PermitRootLogin yes" > /etc/ssh/sshd_config.d/10-allow-root-password.conf' +buildah run --isolation=chroot "$newcontainer" apt autoclean -y +buildah run --isolation=chroot "$newcontainer" apt autopurge -y + +buildah run --isolation=chroot "$newcontainer" rm -rf /var/cache/ +buildah run --isolation=chroot "$newcontainer" rm -rf /var/lib/apt/ + +if [[ -d "$overlay_dir" ]]; then + rsync -av --chown=root:root "$overlay_dir/" "$scratchmnt/" +fi + +buildah unmount "$newcontainer" + +buildah config --entrypoint '["/sbin/init"]' "$newcontainer" +buildah config --os linux "$newcontainer" +buildah config --arch "$deb_arch" "$newcontainer" + +buildah commit --format=docker "$newcontainer" "$container_image_name" + +podman image inspect "$container_image_name" diff --git a/containers/debian-rootfs/build.sh b/containers/debian-rootfs/build.sh new file mode 100755 index 0000000..71c9fa2 --- /dev/null +++ b/containers/debian-rootfs/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -ex + +exec buildah unshare ./build-debian-rootfs.sh \ + trixie \ + arm64 \ + localhost/libcamera-ci/debian-rootfs:arm64 \ + ./overlay diff --git a/containers/debian-rootfs/overlay/opt/test-libcamera.sh b/containers/debian-rootfs/overlay/opt/test-libcamera.sh new file mode 100755 index 0000000..a22a17d --- /dev/null +++ b/containers/debian-rootfs/overlay/opt/test-libcamera.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -ex + +pkg_source="$1" +camera_id="$2" + +trap 'rm -rf /tmp/libcamera.deb' EXIT +curl --retry 3 -f -o /tmp/libcamera.deb -- "$pkg_source" +dpkg -i /tmp/libcamera.deb +rm -rf /tmp/libcamera.deb + +env \ + LIBCAMERA_LOG_COLOR=no \ + GTEST_COLOR=no \ + ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \ + UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \ + lc-compliance -c "$camera_id" diff --git a/doc/debian-rootfs.rst b/doc/debian-rootfs.rst new file mode 100644 index 0000000..1cb45a1 --- /dev/null +++ b/doc/debian-rootfs.rst @@ -0,0 +1,47 @@ +.. SPDX-License-Identifier: CC-BY-SA-4.0 + +Creating the root file system for on device testing +=================================================== + +At the moment, the root file system used with boot2container for testing +needs to be built and deployed manually. + +Building +-------- + +Some dependencies that might need to be installed: + + * `buildah`_ + * debootstrap + * rsync + * qemu user emulation for aarch64 with binfmt setup + +.. _buildah: https://buildah.io/ + +Simply ``cd`` into the ``containers/debian-rootfs`` directory, and execute the ``build.sh``: + +.. code:: shell + + $ ./build.sh + +If everything succeeds, a new image tagged as ``localhost/libcamera-ci/debian-rootfs:arm64`` +should be available. + +Deployment +---------- + +The ``localhost/libcamera-ci/debian-rootfs:arm64`` image must be pushed to the internal +registry running alongside the LAVA services. After starting SSH forwarding: + +.. code:: shell + + $ ssh -N -v -L 127.0.0.1:5000:${REGISTRY_LOCAL_ADDR}:5000 ssh://${REGISTRY_REMOTE_ADDR} + +the image must be tagged for the registry and pushed: + +.. code:: shell + + $ podman image tag localhost/libcamera-ci/debian-rootfs:arm64 localhost:5000/libcamera-ci/debian-rootfs-arm64:latest + $ podman image push --tls-verify=false localhost:5000/libcamera-ci/debian-rootfs-arm64 + +Internal documentation describes how to gain access.