Skip to content

Commit 3fd0e3f

Browse files
committed
First steps towards camera support
Enough to make camera available from console. console:/ # libcamera-cam -l Available cameras: 1: 'ov8858' (/base/i2c@ff110000/camera@36) Camera app. preview doesn't work yet. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
1 parent c82bffb commit 3fd0e3f

9 files changed

Lines changed: 671 additions & 1 deletion

aosptree/vendor/devices-community/pine64_pinephonepro/BoardConfig.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ BOARD_VENDOR_SEPOLICY_DIRS += $(BC_PATH)/sepolicy/vendor
1515
BOARD_LIBCAMERA_IPAS := rkisp1
1616
BOARD_LIBCAMERA_PIPELINES := rkisp1
1717

18+
BOARD_LIBCAMERA_EXTRA_TARGETS := \
19+
libetc:libcamera/ipa_rkisp1.so:libcamera:ipa_rkisp1.so: \
20+
libetc:libcamera/ipa_rkisp1.so.sign:libcamera:ipa_rkisp1.so.sign: \
21+
1822
KERNEL_FRAGMENTS := $(BC_PATH)/kernel.config
1923
KERNEL_DEFCONFIG := $(BC_PATH)/pinephone_pro_defconfig
2024

aosptree/vendor/devices-community/pine64_pinephonepro/device.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,19 @@ PRODUCT_PROPERTY_OVERRIDES += \
3838
ro.iio.magn.af8133j.name=AF8133J_Magnetometer \
3939
ro.iio.magn.quirks=no-trig,no-event \
4040

41+
# Camera
42+
PRODUCT_PACKAGES += \
43+
ipa_rkisp1.so \
44+
ipa_rkisp1.so.sign \
45+
46+
LIBCAMERA_CFGS := $(wildcard glodroid/vendor/libcamera/src/ipa/rkisp1/data/*yaml)
47+
PRODUCT_COPY_FILES += $(foreach cfg,$(LIBCAMERA_CFGS),$(cfg):$(TARGET_COPY_OUT_VENDOR)/etc/libcamera/ipa/rkisp1/$(notdir $(cfg))$(space))
48+
49+
4150
PRODUCT_COPY_FILES += \
4251
$(LOCAL_PATH)/etc/modem.pinephonepro.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/modem.pinephonepro.rc \
52+
$(LOCAL_PATH)/etc/uevent.device.rc:$(TARGET_COPY_OUT_VENDOR)/etc/uevent.device.rc \
53+
$(LOCAL_PATH)/etc/camera_hal.yaml:$(TARGET_COPY_OUT_VENDOR)/etc/libcamera/camera_hal.yaml \
4354

4455
PRODUCT_COPY_FILES += \
4556
$(LOCAL_PATH)/etc/audio.pinephonepro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio.pine64_pinephonepro.xml \
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: CC0-1.0
2+
3+
cameras:
4+
"/base/i2c@ff110000/camera@36":
5+
location: back
6+
rotation: 0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Bluetooth
2+
/dev/rfkill 0660 bluetooth bluetooth
3+
4+
# Modem
5+
/dev/ttyUSB0 0660 radio radio
6+
/dev/ttyUSB1 0660 radio radio
7+
/dev/ttyUSB2 0660 radio radio
8+
/dev/ttyUSB3 0660 radio radio
9+
10+
# Sensors
11+
/dev/iio:device0 0660 system system
12+
/dev/iio:device1 0660 system system
13+
/dev/iio:device2 0660 system system
14+
/dev/iio:device3 0660 system system
15+
16+
# Camera
17+
/dev/media* 0660 system camera
18+
/dev/v4l-subdev* 0660 system camera
19+
/dev/video* 0660 system camera

manifests/glodroid.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<project path="glodroid/vendor/mesa3d" remote="aosp" name="platform/external/mesa3d" groups="glodroid" revision="66b438dca11f79a8e54e558a97dc2d10c6b185d2" />
2323

2424
<!-- camera components (vendor) -->
25-
<project path="glodroid/vendor/libcamera" remote="libcamera" name="libcamera.git" groups="glodroid" revision="ea8ae5afff226f9373c82c1a3185e532d5d6eda0" />
25+
<project path="glodroid/vendor/libcamera" remote="libcamera" name="libcamera.git" groups="glodroid" revision="b9ecd85ed1fee2e9d715368b24592ad3009131d8" />
2626
<project path="glodroid/vendor/libcamera/subprojects/libyuv" remote="glodroid" name="glodroid_forks.git" groups="glodroid" revision="refs/tags/libyuv-v0.8.2" />
2727
<project path="glodroid/vendor/libcamera/subprojects/libyaml" remote="github" name="yaml/libyaml.git" groups="glodroid" revision="refs/tags/0.2.5" />
2828

0 commit comments

Comments
 (0)