root@odroidxu4:~# fdisk /dev/sda Welcome to fdisk (util-linux 2.25.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0x1ed01c74. Command (m for help): o Created a new DOS disklabel with disk identifier 0x3b80f890. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): First sector (65535-1953525167, default 65535): Last sector, +sectors or +size{K,M,G,T,P} (65535-1953525167, default 1953525167): Created a new partition 1 of type 'Linux' and of size 931.5 GiB. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
et la formater en ext4 :
root@odroidxu4:~# mkfs.ext4 /dev/sda1 mke2fs 1.42.12 (29-Aug-2014) /dev/sda1 alignment is offset by 512 bytes. This may result in very poor performance, (re)-partitioning suggested. Creating filesystem with 244182454 4k blocks and 61046784 inodes Filesystem UUID: 8f99812d-689d-4a29-8b1d-b4110e304869 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done
/archives
et configurer /etc/fstab
pour monter le disque dur au démarrage : UUID=b220106d-cdb1-43a8-9891-5c264bac9775 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 tmpfs /tmp tmpfs defaults,nosuid 0 0 /var/swap none swap sw 0 0 UUID=8f99812d-689d-4a29-8b1d-b4110e304869 /archives ext4 defaults,noatime 0 2
(la commande blkid
affiche le UUID de /dev/sda1
)
rsync -ave ssh 192.168.0.10:/archives/ /archives
root@odroidxu4:~# cat /proc/asound/cards 1 [U20X1 ]: USB-Audio - USB Audio 2.0(X1) Singxer USB Audio 2.0(X1) at usb-1c1d000.usb-1, high speed
Créer /etc/asound.conf
avec les lignes :
pcm.!default { type hw card 1 } ctl.!default { type hw card 1 }
On a deux contrôles de volume sonore dans l'interface Singxer X1 :
/etc/mpd.conf
par ces lignes audio_output { type "alsa" name "Interface USB/SPDIF XMOS" device "plughw:1,0" mixer_type "none" <--- soit cette ligne (ne pas utiliser hardware volume contrôle), soit les 4 lignes suivantes (utiliser hardware volume contrôle) #mixer_type "hardware" #mixer_device "hw:1" #mixer_control "USB Audio 2.0(X1) " <-- un espace à la fin (voir plus bas explication) #mixer_index "1" <--- cela signifie utiliser le deuxième contrôle, la deuxième barre dans la copie d'écran plus haut. }
systemctl status mpd
amixer
donne (voir aussi la copie d'écran de alsamixer
plus haut) root@odroidxu4:~# amixer Simple mixer control 'Singxer Internal Clock Validity',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'USB Audio 2.0(X1) ',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 127 Mono: Front Left: Playback 127 [100%] [0.00dB] [on] Front Right: Playback 127 [100%] [0.00dB] [on] Simple mixer control 'USB Audio 2.0(X1) ',1 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback 0 - 127 Mono: Playback 127 [100%] [0.00dB] [on]
On remarque la ligne Simple mixer control 'USB Audio 2.0(X1) ',1
pour contrôler le volume. Le nom est USB Audio 2.0(X1)
avec un espace à la fin ! Il faut faire attention dans la config de MPD.
friendlyname = UpMpd[OdroidHC1]
et ohproductroom = UpMpd[OdroidHC1]
dans /etc/upmpdcli.conf
.upmpdcli-qobuz
et configurer l'accès dans /etc/upmpdcli.conf
radiolist = /etc/upmpdcli_radiolist
dans /etc/upmpdcli.conf
. Voici /etc/upmpdcli_radiolistupmpdcli-uprcl
et suivre recoll download pour installer une version récente de recoll
et python-recoll
. Installer aussi une dépendance python-bottle
. Configurer uprcl
dans /etc/upmpdcli.conf
apt-get install shairport-sync
apt-get install squeezelite
/sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
et /etc/default/cpufrequtils
.root@odroidxu4:~# systemctl get-default graphical.target root@odroidxu4:~# ls -l /lib/systemd/system/default.target lrwxrwxrwx 1 root root 16 Apr 8 23:45 /lib/systemd/system/default.target -> graphical.target
Chenger-le en multi-user.target :
root@odroidxu4:~# systemctl set-default multi-user.target Created symlink from /etc/systemd/system/default.target to /lib/systemd/system/multi-user.target. root@odroidxu4:~# systemctl get-default multi-user.target root@odroidxu4:~# reboot
timedatectl timedatectl list-timezones timedatectl set-timezone Europe/Paris
systemctl stop ntp.service systemctl disable ntp.service
Créer et activer un timer /etc/systemd/system/time-sync.timer
[Unit] Description=Synchronisation de l'heure [Timer] OnBootSec=60 OnCalendar=*-*-* 23:50:00 Persistent=true [Install] WantedBy=multi-user.target
et créer le service correspondant (pas besoin de l'activer) /etc/systemd/system/time-sync.service
[Unit] Description=Synchronisation de l'heure After=network.target [Service] Type=oneshot ExecStart=/usr/sbin/ntpd -qg
systemctl stop lirc hostapd kbd keyboard-setup remote-fs.target getty@tty1 serial-getty@ttyS0 systemctl disable lirc hostapd kbd keyboard-setup remote-fs.target getty@tty1 serial-getty@ttyS0 systemctl mask serial-getty@ttyS0