Compare commits

...
2 Commits
Author SHA1 Message Date
Oliver Smith 2dddc6d224 temp/calamares-extensions: fork, increase timeout (MR 3280)
Increase the timeout for the PartitionJob from 2 min to 10 min, so it
works on the PinePhone Pro with its 128 GiB eMMC.

Related: https://github.com/calamares/calamares-extensions/pull/20
[ci:skip-vercheck]: forked pkg intentionally not having pkgrel=0
2022-07-11 21:33:01 +02:00
Martijn Braam cbb3def4f0 device-pine64-pinephonepro: backport to stable 2022-07-11 21:32:40 +02:00
16 changed files with 7814 additions and 0 deletions

No files matched your search

@@ -0,0 +1,12 @@
SUBSYSTEMS=="usb", ENV{.LOCAL_ifNum}="$attr{bInterfaceNumber}"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="01", SYMLINK+="EG25.NMEA", MODE="0660"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="02", SYMLINK+="EG25.AT", MODE="0660"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="03", SYMLINK+="EG25.MODEM", MODE="0660"
ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{.LOCAL_ifNum}=="02", RUN+="/usr/bin/pinephone_setup-modem '%E{DEVNAME}'"
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTRS{serial}=="0123456789ABCDEF", ATTR{power/persist}="1", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTRS{serial}=="community_fw", ATTR{power/persist}="1", ATTR{power/control}="on"
@@ -0,0 +1,123 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Martijn Braam <martijn@brixit.nl>
pkgname=device-pine64-pinephonepro
pkgdesc="PINE64 PinePhone Pro"
pkgver=3.2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
# pmb:strict is required for grub
options="!check !archcheck pmb:strict"
depends="
alsa-ucm-conf>=1.2.6.2
eg25-manager>=0.4.2
linux-pine64-pinephonepro
mesa-dri-gallium
postmarketos-base
fwupd
fwupd-plugin-modem_manager
fwupd-plugin-fastboot
"
makedepends="
devicepkg-dev
grub
grub-efi
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
install="
$pkgname.post-install
$pkgname.post-upgrade
"
source="
90-modem-eg25.rules
deviceinfo
grub.cfg
grub_early.cfg
ucm/HiFi.conf
ucm/PINE64-PinePhonePro-.conf
ucm/VoiceCall.conf
ppkb.sh
setup-modem.sh
"
build() {
devicepkg_build $startdir $pkgname
grub-mkimage \
--config="$srcdir/grub_early.cfg" \
--prefix="" \
--output="bootaa64.efi" \
--format="arm64-efi" \
--compression="xz" \
\
all_video \
cat \
configfile \
disk \
echo \
efi_gop \
fat \
gzio \
help \
iso9660 \
linux \
ls \
normal \
part_gpt \
part_msdos \
search \
search_label \
test \
true
}
package() {
devicepkg_package $startdir $pkgname
# Grub / bootloader
install -Dm644 -t "$pkgdir"/boot/grub \
"$srcdir"/grub.cfg
install -Dm644 -t "$pkgdir"/boot/EFI/Boot \
"$srcdir"/bootaa64.efi
# Alsa usecase manager config
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/PinePhonePro \
"$srcdir"/HiFi.conf \
"$srcdir"/PINE64-PinePhonePro-.conf \
"$srcdir"/VoiceCall.conf
mkdir -p "$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card
ln -s /usr/share/alsa/ucm2/PinePhonePro/PINE64-PinePhonePro-.conf \
"$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card/PINE64-PinePhonePro-.conf
# Modem
install -Dm755 "$srcdir"/setup-modem.sh \
"$pkgdir"/usr/bin/pinephone_setup-modem
install -Dm644 "$srcdir"/90-modem-eg25.rules -t \
"$pkgdir"/usr/lib/udev/rules.d/
# Keyboard config
install -Dm755 "$srcdir"/ppkb.sh "$pkgdir"/etc/profile.d/ppkb.sh
}
nonfree_firmware() {
pkgdesc="Wifi, Bluetooth and video-out firmware"
depends="
firmware-pine64-pinebookpro
linux-firmware-brcm
linux-firmware-rockchip
"
mkdir "$subpkgdir"
}
sha512sums="
fdfa807c0de33aee3deb09ee25c37a58fa970ce71483e52f21793717cb89adeb74f251ff1a2c2086361e3e58877f8b2e5643f24186b1a537acf9c16e3419313c 90-modem-eg25.rules
e591572d0bfc4d7d990fcc15bc82e78e60404becf62a38283b4ceee6f49a812b63eebbc5c304907330e33dce5f023edba26c9b86f1375affa3cf6b49fbd06539 deviceinfo
eeddbd3712c7385ef8daea252d71f9f91f8be03be43dea4ce036ae7d7b8a38d199a709ae87b9aa8fe8a63f0201224dbda704fd4b95c8c7d3b4f9852ae4e95c11 grub.cfg
0f9357d4eea089628fbceb1e3e96d21a3f4329aeb6743158a6f877f967ef274506404eba949d5f01b7e1adea149f9a3aef992a5e8cd4181f93ab00909b1c5ecd grub_early.cfg
1684514a6b814a83473e9da8855fd776cf3f31a2be1f8834c370f710428b4ee305559e275be52894d167ccd1e32f8f1c8586f8a072f19e44b46caec9f504d453 HiFi.conf
9c6edbe7ea387baf9bfa6c4a46b28c4fe274ab0994e0a1640012048407e6679c437de43cc50e6778c9a852132eaa680de3fd4e0256d36455d1dd57aa729ac8be PINE64-PinePhonePro-.conf
deb360baf914e1c917403d5e26291b9e9d27426876232ab753e4ebfe367423206f1fc01b85d195aa69fb4b51bcaed023423d0fcc0d73fa1bedd5fbe7b17f0fb5 VoiceCall.conf
43f67e94491791685cdbb4874bb3034b1d297bdf3d23e7405c45ba8c58de72b4fb6a9943b79f46ef7b8f4dbc4d9db254ebec8eb3453d720a5a8fad277c6a9d88 ppkb.sh
420ee1d7522d4d56c2909580fd6ba7580483ca5455b13eb6d22e700063ce0c1a5c6d2f5b161dfce0d777636fe9a712aa82f38a0585f2feabea3785b02bae7515 setup-modem.sh
"
@@ -0,0 +1,3 @@
#!/bin/sh
rc-update add eg25-manager default
@@ -0,0 +1 @@
device-pine64-pinephonepro.post-install
@@ -0,0 +1,28 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="PINE64 PinePhone Pro"
deviceinfo_manufacturer="PINE64"
deviceinfo_codename="pine64-pinephonepro"
deviceinfo_year="2021"
deviceinfo_modules_initfs="gpu_sched dw_wdt fusb302 panel_himax_hx8394 goodix_ts"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="handset"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1440"
deviceinfo_getty="ttyS2;115200"
# Installer related
deviceinfo_dev_internal_storage="/dev/mmcblk0"
deviceinfo_dev_internal_storage_repartition="true"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_boot_filesystem="fat32"
deviceinfo_partition_type="gpt"
@@ -0,0 +1,6 @@
timeout=0
menuentry "postmarketOS" {
linux ($root)/vmlinuz console=tty0 earlycon=uart8250,mmio32,0xff1a0000 console=ttyS2,115200 panic=10 coherent_pool=1M loglevel=1 mem_sleep_default=s2idle PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE fw_devlink=off
initrd ($root)/initramfs
}
@@ -0,0 +1,2 @@
search --no-floppy --set=root --label "pmOS_boot"
set prefix=($root)/grub
@@ -0,0 +1,2 @@
#!/bin/sh
export XKB_DEFAULT_MODEL=ppkb
@@ -0,0 +1,32 @@
#!/bin/sh
log() {
echo "$@" | logger -t "postmarketOS:modem-setup"
}
QMBNCFG_CONFIG="1"
if [ -z "$1" ]
then
DEV="/dev/EG25.AT"
else
DEV="$1"
fi
# Read current config
QMBNCFG_ACTUAL_CONFIG=$(echo 'AT+QMBNCFG="AutoSel"' | atinout - $DEV -)
if echo $QMBNCFG_ACTUAL_CONFIG | grep -q $QMBNCFG_CONFIG
then
log "Modem already configured"
exit 0
fi
# Configure VoLTE auto selecting profile
RET=$(echo "AT+QMBNCFG=\"AutoSel\",$QMBNCFG_CONFIG" | atinout - $DEV -)
if ! echo $RET | grep -q OK
then
log "Failed to enable VoLTE profile auto selecting: $RET"
exit 1
fi
@@ -0,0 +1,278 @@
SectionVerb {
EnableSequence [
# First of all, disable the internal speaker amplifier
cset "name='Internal Speaker Switch' off"
### Based on /codecs/rt5640/EnableSeq.conf ###
# RT5640 default output routing
cset "name='DAC MIXL INF1 Switch' on"
cset "name='DAC MIXR INF1 Switch' on"
cset "name='DAC MIXL Stereo ADC Switch' off"
cset "name='DAC MIXR Stereo ADC Switch' off"
cset "name='Stereo DAC MIXL DAC L1 Switch' on"
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
cset "name='Stereo DAC MIXL DAC L2 Switch' on"
cset "name='Stereo DAC MIXR DAC R2 Switch' on"
cset "name='OUT MIXL DAC L1 Switch' on"
cset "name='OUT MIXR DAC R1 Switch' on"
cset "name='SPK MIXL DAC L1 Switch' on"
cset "name='SPK MIXR DAC R1 Switch' on"
# uncomment to enable swap between AIF1 and AIF2
# warning: can only work with SSP0 firmware enabled
cset "name='SDI select' 0"
cset "name='DAI select' 0"
#cset "name='SDI select' 1"
#cset "name='DAI select' 1"
cset "name='DAC2 Playback Switch' on"
# Input Configuration
cset "name='Stereo ADC1 Mux' ADC"
cset "name='Stereo ADC2 Mux' DMIC1"
cset "name='ADC Capture Switch' on"
cset "name='Mono ADC L1 Mux' ADCL"
cset "name='Mono ADC R1 Mux' ADCR"
cset "name='Mono ADC L2 Mux' DMIC L1"
cset "name='Mono ADC R2 Mux' DMIC R1"
cset "name='Mono ADC Capture Switch' on"
# Set capture volume to 0dB so modem audio doesn't overdrive the ADC
cset "name='ADC Capture Volume' 47"
cset "name='Mono ADC Capture Volume' 47"
# The second 'Mono ADC' path does not have a 'Boost Gain',
# set this to 0dB so that the volume of the AIF1 and AIF2 paths is equal.
cset "name='ADC Boost Gain' 0"
# Set IN1 internal mic boost to 8 (max)
# Set IN2 headset-mic boost to 1, headset mics are quite loud
# Set IN3 (modem audio) boost to 0 as it's already loud enough
cset "name='IN1 Boost' 8"
cset "name='IN2 Boost' 1"
cset "name='IN3 Boost' 0"
# Start with all controls which are used by the individual
# input/output Enable/DisableSequences off
cset "name='RECMIXL BST1 Switch' off"
cset "name='RECMIXR BST1 Switch' off"
# IN2 is headset mic, make sure its route is enabled
cset "name='RECMIXL BST2 Switch' on"
cset "name='RECMIXR BST2 Switch' on"
cset "name='RECMIXL BST3 Switch' off"
cset "name='RECMIXR BST3 Switch' off"
cset "name='Stereo ADC MIXL ADC1 Switch' off"
cset "name='Stereo ADC MIXR ADC1 Switch' off"
cset "name='Stereo ADC MIXL ADC2 Switch' off"
cset "name='Stereo ADC MIXR ADC2 Switch' off"
cset "name='Mono ADC MIXL ADC1 Switch' off"
cset "name='Mono ADC MIXR ADC1 Switch' off"
cset "name='Mono ADC MIXL ADC2 Switch' off"
cset "name='Mono ADC MIXR ADC2 Switch' off"
# Limit amplification factor of earpiece amplifier so sound stays clear
cset "name='Class D SPK Ratio Control' 1.66x"
# Turn off playback switches by default, otherwise both Speaker
# and headphones are playing audio initially until headphones are
# re-inserted.
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
# MONO output is used as IN3 here, so make sure it's disabled
cset "name='Mono Playback Switch' off"
# Set playback volumes to 0dB
cset "name='HP Playback Volume' 31"
cset "name='Speaker Playback Volume' 31"
]
DisableSequence [
# Turn off all output channels
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='HP Channel Switch' off"
cset "name='HPO MIX HPVOL Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
cset "name='Speaker Channel Switch' off"
cset "name='SPOL MIX SPKVOL L Switch' off"
cset "name='SPOL MIX SPKVOL R Switch' off"
# Reset output routing
cset "name='DAC MIXL INF1 Switch' off"
cset "name='DAC MIXR INF1 Switch' off"
cset "name='OUT MIXL DAC L1 Switch' off"
cset "name='OUT MIXR DAC R1 Switch' off"
cset "name='SPK MIXL DAC L1 Switch' off"
cset "name='SPK MIXR DAC R1 Switch' off"
]
Value {
TQ "HiFi"
}
}
SectionDevice."Earpiece" {
Comment "Internal Earpiece"
ConflictingDevice [
"Headphones"
"Speaker"
]
EnableSequence [
cset "name='SPOL MIX SPKVOL L Switch' on"
# for mono speaker we apply left on right
# cset "name='SPOR MIX SPKVOL R Switch' on"
cset "name='SPOL MIX SPKVOL R Switch' on"
cset "name='Speaker Channel Switch' on"
cset "name='Speaker L Playback Switch' on"
cset "name='Speaker R Playback Switch' on"
]
DisableSequence [
cset "name='Speaker Channel Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
]
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId}"
PlaybackMixerElem "Speaker"
PlaybackVolume "Speaker Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Speaker" {
Comment "Internal Speaker"
ConflictingDevice [
"Earpiece"
"Headphones"
]
EnableSequence [
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HP Channel Switch' on"
cset "name='HP L Playback Switch' on"
cset "name='HP R Playback Switch' on"
cset "name='Internal Speaker Switch' on"
]
DisableSequence [
cset "name='Internal Speaker Switch' off"
cset "name='HP Channel Switch' off"
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
]
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Headphones" {
Comment "Headphones"
ConflictingDevice [
"Earpiece"
"Speaker"
]
EnableSequence [
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HP Channel Switch' on"
cset "name='HP L Playback Switch' on"
cset "name='HP R Playback Switch' on"
]
DisableSequence [
cset "name='HP Channel Switch' off"
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
]
Value {
PlaybackPriority 300
PlaybackPCM "hw:${CardId}"
JackControl "Headphones Jack"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Mic" {
Comment "Internal Microphone"
ConflictingDevice [
"Headset"
]
EnableSequence [
cset "name='Mono ADC MIXL ADC2 Switch' on"
cset "name='Mono ADC MIXR ADC2 Switch' on"
cset "name='Stereo ADC MIXL ADC2 Switch' on"
cset "name='Stereo ADC MIXR ADC2 Switch' on"
]
DisableSequence [
cset "name='Mono ADC MIXL ADC2 Switch' off"
cset "name='Mono ADC MIXR ADC2 Switch' off"
cset "name='Stereo ADC MIXL ADC2 Switch' off"
cset "name='Stereo ADC MIXR ADC2 Switch' off"
]
Value {
CapturePriority 100
CapturePCM "hw:${CardId}"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
ConflictingDevice [
"Mic"
]
EnableSequence [
cset "name='Mono ADC MIXL ADC1 Switch' on"
cset "name='Mono ADC MIXR ADC1 Switch' on"
cset "name='Stereo ADC MIXL ADC1 Switch' on"
cset "name='Stereo ADC MIXR ADC1 Switch' on"
]
DisableSequence [
cset "name='Mono ADC MIXL ADC1 Switch' off"
cset "name='Mono ADC MIXR ADC1 Switch' off"
cset "name='Stereo ADC MIXL ADC1 Switch' off"
cset "name='Stereo ADC MIXR ADC1 Switch' off"
]
Value {
CapturePriority 200
CapturePCM "hw:${CardId}"
JackControl "Headphones Jack"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
}
}
@@ -0,0 +1,16 @@
Syntax 4
Comment "PinePhone Pro"
SectionUseCase."HiFi" {
File "/PinePhonePro/HiFi.conf"
Comment "Default"
}
SectionUseCase."Voice Call" {
File "/PinePhonePro/VoiceCall.conf"
Comment "Phone call"
}
Include.card-init.File "/lib/card-init.conf"
Include.ctl-remap.File "/lib/ctl-remap.conf"
Include.codec-init.File "/codecs/rt5640/init.conf"
@@ -0,0 +1,275 @@
SectionVerb {
EnableSequence [
# First of all, disable the internal speaker amplifier
cset "name='Internal Speaker Switch' off"
### Based on /codecs/rt5640/EnableSeq.conf ###
# Get audio only from the microphones, not the system
cset "name='DAC MIXL INF1 Switch' off"
cset "name='DAC MIXR INF1 Switch' off"
cset "name='DAC MIXL Stereo ADC Switch' on"
cset "name='DAC MIXR Stereo ADC Switch' on"
cset "name='Stereo DAC MIXL DAC L1 Switch' on"
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
cset "name='Stereo DAC MIXL DAC L2 Switch' on"
cset "name='Stereo DAC MIXR DAC R2 Switch' on"
cset "name='OUT MIXL DAC L1 Switch' off"
cset "name='OUT MIXR DAC R1 Switch' off"
cset "name='SPK MIXL DAC L1 Switch' off"
cset "name='SPK MIXR DAC R1 Switch' off"
# uncomment to enable swap between AIF1 and AIF2
# warning: can only work with SSP0 firmware enabled
cset "name='SDI select' 0"
cset "name='DAI select' 0"
#cset "name='SDI select' 1"
#cset "name='DAI select' 1"
cset "name='DAC2 Playback Switch' on"
# Input Configuration
cset "name='Stereo ADC1 Mux' ADC"
cset "name='Stereo ADC2 Mux' DMIC1"
cset "name='ADC Capture Switch' on"
cset "name='Mono ADC L1 Mux' ADCL"
cset "name='Mono ADC R1 Mux' ADCR"
cset "name='Mono ADC L2 Mux' DMIC L1"
cset "name='Mono ADC R2 Mux' DMIC R1"
cset "name='Mono ADC Capture Switch' on"
# Set capture volume to 0dB so modem audio doesn't overdrive the ADC
cset "name='ADC Capture Volume' 47"
cset "name='Mono ADC Capture Volume' 47"
# The second 'Mono ADC' path does not have a 'Boost Gain',
# set this to 0dB so that the volume of the AIF1 and AIF2 paths is equal.
cset "name='ADC Boost Gain' 0"
# Set IN1 internal mic boost to 8 (max)
# Set IN2 headset-mic boost to 1, headset mics are quite loud
# Set IN3 (modem audio) boost to 0 as it's already loud enough
cset "name='IN1 Boost' 8"
cset "name='IN2 Boost' 1"
cset "name='IN3 Boost' 0"
# Start with all controls which are used by the individual
# input/output Enable/DisableSequences off
cset "name='RECMIXL BST1 Switch' off"
cset "name='RECMIXR BST1 Switch' off"
# IN2 is headset mic, make sure its routed to the left channel
cset "name='RECMIXL BST2 Switch' on"
cset "name='RECMIXR BST2 Switch' off"
# IN3 is modem audio, route it to the right channel
cset "name='RECMIXL BST3 Switch' off"
cset "name='RECMIXR BST3 Switch' on"
cset "name='Stereo ADC MIXL ADC1 Switch' off"
cset "name='Stereo ADC MIXR ADC1 Switch' off"
cset "name='Stereo ADC MIXL ADC2 Switch' off"
cset "name='Stereo ADC MIXR ADC2 Switch' off"
cset "name='Mono ADC MIXL ADC1 Switch' off"
cset "name='Mono ADC MIXR ADC1 Switch' off"
cset "name='Mono ADC MIXL ADC2 Switch' off"
cset "name='Mono ADC MIXR ADC2 Switch' off"
# Limit amplification factor of earpiece amplifier so sound stays clear
cset "name='Class D SPK Ratio Control' 1.66x"
# Loopback IN3 to earpiece/speaker/headphones
cset "name='OUT MIXR REC MIXR Switch' on"
cset "name='SPK MIXR OUT MIXR Switch' on"
# Send the left channel (microphones) to the modem through DAC L1
cset "name='LOUT MIX DAC L1 Switch' on"
# Don't use DAC R1 nor the OUTVOL blocks as we use them for
# routing audio from the modem
cset "name='LOUT MIX DAC R1 Switch' off"
cset "name='LOUT MIX OUTVOL L Switch' off"
cset "name='LOUT MIX OUTVOL R Switch' off"
# Disable left channel for HP (speaker/headphones) output
# as we're only routing modem audio to the right channel
cset "name='HP L Playback Switch' off"
# Turn off playback switches by default, otherwise both Speaker
# and headphones are playing audio initially until headphones are
# re-inserted.
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
# MONO output is used as IN3 here, so make sure it's disabled
cset "name='Mono Playback Switch' off"
# Set playback volumes to 0dB
cset "name='HP Playback Volume' 31"
cset "name='Speaker Playback Volume' 31"
]
DisableSequence [
# Turn off all output channels
cset "name='HP L Playback Switch' off"
cset "name='HP R Playback Switch' off"
cset "name='HP Channel Switch' off"
cset "name='Speaker L Playback Switch' off"
cset "name='Speaker R Playback Switch' off"
cset "name='Speaker Channel Switch' off"
# Reset output routing
cset "name='DAC MIXL Stereo ADC Switch' off"
cset "name='DAC MIXR Stereo ADC Switch' off"
cset "name='OUT MIXR REC MIXR Switch' off"
cset "name='SPK MIXR OUT MIXR Switch' off"
cset "name='LOUT MIX DAC L1 Switch' off"
# Reset ADC input routing
cset "name='RECMIXL BST2 Switch' off"
cset "name='RECMIXR BST3 Switch' off"
]
Value {
TQ "VoiceCall"
}
}
SectionDevice."Earpiece" {
Comment "Internal Earpiece"
ConflictingDevice [
"Headphones"
"Speaker"
]
EnableSequence [
cset "name='SPOL MIX SPKVOL L Switch' on"
# Send right channel to left as it's mono only
cset "name='SPOL MIX SPKVOL R Switch' on"
cset "name='Speaker Channel Switch' on"
cset "name='Speaker L Playback Switch' on"
]
DisableSequence [
cset "name='Speaker Channel Switch' off"
cset "name='Speaker L Playback Switch' off"
]
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
PlaybackMixerElem "Speaker"
PlaybackVolume "Speaker Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Speaker" {
Comment "Internal Speaker"
ConflictingDevice [
"Earpiece"
"Headphones"
]
EnableSequence [
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HP Channel Switch' on"
cset "name='HP R Playback Switch' on"
cset "name='Internal Speaker Switch' on"
]
DisableSequence [
cset "name='Internal Speaker Switch' off"
cset "name='HP Channel Switch' off"
cset "name='HP R Playback Switch' off"
]
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId}"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Headphones" {
Comment "Headphones"
ConflictingDevice [
"Earpiece"
"Speaker"
]
EnableSequence [
cset "name='HPO MIX HPVOL Switch' on"
cset "name='HP Channel Switch' on"
cset "name='HP R Playback Switch' on"
]
DisableSequence [
cset "name='HP Channel Switch' off"
cset "name='HP R Playback Switch' off"
]
Value {
PlaybackPriority 300
PlaybackPCM "hw:${CardId}"
JackControl "Headphones Jack"
PlaybackMixerElem "HP"
PlaybackVolume "HP Playback Volume"
PlaybackMasterElem "DAC1"
}
}
SectionDevice."Mic" {
Comment "Internal Microphone"
ConflictingDevice [
"Headset"
]
EnableSequence [
cset "name='Stereo ADC MIXL ADC2 Switch' on"
]
DisableSequence [
cset "name='Stereo ADC MIXL ADC2 Switch' off"
]
Value {
CapturePriority 100
CapturePCM "hw:${CardId}"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
ConflictingDevice [
"Mic"
]
EnableSequence [
cset "name='Stereo ADC MIXL ADC1 Switch' on"
]
DisableSequence [
cset "name='Stereo ADC MIXL ADC1 Switch' off"
]
Value {
CapturePriority 200
CapturePCM "hw:${CardId}"
JackControl "Headphones Jack"
CaptureMixerElem "ADC"
CaptureVolume "ADC Capture Volume"
CaptureSwitch "ADC Capture Switch"
}
}
@@ -0,0 +1,81 @@
# Maintainer: Martijn Braam <martijn@brixit.nl>
pkgname=linux-pine64-pinephonepro
pkgver=5.17.9
pkgrel=0
pkgdesc="Mainline kernel for the pinephone pro"
arch="aarch64"
_flavor="${pkgname#linux-}"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-anbox
pmb:kconfigcheck-nftables
pmb:kconfigcheck-containers
pmb:kconfigcheck-zram
"
makedepends="
bison
findutils
flex
gmp-dev
gzip
linux-headers
mpc1-dev
mpfr-dev
openssl-dev
perl
postmarketos-installkernel
rsync
xz
"
case "$CARCH" in
aarch64*) _carch="arm64" ;;
arm*) _carch="arm" ;;
esac
# Source
_config="config-$_flavor.$CARCH"
case $pkgver in
*.*.*) _kernver=${pkgver%.0};;
*.*) _kernver=$pkgver;;
esac
source="
https://gitlab.com/pine64-org/linux/-/archive/ppp-$pkgver/linux-ppp-$pkgver.tar.gz
config-$_flavor.aarch64
"
builddir="$srcdir/linux-ppp-$pkgver"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$CARCH" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))"
}
package() {
mkdir -p "$pkgdir"/boot
make zinstall modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_PATH="$pkgdir"/boot \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs-$_flavor
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
9508e0947a242f83b803e2667247c7a46aa9f602926096f8a98fa90ace297b4be6cd153eb75820c44d8dc2d94d1994560402e93dc2f771ad1719fc4f10c799e2 linux-ppp-5.17.9.tar.gz
1b48dadb51fc17d80cabaa231f546cdb29d463eceed6ac051ddefb937412e51e93a25ff955120bd072767aadbffe58848b6a1992dd33f1b7cd5e7b579d302612 config-pine64-pinephonepro.aarch64
"
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,43 @@
From 517ac0278347e1127bb7ba855c75cffee3f56204 Mon Sep 17 00:00:00 2001
From: Oliver Smith <ollieparanoid@postmarketos.org>
Date: Mon, 11 Jul 2022 08:05:11 +0200
Subject: [PATCH] increase timeout for PartitionJob: 10 min
Increase the PartitionJob's timeout from 2 min to 10 min, as there was
an report of hitting the timeout with the PinePhone Pro's 128 GiB eMMC.
Related: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3280#note_1021536268
---
modules/mobile/PartitionJob.cpp | 2 +-
modules/mobile/wait.qml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/mobile/PartitionJob.cpp b/modules/mobile/PartitionJob.cpp
index 38ca1ae..db2e5bb 100644
--- a/modules/mobile/PartitionJob.cpp
+++ b/modules/mobile/PartitionJob.cpp
@@ -118,7 +118,7 @@ PartitionJob::exec()
const QString pathRoot = "/";
ProcessResult res
- = System::runCommand( System::RunLocation::RunInHost, args, pathRoot, stdInput, chrono::seconds( 120 ) );
+ = System::runCommand( System::RunLocation::RunInHost, args, pathRoot, stdInput, chrono::seconds( 600 ) );
if ( res.getExitCode() )
{
return JobResult::error( "Command failed:<br><br>"
diff --git a/modules/mobile/wait.qml b/modules/mobile/wait.qml
index 9bf561d..0978764 100644
--- a/modules/mobile/wait.qml
+++ b/modules/mobile/wait.qml
@@ -38,7 +38,7 @@ Page
anchors.topMargin: 150
wrapMode: Text.WordWrap
text: "Formatting and mounting target partition. This may" +
- " take up to two minutes, please be patient."
+ " take up to ten minutes, please be patient."
width: 500
}
}
--
2.30.2
+118
View File
@@ -0,0 +1,118 @@
# Forked from Alpine to temporarily add a patch to increase timeout. Remove
# this fork and update the alpine package once the PR is merged and a new
# calamares-extensions release is tagged.
# https://github.com/calamares/calamares-extensions/pull/20
# Do not change arch to noarch, until this bug is resolved:
# https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10022
pkgname=calamares-extensions
pkgver=1.2.1
pkgrel=2
# armhf blocked by qt5-qtdeclarative
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> calamares
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://github.com/calamares/calamares-extensions"
pkgdesc="Calamares Branding and Module Examples"
license="GPL-3.0-or-later"
makedepends="
calamares-dev
qt5-qtsvg-dev
qt5-qtdeclarative-dev
"
source="
https://github.com/calamares/calamares-extensions/releases/download/v$pkgver/calamares-extensions-$pkgver.tar.gz
0001-increase-timeout-for-PartitionJob-10-min.patch
"
options="!check" # has no tests
# Modules and brandings to build:
# https://github.com/calamares/calamares-extensions/tree/calamares/modules
# https://github.com/calamares/calamares-extensions/tree/calamares/branding
_modules="
mobile
"
_brandings="
default-mobile
"
for i in $_modules; do
subpackages="$pkgname-mod-$i:_module $subpackages"
done
for i in $_brandings; do
subpackages="$pkgname-brand-$i:_branding $subpackages"
done
# Check if one module/branding is enabled
# $1: name of module/branding
# $2: either $_modules or $_brandings
is_enabled() {
local i
for i in $2; do
[ "$i" = "$1" ] && return 0
done
return 1
}
# Check if string $1 is in CMakeLists.txt and comment it out
comment_out() {
sed -i "s~$1~#&~g" "$builddir/CMakeLists.txt"
}
prepare() {
default_prepare
local i
msg "disabled modules:"
cd "$builddir/modules"
for i in *; do
if ! [ -d "$i" ] || is_enabled "$i" "$_modules"; then
continue
fi
echo " - $i"
comment_out "calamares_add_module_subdirectory( modules/$i "
done
msg "disabled brandings:"
cd "$builddir/branding"
for i in *; do
if ! [ -d "$i" ] || is_enabled "$i" "$_brandings"; then
continue
fi
echo " - $i"
comment_out "calamares_add_branding_subdirectory( branding/$i "
done
}
build() {
cmake -B build \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
cmake --build build
}
_module() {
local module=${subpkgname##calamares-extensions-mod-}
local path="usr/lib/calamares/modules"
mkdir -p "$subpkgdir/$path"
mv "$pkgdir/$path/$module" "$subpkgdir/$path/$module"
}
_branding() {
local branding=${subpkgname##calamares-extensions-brand-}
local path="usr/share/calamares/branding"
mkdir -p "$subpkgdir/$path"
mv "$pkgdir/$path/$branding" "$subpkgdir/$path/$branding"
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
dae305835656b88fd17a306c21ec49b904ee77d9db34144d29702fb4de9f7cb3eed93e694e0d047722b4ff949f44e99b0e2054eb2d5b4a1645b2e5ead8e81893 calamares-extensions-1.2.1.tar.gz
bf5ba15b6a1a59540f826274056b2aa4d71242882d89ae161babee542c0bdc5c85ffd348957918e96f1cfb93b6007a1b3c5aa0894985a8a80babd7c3907c45f9 0001-increase-timeout-for-PartitionJob-10-min.patch
"