Giter Site home page Giter Site logo

libcamera-builder's Introduction

Cross compilation environment for libcamera for the RPi Bullseye OS

This will let you build a cross compilation docker image, and use it to compile libcamera for the RPi, and the package it up in a deb file to send to your RPi. A meson cross file will be automatically generated inside the debian bullseye environment.

Setting up your working directory

Make the directory

mkdir libcamera-raspi; cd libcamera-raspi

Download this repo

git clone https://github.com/CactiChameleon9/Libcamera-RPiOS-Build-Enviroment ./

Clone the libcamera sources

git clone https://git.libcamera.org/libcamera/libcamera.git

Building and installing

Build your cross compile docker image: (TODO: make a prebuilt image to pull)

sudo docker build -t libcamera/debian/bullseye-cross-arm64 - < Dockerfile

Run a shell in the new docker image in your working directory (containing libcamera and your mountpoint)

sudo docker run -v "$PWD":"$PWD" -w "$PWD" --rm -it libcamera/debian/bullseye-cross-arm64

Enter your libcamera sources directory

cd libcamera

Configure meson to perform the cross build

meson build/rpi/bullseye --cross-file /usr/share/meson/arm64-cross

(Cross-compile) Build libcamera at host compile speeds

ninja -C ./build/rpi/bullseye/

Building the deb package

sudo DESTDIR=$(readlink -f ../libcamera-raspi-debian) ninja -C ./build/rpi/bullseye install

cd ../

sudo dpkg -b libcamera-raspi-debian

Installing your built deb file

  • You should find a libcamera-raspi-debian.deb file in your working directory, you need to transfer this to your raspberry pi and install it
  • I personally would use sftp with a graphical file manager such as nautilus, but cloud storage, ftp, transfer.sh etc. could work too
  • To install the deb file, simply run sudo apt install ./libcamera-raspi-debian.deb in the directory of your transfered deb file

libcamera-builder's People

Contributors

cactichameleon9 avatar kbingham avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.