定制 Raspberry Pi ArchLinuxARM 镜像

Build Environment

 * piimg

piimg 用来 mount pi 的 image 文件

packer -S --noedit --noconfirm piimg-git


 * binfmt-qemu-static

binfmt 可以在 Host 机器上执行不同指令集的二进制文件

packer -S --noedit --noconfirm binfmt-qemu-static


 * qemu-static

qemu-static 作为 binfmt 所需要的二进制解释器

packer -S --noedit --noconfirm qemu-static

增加 archphile repo
[archphile] SigLevel = Never Server = http://archphile.org/repo/arm7

修改 hosts 节省国内 DNS 时间

137.132.155.168 sg2.mirror.archlinuxarm.org 51.254.158.135 archphile.org

在 /boot/config.txt 中打开 DAC 驱动和音频控制所需要的各类总线：

device_tree_param=i2c_arm=on device_tree_param=i2c_vc=on device_tree_param=i2s=on dtoverlay=rpi-dac

 mpd.conf  文件

zeroconf_enabled "no" follow_outside_symlinks        "yes" follow_inside_symlinks "yes" db_file        "/var/lib/mpd/mpd.db" log_file       "/var/log/mpd.log" pid_file       "/var/run/mpd/pid" music_directory        "/var/lib/mpd/music" playlist_directory     "/var/lib/mpd/playlists" state_file     "/var/lib/mpd/mpdstate" bind_to_address        "0.0.0.0" port   "6600" log_level      "default" volume_normalization   "no" audio_buffer_size      "2048" buffer_before_play     "20%" filesystem_charset     "UTF-8" id3v1_encoding "UTF-8" gapless_mp3_playback   "yes" auto_update    "no" mixer_type     "hardware" max_connections "20" restore_paused "no"

decoder { plugin "ffmpeg" enabled "yes" }

input { plugin "curl" }

audio_output { enabled        "yes" type           "alsa" name           "IQAudio+" device         "hw:0,0" mixer_control  "Digital" auto_resample  "no" auto_channels  "no" auto_format    "no" dsd_usb        "yes" }

IMAGE 软件包安装
pacman -S dialog wpa_supplicant iw mpd ympd-archphile proxychains-ng libpulse opus mpd

开发 IMAGE 的包
pacman -S base-devel