Skip to content
/ rOS Public
forked from rern/rOS

Cubieboard2 audio player derived from rOs which is original for Raspberry Pi

Notifications You must be signed in to change notification settings

jazzi/rOS

 
 

Repository files navigation


Instructions to build rAudio on Cubieboard2

  1. Follow Installation guide on ArchLinuxARM.org
  2. Insert SD Card into cubieboard2, power on and login by ssh, user alarm:alarm and root:root
  3. Set your mirror by edit /etc/pacman.d/mirrorlist and add server Server = https://mirrors.bfsu.edu.cn/archlinuxarm/$arch/$repo
  4. echo noarp >> /etc/dhcpcd.conf
  5. echo DNSSEC=no >> /etc/systemd/resolved.conf
  6. rm -r /etc/systemd/system/network-online.target.wants
  7. systemctl start systemd-random-seed
  8. echo kid3-common samba snapcast camilladsp camillagui-backend chromium matchbox-window-manager plymouth-lite-rbp upower xf86-video-fbturbo spotifyd upmpdcli > /boot/features
  9. Create file /boot/versions and add following contents:
version=1
release=20220610 # check the release you want
  1. create two dummy files /boot/config.txt0 and /boot/cmdline.txt0, many rAudio scripts will grep it
  2. UTF-8 support on the target:
  • enable en_US.UTF-8 in /etc/locale.gen
  • run locale-gen
  • sudo localectl set-locale en_US.UTF-8
  1. on the target download and run create-ros.sh as root, please aware the password for root is changed to ros now
  2. set the timezone by timedatectl set-timezone Asia/Shanghai
  3. change taskset from 3 to 0 in /etc/systemd/system/mpd.service.d/override.conf otherwise will get a tastset error when checking systemctl status mpd.service, because taskset -c 3 means use the forth CPU core and Cubieboard2's A20 has two CPU cores only
  4. add user alarm and mpd to group audio by sudo usermod --append --groups audio alarm mpd
  5. unmute by alsamixer, then test the sound by aplay /usr/share/sound/alsa/Front_Center.wav
  6. check how the system starting up by journalctl -e --no-hostname and fix issues as they come
  7. logout ssh and input cubieboard2's IP address in browser to configure and control rAudio
  8. create images, follow original instructions below

Credit: many thanks to @fillods on post rAudio-1 running on BeagleBone Black and @rern creates so great music player rAudio-1


rOS - DIY rAudio

Build rAudio - Audio player and renderer for Raspberry Pi

  • For all Raspberry Pis:
  • Create rAudio from latest releases of Arch Linux Arm
  • Interactive interface
  • Options:
    • Run ROOT partition on USB drive
    • Run on USB only - no SD card (boot from USB)
    • Pre-configure Wi-Fi connection (headless mode)
    • Exclude features (can be as light as possible in terms of build time and disk space)
  • Take less than 15 minutes for the whole process with a decent download speed.

Procedure

  • Prepare partitions
    • Create BOOT and ROOT partitions
  • Create Arch Linux Arm + rAudio
    • Use wired LAN connection if possible
      • Use router assigned IP address if possible
        • Router may take some time to broadcast hostname of DHCP Raspberry Pi
      • Optional - Pre-configure Wi-Fi connection
    • Select features
    • Download Arch Linux Arm
    • Write BOOT and ROOT
    • SSH connect PC to Raspberry Pi
    • Upgrade kernel and default packages
    • Install feature packages
    • Install web user interface
    • Configure
    • Set defaults
  • Optionals
    • Setup Wi-Fi auto-connect
    • Create image file
  • Expert mode (1 command line )
    • For those who know how to read and confirm syntax of SD card partitions.
    • For Alternative 1: Micro SD card only
     bash <( wget -qO - https://github.com/rern/rOS/raw/main/create.sh )

dialog1 dialog2

Need

  • PC - Linux - any distro
    • or on USB e.g., Manjaro - Arch Linux
    • or on Raspberry Pi itself (If no GUI, fdisk and mount skills needed.)
    • or on VirtualBox on Windows (with network set as Bridge Adapter) - Slowest
  • Raspberry Pi
  • Network connection to Raspberry Pi
    • Wired LAN
    • Optional: Wi-Fi (if necessary)
  • Media:
    • Micro SD card shoule be at least class 10 or U1.
    • Option 1: Micro SD card: 8GB+ for BOOT + ROOT partitions
    • Option 2: Micro SD card + USB drive (ROOT partition on USB drive)
      • Micro SD card: 200MB+ for BOOT partition only
      • USB drive: 8GB+ for ROOT partition (or USB hard drive with existing data)
    • Option 3: USB drive only - no SD card (Boot from USB drive)
      • Raspberry Pi 3 and 2 v1.2 only (4 not yet supported)
      • USB drive: 8GB+ for BOOT + ROOT partition
    • Note for USB drive:
      • Suitable for hard drives or faster-than-SD-card thumb drives.
      • Boot from USB drive:
        • Suitable for solid state drives.
        • Normal hard drive needs external power, e.g., powered USB hub, to have it spin up 5+ seconds before boot.
        • Boot takes 10+ seconds longer (detect no sd card > read boot loader into memory > boot)

Prepare partitions

  • On Linux PC
  • Open GParted app (Manjaro root password: manjaro)
  • 3 Alternatives:
    • Micro SD card only
    • Micro SD card + USB drive
    • USB drive only

Alternative 1: Micro SD card only

  • Unmount > Delete all partitions (make sure it's the micro SD card)
  • Create partitions:
No. Size Type Format Label
#1 200MiB primary fat32 BOOT
#2 (the rest) primary ext4 ROOT

Alternative 2: Micro SD card + USB drive

  • Micro SD card
    • Unmount > Delete all partitions (Caution: make sure it's the SD card)
    • Create a partition:
No. Size Type Format Label
#1 200MiB primary fat32 BOOT
  • USB drive - Blank:
    • Unmount > Delete all partitions (Caution: make sure it's the USB drive)
    • Create partitions:
No. Size Type Format Label
#1 5000MiB primary ext4 ROOT
#2 (the rest) primary ext4 (any)
  • or USB drive - with existing data:
    • No need to reformat or change format of existing partition
    • Resize the existing to get 5000MiB unallocated space (anywhere - at the end, middle or start of the disk)
    • Create a partition in the space:
No. Size Type Format Label
(any) (existing) primary (any) (any)
(any) 5000MiB primary ext4 ROOT

Alternative 3: USB drive only

  • Enable boot from USB: Set boot bit (Micro SD card can still be used as usual if inserted.)
  • Create partitions: (Drive with existing data must be resized and rearranged respectively.)
No. Size Type Format Label
#1 200MiB primary fat32 BOOT
#2 5000MiB primary ext4 ROOT
#3 (the rest) primary ext4 (any)

Create Arch Linux Arm + rAudio

  • Open Files app (File Manager on Manjaro)
  • Click BOOT and ROOT to mount
  • Note each path in location bar or hover mouse over BOOT and ROOT for confirmation
  • Switch user to root
su
  • Create script
bash <( wget -qO - https://github.com/rern/rOS/raw/main/create-alarm.sh )
  • RPi 2 and 3 get the same ArchLinuxARM-rpi-2-latest.tar.gz
  • Errors or too slow download: press Ctrl+C and run ./create-alarm.sh again (while in Create Arch Linux Arm mode only)
  • If there're other applications running and "Create Arch Linux Arm" progress was stalled, open another terminal and run sync command.

Optionals

Setup Wi-Fi auto-connect for headless/no screen (if not set during build)

  • On Linux or Windows
  • Insert micro SD card
  • 3 alternatives:
    1. From existing
      • Backup the profile file from /etc/netctl/PROFILE
      • Rename it to wifi then copy it to BOOT before power on.
    2. Edit template file - name and password
      • Open wifi0 in BOOT with text editor
      • Edit SSID and Key
      • Save as wifi
    3. Generate a complex profile - static IP, hidden SSID
  • Move micro SD card to Raspberry Pi
  • Power on

Create image file (Micro SD card mode only)

  • Once started rAudio successfully
  • SSH to RPi
  • Reset for image
ssh root@<RPI IP>
bash <( wget -qO - https://github.com/rern/rOS/raw/main/reset.sh )
  • Shutdown
  • Move micro SD card to Linux
  • Create compressed image file
bash <( wget -qO - https://github.com/rern/rOS/raw/main/imagecreate.sh )

LED flashes - errors

  • 3 flashes: start.elf not found
  • 4 flashes: start.elf not launched
  • 7 flashes: kernel.img not found
  • 8 flashes: SD card not recognised

Fix - Error: Known host keys on SSH

sed -i "/IP_ADDRESS/ d" ~/.ssh/known_hosts

About

Cubieboard2 audio player derived from rOs which is original for Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%