Bonjour,
Voici les scripts que j'utilise pour installer HQPlayer Embedded / NAA sous Fedora.
Ces scripts permettent aussi de compiler automatiquement les drivers ALSA de Diretta.
Les deux scripts doivent être dans le répertoire /home/xxx de Fedora 37.
Le premier sous le nom que vous souhaiterez, le deuxième sous le nom extract-vmlinux.sh
Le driver ALSA de Diretta est téléchargé depuis le site de Diretta.
N'oubliez pas de les rendre exécutables (chmod +x xxxx.sh)
Mise à disposition gracieuse et sans aucune garantie.
À vos risques et périls. Enjoy
et
Voici les scripts que j'utilise pour installer HQPlayer Embedded / NAA sous Fedora.
Ces scripts permettent aussi de compiler automatiquement les drivers ALSA de Diretta.
Les deux scripts doivent être dans le répertoire /home/xxx de Fedora 37.
Le premier sous le nom que vous souhaiterez, le deuxième sous le nom extract-vmlinux.sh
Le driver ALSA de Diretta est téléchargé depuis le site de Diretta.
N'oubliez pas de les rendre exécutables (chmod +x xxxx.sh)
Mise à disposition gracieuse et sans aucune garantie.
À vos risques et périls. Enjoy
Code :
#!/bin/sh
# Install_HQPe
# GPL 2.0
# Mis à disposition sans garantie d'aucune sorte
# bear at forum-hifi.fr
#
RELEASE=$(uname -r)
echo "Current kernel release is: $RELEASE"
USER=$(whoami)
echo "Current user is: $USER"
sudo dnf update
echo ""
echo "You will be offered the opportunity to achieve certain tasks:"
echo "Please choose among the following"
echo ""
echo "LastKernel install the latest version of Fedora Kernel (be careful, as this is 'bleeding edge')"
echo "Diretta: install and compile the Diretta ALSA drivers"
echo "NAA: install HQPlayers's Network Audio Adapter"
echo "HQPe: install HQPlayer Embedded for Fedora"
echo "Network: change parameters of Diretta network interface"
echo "Optimize: remove certain unnecessary services"
echo "reboot"
echo "exit"
echo ""
echo "Which task would you like to achieve?"
select option in "LastKernel" "Diretta" "NAA" "HQPe" "Network" "Optimize" "reboot" "exit" ; do
case $option in
LastKernel )
sudo dnf install fedora-repos-rawhide
sudo dnf upgrade kernel* --enablerepo=rawhide
;;
Diretta )
sudo dnf install -y kernel-devel make dwarves tar zstd rsync curl
cd /home/$USER
/bin/bash /home/$USER/extract-vmlinux.sh /boot/vmlinuz-$RELEASE > vmlinux
sudo cp vmlinux /usr/src/kernels/$RELEASE/.
DIR="/home/$USER/DirettaALSAdriver"
if [ -d "$DIR" ]; then
# Take action if $DIR exists. #
echo "Saving previous DirettaALSAdriver directory"
DIRBAK="/home/$USER/DirettaALSAdriver_backup"
mv $DIR $DIRBAK
fi
# downloading latest version of driver
curl 'https://www.diretta.link/download/DirettaALSAdriver.tar.zst' --output DirettaALSAdriver.tar.zst
# uncompressing Diretta drivers' directory
tar --use-compress-program=unzstd -xvf DirettaALSAdriver.tar.zst
cd DirettaALSAdriver/driver
touch alsa_bridge.c
sudo make KERNELDIR=/usr/src/kernels/$RELEASE/
sudo insmod alsa_bridge.ko
cd /home/$USER
x='\/home\/user'
y="\/home\/$USER"
sed -i -e "s/$x/$y/g" /home/$USER/DirettaALSAdriver/diretta_bridge_driver.service
sed -i -e "s/$x/$y/g" /home/$USER/DirettaALSAdriver/diretta_bridge_host.service
sudo cp /home/$USER/DirettaALSAdriver/diretta_bridge_driver.service /etc/systemd/system
sudo cp /home/$USER/DirettaALSAdriver/diretta_bridge_host.service /etc/systemd/system
sudo systemctl enable diretta_bridge_driver
sudo systemctl enable diretta_bridge_host
;;
NAA )
sudo dnf install https://www.sonarnerd.net/src/fc36/libgmpris-2.2.1-6.fc36.x86_64.rpm
sudo dnf install https://www.signalyst.eu/bins/naa/linux/fc36/networkaudiod-4.4.0-14.fc36.x86_64.rpm
sudo systemctl enable networkaudiod
sudo systemctl start networkaudiod
;;
HQPe )
sudo dnf install https://www.sonarnerd.net/src/fc37/libgmpris-2.2.1-6.fc37.x86_64.rpm
sudo dnf install https://www.signalyst.eu/bins/hqplayerd/fc37/hqplayerd-5.0.3-3.fc37.x86_64.rpm
sudo systemctl enable hqplayerd
sudo systemctl start hqplayerd
read -p "Please enter the password you want to use for HQPlayer's web interface: " PWD
echo ""
echo "The username you will be using is $USER"
echo "The password you entered is: $PWD"
echo "Is this correct ?"
select yn in "Yes" "No" ; do
case $yn in
Yes )
sudo hqplayerd -s $USER $PWD
break ;;
No )
break ;;
esac
done
;;
Network )
nmcli -f DEVICE,TYPE,IP4-CONNECTIVITY,CONNECTION device
read -p "Please enter the interface names you want to bridge together: " ifname1 ifname2
echo "The interface name you entered is: $ifname1 $ifname2"
echo "Is this correct ?"
select yn in "Yes" "No" ; do
case $yn in
Yes )
sudo nmcli con add ifname br0 type bridge con-name br0
sudo nmcli con add type bridge-slave ifname $ifname1 master br0
sudo nmcli con add type bridge-slave ifname $ifname2 master br0
sudo nmcli con mod br0 ipv4.method static ipv4.address 192.168.1.24/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8,8.8.4.4
sudo nmcli con mod br0 ipv6.method link-local ipv6.route-metric 100 connection.autoconnect yes
sudo nmcli con down $ifname1; sudo nmcli con down $ifname2; sudo nmcli con up br0
break ;;
No )
break ;;
esac
done
;;
Optimize )
sudo systemctl disable auditd
sudo systemctl stop firewalld
sudo dnf remove firewalld
sudo dnf remove selinux-policy
sudo systemctl disable systemd-journald
sudo systemctl stop systemd-journald
sudo systemctl disable systemd-oomd
sudo systemctl stop systemd-oomd
sudo systemctl disable systemd-homed
sudo systemctl stop systemd-homed
sudo dnf install dropbear
sudo systemctl enable dropbear
sudo systemctl start dropbear
sudo systemctl disable sshd
sudo systemctl stop sshd
sudo dnf install htop
;;
reboot )
sudo reboot
;;
exit )
exit
;;
esac
done
et
Code :
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
# ----------------------------------------------------------------------
# extract-vmlinux - Extract uncompressed vmlinux from a kernel image
#
# Inspired from extract-ikconfig
# (c) 2009,2010 Dick Streefland <dick@streefland.net>
#
# (c) 2011 Corentin Chary <corentin.chary@gmail.com>
#
# ----------------------------------------------------------------------
check_vmlinux()
{
# Use readelf to check if it's a valid ELF
# TODO: find a better to way to check that it's really vmlinux
# and not just an elf
readelf -h $1 > /dev/null 2>&1 || return 1
cat $1
exit 0
}
try_decompress()
{
# The obscure use of the "tr" filter is to work around older versions of
# "grep" that report the byte offset of the line instead of the pattern.
# Try to find the header ($1) and decompress from here
for pos in `tr "$1\n$2" "\n$2=" < "$img" | grep -abo "^$2"`
do
pos=${pos%%:*}
tail -c+$pos "$img" | $3 > $tmp 2> /dev/null
check_vmlinux $tmp
done
}
# Check invocation:
me=${0##*/}
img=$1
if [ $# -ne 1 -o ! -s "$img" ]
then
echo "Usage: $me <kernel-image>" >&2
exit 2
fi
# Prepare temp files:
tmp=$(mktemp /tmp/vmlinux-XXX)
trap "rm -f $tmp" 0
# That didn't work, so retry after decompression.
try_decompress '\037\213\010' xy gunzip
try_decompress '\3757zXZ\000' abcde unxz
try_decompress 'BZh' xy bunzip2
try_decompress '\135\0\0\0' xxx unlzma
try_decompress '\211\114\132' xy 'lzop -d'
try_decompress '\002!L\030' xxx 'lz4 -d'
try_decompress '(\265/\375' xxx unzstd
# Finally check for uncompressed images or objects:
check_vmlinux $img
# Bail out:
echo "$me: Cannot find vmlinux." >&2