-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arducam driver #4
Conversation
a8d87e9
to
2a21b66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
31153b0
to
2b89a48
Compare
@MayaAbe のテスト待ち |
1289780
to
a49ae4b
Compare
末尾に改行を加えた結果md5の値が変わっていたので,その部分のみ修正しました |
カメラの動確のためにlibcameraを入れられますか? |
55cee40
to
7b22064
Compare
kirkstone (kernel 5.15.34)で、libcameraを使ってArducam Cameraが動作したので PRを更新しています。
|
Is the library based on https://github.com/ArduCAM/Arducam_dvp? |
I couldn't find license information for the binary file. Do you have it? |
I guess not. |
@@ -0,0 +1,68 @@ | |||
SUMMARY = "Arducam libcamera framework" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more like "Arducam fork of libcamera", no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or if you want to keep the orignal, "Arducam fork of Linux libcamera framework"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will change to "Arducam fork of Linux libcamera framework"
file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ | ||
" | ||
|
||
SRC_URI = " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the diff between this file and the original. Is it still better to fork it instead of overlay?
diff -u meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb ~/work/launch2022/rpi-zero/zero/meta-arducam/recipes-multimedia/libcamera-arducam/libcamera-arducam_0.0.5.bb
--- meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb 2023-09-18 21:42:16.622746910 +0900
+++ /home/yashi/work/launch2022/rpi-zero/zero/meta-arducam/recipes-multimedia/libcamera-arducam/libcamera-arducam_0.0.5.bb 2023-09-18 21:32:04.688421677 +0900
@@ -1,4 +1,4 @@
-SUMMARY = "Linux libcamera framework"
+SUMMARY = "Arducam libcamera framework"
SECTION = "libs"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
@@ -9,16 +9,16 @@
"
SRC_URI = " \
- git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \
+ git://github.com/ArduCAM/libcamera.git;protocol=https;branch=arducam \
"
-SRCREV = "960d0c1e19feaf310321c906e14bd5410c6be629"
+SRCREV = "bde06144d10d4a201e761218ba9169d7a00446e6"
PE = "1"
S = "${WORKDIR}/git"
-DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml"
+DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml arducam-pivariety"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
PACKAGES =+ "${PN}-gst"
@@ -26,10 +26,9 @@
PACKAGECONFIG ??= ""
PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
-LIBCAMERA_PIPELINES ??= "auto"
-
EXTRA_OEMESON = " \
- -Dpipelines=${LIBCAMERA_PIPELINES} \
+ -Dpipelines=rpi/vc4 \
+ -Dipas=rpi/vc4 \
-Dv4l2=true \
-Dcam=enabled \
-Dlc-compliance=disabled \
@@ -46,8 +45,7 @@
}
do_install:append() {
- chrpath -d ${D}${libdir}/libcamera.so
- chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
+ rm -rf ${D}/usr/share
}
addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
@@ -63,10 +61,8 @@
${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}"
}
-FILES:${PN} += " ${libexecdir}/libcamera/v4l2-compat.so"
-FILES:${PN}-gst = "${libdir}/gstreamer-1.0"
+FILES:${PN} += " ${libdir}/v4l2-compat.so ${libdir}/libcamera/ipa*"
# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
# both 32 and 64 bit file APIs.
GLIBC_64BIT_TIME_FLAGS = ""
-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was also wondering if I should overlay with bbapend.
I will try to change to use a bbapend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, do_install fails because the libcamera version targeted by kirkstone's libcamera recipe and
the arducam libcamera version do not match.
So, we forked the recipece from commit below and modified it
zero/meta-arducam/recipes-multimedia/arducam-pivariety/files/arducam_pivariety.pc
Show resolved
Hide resolved
LICENSE = "CLOSED" | ||
|
||
SRC_URI = "\ | ||
file://libarducam_pivariety.so \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create the symlink in do_install()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OKay. will create in do_install()
.
@@ -0,0 +1,34 @@ | |||
SUMMARY = "Arducam pivariety SDK recipe" | |||
SECTION = "libs" | |||
LICENSE = "CLOSED" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the library is non-distributable, we have to do something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm asking the license information in Arducam forum.
https://forum.arducam.com/t/what-is-the-license-for-arducam-pivariety-sdk-dev/5760
zero/meta-arducam/recipes-multimedia/arducam-pivariety/arducam-pivariety_1.0.2.bb
Outdated
Show resolved
Hide resolved
FILES:${PN}-dev = "${libdir}/pkgconfig/arducam_pivariety.pc \ | ||
${includedir}/arducam" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed .hpp
in -dev
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. will fix.
zero/meta-arducam/recipes-multimedia/arducam-pivariety/arducam-pivariety_1.0.2.bb
Outdated
Show resolved
Hide resolved
zero/meta-arducam/conf/layer.conf
Outdated
@@ -6,6 +6,7 @@ BBFILES += "\ | |||
${LAYERDIR}/recipes-devicetree/linux-raspberrypi_%.bbappend \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where to put my comment on the commit log so here goes.
- please check english grammer.
- The arducam_ppa provides packages and there is a package providing a pre-built "binary".
- The word "various" isn't the right word because you are installing
.so
and.hpp
. You should generate the symlink. - this "Libcamera's build system utilizes the first pkgconfig to search for this SDK, so it also installs .pc file." isn't right. libcamera uses pkgconfig (or pkg-config). pkgconfig uses the first matched
.pc
file (if it's true; I haven't tested). - This "It used the following page as a reference for how to install pre-built packages with Yocto." is unbigous. Since we were just talking about "Libcamera's build system", "pkgconfig", or the
.pc
file, the word "it" sounds like referencing one of them. Instead I'm sure you are referencing the.bb
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my take:
zero/meta-arducam: Install libarducam_pivariety.so.1.0.2 from Arducam SDK
This commit adds pre-built libarducam_pivariety.so taken from Arducam SDK.
Arducam has extended libcamera source code and has published it on
GitHub. However, the source code needs libarducam_pivariety.so and
it's header file to build and run.
- https://github.com/ArduCAM/arducam_ppa
arducam-pivariety-sdk-dev(We should add SHA hash or tags where we obtained files)
(We should add list of files taken from the package)Libcamera build system utilizes pkgconfig and pkgconfig utilizes the
first .pc, we are adding the .pc file to -dev package as well.The arducam-pivariety_1.0.2.bb was writen referencing the following
page: "Working with Pre-Built Libraries"
Please update hash value, tags, package name, list of files taken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. will update commit log and add SHA hash.etc.
BTW, if the files are taken from someother places, you don't need to fix it. But please write it down where you've got them from. |
aae9535
to
e6c2d6d
Compare
This commit add a dts overlay file and enable driver to use the Arducam camera. The DTS and driver for the Arducam camera have been merged into the raspberrypi linux kernel as of version 5.15.38 Signed-off-by: KantaTamura <[email protected]> Co-authored-by:: Takuya Sasaki <[email protected]> Signed-off-by: Takuya Sasaki <[email protected]>
If we build with core-image-minimal, we will need to enable some kernel configurations. For configurations that should be enabled by at startup, CONFIG_XX is set to 'y' with reference to the following page. - https://docs.yoctoproject.org/singleindex.html#changing-the-configuration Kernel modules loaded from other drivers are added in layer.conf. Signed-off-by: Takuya Sasaki <[email protected]>
This commit adds pre-built libarducam_pivariety.so taken from Arducam SDK. Arducam has extended libcamera source code and has published it on GitHub. However, the source code needs libarducam_pivariety.so and it's header file to build and run. - repository: https://github.com/ArduCAM/arducam_ppa - package name: arducam-pivariety-sdk-dev - hash: 332543a - file: pool/main/a/arducam-pivariety-sdk-dev/\ arducam-pivariety-sdk-dev_1.0.6_armhf.deb - file lst: usr/include/arducam/arducam_pivariety.hpp usr/lib/libarducam_pivariety.so.1.0.6 usr/lib/pkgconfig/arducam_pivariety.pc Libcamera build system utilizes pkgconfig and pkgconfig utilizes the first .pc, we are adding the .pc file to -dev package as well. The arducam-pivariety_1.0.6.bb was writen referencing the following page: "Working with Pre-Built Libraries" https://docs.yoctoproject.org/dev/dev-manual/prebuilt-libraries.html Signed-off-by: Takuya Sasaki <[email protected]>
This commit adds libcamera library provided by Arducam as repository below. - https://github.com/ArduCAM/libcamera.git In meta-openembedded, there exists the original version receipe of libcamera, but Arducam has independently extended libcamera and published it on gitHub. However, do_install fails because the libcamera version targeted by kirkstone's libcamera recipe and the arducam libcamera version do not match. So, we forked the recipece from commit below and modified it - repository: https://github.com/openembedded/meta-openembedded - hash: d369384 - subject: libcamera: Simplify pipeline configuration Signed-off-by: Takuya Sasaki <[email protected]>
It has been fixed, so dismiss review and merge to master.
arducam driverをyoctoに移植した
動作確認はできていないです