From 994f559c01cd13c026678d9ec4080417d023ab54 Mon Sep 17 00:00:00 2001 From: Justin Hammond Date: Fri, 18 Aug 2023 22:54:17 +0800 Subject: [PATCH] Updates for PtV (#14) * initial PTV support * Upgrade libinput to 1.23 to fix touchpad problems on PtV * Add Alsa UCM profile for PtV, bump Pipewire Version, Enable Apt Repository for PtV --- .gitignore | 2 +- README.md | 54 ++++++- conf/distro/pinix.conf | 2 +- conf/templates/pinix/bblayers.conf.sample | 2 +- conf/templates/pinix/conf-notes.txt | 9 +- .../packagefeed/sources.list.pinetabv | 2 + recipes-core/packagefeed/packagefeed_1.0.bb | 15 +- .../packagegroup-pinetabv-plasma.bb | 151 ++++++++++++++++++ .../packagegroup-star64-minimal.bb | 5 +- .../packagegroup-star64-plasma.bb | 4 +- .../packagegroup-star64-weston.bb | 4 +- recipes-core/resize-rootfs/resize-rootfs.bb | 2 +- .../star64-image/pinetabv-image-plasma.bb | 19 +++ .../star64-image/star64-image-minimal.bb | 12 +- .../star64-image/star64-image-plasma.bb | 2 + .../libinput/50-system-pinetab.quirks | 6 + recipes-graphics/libinput/libinput_1.23.0.bb | 54 +++++++ .../alsa-ucm-conf/alsa-ucm-conf/HiFi.conf | 58 +++++++ .../alsa-ucm-conf/alsa-ucm-conf/asound.conf | 10 ++ .../alsa-ucm-conf/alsa-ucm-conf/es8316.conf | 29 ++++ .../alsa-ucm-conf/alsa-ucm-conf_%.bbappend | 19 +++ recipes-multimedia/ffmpeg/ffmpeg_%.bbappend | 2 +- ...{pipewire_0.3.70.bb => pipewire_0.3.77.bb} | 24 ++- ...3.70.bbappend => pipewire_0.3.77.bbappend} | 0 recipes-qt/qt5/qtwebengine_%.bbappend | 4 +- .../iio-sensors-proxy_3.4.bb | 34 ++++ recipes-support/sddm/sddm_%.bbappend | 8 +- setup.sh | 2 +- 28 files changed, 512 insertions(+), 23 deletions(-) create mode 100644 recipes-core/packagefeed/packagefeed/sources.list.pinetabv create mode 100644 recipes-core/packagegroups/packagegroup-pinetabv-plasma.bb create mode 100644 recipes-core/star64-image/pinetabv-image-plasma.bb create mode 100755 recipes-graphics/libinput/libinput/50-system-pinetab.quirks create mode 100644 recipes-graphics/libinput/libinput_1.23.0.bb create mode 100644 recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/HiFi.conf create mode 100644 recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/asound.conf create mode 100644 recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/es8316.conf create mode 100644 recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf_%.bbappend rename recipes-multimedia/pipewire/{pipewire_0.3.70.bb => pipewire_0.3.77.bb} (94%) rename recipes-multimedia/pipewire/{pipewire_0.3.70.bbappend => pipewire_0.3.77.bbappend} (100%) create mode 100644 recipes-support/iio-sensors-proxy/iio-sensors-proxy_3.4.bb diff --git a/.gitignore b/.gitignore index 49806aa..15765d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.log *~ -build +build* layers meta-* wip/* diff --git a/README.md b/README.md index 3da8e43..8219b90 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,13 @@ best to find a recipe to include those packages. The Following Images are currently provided: * star64-image-minimal - A CommandLine only image * star64-image-weston - A Weston/Wayland "Demo" image. - * star64-image-plasma- A Plasma Based Image. + * star64-image-plasma - A Plasma Based Image. + * pinetabv-image-plasma - A Plasma Image for the PineTabV All Images contain the necessary patches to the kernel/userspace to support GPU/VPU Acceleration. - The Kernel used is 5.15.107 - This is due to the GPU Model used in Star64 (BXE-4-32 GPU) (img-rouge) driver not available for more recent kernels yet + The [Kernel used is 5.15.107](https://github.com/Fishwaldo/Star64_linux/) - This is due to the GPU Model used in Star64 (BXE-4-32 GPU) (img-rouge) driver not available for more recent kernels yet *Warning* - Right now, these images might be a bit unstable as we finetune the image configurations. Running apt upgrade *might* break things. @@ -35,6 +36,15 @@ Building The Images =================== The images are built using the Yocto Project. +By Default, the images produced are for Star64. You can select different machines by specifing the MACHINE variable as such: + +```bash +export MACHINE= +``` +where can be: + * star64 + * pinetabv + I recommend you build the images in a docker container as there are some dependencies that are dependant upon the host system build tool versions. @@ -52,8 +62,48 @@ You will end up inside the container. From there, you can execute the bitbake co bitbake star64-image-minimal ``` +or + +```bash +MACHINE=pinetabv bitbake pinetabv-image-plasma +``` + *Note: This image depends upon your userid/groupid being 1000, if it is not, you would have to rebuild the image with your custom userid* +## Installing/Building Additional Packages +The images produced have a apt repository configured to allow you to install additional packages not included in the image. (There is currently around 10000+ aditional packages available) +First run +```bash +apt update +``` +and then you can search and install additional packages using apt search/apt install. + +*NOTE* These additional packages are not well tested. If you find a package that does not work, please submit a issue request. + +You can locally build additional packages (if they are included in any of the BitBake Layers we use) with the command: + +```bash +bitbake +``` + +To see what packages are available, you can use the command + +```bash +bitbake-layers show-recipes +``` +or +```bash +bitbake-layers show-recipes | grep +``` + +if a Package is not included, you can see if there are any available reciepes already created at https://layers.openembedded.org/layerindex/branch/master/recipes/ + +If you find a suitable recipe, depending upon its complexity, requirements, dependancies etc, you can either copy the recipe into the meta-pine64 layer, or add the +layer that contains the reciepe using bitbake-layers command. Please consult the Yocto Documentation for more info here. + + + + ## Usernames * root/pine64 diff --git a/conf/distro/pinix.conf b/conf/distro/pinix.conf index ff07a6a..173f84d 100644 --- a/conf/distro/pinix.conf +++ b/conf/distro/pinix.conf @@ -2,7 +2,7 @@ require conf/distro/poky.conf DISTRO = "pinix" DISTRO_NAME = "PinIx" -DISTRO_VERSION = "1.3" +DISTRO_VERSION = "2.0" DISTRO_CODENAME = "pinix" SDK_VENDOR = "-pine64" TARGET_VENDOR = "-pine64" diff --git a/conf/templates/pinix/bblayers.conf.sample b/conf/templates/pinix/bblayers.conf.sample index 334bc54..4ebe358 100644 --- a/conf/templates/pinix/bblayers.conf.sample +++ b/conf/templates/pinix/bblayers.conf.sample @@ -14,7 +14,7 @@ BBLAYERS ?= " \ ##OEROOT##/../meta-openembedded/meta-oe \ ##OEROOT##/../meta-openembedded/meta-python \ ##OEROOT##/../meta-openembedded/meta-networking \ - ##OEROOT##/../meta-openembedded/meta-multimedia \ + ##OEROOT##/../meta-openembedded/meta-filesystems \ ##OEROOT##/../meta-java \ ##OEROOT##/../meta-qt5 \ ##OEROOT##/../yocto-meta-kf5 \ diff --git a/conf/templates/pinix/conf-notes.txt b/conf/templates/pinix/conf-notes.txt index c6664ec..5a0cbbb 100644 --- a/conf/templates/pinix/conf-notes.txt +++ b/conf/templates/pinix/conf-notes.txt @@ -2,14 +2,19 @@ Bitbake Setup for PinIx Using Shared State Cache at pine64.my-ho.st to speed up builds on x86_64 -By Default, this will create binaries/images for the Star64 Device. To build for different platforms, please use MACHINE="" bitbake +By Default, this will create binaries/images for the Star64/PineTabv Device. To build for different platforms, please use MACHINE="" bitbake + +Machines Supported: +* star64 +* pinetabv You can now build. Some sample images: * star64-image-minimal * star64-image-weston * star64-image-plasma +* pinetabv-image-plasma (with MACHINE=pinetabv) Start a build with: -`bitbake ` or `bitbake ` +`bitbake ` or `bitbake ` or `MACHINE=pinetabv bitbake ` diff --git a/recipes-core/packagefeed/packagefeed/sources.list.pinetabv b/recipes-core/packagefeed/packagefeed/sources.list.pinetabv new file mode 100644 index 0000000..895d3fe --- /dev/null +++ b/recipes-core/packagefeed/packagefeed/sources.list.pinetabv @@ -0,0 +1,2 @@ +# Apt Repo is disabled in these test images +deb [signed-by=/etc/apt/trusted.gpg.d/pinix.gpg] https://pine64.my-ho.st:8443/ pinix all riscv64 pinetabv diff --git a/recipes-core/packagefeed/packagefeed_1.0.bb b/recipes-core/packagefeed/packagefeed_1.0.bb index b24a71f..998803e 100644 --- a/recipes-core/packagefeed/packagefeed_1.0.bb +++ b/recipes-core/packagefeed/packagefeed_1.0.bb @@ -6,6 +6,13 @@ SRC_URI:append:star64 = "\ file://sources.list.star64 \ https://pine64.my-ho.st:8443/public-key.asc \ " + +SRC_URI:append:pinetabv = "\ + file://sources.list.pinetabv \ + https://pine64.my-ho.st:8443/public-key.asc \ +" + + SRC_URI[sha256sum] = "8ca5205bcbb703ebe372f40318e748c0b3f1bca64aaf5b8d315eac07e7f95e37" CONFFILES:${PN} += " \ @@ -17,12 +24,18 @@ FILES:${PN} += " \ ${sysconfdir}/apt/trusted.gpg.d/pinix.gpg \ " -do_install:append() { +do_install:star64:append() { install -d ${D}/${sysconfdir}/apt/trusted.gpg.d install -m 644 ${WORKDIR}/sources.list.star64 ${D}/${sysconfdir}/apt/sources.list cat ${WORKDIR}/public-key.asc | gpg --dearmor | tee ${D}/${sysconfdir}/apt/trusted.gpg.d/pinix.gpg } +do_install:pinetabv:append() { + install -d ${D}/${sysconfdir}/apt/trusted.gpg.d + install -m 644 ${WORKDIR}/sources.list.pinetabv ${D}/${sysconfdir}/apt/sources.list + cat ${WORKDIR}/public-key.asc | gpg --dearmor | tee ${D}/${sysconfdir}/apt/trusted.gpg.d/pinix.gpg +} + DEPENDS += " \ gnupg-native \ " \ No newline at end of file diff --git a/recipes-core/packagegroups/packagegroup-pinetabv-plasma.bb b/recipes-core/packagegroups/packagegroup-pinetabv-plasma.bb new file mode 100644 index 0000000..a36c666 --- /dev/null +++ b/recipes-core/packagegroups/packagegroup-pinetabv-plasma.bb @@ -0,0 +1,151 @@ +DESCRIPTION = "Plasma PineTabV Packages" + +PACKAGE_ARCH = "${TUNE_PKGARCH}" + +inherit packagegroup + +PACKAGES = " \ + packagegroup-pinetabv-plasma \ +" +RDEPENDS:packagegroup-pinetabv-plasma = " \ + packagegroup-core-sdk \ + packagegroup-kde-frameworks5 \ + packagegroup-kde-gear \ + packagegroup-star64-minimal \ + alsa-plugins-pulseaudio-conf \ + alsa-ucm-conf \ + bluedevil \ + breeze \ + dbus \ + discover \ + drkonqi \ + clinfo \ + cmake \ + cups \ + firewalld-applet \ + firefox \ + git \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + gstreamer1.0-pipewire \ + gstreamer1.0-omx \ + gstreamer1.0-libav \ + gstreamer1.0-vaapi \ + iio-sensors-proxy \ + kactivitymanagerd \ + kclock \ + kde-cli-tools \ + kdecoration \ + kdeplasma-addons \ + kdeconnect-kde \ + kgamma5 \ + khotkeys \ + kinfocenter \ + kirigami-addons \ + kmenuedit \ + konsole \ + konqueror \ + kpipewire \ + kscreen \ + kscreenlocker \ + ksystemstats \ + kvantum \ + kwayland-integration \ + kweather \ + kwin \ + libkscreen \ + libksysguard \ + liberation-fonts \ + mesa-demos \ + milou \ + pipewire \ + pipewire-alsa \ + pipewire-alsa-card-profile \ + pipewire-modules-access \ + pipewire-modules-adapter \ + pipewire-modules-client-device \ + pipewire-modules-echo-cancel \ + pipewire-modules-fallback-sink \ + pipewire-modules-filter-chain \ + pipewire-modules-link-factory \ + pipewire-modules-loopback \ + pipewire-modules-meta \ + pipewire-modules-metadata \ + pipewire-modules-portal \ + pipewire-modules-profiler \ + pipewire-modules-protocol-pulse \ + pipewire-modules-protocol-simple \ + pipewire-spa-plugins-volume \ + pipewire-spa-plugins-videotestsrc \ + pipewire-spa-plugins-videoconvert \ + pipewire-spa-plugins-v4l2 \ + pipewire-spa-plugins-support \ + pipewire-spa-plugins-meta \ + pipewire-spa-plugins-journal \ + pipewire-spa-plugins-dbus \ + pipewire-spa-plugins-control \ + pipewire-spa-plugins-codec-bluez5-sbc \ + pipewire-spa-plugins-codec-bluez5-faststream \ + pipewire-spa-plugins-bluez5 \ + pipewire-spa-plugins-audiotestsrc \ + pipewire-spa-plugins-audiomixer \ + pipewire-spa-plugins-audioconvert \ + pipewire-spa-plugins-alsa \ + pipewire-spa-plugins-aec-null \ + pipewire-modules-session-manager \ + pipewire-pulse \ + pipewire-spa-tools \ + pipewire-tools \ + pipewire-v4l2 \ + plasma-desktop \ + plasma-integration \ + plasma-nano \ + plasma-nm \ + plasma-pa \ + plasma-workspace \ + plasma-settings \ + plasma-systemmonitor \ + plasma-vault \ + plasma-workspace-wallpapers \ + plasma-firewall \ + plasma-sdk \ + plasma-disks \ + plasma-browser-integration \ + plasma-welcome \ + polkit-kde-agent-1 \ + powerdevil \ + sddm \ + sddm-kcm \ + systemd \ + systemsettings \ + ttf-noto \ + udisks2 \ + upower \ + wayland \ + wings-theme \ + wireplumber \ + wireplumber-modules-default-nodes \ + wireplumber-modules-default-nodes-api \ + wireplumber-modules-default-profile \ + wireplumber-modules-file-monitor-api \ + wireplumber-modules-logind \ + wireplumber-modules-lua-scripting \ + wireplumber-modules-meta \ + wireplumber-modules-metadata \ + wireplumber-modules-mixer-api \ + wireplumber-modules-portal-permissionstore \ + wireplumber-modules-reserve-device \ + wireplumber-modules-si-audio-adapter \ + wireplumber-modules-si-audio-endpoint \ + wireplumber-modules-si-node \ + wireplumber-modules-si-standard-link \ + vlc \ + xdg-desktop-portal-kde \ + xserver-xorg-extension-glx \ + xf86-video-modesetting \ +" + +COMPATIBLE_MACHINE = "pinetabv" \ No newline at end of file diff --git a/recipes-core/packagegroups/packagegroup-star64-minimal.bb b/recipes-core/packagegroups/packagegroup-star64-minimal.bb index 21dbd1f..1067f46 100644 --- a/recipes-core/packagegroups/packagegroup-star64-minimal.bb +++ b/recipes-core/packagegroups/packagegroup-star64-minimal.bb @@ -44,4 +44,7 @@ RDEPENDS:packagegroup-star64-minimal = " \ git \ cmake \ meson \ -" \ No newline at end of file + tree \ +" + +COMPATIBLE_MACHINE = "star64|pinetabv" \ No newline at end of file diff --git a/recipes-core/packagegroups/packagegroup-star64-plasma.bb b/recipes-core/packagegroups/packagegroup-star64-plasma.bb index 36cfc27..3c1095a 100644 --- a/recipes-core/packagegroups/packagegroup-star64-plasma.bb +++ b/recipes-core/packagegroups/packagegroup-star64-plasma.bb @@ -141,4 +141,6 @@ RDEPENDS:packagegroup-star64-plasma = " \ xdg-desktop-portal-kde \ xserver-xorg-extension-glx \ xf86-video-modesetting \ -" \ No newline at end of file +" + +COMPATIBLE_MACHINE = "star64" \ No newline at end of file diff --git a/recipes-core/packagegroups/packagegroup-star64-weston.bb b/recipes-core/packagegroups/packagegroup-star64-weston.bb index 8a4b8e2..a46c0f6 100644 --- a/recipes-core/packagegroups/packagegroup-star64-weston.bb +++ b/recipes-core/packagegroups/packagegroup-star64-weston.bb @@ -16,4 +16,6 @@ RDEPENDS:packagegroup-star64-weston = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)} \ firefox \ mesa-demos \ -" \ No newline at end of file +" + +COMPATIBLE_MACHINE = "star64" diff --git a/recipes-core/resize-rootfs/resize-rootfs.bb b/recipes-core/resize-rootfs/resize-rootfs.bb index 032cf23..510675f 100644 --- a/recipes-core/resize-rootfs/resize-rootfs.bb +++ b/recipes-core/resize-rootfs/resize-rootfs.bb @@ -8,7 +8,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" ALLOW_EMPTY:${PN} = "1" pkg_postinst_ontarget:${PN}() { - root=`lsblk -o NAME,LABEL -r | grep root | awk -F' ' '{print $1}'` + root=$(eval $(lsblk -oMOUNTPOINT,NAME -P -M | grep 'MOUNTPOINT="/"'); echo $NAME) if [[ "$root" == *"mmcblk"* ]]; then echo "Resizing $root partition to fill SDCard..." psplash-write "MSG Resizing $root partition to fill SDCard..." || true diff --git a/recipes-core/star64-image/pinetabv-image-plasma.bb b/recipes-core/star64-image/pinetabv-image-plasma.bb new file mode 100644 index 0000000..727781a --- /dev/null +++ b/recipes-core/star64-image/pinetabv-image-plasma.bb @@ -0,0 +1,19 @@ +SUMMARY = "KDE Plasma image for PineTabV" + +require star64-image-minimal.bb + + +IMAGE_FEATURES += "splash \ + package-management \ + ssh-server-openssh \ + hwcodecs \ +" + +LICENSE = "MIT" + + +IMAGE_INSTALL:append = " \ + packagegroup-pinetabv-plasma \ +" + +COMPATIBLE_MACHINE = "pinetabv" \ No newline at end of file diff --git a/recipes-core/star64-image/star64-image-minimal.bb b/recipes-core/star64-image/star64-image-minimal.bb index 3f33c3f..fed0488 100644 --- a/recipes-core/star64-image/star64-image-minimal.bb +++ b/recipes-core/star64-image/star64-image-minimal.bb @@ -2,6 +2,7 @@ SUMMARY = "A small commandline only image for Star64" inherit core-image extrausers +DEPENDS:append:star64 = " jh7110-spl-tool-native" IMAGE_INSTALL:append = "packagegroup-core-boot \ packagegroup-core-full-cmdline \ @@ -29,5 +30,12 @@ PASSWD = "\$5\$svJwM1eWQPV5bb\$CgKgw8mrSVcZEBPR1re37qeShy/scdk5GMbKZaSln74" EXTRA_USERS_PARAMS = "\ useradd -p '${PASSWD}' pine64; \ usermod -p '${PASSWD}' root; \ - groupmod -a pine64 wheel; \ -" \ No newline at end of file + groupmod -a -U pine64 wheel; \ +" + +# We need to apply a fixup inside of the partition table +IMAGE_CMD:wic:append:star64() { + # Change partition type for mxs processor family + bbnote "Fixing up image for emmc boot" + spl_tool -i -f $out${IMAGE_NAME_SUFFIX}.wic +} \ No newline at end of file diff --git a/recipes-core/star64-image/star64-image-plasma.bb b/recipes-core/star64-image/star64-image-plasma.bb index 9a66882..c5ad995 100644 --- a/recipes-core/star64-image/star64-image-plasma.bb +++ b/recipes-core/star64-image/star64-image-plasma.bb @@ -15,3 +15,5 @@ LICENSE = "MIT" IMAGE_INSTALL:append = " \ packagegroup-star64-plasma \ " + +COMPATIBLE_MACHINE = "star64" \ No newline at end of file diff --git a/recipes-graphics/libinput/libinput/50-system-pinetab.quirks b/recipes-graphics/libinput/libinput/50-system-pinetab.quirks new file mode 100755 index 0000000..2245938 --- /dev/null +++ b/recipes-graphics/libinput/libinput/50-system-pinetab.quirks @@ -0,0 +1,6 @@ +[PineTab2 and PineTabV TouchPad] +MatchVendor=0x1018 +MatchProduct=0x1006 +MatchUdevType=touchpad +MatchBus=usb +AttrEventCode=-BTN_RIGHT \ No newline at end of file diff --git a/recipes-graphics/libinput/libinput_1.23.0.bb b/recipes-graphics/libinput/libinput_1.23.0.bb new file mode 100644 index 0000000..5d11bcc --- /dev/null +++ b/recipes-graphics/libinput/libinput_1.23.0.bb @@ -0,0 +1,54 @@ +SUMMARY = "Library to handle input devices in Wayland compositors" +DESCRIPTION = "libinput is a library to handle input devices in Wayland \ +compositors and to provide a generic X.Org input driver. It provides \ +device detection, device handling, input device event processing and \ +abstraction so minimize the amount of custom input code compositors need to \ +provide the common set of functionality that users expect." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=bab4ac7dc1c10bc0fb037dc76c46ef8a" + +DEPENDS = "libevdev udev mtdev libcheck" + +SRC_URI = "git://gitlab.freedesktop.org/libinput/libinput.git;protocol=https;branch=main \ + file://50-system-pinetab.quirks \ +" + +SRCREV = "0b005eb64b12603e65a620a77c67ec62fd03f413" +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_REGEX = "libinput-(?P\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig lib_package ptest + +# Patch out build directory, otherwise it leaks into ptest binary +do_configure:append() { + sed -i -e "s,${WORKDIR},,g" config.h + if [ -e "litest-config.h" ]; then + sed -i -e "s,${WORKDIR},,g" litest-config.h + fi +} + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" +PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" + +UDEVDIR = "`pkg-config --variable=udevdir udev`" + +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dtests=true -Dinstall-tests=true', '-Dtests=false -Dinstall-tests=false', d)} \ + -Dzshcompletiondir=no" + +do_install:append() { + install -m 0644 ${WORKDIR}/50-system-pinetab.quirks ${D}${datadir}/libinput/ +} + +# package name changed in 1.8.1 upgrade: make sure package upgrades work +RPROVIDES:${PN} = "libinput" +RREPLACES:${PN} = "libinput" +RCONFLICTS:${PN} = "libinput" + +FILES:${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite" \ No newline at end of file diff --git a/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/HiFi.conf b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/HiFi.conf new file mode 100644 index 0000000..05d619d --- /dev/null +++ b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/HiFi.conf @@ -0,0 +1,58 @@ +# Reference: +# https://gitlab.manjaro.org/manjaro-arm/packages/community/pinebookpro-post-install/-/blob/4b4206c57b21044bf9c00848bd1f8b6f710d19eb/asound.state +# https://gitlab.manjaro.org/manjaro-arm/packages/community/pinebookpro-audio/-/blob/1f567db09495acc3beb5405c9ef85c3c07b86785/audio_jack_plugged_in.sh + +SectionDevice."Speaker" { + Comment "Speaker" + + ConflictingDevice [ + "Headphones" + ] + + EnableSequence [ + cset "name='Speaker Switch' on" + ] + + DisableSequence [ + cset "name='Speaker Switch' off" + ] + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId}" + PlaybackMixerElem "Headphone Mixer" + PlaybackMasterElem "DAC" + } +} + +SectionDevice."Mic" { + Comment "Internal Microphone" + + EnableSequence [ + cset "name='Differential Mux' lin1-rin1" + ] + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId}" + CaptureMixerElem "ADC PGA Gain" + CaptureMasterElem "ADC" + } +} + +SectionDevice."Headphones" { + Comment "Headphones" + + ConflictingDevice [ + "Speaker" + ] + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId}" + PlaybackMixerElem "Headphone Mixer" + PlaybackMasterElem "DAC" + JackControl "Headphones Jack" + JackHWMute "Speaker" + } +} diff --git a/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/asound.conf b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/asound.conf new file mode 100644 index 0000000..92474fc --- /dev/null +++ b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/asound.conf @@ -0,0 +1,10 @@ +pcm.!default { + type hw + card Pine64PineTabV + device 1 +} + +ctl.!default { + type hw + card Pine64PineTabV +} diff --git a/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/es8316.conf b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/es8316.conf new file mode 100644 index 0000000..978d4c3 --- /dev/null +++ b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf/es8316.conf @@ -0,0 +1,29 @@ +Syntax 3 + +SectionUseCase."HiFi" { + File "/Pine64/PineTabV/HiFi.conf" + Comment "Play HiFi quality Music" +} + +BootSequence [ + # Disable all outputs + cset "name='Speaker Switch' on" + + # Set HP vol to 0 dB (3/3) + cset "name='Headphone Playback Volume' 2" + # Set HP mixer vol to 0 dB + cset "name='Headphone Mixer Volume' 11" + # Set DAC vol to 0 dB (192/192) + cset "name='DAC Playback Volume' 192" + + # Disable Auto Level Control + cset "name='ALC Capture Switch' off" + # Set ADC vol to 0 dB (192/192) + cset "name='ADC Capture Volume' 192" + # Set Mic amplifier to +16 dB + cset "name='ADC PGA Gain Volume' 7" + + # Setup muxes / switches + cset "name='Left Headphone Mixer Left DAC Switch' on" + cset "name='Right Headphone Mixer Right DAC Switch' on" +] diff --git a/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf_%.bbappend b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf_%.bbappend new file mode 100644 index 0000000..97872c9 --- /dev/null +++ b/recipes-multimedia/alsa-ucm-conf/alsa-ucm-conf_%.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:pinetabv = "\ + file://es8316.conf \ + file://HiFi.conf \ + file://asound.conf \ +" + +do_install:append:pinetabv() { + install -d ${D}${datadir}/alsa/ucm2/Pine64/PineTabV + install -m 0644 ${WORKDIR}/es8316.conf ${D}${datadir}/alsa/ucm2/Pine64/PineTabV/es8316.conf + install -m 0644 ${WORKDIR}/HiFi.conf ${D}${datadir}/alsa/ucm2/Pine64/PineTabV/HiFi.conf + install -d ${D}${datadir}/alsa/ucm2/conf.d/simple-card + cd ${D}${datadir}/alsa/ucm2/conf.d/simple-card + ln -s ../../Pine64/PineTabV/es8316.conf Pine64,PineTabV.conf + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}/asound.conf +} + diff --git a/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend index 804d3d0..bd36acc 100644 --- a/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend +++ b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI:append:riscv64 = "\ +SRC_URI:append:jh7110 = "\ file://0002-add-Starfive-OMX-patches.patch \ " #file://0001-fix-chromium.patch diff --git a/recipes-multimedia/pipewire/pipewire_0.3.70.bb b/recipes-multimedia/pipewire/pipewire_0.3.77.bb similarity index 94% rename from recipes-multimedia/pipewire/pipewire_0.3.70.bb rename to recipes-multimedia/pipewire/pipewire_0.3.77.bb index 56595e7..34b3720 100644 --- a/recipes-multimedia/pipewire/pipewire_0.3.70.bb +++ b/recipes-multimedia/pipewire/pipewire_0.3.77.bb @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = " \ DEPENDS = "dbus ncurses" -SRCREV = "9f7d60c1e84cc0481afc3f6ccf76e127567943a8" +SRCREV = "31cd694602cc37ada3a6d02a5a381f4e3933ecef" SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https" S = "${WORKDIR}/git" @@ -48,7 +48,7 @@ SYSTEMD_PACKAGES = "${PN}" # it just prevents this subproject feature. # # AptX and LDAC are not available in OE. Currently, neither -# are lv2 and ROC. +# are lv2, ROC, and libmysofa. # # The RTKit module is deprecated in favor of the newer RT module. # It still exists for legacy setups that still include it in @@ -66,6 +66,7 @@ EXTRA_OEMESON += " \ -Dbluez5-codec-aptx=disabled \ -Dbluez5-codec-ldac=disabled \ -Dlegacy-rtkit=false \ + -Dlibmysofa=disabled \ " # spa alsa plugin code uses typedef redefinition, which is officially a C11 feature. @@ -87,7 +88,7 @@ PACKAGECONFIG:class-target ??= " \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \ ${PIPEWIRE_SESSION_MANAGER} \ - ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera \ + ${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \ " # "jack" and "pipewire-jack" packageconfigs cannot be both enabled, @@ -100,6 +101,11 @@ PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi" PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac" PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus" +PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3" +# From the pipewire git log: +# "Some Linux phones doesn't use oFono but ModemManager to control the modem." +# This packageconfig enables modemmanager specific code in the BlueZ backend. +PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager" PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native" PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0" @@ -115,6 +121,9 @@ PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,pipewire-jack,jack" PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl" +# Starting with version 0.3.60, readline usage can be turned off in pw-cli. +# If it is disabled, getline() is used as a fallback. +PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline" PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,libsdl2" PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" @@ -241,6 +250,7 @@ PACKAGES =+ "\ ${PN}-modules-meta \ ${PN}-alsa-card-profile \ ${PN}-v4l2 \ + ${PN}-aes67 \ gstreamer1.0-pipewire \ " @@ -255,8 +265,6 @@ FILES:${PN} = " \ ${systemd_user_unitdir} \ ${bindir}/pipewire \ ${bindir}/pipewire-avb \ - ${bindir}/pipewire-aes67 \ - ${sysconfdir}/security/limits.d \ " RRECOMMENDS:${PN}:class-target += " \ @@ -350,6 +358,7 @@ RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf" FILES:${PN}-modules-rt += " \ ${datadir}/pipewire/client-rt.conf \ + ${sysconfdir}/security/limits.d/* \ " CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*" @@ -368,6 +377,11 @@ FILES:${PN}-v4l2 += " \ ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ " +# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES). +FILES:${PN}-aes67 += " \ + ${bindir}/pipewire-aes67 \ +" + FILES:gstreamer1.0-pipewire = " \ ${libdir}/gstreamer-1.0/* \ " diff --git a/recipes-multimedia/pipewire/pipewire_0.3.70.bbappend b/recipes-multimedia/pipewire/pipewire_0.3.77.bbappend similarity index 100% rename from recipes-multimedia/pipewire/pipewire_0.3.70.bbappend rename to recipes-multimedia/pipewire/pipewire_0.3.77.bbappend diff --git a/recipes-qt/qt5/qtwebengine_%.bbappend b/recipes-qt/qt5/qtwebengine_%.bbappend index 4e7ee03..bf35118 100644 --- a/recipes-qt/qt5/qtwebengine_%.bbappend +++ b/recipes-qt/qt5/qtwebengine_%.bbappend @@ -17,4 +17,6 @@ PACKAGECONFIG:append = " icu ffmpeg harfbuzz opus libwebp libvpx libevent libpng #due to broken pkgconfig detection in v8/chromium, it searches the host sysroot and not the target sysroot. Ugly hack. DEPENDS:append:riscv64 = " libwebp-native harfbuzz-native" -COMPATIBLE_MACHINE:riscv64 = "(jh7110)" \ No newline at end of file +COMPATIBLE_MACHINE:riscv64 = "(jh7110)" + +PARALLEL_MAKE:pn-qtwebengine = "-j 10" diff --git a/recipes-support/iio-sensors-proxy/iio-sensors-proxy_3.4.bb b/recipes-support/iio-sensors-proxy/iio-sensors-proxy_3.4.bb new file mode 100644 index 0000000..af7b08d --- /dev/null +++ b/recipes-support/iio-sensors-proxy/iio-sensors-proxy_3.4.bb @@ -0,0 +1,34 @@ +SECTION = "base" +DESCRIPTION = "IIO accelerometer sensor to input device proxy." + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = " \ + git://gitlab.freedesktop.org/hadess/iio-sensor-proxy.git;branch=master;protocol=https \ +" + +SRCREV = "cd6d5e653ef33f6e824e2f7f2ee61e330d4932ac" + +S = "${WORKDIR}/git" + + +inherit meson +inherit gettext +inherit pkgconfig +inherit systemd + +DEPENDS = " \ + udev \ + systemd \ + libgudev \ + polkit \ +" + + +#EXTRA_OEMESON = "--disable-gtk-doc --disable-gtk-tests" + +FILES:${PN} += " \ + ${systemd_unitdir} \ + ${datadir}/polkit-1/actions/ \ +" \ No newline at end of file diff --git a/recipes-support/sddm/sddm_%.bbappend b/recipes-support/sddm/sddm_%.bbappend index 78c4224..f0ce25f 100644 --- a/recipes-support/sddm/sddm_%.bbappend +++ b/recipes-support/sddm/sddm_%.bbappend @@ -5,9 +5,15 @@ SRC_URI:append:star64 = "\ file://sddm.conf \ " +SRC_URI:append:pinetabv = "\ + file://sddm.conf \ +" + CONFFILES:${PN} += "${sysconfdir}/sddm.conf" FILES:${PN} += "${sysconfdir}/sddm.conf" do_install:append() { install -m 644 ${WORKDIR}/sddm.conf ${D}/${sysconfdir}/ -} \ No newline at end of file +} + +COMPATIBLE_MACHINE = "(star64|pinetabv)" diff --git a/setup.sh b/setup.sh index 632c08b..962bea7 100755 --- a/setup.sh +++ b/setup.sh @@ -25,7 +25,7 @@ echo "Setting up PinIx Yocto Build" declare -A layers layers['poky']='git://git.yoctoproject.org/poky|kirkstone|4cc0e9438b450b43749730e128b6b9adb30f9663' layers['meta-openembedded']='https://github.com/openembedded/meta-openembedded|kirkstone|571e36e20e9d1f27af0eb4545291beeb64f280e2' -layers['meta-riscv']='https://github.com/Fishwaldo/meta-riscv.git|master|2a27909f0d3655f563464b6abb14b471944105eb' +layers['meta-riscv']='https://github.com/Fishwaldo/meta-riscv.git|master|8ab08c866bd6e86c51679d4825ebe4d290fa2419' layers['meta-qt5']='https://github.com/meta-qt5/meta-qt5.git|master|cf6ffcbad5275a3428f6046468a0c9d572e813d1' layers['yocto-meta-kf5']='https://github.com/Fishwaldo/yocto-meta-kf5.git|master|104abe6793180bac03f36fb59355abc8778e3ffd' layers['yocto-meta-kde']='https://github.com/Fishwaldo/yocto-meta-kde.git|master|1ba0b84e783b4a5ec83cf883181622538566eb9c'