From c2edccf7b5f9616994cff66210a025274b07171a Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 17 Jan 2017 13:47:47 +0100 Subject: [PATCH 001/673] Raspberry: streamlining /etc/modules as per https://github.com/volumio/Build/issues/103 (plus remove linefeed in /etc/apt/sources.list.d/raspi.list ) --- scripts/raspberryconfig.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 5bd12786a..f945649d7 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -26,9 +26,7 @@ tmpfs /dev/shm tmpfs defaults 0 0 echo "Adding PI Modules" echo " -snd_bcm2835 i2c-dev -i2c-bcm2708 " >> /etc/modules echo "Alsa Raspberry PI Card Ordering" @@ -39,8 +37,7 @@ options snd-usb-audio index=5 options snd_bcm2835 index=0" >> /etc/modprobe.d/alsa-base.conf echo "Adding Raspberrypi.org Repo" -echo " -deb http://archive.raspberrypi.org/debian/ jessie main ui +echo "deb http://archive.raspberrypi.org/debian/ jessie main ui deb-src http://archive.raspberrypi.org/debian/ jessie main ui " >> /etc/apt/sources.list.d/raspi.list From 6fc6ebc404438b79afab0bf0063db443da3f6e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 7 Feb 2017 14:25:28 +0100 Subject: [PATCH 002/673] First version Udoo Quad/DL and Neo, wifi for udoo-neo to be added --- scripts/udooneoconfig.sh | 11 +- scripts/udooneoimage.sh | 8 +- scripts/udooqdlconfig.sh | 260 +++++++++++++-------------------------- scripts/udooqdlimage.sh | 6 +- 4 files changed, 92 insertions(+), 193 deletions(-) mode change 100644 => 100755 scripts/udooqdlconfig.sh mode change 100644 => 100755 scripts/udooqdlimage.sh diff --git a/scripts/udooneoconfig.sh b/scripts/udooneoconfig.sh index a578ad89d..db19da73b 100755 --- a/scripts/udooneoconfig.sh +++ b/scripts/udooneoconfig.sh @@ -31,13 +31,7 @@ exit 101 EOF chmod +x /usr/sbin/policy-rc.d -echo "Installing additional packages" -echo "Adding UDOO's Repository" -echo "deb http://repository.udoo.org udoobuntu main" >> /etc/apt/sources.list - apt-get update -echo "Installing Firmware and Modules" -apt-get -y install firmware-udooneo-wl1831 udev-udooneo-rules udooneo-bluetooth apt-get -y install u-boot-tools echo "Installing winbind here, since it freezes networking" apt-get install -y winbind libnss-winbind @@ -75,7 +69,7 @@ rm /patch #TODO: check initrd size echo "Changing to 'modules=dep'" -echo "(otherwise cuboxi may not boot due to size of initrd)" +echo "(otherwise udoo may not boot due to size of initrd)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf #First Boot operations @@ -89,5 +83,4 @@ mkinitramfs-custom.sh -o /tmp/initramfs-tmp echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd -echo "Removing unnecessary /boot files" -rm /boot/volumio.initrd +#rm /boot/volumio.initrd diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 646cd819f..81a94b727 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -106,7 +106,7 @@ mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying udoo-neo boot files, Kernel, Modules and Firmware" -cp platform-udoo/udoo-neo/boot/* /mnt/volumio/rootfs/boot +cp -R platform-udoo/udoo-neo/boot/* /mnt/volumio/rootfs/boot cp -pdR platform-udoo/udoo-neo/lib/modules /mnt/volumio/rootfs/lib cp -pdR platform-udoo/udoo-neo/lib/firmware /mnt/volumio/rootfs/lib @@ -115,7 +115,7 @@ cp -pdR platform-udoo/udoo-neo/lib/firmware /mnt/volumio/rootfs/lib sync echo "Preparing to run chroot for more udoo-neo configuration" -cp scripts/udooqdlconfig.sh /mnt/volumio/rootfs +cp scripts/udooneoconfig.sh /mnt/volumio/rootfs cp scripts/initramfs/init /mnt/volumio/rootfs/root cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb @@ -127,11 +127,11 @@ mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - -/udoo-neoconfig.sh +/udooneoconfig.sh EOF #cleanup -rm /mnt/volumio/rootfs/udooqdlconfig.sh /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/udooneoconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev diff --git a/scripts/udooqdlconfig.sh b/scripts/udooqdlconfig.sh old mode 100644 new mode 100755 index 646cd819f..5cbd39065 --- a/scripts/udooqdlconfig.sh +++ b/scripts/udooqdlconfig.sh @@ -1,186 +1,92 @@ -#!/bin/sh - -# Default build for Debian 32bit -ARCH="armv7" - -while getopts ":v:p:a:" opt; do - case $opt in - v) - VERSION=$OPTARG - ;; - p) - PATCH=$OPTARG - ;; - a) - ARCH=$OPTARG - ;; - esac -done - -BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-udoo-neo.img" - -if [ "$ARCH" = arm ]; then - DISTRO="Raspbian" -else - DISTRO="Debian 32bit" -fi - -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 - -echo "Creating Image Bed" -LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - -parted -s "${LOOP_DEV}" mklabel msdos -parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% -parted -s "${LOOP_DEV}" set 1 boot on -parted -s "${LOOP_DEV}" print -partprobe "${LOOP_DEV}" -kpartx -s -a "${LOOP_DEV}" - -BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` -SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` -DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` -echo "Using: " ${BOOT_PART} -echo "Using: " ${SYS_PART} -echo "Using: " ${DATA_PART} -if [ ! -b "${BOOT_PART}" ] -then - echo "${BOOT_PART} doesn't exist" - exit 1 -fi - -echo "Creating boot and rootfs filesystems" -mkfs -t vfat -n BOOT "${BOOT_PART}" -mkfs -F -t ext4 -L volumio "${SYS_PART}" -mkfs -F -t ext4 -L volumio_data "${DATA_PART}" -sync - -echo "Preparing for the udoo kernel/ platform files" -if [ -d platform-udoo ] -then - echo "Platform folder already exists - keeping it" - # if you really want to re-clone from the repo, then delete the platforms-udoo folder +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# udooneo fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +" > /etc/fstab + + +#TODO: add sound modules +echo "Adding sound modules" +#echo " +#..... +#..... +#" >> /etc/modules + +echo "Prevent services starting during install, running under chroot" +echo "(avoids unnecessary errors)" +cat > /usr/sbin/policy-rc.d << EOF +exit 101 +EOF +chmod +x /usr/sbin/policy-rc.d + +echo "Installing additional packages" +echo "Adding UDOO's Repository" +echo "deb http://repository.udoo.org udoobuntu main" >> /etc/apt/sources.list + +apt-get update +echo "Installing Firmware and Modules" +apt-get -y install firmware-udooneo-wl1831 udev-udooneo-rules udooneo-bluetooth +apt-get -y install u-boot-tools +echo "Installing winbind here, since it freezes networking" +apt-get install -y winbind libnss-winbind +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" else - echo "Clone all cubox files from repo" - git clone https://github.com/volumio/platform-udoo.git platform-udoo - echo "Unpack the cubox platform files" - cd platform-udoo - tar xfJ udoo-neo.tar.xz - cd .. -fi - -#TODO: Check!!!! -echo "Copying the bootloader" -echo "Burning bootloader" -dd if=platform-udoo/udoo-neo/uboot/SPL of=${LOOP_DEV} bs=1K seek=1 -dd if=platform-udoo/udoo-neo/uboot/u-boot.img of=${LOOP_DEV} bs=1K seek=69 -sync - -echo "Preparing for Volumio rootfs" -if [ -d /mnt ] -then - echo "/mount folder exist" +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh else - mkdir /mnt +echo "Cannot Find Patch File, aborting" fi -if [ -d /mnt/volumio ] -then - echo "Volumio Temp Directory Exists - Cleaning it" - rm -rf /mnt/volumio/* -else - echo "Creating Volumio Temp Directory" - mkdir /mnt/volumio +cd / +rm -rf ${PATCH} fi +rm /patch -echo "Creating mount point for the images partition" -mkdir /mnt/volumio/images -mount -t ext4 "${SYS_PART}" /mnt/volumio/images -mkdir /mnt/volumio/rootfs -mkdir /mnt/volumio/rootfs/boot -mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot - -echo "Copying Volumio RootFs" -cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying udoo-neo boot files, Kernel, Modules and Firmware" -cp platform-udoo/udoo-neo/boot/* /mnt/volumio/rootfs/boot -cp -pdR platform-udoo/udoo-neo/lib/modules /mnt/volumio/rootfs/lib -cp -pdR platform-udoo/udoo-neo/lib/firmware /mnt/volumio/rootfs/lib - - -#TODO: asound.conf (/etc/) and asound.state (/var/lib/alsa/) -sync - -echo "Preparing to run chroot for more udoo-neo configuration" -cp scripts/udooqdlconfig.sh /mnt/volumio/rootfs -cp scripts/initramfs/init /mnt/volumio/rootfs/root -cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin -#copy the scripts for updating from usb -wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater - -mount /dev /mnt/volumio/rootfs/dev -o bind -mount /proc /mnt/volumio/rootfs/proc -t proc -mount /sys /mnt/volumio/rootfs/sys -t sysfs -echo $PATCH > /mnt/volumio/rootfs/patch -chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' -su - -/udoo-neoconfig.sh -EOF - -#cleanup -rm /mnt/volumio/rootfs/udooqdlconfig.sh /mnt/volumio/rootfs/root/init - -echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys - -echo "==> udoo-neo device installed" - -#echo "Removing temporary platform files" -#echo "(you can keep it safely as long as you're sure of no changes)" -#sudo rm -r platforms-udoo -sync - -echo "Preparing rootfs base for SquashFS" - -if [ -d /mnt/squash ]; then - echo "Volumio SquashFS Temp Dir Exists - Cleaning it" - rm -rf /mnt/squash/* -else - echo "Creating Volumio SquashFS Temp Dir" - mkdir /mnt/squash -fi - -echo "Copying Volumio rootfs to Temp Dir" -cp -rp /mnt/volumio/rootfs/* /mnt/squash/ - -echo "Removing the Kernel" -rm -rf /mnt/squash/boot/* - -echo "Creating SquashFS, removing any previous one" -rm -r Volumio.sqsh -mksquashfs /mnt/squash/* Volumio.sqsh - -echo "Squash filesystem created" -echo "Cleaning squash environment" -rm -rf /mnt/squash - -#copy the squash image inside the boot partition -cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh -sync -echo "Unmounting Temp Devices" -umount -l /mnt/volumio/images -umount -l /mnt/volumio/rootfs/boot +#TODO: check initrd size +echo "Changing to 'modules=dep'" +echo "(otherwise udoo may not boot due to size of initrd)" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart -dmsetup remove_all -losetup -d ${LOOP_DEV} -sync +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp +#TODO: check if it is OK to use uInitrd +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd +#rm /boot/volumio.initrd diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh old mode 100644 new mode 100755 index 8d7f44094..75d7beebd --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Default build for Debian 32bit (to be changed to armv8) +# Default build for Debian 32bit ARCH="armv7" while getopts ":v:p:" opt; do @@ -106,7 +106,7 @@ mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying udoo-qdl boot files, Kernel, Modules and Firmware" -cp platform-udoo/udoo-qdl/boot/* /mnt/volumio/rootfs/boot +cp -R platform-udoo/udoo-qdl/boot/* /mnt/volumio/rootfs/boot cp -pdR platform-udoo/udoo-qdl/lib/modules /mnt/volumio/rootfs/lib cp -pdR platform-udoo/udoo-qdl/lib/firmware /mnt/volumio/rootfs/lib @@ -125,7 +125,7 @@ mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - -/udoo-qdlconfig.sh +/udooqdlconfig.sh EOF #cleanup From f6c85c84dad070c9c0000dc7cb230daa47cf1d17 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Thu, 9 Feb 2017 20:59:21 +1100 Subject: [PATCH 003/673] Use consistent filesystem label for volumio_data partition scripts/x86image.sh uses a different filesystem label than all the other platform setup scripts for the 'data' partition on the flash image. To simplify the codebase, make x86 consistent with the other platforms. he only place the label was used was in the udisks-glue.conf file, to which it was only recently added (b0400e4baf, Do not mount volumiodata partition). This patch reverts that change as well. --- scripts/initramfs/init-x86 | 4 ++-- scripts/x86image.sh | 2 +- volumio/etc/udisks-glue.conf | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 4919761e4..85b73f7c4 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -251,7 +251,7 @@ mkdir /mnt/factory mount -t vfat ${BOOT_DEVICE}1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then echo "Executing factory reset..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumiodata + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data echo "Factory reset executed: part I" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset @@ -259,7 +259,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then fi if [ -e "/mnt/factory/user_data" ]; then echo "Deleting User Data..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumiodata + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data rm /mnt/factory/user_data echo "User Data successfully deleted " diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 0870b4ad5..d4be3234b 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -42,7 +42,7 @@ echo "Creating filesystems" #sudo mkdosfs "${BOOT_PART}" sudo mkfs -t vfat -F 32 -n volumioboot "${BOOT_PART}" sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${IMG_PART}" -L volumioimg -sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${DATA_PART}" -L volumiodata +sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${DATA_PART}" -L volumio_data sudo parted -s "${LOOP_DEV}" print sync diff --git a/volumio/etc/udisks-glue.conf b/volumio/etc/udisks-glue.conf index 2b2330ce1..c4c844b91 100644 --- a/volumio/etc/udisks-glue.conf +++ b/volumio/etc/udisks-glue.conf @@ -2,10 +2,6 @@ filter volumio-data { label = volumio_data } -filter volumiodata { - label = volumiodata -} - filter ntfs-partitions { optical = false partition_table = false From 30f3b3f72809622ff0b096d407ad571ed31fd629 Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 10 Feb 2017 17:21:07 +0100 Subject: [PATCH 004/673] Adding Piano Firmware --- scripts/raspberryconfig.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 411a9612b..8d939ad1f 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -238,11 +238,18 @@ echo "Extracting Allo Boss modules" tar xf volumio-RPi4.4.9_pianoDAC_22122016.tgz rm volumio-RPi4.4.9_pianoDAC_22122016.tgz -echo "Getting Allo Firmwares" +echo "Getting Allo Piano Firmwares" +wget http://repo.volumio.org/Volumio2/Firmwares/alloPianoDACfw_01122016.tgz +echo "Extracting Allo Firmwares" +tar xf alloPianoDACfw_01122016.tgz +rm alloPianoDACfw_01122016.tgz + +echo "Getting Allo BOSS Firmwares" wget http://repo.volumio.org/Volumio2/Firmwares/volumio-RPi4.4.9_boss_03022017.tgz echo "Extracting Allo Firmwares" tar xf volumio-RPi4.4.9_boss_03022017.tgz rm volumio-RPi4.4.9_boss_03022017.tgz + echo "Allo modules and firmware installed" echo "Adding license info" From f2cdc243ffeba222a733f47b9da0371920b0f3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 12 Feb 2017 16:29:28 +0100 Subject: [PATCH 005/673] Changed Repo bach to http://ftp.nl.debian.org/debian --- recipes/armv7-dev.conf | 16 ++++++++-------- recipes/armv8-dev.conf | 18 +++++++++--------- recipes/armv8.conf | 16 ++++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/recipes/armv7-dev.conf b/recipes/armv7-dev.conf index b6e678e6e..8dd4156c1 100644 --- a/recipes/armv7-dev.conf +++ b/recipes/armv7-dev.conf @@ -13,49 +13,49 @@ omitrequired=false [Base] packages=busybox acl dmsetup insserv libbz2-1.0 libcap2 libcap2-bin libdebconfclient0 libdevmapper1.02.1 libgpg-error0 libprocps3 libsemanage-common libsemanage1 systemd libsystemd0 libudev1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl base-files base-passwd bash debconf debconf-i18n debianutils e2fslibs e2fsprogs gcc-4.8-base gcc-4.9-base initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcomerr2 libcryptsetup4 libdb5.3 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtinfo5 libudev1 libustr-1.0-1 libuuid1 lsb-base mawk multiarch-support ncurses-base ncurses-bin procps startpar tzdata udev util-linux zlib1g apt apt-transport-https sudo xz-utils -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [BaseDebPlus] packages=cpio initramfs-tools klibc-utils libdrm2 libklibc makedev mountall plymouth -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Net] packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Utils] packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [FS] packages= cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient samba -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Assets] packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [DevTools] packages=build-essential cmake dh-autoreconf subversion -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Firmware] packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free suite=jessie diff --git a/recipes/armv8-dev.conf b/recipes/armv8-dev.conf index 1fe4ac417..01098b4e8 100644 --- a/recipes/armv8-dev.conf +++ b/recipes/armv8-dev.conf @@ -13,55 +13,55 @@ omitrequired=false [Base] packages=busybox acl dmsetup insserv libbz2-1.0 libcap2 libcap2-bin libdebconfclient0 libdevmapper1.02.1 libgpg-error0 libprocps3 libsemanage-common libsemanage1 systemd libsystemd0 libudev1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl base-files base-passwd bash debconf debconf-i18n debianutils e2fslibs e2fsprogs gcc-4.8-base gcc-4.9-base initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcomerr2 libcryptsetup4 libdb5.3 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtinfo5 libudev1 libustr-1.0-1 libuuid1 lsb-base mawk multiarch-support ncurses-base ncurses-bin procps startpar tzdata udev util-linux zlib1g apt apt-transport-https sudo xz-utils -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [BaseDebPlus] packages=cpio initramfs-tools klibc-utils libdrm2 libklibc makedev mountall plymouth -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Net] packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Utils] packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [FS] packages= cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient samba -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Assets] packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [DevTools] packages=build-essential cmake dh-autoreconf subversion -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [SID] packages=mpd -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Firmware] packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index 698a7e66b..58ea50cfd 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -13,49 +13,49 @@ omitrequired=false [Base] packages=busybox acl dmsetup insserv libbz2-1.0 libcap2 libcap2-bin libdebconfclient0 libdevmapper1.02.1 libgpg-error0 libprocps3 libsemanage-common libsemanage1 systemd libsystemd0 libudev1 udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common base-files base-passwd bash debconf debconf-i18n debianutils e2fslibs e2fsprogs gcc-4.8-base gcc-4.9-base initscripts libacl1 libattr1 libaudit-common libaudit1 libblkid1 libc-bin libc6 libcomerr2 libcryptsetup4 libdb5.3 libgcc1 libgcrypt20 libkmod2 liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsepol1 libslang2 libsmartcols1 libss2 libtinfo5 libustr-1.0-1 libuuid1 lsb-base mawk multiarch-support ncurses-base ncurses-bin procps startpar tzdata util-linux zlib1g apt apt-transport-https sudo xz-utils -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [BaseDebPlus] packages=cpio initramfs-tools klibc-utils libdrm2 libklibc makedev mountall plymouth -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Net] packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Utils] packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [FS] packages= cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient samba -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Assets] packages=libasound2 alsa-utils alsa-base sox sqlite3 mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie [Firmware] packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free suite=jessie [SID] packages=mpd -source=http://httpredir.debian.org/debian +source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie From 077e503f73504dec0d602a98aa377313cfe3b0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 12 Feb 2017 16:37:27 +0100 Subject: [PATCH 006/673] Also change the the runtime sources.list for Debain --- volumio/etc/apt/sources.list.armv7 | 4 ++-- volumio/etc/apt/sources.list.armv8 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/volumio/etc/apt/sources.list.armv7 b/volumio/etc/apt/sources.list.armv7 index 5cb0c363c..842b1a3f3 100644 --- a/volumio/etc/apt/sources.list.armv7 +++ b/volumio/etc/apt/sources.list.armv7 @@ -1,2 +1,2 @@ -deb http://httpredir.debian.org/debian/ jessie main contrib non-free -deb-src http://httpredir.debian.org/debian/ jessie main contrib non-free +deb http://ftp.nl.debian.org/debian/ jessie main contrib non-free +deb-src http://ftp.nl.debian.org/debian/ jessie main contrib non-free diff --git a/volumio/etc/apt/sources.list.armv8 b/volumio/etc/apt/sources.list.armv8 index 5cb0c363c..842b1a3f3 100644 --- a/volumio/etc/apt/sources.list.armv8 +++ b/volumio/etc/apt/sources.list.armv8 @@ -1,2 +1,2 @@ -deb http://httpredir.debian.org/debian/ jessie main contrib non-free -deb-src http://httpredir.debian.org/debian/ jessie main contrib non-free +deb http://ftp.nl.debian.org/debian/ jessie main contrib non-free +deb-src http://ftp.nl.debian.org/debian/ jessie main contrib non-free From bcf7664d83ae98c690f518edf47b0fddc13f0bbb Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 15 Feb 2017 13:28:58 +0100 Subject: [PATCH 007/673] do not remove boot part after creation --- scripts/bbbimage.sh | 5 +---- scripts/bpim2uimage.sh | 19 ++++++++----------- scripts/bpiproimage.sh | 19 ++++++++----------- scripts/cuboxiimage.sh | 23 +++++++++-------------- scripts/odroidc1image.sh | 25 ++++++++++--------------- scripts/odroidc2image.sh | 25 ++++++++++--------------- scripts/odroidx2image.sh | 27 ++++++++++++--------------- scripts/odroidxu4image.sh | 25 +++++++++++-------------- scripts/pine64image.sh | 20 ++++++++------------ scripts/raspberryimage.sh | 5 ----- scripts/sparkyimage.sh | 21 +++++++++------------ scripts/udooneoimage.sh | 23 +++++++++-------------- scripts/udooqdlimage.sh | 23 +++++++++-------------- 13 files changed, 104 insertions(+), 156 deletions(-) diff --git a/scripts/bbbimage.sh b/scripts/bbbimage.sh index 16ce69043..74a8cd029 100755 --- a/scripts/bbbimage.sh +++ b/scripts/bbbimage.sh @@ -32,7 +32,7 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=896 echo Copying bootloader and U-Boot @@ -172,9 +172,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio - dmsetup remove_all losetup -d ${LOOP_DEV} sync diff --git a/scripts/bpim2uimage.sh b/scripts/bpim2uimage.sh index 104bb6fb0..1cce96022 100755 --- a/scripts/bpim2uimage.sh +++ b/scripts/bpim2uimage.sh @@ -26,7 +26,7 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1700 echo "Creating Image Bed" @@ -61,7 +61,7 @@ sync echo "Preparing for the banana bpi-m2u kernel/ platform files" if [ -d platform-banana ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-banana folder # that will refresh all the bananapi platforms, see below @@ -85,13 +85,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -151,14 +151,14 @@ mv /mnt/volumio/rootfs/boot/uInitrd /mnt/volumio/rootfs/boot/bananapi/bpi-m2u/li rm /mnt/volumio/rootfs/bpim2uconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" -echo "==> BPI-M2U device installed" +echo "==> BPI-M2U device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -196,9 +196,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync diff --git a/scripts/bpiproimage.sh b/scripts/bpiproimage.sh index 85fe949de..e625732f7 100755 --- a/scripts/bpiproimage.sh +++ b/scripts/bpiproimage.sh @@ -26,7 +26,7 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" @@ -61,7 +61,7 @@ sync echo "Preparing for the banana bpi-pro kernel/ platform files" if [ -d platform-banana ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-banana folder # that will refresh all the bananapi platforms, see below @@ -90,13 +90,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -147,14 +147,14 @@ EOF rm /mnt/volumio/rootfs/bpiproconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" -echo "==> BPI-PRO device installed" +echo "==> BPI-PRO device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -192,9 +192,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index f86dc2ef4..af29cdaaa 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -25,12 +25,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 @@ -60,7 +60,7 @@ sync echo "Preparing for the cubox kernel/ platform files" if [ -d platform-cuboxi ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-cuboxi folder else @@ -81,13 +81,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -140,11 +140,11 @@ EOF rm /mnt/volumio/rootfs/cuboxiconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> cuboxi device installed" +echo "==> cuboxi device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -182,11 +182,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index f06966ddc..f142e7c0d 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -26,12 +26,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 @@ -61,13 +61,13 @@ sync echo "Preparing for the Odroid C1/C1+ kernel/ platform files" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidc1 ]; then - tar xfJ odroidc1.tar.xz + tar xfJ odroidc1.tar.xz fi cd .. else @@ -87,13 +87,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -152,16 +152,16 @@ EOF rm /mnt/volumio/rootfs/odroidc1config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys echo "Copying LIRC configuration files for HK stock remote" cp platform-odroid/odroidc1/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc1/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc1/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -echo "==> Odroid-C1 device installed" +echo "==> Odroid-C1 device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -199,11 +199,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index 6e76f28db..860188b4d 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -26,12 +26,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 @@ -61,13 +61,13 @@ sync echo "Preparing for the Odroid C2 kernel/ platform files" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidc2 ]; then - tar xfJ odroidc2.tar.xz + tar xfJ odroidc2.tar.xz fi cd .. else @@ -87,13 +87,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -148,16 +148,16 @@ EOF rm /mnt/volumio/rootfs/odroidc2config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys echo "Copying LIRC configuration files for HK stock remote" cp platform-odroid/odroidc2/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc2/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc2/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -echo "==> Odroid-C2 device installed" +echo "==> Odroid-C2 device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -195,11 +195,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/odroidx2image.sh b/scripts/odroidx2image.sh index b9c99604a..76f8efb93 100755 --- a/scripts/odroidx2image.sh +++ b/scripts/odroidx2image.sh @@ -26,12 +26,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 3072s 64 parted -s "${LOOP_DEV}" mkpart primary ext4 64 1500 @@ -61,13 +61,13 @@ sync echo "Get the Odroid kernel/ platform files from repo" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidx2 ]; then - tar xfJ odroidx2.tar.xz + tar xfJ odroidx2.tar.xz fi cd .. else @@ -75,7 +75,7 @@ else git clone https://github.com/gkkpch/Platform-Odroid.git platform-odroid echo "Unpack the X2 platform files" cd platform-odroid - tar xfJ odroidx2.tar.xz + tar xfJ odroidx2.tar.xz cd .. fi @@ -85,7 +85,7 @@ dd iflag=dsync oflag=dsync if=platform-odroid/odroidx2/uboot/bl2.signed.bin of=$ dd iflag=dsync oflag=dsync if=platform-odroid/odroidx2/uboot/u-boot.bin of=${LOOP_DEV} seek=63 dd iflag=dsync oflag=dsync if=platform-odroid/odroidx2/uboot/E4412_S.tzsw.signed.bin of=${LOOP_DEV} seek=2111 -echo "Erasing and writing u-boot environment" +echo "Erasing and writing u-boot environment" dd if=/dev/zero of=${LOOP_DEV} bs=1 seek=1310720 count=4096 echo "${LOOP_DEV} 0x140000 0x1000" > /etc/fw_env.config fw_setenv bootcmd 'run loadscript' @@ -99,13 +99,13 @@ sync echo "Copying Volumio RootFs" if [ -d /mnt ] -then +then echo "/mnt/folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -159,12 +159,12 @@ EOF rm /mnt/volumio/rootfs/odroidx2config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys sync -echo "Odroid-XU4 device installed" +echo "Odroid-XU4 device installed" echo "Preparing rootfs base for SquashFS" @@ -198,9 +198,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index fd32fc483..e565e9c27 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -26,12 +26,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 3072s 64 parted -s "${LOOP_DEV}" mkpart primary ext4 64 1500 @@ -61,13 +61,13 @@ sync echo "Get the Odroid kernel/ platform files from repo" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidxu4 ]; then - tar xfJ odroidxu4.tar.xz + tar xfJ odroidxu4.tar.xz fi cd .. else @@ -75,7 +75,7 @@ else git clone https://github.com/gkkpch/Platform-Odroid.git platform-odroid echo "Unpack the XU4 platform files" cd platform-odroid - tar xfJ odroidxu4.tar.xz + tar xfJ odroidxu4.tar.xz cd .. fi @@ -91,13 +91,13 @@ sync echo "Copying Volumio RootFs" if [ -d /mnt ] -then +then echo "/mnt/folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -146,15 +146,15 @@ EOF rm /mnt/volumio/rootfs/odroidxu4config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #TODO echo "Copying inittab" #TODO cp platform-odroid/odroidxu4/etc/inittab /mnt/volumio/etc/ sync -echo "Odroid-XU4 device installed" +echo "Odroid-XU4 device installed" echo "Preparing rootfs base for SquashFS" @@ -188,9 +188,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 2d7623c3e..bdd6fcc0a 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -26,7 +26,7 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 @@ -62,7 +62,7 @@ sync echo "Preparing for the pine64 kernel/ platform files" if [ -d platform-pine64 ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-pine64 folder # that will refresh all the odroid platforms, see below @@ -82,13 +82,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else sudo mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -143,16 +143,16 @@ EOF rm /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" #sudo cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc #sudo cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc #sudo cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -echo "==> Pine64 device installed" +echo "==> Pine64 device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -190,10 +190,6 @@ echo "Unmounting Temp Devices" sudo umount -l /mnt/volumio/images sudo umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync - diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 908369223..a7633c039 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -141,10 +141,5 @@ echo "Unmounting Temp Devices" sudo umount -l /mnt/volumio/images sudo umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all sudo losetup -d ${LOOP_DEV} - - diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index 8ba358e92..678560231 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -26,12 +26,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + sudo parted -s "${LOOP_DEV}" mklabel msdos sudo parted -s "${LOOP_DEV}" mkpart primary fat32 8 71 sudo parted -s "${LOOP_DEV}" mkpart primary ext3 71 1500 @@ -61,7 +61,7 @@ sync echo "Preparing for the sparky kernel/ platform files" if [ -d platform-sparky ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-sparky folder else @@ -80,13 +80,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else sudo mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -136,11 +136,11 @@ EOF rm /mnt/volumio/rootfs/sparkyconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> sparky device installed" +echo "==> sparky device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -178,9 +178,6 @@ echo "Unmounting Temp Devices" sudo umount -l /mnt/volumio/images sudo umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 81a94b727..ac5b64180 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -26,12 +26,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 @@ -61,7 +61,7 @@ sync echo "Preparing for the udoo kernel/ platform files" if [ -d platform-udoo ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-udoo folder else @@ -82,13 +82,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -134,11 +134,11 @@ EOF rm /mnt/volumio/rootfs/udooneoconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> udoo-neo device installed" +echo "==> udoo-neo device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -176,11 +176,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index 75d7beebd..97a1c586d 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -26,12 +26,12 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 @@ -61,7 +61,7 @@ sync echo "Preparing for the udoo kernel/ platform files" if [ -d platform-udoo ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-udoo folder else @@ -82,13 +82,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -132,11 +132,11 @@ EOF rm /mnt/volumio/rootfs/udooqdlconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> udoo-qdl device installed" +echo "==> udoo-qdl device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -174,11 +174,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync - - From d2f3ae9adb27216eeea92287c0fe5b71f5909333 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 15 Feb 2017 14:23:38 +0100 Subject: [PATCH 008/673] create kernel archive --- scripts/pine64image.sh | 15 ++++++++++++++- scripts/raspberryimage.sh | 18 +++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index bdd6fcc0a..48fa08c63 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -172,11 +172,24 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar.gz ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar.gz +fi + +echo "Creating Kernel Partition Archive" +tar zcf /mnt/kernel_current.tar.gz -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* echo "Creating SquashFS, removing any previous one" -rm -r Volumio.sqsh +if [ -e Volumio.sqsh ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -r Volumio.sqsh +fi + +echo "Creating SquashFS" mksquashfs /mnt/squash/* Volumio.sqsh echo "Squash filesystem created" diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index a7633c039..6d751c127 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -122,11 +122,23 @@ fi echo "Copying Volumio ROOTFS to Temp DIR" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ -echo "Removing Kernel" +if [ -e /mnt/kernel_current.tar.gz ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar.gz +fi + +echo "Creating Kernel Partition Archive" +tar zcf /mnt/kernel_current.tar.gz -C /mnt/squash/boot/ . + +echo "Removing the Kernel" rm -rf /mnt/squash/boot/* -echo "Deleting Volumio.sqsh from an earlier session" -rm Volumio.sqsh +echo "Creating SquashFS, removing any previous one" +if [ -e Volumio.sqsh ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -r Volumio.sqsh +fi + echo "Creating SquashFS" mksquashfs /mnt/squash/* Volumio.sqsh From 40c7cfdbd29c9c5db422e7e3b2b454626de96964 Mon Sep 17 00:00:00 2001 From: ghembs Date: Wed, 15 Feb 2017 14:35:58 +0100 Subject: [PATCH 009/673] kernel updater: factory reset with kernel support --- scripts/initramfs/init | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 629bf61fb..686f19c69 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -133,6 +133,14 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then echo "Creating factory image, this will take a minute, please wait..." cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh echo "Factory image created" + echo "Creating archive for factory kernel..." + mkdir /mnt/factory + mount -t vfat /dev/mmcblk0p1 /mnt/factory + tar -zcf /mnt/factory kernel_current.tar.gz + cp kernel_current.tar.gz /mnt/imgpart/kernel_factory.tar.gz + umount /mnt/factory + rm -r /mnt/factory + elif [ ! -z "${BOOTDELAY}" ]; then echo "Doing a ${BOOTDELAY} second delay here to give kernel load a headstart" sleep ${BOOTDELAY} @@ -180,9 +188,12 @@ if [ -e "/mnt/factory/factory_reset" ]; then echo "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data - echo "Factory reset executed: part I" - cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset - echo "Factory reset executed: part II - end" + echo "Factory reset executed: part I - Kernel" + tar xf /mnt/imgpart/kernel_factory.tar.gz -C /mnt/factory + echo "Factory reset executed: part II - Squash" + cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh + echo "Factory reset executed: part III - end" + rm /mnt/factory/factory_reset fi if [ -e "/mnt/factory/user_data" ]; then echo "Deleting User Data" From b1dd5786203f2b38eeb89b5f7ad2585aeed77a47 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 15 Feb 2017 15:56:53 +0100 Subject: [PATCH 010/673] fix tar creation --- scripts/raspberryimage.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 6d751c127..d1451b386 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -122,13 +122,13 @@ fi echo "Copying Volumio ROOTFS to Temp DIR" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ -if [ -e /mnt/kernel_current.tar.gz ]; then +if [ -e /mnt/kernel_current.tar ]; then echo "Volumio Kernel Partition Archive exists - Cleaning it" - rm -rf /mnt/kernel_current.tar.gz + rm -rf /mnt/kernel_current.tar fi echo "Creating Kernel Partition Archive" -tar zcf /mnt/kernel_current.tar.gz -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* From f4f22e25eb47c31ef69c570ab42a3a5c1af0cbd8 Mon Sep 17 00:00:00 2001 From: ghembs Date: Wed, 15 Feb 2017 16:00:21 +0100 Subject: [PATCH 011/673] fixed tar --- scripts/initramfs/init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 686f19c69..89398b1d7 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -136,8 +136,8 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then echo "Creating archive for factory kernel..." mkdir /mnt/factory mount -t vfat /dev/mmcblk0p1 /mnt/factory - tar -zcf /mnt/factory kernel_current.tar.gz - cp kernel_current.tar.gz /mnt/imgpart/kernel_factory.tar.gz + tar cf /mnt/factory kernel_current.tar + cp kernel_current.tar /mnt/imgpart/kernel_factory.tar umount /mnt/factory rm -r /mnt/factory @@ -189,7 +189,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data echo "Factory reset executed: part I - Kernel" - tar xf /mnt/imgpart/kernel_factory.tar.gz -C /mnt/factory + tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory echo "Factory reset executed: part II - Squash" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh echo "Factory reset executed: part III - end" From 48b8f18b22d93de35934a9c82fb6a08a7d2cb28d Mon Sep 17 00:00:00 2001 From: ghembs Date: Wed, 15 Feb 2017 16:26:05 +0100 Subject: [PATCH 012/673] fixed tar --- scripts/initramfs/init | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 89398b1d7..fcea64d70 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -30,7 +30,7 @@ else OVERLAY=WITHWRKDIR fi -echo "Booting Volumio for $(cat /proc/cpuinfo | grep Hardware )" +echo "Booting Volumio for $(cat /proc/cpuinfo | grep Hardware )" echo " This script mounts rootfs RO with an overlay RW layer." if [ $OVERLAY == WITHWRKDIR ]; then @@ -136,7 +136,7 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then echo "Creating archive for factory kernel..." mkdir /mnt/factory mount -t vfat /dev/mmcblk0p1 /mnt/factory - tar cf /mnt/factory kernel_current.tar + tar cf kernel_current.tar -C /mnt/factory . cp kernel_current.tar /mnt/imgpart/kernel_factory.tar umount /mnt/factory rm -r /mnt/factory @@ -199,7 +199,7 @@ if [ -e "/mnt/factory/user_data" ]; then echo "Deleting User Data" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data rm /mnt/factory/user_data - + echo "User Data successfully deleted " fi umount /mnt/factory @@ -232,7 +232,7 @@ mount -t ext4 -o noatime /dev/mmcblk0p3 /mnt/ext if [ $OVERLAY == WITHWRKDIR ]; then [ -d /mnt/ext/work ] || mkdir -m 777 /mnt/ext/work echo "With Option:" $OVERLAY - mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union + mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union else echo "Without Option:" $OVERLAY mount -t overlayfs overlayfs /mnt/ext/union -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn @@ -254,5 +254,3 @@ exec switch_root /mnt/ext/union /sbin/init echo "Failed to switch_root, dropping to a shell" exec sh - - From dce383dd5bd5d183f58bad491ec93ad817f0dc86 Mon Sep 17 00:00:00 2001 From: ghembs Date: Wed, 15 Feb 2017 17:35:03 +0100 Subject: [PATCH 013/673] changed path for the tar --- scripts/initramfs/init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index fcea64d70..d0f3c129e 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -136,8 +136,8 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then echo "Creating archive for factory kernel..." mkdir /mnt/factory mount -t vfat /dev/mmcblk0p1 /mnt/factory - tar cf kernel_current.tar -C /mnt/factory . - cp kernel_current.tar /mnt/imgpart/kernel_factory.tar + tar cf /mnt/imgpart/kernel_current.tar -C /mnt/factory . + cp /mnt/imgpart/kernel_current.tar /mnt/imgpart/kernel_factory.tar umount /mnt/factory rm -r /mnt/factory From ba11730ff54a08da8dce28b40495266687a742aa Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 15 Feb 2017 23:40:30 +0100 Subject: [PATCH 014/673] new upmpdcli version with straming support --- scripts/volumioconfig.sh | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 05bbfb3f9..b14e05c9f 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -154,14 +154,14 @@ if [ $(uname -m) = armv7l ]; then rm /shairport-sync_arm.tar.gz echo "Installing Upmpdcli" - wget http://repo.volumio.org/Packages/Upmpdcli/arm/upmpdcli_1.1.3-1_armhf.deb + wget http://repo.volumio.org/Packages/Upmpdcli/arm/upmpdcli_1.2.12-1_armhf.deb wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnpp2_0.14.1-1_armhf.deb - wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnp6_1.6.19.jfd3-1_armhf.deb + wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnp6_1.6.20.jfd5-1_armhf.deb dpkg -i libupnpp2_0.14.1-1_armhf.deb - dpkg -i libupnp6_1.6.19.jfd3-1_armhf.deb - dpkg -i upmpdcli_1.1.3-1_armhf.deb - rm /upmpdcli_1.1.3-1_armhf.deb - rm /libupnp6_1.6.19.jfd3-1_armhf.deb + dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb + dpkg -i upmpdcli_1.2.12-1_armhf.deb + rm /upmpdcli_1.2.12-1_armhf.deb + rm /libupnp6_1.6.20.jfd5-1_armhf.deb rm /libupnpp2_0.14.1-1_armhf.deb #Remove autostart of upmpdcli @@ -255,12 +255,12 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /mpd_0.19.19-1_i386.deb echo "Installing Upmpdcli" - wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.1.3-1_i386.deb - wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnpp2_0.14.1-1_i386.deb - dpkg -i libupnpp2_0.14.1-1_i386.deb - dpkg -i upmpdcli_1.1.3-1_i386.deb - rm /upmpdcli_1.1.3-1_i386.deb - rm /libupnpp2_0.14.1-1_i386.deb + wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb + wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb + dpkg -i libupnp6_1.6.20.jfd5-1_i386.deb + dpkg -i upmpdcli_1.2.12-1_i386.deb + rm /upmpdcli_1.2.12-1_i386.deb + rm /libupnp6_1.6.20.jfd5-1_i386.deb echo "Installing Shairport-Sync" wget http://repo.volumio.org/Volumio2/Binaries/x86/shairport-sync_2.8.4-1_i386.deb @@ -292,6 +292,17 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] fi +echo "Installing Upmpdcli Streaming Modules" +wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-gmusic_1.2.12-1_all.deb +wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-qobuz_1.2.12-1_all.deb +wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-tidal_1.2.12-1_all.deb +dpkg -i upmpdcli-gmusic_1.2.12-1_all.deb +dpkg -i upmpdcli-qobuz_1.2.12-1_all.deb +dpkg -i upmpdcli-tidal_1.2.12-1_all.deb +rm /upmpdcli-gmusic_1.2.12-1_all.deb +rm /upmpdcli-qobuz_1.2.12-1_all.deb +rm /upmpdcli-tidal_1.2.12-1_all.deb + echo "Creating Volumio Folder Structure" # Media Mount Folders mkdir /mnt/NAS From 1d5c1d4b9f71d6f970705e4a32c46f0d50e48d5b Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 16 Feb 2017 01:51:05 +0100 Subject: [PATCH 015/673] fix upmpdcli for arm --- recipes/arm.conf | 2 +- scripts/volumioconfig.sh | 3 +++ volumio/etc/apt/sources.list.arm | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 2a2935eb4..675b285da 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -36,7 +36,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index b14e05c9f..23ffe9ff6 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -157,9 +157,12 @@ if [ $(uname -m) = armv7l ]; then wget http://repo.volumio.org/Packages/Upmpdcli/arm/upmpdcli_1.2.12-1_armhf.deb wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnpp2_0.14.1-1_armhf.deb wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnp6_1.6.20.jfd5-1_armhf.deb + wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnpp3_0.15.1-1_armhf.deb + dpkg -i libupnpp3_0.15.1-1_armhf.deb dpkg -i libupnpp2_0.14.1-1_armhf.deb dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb dpkg -i upmpdcli_1.2.12-1_armhf.deb + rm /libupnpp3_0.15.1-1_armhf.deb rm /upmpdcli_1.2.12-1_armhf.deb rm /libupnp6_1.6.20.jfd5-1_armhf.deb rm /libupnpp2_0.14.1-1_armhf.deb diff --git a/volumio/etc/apt/sources.list.arm b/volumio/etc/apt/sources.list.arm index a472062e6..3a0e4ca53 100644 --- a/volumio/etc/apt/sources.list.arm +++ b/volumio/etc/apt/sources.list.arm @@ -1,2 +1,2 @@ -deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi +deb http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi From 97d7c1050210d02668fde5a586572f740e7109bc Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 16 Feb 2017 01:57:16 +0100 Subject: [PATCH 016/673] fix bubbleupnp x86 --- recipes/x86.conf | 2 +- scripts/volumioconfig.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index bdbb99791..348b9f729 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -43,7 +43,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 23ffe9ff6..7c5a54f77 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -260,8 +260,11 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb + wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnpp3_0.15.1-1_i386.deb + dpkg -i libupnpp3_0.15.1-1_i386.deb dpkg -i libupnp6_1.6.20.jfd5-1_i386.deb dpkg -i upmpdcli_1.2.12-1_i386.deb + rm /libupnpp3_0.15.1-1_i386.deb rm /upmpdcli_1.2.12-1_i386.deb rm /libupnp6_1.6.20.jfd5-1_i386.deb From bdcc46bb5bda7ee6453f620efff006c7d208e793 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 16 Feb 2017 18:21:23 +0100 Subject: [PATCH 017/673] mpd 0.20.4 --- scripts/volumioconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 7c5a54f77..d9924e252 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -144,9 +144,9 @@ if [ $(uname -m) = armv7l ]; then cd / echo "Installing custom MPD version" - wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.19.19-1_armhf.deb - dpkg -i mpd_0.19.19-1_armhf.deb - rm /mpd_0.19.19-1_armhf.deb + wget http://repo.volumio.org//Packages/Mpd/arm/mpd_0.20.4-1_armhf.deb + dpkg -i mpd_0.20.4-1_armhf.deb + rm /mpd_0.20.4-1_armhf.deb echo "Installing Shairport for Airplay emulation" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_arm.tar.gz @@ -253,9 +253,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] cd / echo "Installing custom MPD version" - wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.19.19-1_i386.deb - dpkg -i mpd_0.19.19-1_i386.deb - rm /mpd_0.19.19-1_i386.deb + wget http://repo.volumio.org/Packages/Mpd/x86/mpd_0.20.4-1_i386.deb + dpkg -i mpd_0.20.4-1_i386.deb + rm /mpd_0.20.4-1_i386.deb echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb From 3b574ca52e54c679b91feb0bd60f1b568f9e0671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 19 Feb 2017 14:22:09 +0100 Subject: [PATCH 018/673] Syncing arm and armv7 recipes to fix a problem with building --- recipes/armv7-dev.conf | 2 +- recipes/armv7.conf | 2 +- recipes/armv8-dev.conf | 2 +- recipes/armv8.conf | 2 +- scripts/odroidc1config.sh | 9 ++------- scripts/odroidc2config.sh | 2 ++ 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/recipes/armv7-dev.conf b/recipes/armv7-dev.conf index 8dd4156c1..5c852e845 100644 --- a/recipes/armv7-dev.conf +++ b/recipes/armv7-dev.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 18a18689e..7b708eac6 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8-dev.conf b/recipes/armv8-dev.conf index 01098b4e8..21099947c 100644 --- a/recipes/armv8-dev.conf +++ b/recipes/armv8-dev.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index 58ea50cfd..d1e5786d0 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/odroidc1config.sh b/scripts/odroidc1config.sh index 0e4b0aa43..0fc60da95 100755 --- a/scripts/odroidc1config.sh +++ b/scripts/odroidc1config.sh @@ -36,6 +36,8 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc fbset +echo "Installing winbind here, since it freezes networking" +apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* @@ -73,13 +75,6 @@ echo "Changing to 'modules=dep'" echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf -echo "Installing winbind here, since it freezes networking" -apt-get update -apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" -rm -f /var/lib/apt/lists/*archive* -apt-get clean - #First Boot operations echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart diff --git a/scripts/odroidc2config.sh b/scripts/odroidc2config.sh index d4e678a89..a02f36131 100755 --- a/scripts/odroidc2config.sh +++ b/scripts/odroidc2config.sh @@ -36,6 +36,8 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc fbset +echo "Installing winbind here, since it freezes networking" +apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* From 20e8694d05f484756bb4526794adb12008e2825f Mon Sep 17 00:00:00 2001 From: chrismade Date: Sun, 19 Feb 2017 23:10:54 +0100 Subject: [PATCH 019/673] armbian platform images added --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ build.sh | 5 +++++ 2 files changed, 50 insertions(+) diff --git a/README.md b/README.md index 076f0c09c..20f464ba9 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ Kernel Sources * [Odroid X2](https://github.com/volumio/linux-odroid-public) * [Odroid XU4](https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz) * [BeagleBoneBlack](https://github.com/volumio/linux-beagleboard-botic) +* [armbian](https://github.com/igorpecovnik) Main Packages Sources @@ -70,3 +71,47 @@ Raspbian Packages Sources (armhf) All Raspbian-retrieved packages sources can be found at the [raspbian-sources Repository](https://github.com/volumio/raspbian-sources) If any information, source package or license is missing, please report it to info at volumio dot org + +### armbian-based images + +In case there is no native support in volumio there is the option to build +images based on Armbian ( www.armbian.com ) which supports a variety of +PI clones - + +Example: +./build.sh -b arm -d armbian_bananapipro_vanilla -v 2.0 + +where + +* armbian_ prefix is used to indicate the use of armbian +* boardtype in the notation of armbian +* _vanilla as postfix for mainline kernel or _legacy for android kernel + +#### armbian kernels + +please see notes in armbiam community which kernel is the best - or +if there are any restrictions that apply in your case +e.g. some mainline kernel still do not have stable ports of all devices, e.g. ethernet driver, while legacy kernel may miss other features. +In all cases even lecagy kernels come with overlayfs and squashfs support. + +sucessfully tested images: + +* armbian_bananapi_legacy +* armbian_bananapipro_legacy +* armbian_cubieboard2_legacy +* armbian_cubietruck_legacy +* armbian_bananapi_vanilla +* armbian_bananapipro_vanilla +* armbian_cubieboard2_vanilla +* armbian_cubietruck_vanilla + +#### notes and known issues armbian + +* current sunxi bootloader version 5.25/armbian is not working, solved by explicitely using 5.23 (be careful with apt-get upgrade later on) +* Partition 1 has been changed from vfat to ext4 because armbian scripts are +using symbolic links + +* armbian_orangepipc_legacy ... not booting + +others may work at once or with minor adaptions +* diff --git a/build.sh b/build.sh index a3838af98..019163af1 100755 --- a/build.sh +++ b/build.sh @@ -252,6 +252,11 @@ case $DEVICE in check_os_release "armv7" $VERSION $DEVICE sh scripts/bpiproimage.sh -v $VERSION -p $PATCH -a armv7 ;; + armbian_*) + echo 'Writing armbian-based Image File' + check_os_release "arm" $VERSION $DEVICE + sh scripts/armbianimage.sh -v $VERSION -d "$DEVICE" -p $PATCH + ;; x86) echo 'Writing x86 Image File' check_os_release "x86" $VERSION $DEVICE sh scripts/x86image.sh -v $VERSION -p $PATCH; From 9236f816f0ce80a193bc0b897a7a588a1caf2d24 Mon Sep 17 00:00:00 2001 From: chrismade Date: Sun, 19 Feb 2017 23:19:24 +0100 Subject: [PATCH 020/673] armbian platform readme info --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 20f464ba9..e08b751e5 100644 --- a/README.md +++ b/README.md @@ -74,12 +74,15 @@ If any information, source package or license is missing, please report it to in ### armbian-based images -In case there is no native support in volumio there is the option to build +In case of lacking native support in volumio there is the option to build images based on Armbian ( www.armbian.com ) which supports a variety of PI clones - Example: + +``` ./build.sh -b arm -d armbian_bananapipro_vanilla -v 2.0 +``` where @@ -110,6 +113,7 @@ sucessfully tested images: * current sunxi bootloader version 5.25/armbian is not working, solved by explicitely using 5.23 (be careful with apt-get upgrade later on) * Partition 1 has been changed from vfat to ext4 because armbian scripts are using symbolic links +* kernel, ramdisk and squashfs may be larger compared to native support images due to extra packages required by armbian build routines * armbian_orangepipc_legacy ... not booting From 766984c7dec5e69e53bcb0a473f170f526e9a07c Mon Sep 17 00:00:00 2001 From: chrismade Date: Mon, 20 Feb 2017 15:38:03 +0100 Subject: [PATCH 021/673] armbian platform scripts update --- scripts/armbianconfig.sh | 91 ++++++++ scripts/armbianimage.sh | 181 ++++++++++++++++ scripts/initramfs/init_armbian | 276 +++++++++++++++++++++++++ scripts/upgrade_armbian.sh | 367 +++++++++++++++++++++++++++++++++ 4 files changed, 915 insertions(+) create mode 100755 scripts/armbianconfig.sh create mode 100755 scripts/armbianimage.sh create mode 100755 scripts/initramfs/init_armbian create mode 100755 scripts/upgrade_armbian.sh diff --git a/scripts/armbianconfig.sh b/scripts/armbianconfig.sh new file mode 100755 index 000000000..568d62395 --- /dev/null +++ b/scripts/armbianconfig.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# BPI-PRO fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +# /dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +/dev/mmcblk0p1 /boot ext4 defaults +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults 0 0 +" > /etc/fstab + +#echo "Adding default sound modules and wifi" +#echo "sunxi_codec +#sunxi_i2s +#sunxi_sndcodec +#8723bs +#" >> /etc/modules + +#echo "Blacklisting 8723bs_vq0" +#echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-pine64.conf + +echo "Prevent services starting during install, running under chroot" +echo "(avoids unnecessary errors)" +cat > /usr/sbin/policy-rc.d << EOF +exit 101 +EOF +chmod +x /usr/sbin/policy-rc.d + +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc aptitude bc + +echo "Installing additonal packages" +. /root/upgrade_armbian.sh + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep'" +echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/volumiord +echo "Cleaning up" +# rm /boot/volumio.initrd + diff --git a/scripts/armbianimage.sh b/scripts/armbianimage.sh new file mode 100755 index 000000000..36d4e201d --- /dev/null +++ b/scripts/armbianimage.sh @@ -0,0 +1,181 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":d:v:p:" opt; do + case $opt in + d) + DEVICE=$OPTARG + ;; + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + + esac +done + +old="$IFS" +set -f; IFS='_' +set -- $DEVICE +BOARD=$2 +BRANCH=$3 +set +f +IFS="$old" + +echo BOARD:$BOARD BRANCH:$BRANCH + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${DEVICE}.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +# parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 +parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +# mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +# mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot +mount -t ext4 "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/arm/root/* /mnt/volumio/rootfs + +echo "Preparing to run chroot for more BPI-PRO configuration" +cp scripts/armbianconfig.sh /mnt/volumio/rootfs +cp scripts/upgrade_armbian.sh /mnt/volumio/rootfs/root +cp scripts/initramfs/init_armbian /mnt/volumio/rootfs/root/init +echo "BOARD=$BOARD\nBRANCH=$BRANCH\n" > /mnt/volumio/rootfs/root/device.sh +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/armbianconfig.sh +EOF + +# write board specific boot sector +echo write board specific boot sector +dd if=/mnt/volumio/rootfs/boot/u-boot-sunxi-with-spl.bin of=${LOOP_DEV} bs=1024 seek=8 conv=notrunc + +#cleanup +rm /mnt/volumio/rootfs/armbianconfig.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +#echo "Copying LIRC configuration files" + + +echo "==> BPI-PRO device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-bananapi +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +echo "Cleaning build environment" +rm -rf /mnt/volumio /mnt/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/initramfs/init_armbian b/scripts/initramfs/init_armbian new file mode 100755 index 000000000..f57f340b6 --- /dev/null +++ b/scripts/initramfs/init_armbian @@ -0,0 +1,276 @@ +#!/bin/busybox sh +set -x +# Default PATH differs between shells, and is not automatically exported +# by klibc dash. Make it consistent. +export PATH=/sbin:/usr/sbin:/bin:/usr/bin + +[ -d /proc ] || mkdir /proc +mount -t proc none /proc +[ -d /sys ] || mkdir /sys +mount -t sysfs none /sys + +#busybox --install -s + +mknod /dev/null c 1 3 +mknod /dev/tty c 5 0 +[ -e /dev/console ] || mknod /dev/console c 5 1 + +mdev -s + +#Hardware specific adaptions + +HWDEVICE="$(cat /proc/cpuinfo | grep Hardware | awk '{print $4}' )" +if [ ! x${HWDEVICE} == "x" ]; then + if [ $HWDEVICE == i.MX6 ]; then + exec >/dev/kmsg 2>&1 /dev/kmsg 2>&1 mount auto) +echo "Check for USB updates" +if [ -e /dev/sda1 ]; then + [ -d /mnt/usb ] || mkdir /mnt/usb + mount -t auto /dev/sda1 /mnt/usb + #If there is a firmware file inside the usb + if [ -e /mnt/usb/volumio.fir ]; then + echo "Firmware found, updating will take a few minutes, please wait..." + #when the partitions are mounted we can launch the update script + volumio-init-updater + fi + if [ -e /mnt/usb/factory_reset ]; then + echo "Factory Reset on USB" + mkdir /mnt/factory + mount -t auto /dev/mmcblk0p1 /mnt/factory + echo " " > /mnt/factory/factory_reset + umount /mnt/factory + rm -r /mnt/factory + fi + umount /dev/sda1 + rm -r /mnt/usb +fi + + +# 2) init a loop pointing to the image file +[ -e /dev/loop0 ] || mknod /dev/loop0 b 7 0 +losetup /dev/loop0 /mnt/imgpart/${IMGFILE} +losetup -a + +# 3) mount the squashfs to /mnt/static +[ -d /mnt/static ] || mkdir /mnt/static +mount -t squashfs /dev/loop0 /mnt/static +mount + +VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" + +#if there is factory file then format data partition +mkdir /mnt/factory +mount -t vfat /dev/mmcblk0p1 /mnt/factory +if [ -e "/mnt/factory/factory_reset" ]; then + echo "Executing factory reset" + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data + + echo "Factory reset executed: part I" + cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset + echo "Factory reset executed: part II - end" +fi +if [ -e "/mnt/factory/user_data" ]; then + echo "Deleting User Data" + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data + rm /mnt/factory/user_data + + echo "User Data successfully deleted " +fi +umount /mnt/factory +rm -r /mnt/factory + +mkdir boot +mount -t vfat /dev/mmcblk0p1 /boot +# check and 2nd try with ext4 +if [ ! -e "/boot/boot.scr" ]; then +mount -t ext4 /dev/mmcblk0p1 /boot +fi + +# check if mainline / vanilla kernel +if [ -e "/boot/.next" ]; then + OVERLAY=WITHWRKDIR + # For overlayfs version V22 or higher (modulename 'overlay') + modprobe fuse + modprobe overlay + modprobe overlayfs # fallback +else + OVERLAY=NOWRKDIR + # For overlayfs version V22 or higher (modulename 'overlay') + modprobe fuse + modprobe overlayfs + modprobe overlay # fallback +fi + +if [ -e "/boot/resize-volumio-datapart" ]; then +echo "Re-sizing Volumio data partition" + END="$(parted -s /dev/mmcblk0 unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" + parted -s /dev/mmcblk0 resizepart 3 ${END} + e2fsck -fy /dev/mmcblk0p3 + resize2fs /dev/mmcblk0p3 + echo "Volumio data partition succesfully resized" + parted -s /dev/mmcblk0 unit MB print + rm /boot/resize-volumio-datapart +fi +umount /boot +rm -r /boot + +# 4) mount a filesystem for write access to the static image +# unclear: memory size? -o size=1024M +[ -d /mnt/ext ] || mkdir -m 777 /mnt/ext +mount -t ext4 -o noatime /dev/mmcblk0p3 /mnt/ext + +[ -d /mnt/ext/dyn ] || mkdir -m 777 /mnt/ext/dyn +[ -d /mnt/ext/union ] || mkdir -m 777 /mnt/ext/union + +echo lsmod +lsmod + +# 5) mount the writable overlay to the static image +if [ $OVERLAY == WITHWRKDIR ]; then + [ -d /mnt/ext/work ] || mkdir -m 777 /mnt/ext/work + echo "With Option:" $OVERLAY + mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union +else + echo "Without Option:" $OVERLAY + mount -t overlayfs overlayfs /mnt/ext/union -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn +fi + +[ -d /mnt/ext/union/static ] || mkdir -m 777 /mnt/ext/union/static +[ -d /mnt/ext/union/imgpart ] || mkdir -m 777 /mnt/ext/union/imgpart +mount --move /mnt/static /mnt/ext/union/static +mount --move /mnt/imgpart /mnt/ext/union/imgpart + +chmod -R 777 /mnt/ext/union/imgpart + +umount /proc +umount /sys + +echo ${VOLUMIO_VERSION} +echo "Finish initramfs, continue booting Volumio" +exec switch_root /mnt/ext/union /sbin/init + +echo "Failed to switch_root, dropping to a shell" +exec sh + + diff --git a/scripts/upgrade_armbian.sh b/scripts/upgrade_armbian.sh new file mode 100755 index 000000000..7e511aae1 --- /dev/null +++ b/scripts/upgrade_armbian.sh @@ -0,0 +1,367 @@ +#!/bin/bash +# +# Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com +# +# This file is licensed under the terms of the GNU General Public +# License version 2. This program is licensed "as is" without any +# warranty of any kind, whether express or implied. +# +# This file is a part of tool chain https://github.com/igorpecovnik/lib +# +set -x + +. /root/device.sh +# BOARD="" +# BOARD="cubieboard2" +# BRANCH="legacy" +RELEASE="jessie" +HARDWARE="sun7i" + +# RELEASE=$(lsb_release -cs) +if [[ "$RELEASE" == "sid" ]]; then RELEASE="jessie"; fi +if [[ "$RELEASE" == "testing" ]]; then RELEASE="jessie"; fi +backtitle="Armbian install script, http://www.armbian.com | Author: Igor Pecovnik" +title="Armbian universal installer 2015.11" + + +#----------------------------------------------------------------------------------------------------------------------- +# Show warning at start +#----------------------------------------------------------------------------------------------------------------------- +display_warning() +{ +read -r -d '' MOJTEXT << EOM +1. Please do a backup even the script doesn't plan to ruin anything critical. + +2. If you choose wrong board you might end up with not bootable system. + +3. We are going to remove current kernel package together with headers, firmware and board definitions. + +4. The script will also conduct apt-get upgrade so all packages will be upgraded. + +5. Where possible you can upgrade/downgrade kernel from legacy to vanilla and vice versa. + +6. The whole process takes at least 8 minutes on a fresh image to 30 minutes if you upgrade from other system. + +7. You might need to power cycle the board. +EOM +# dialog --title "$title" --backtitle "$backtitle" --cr-wrap --colors --yesno " \Z1$(toilet -f mono12 WARNING)\Z0\n$MOJTEXT" 36 74 +# if [ $? -ne 0 ]; then exit 1; fi +} + + +#----------------------------------------------------------------------------------------------------------------------- +# Create boot scripts for Allwinner boards +#----------------------------------------------------------------------------------------------------------------------- +create_boot_script () +{ +[ -f "/boot/boot.cmd" ] && cp /boot/boot.cmd /boot/boot.cmd.backup +cat > /boot/boot.cmd </dev/null 2>&1 +} + + +#----------------------------------------------------------------------------------------------------------------------- +# Install packeges and repository +#----------------------------------------------------------------------------------------------------------------------- +install_repo () +{ +# dialog --title "$title" --backtitle "$backtitle" --infobox "\nAdding repository and running pkg list update." 5 50 +echo title "$title" backtitle "$backtitle" infobox "\nAdding repository and running pkg list update." 5 50 +# remove system hostapd +apt-get -f -qq install +apt-get clean +apt-get -y -qq remove hostapd +if [ $? -ne 0 ]; then + echo title "$title" backtitle "$backtitle" infobox "\nError in apt-get. Can not continue." 5 40 + exit 1 +fi +# move armbian to separate list and remove others +sed -i '/armbian/d' /etc/apt/sources.list +if [ -f "/etc/apt/sources.list.d/bananian.list" ]; then +rm -f /etc/apt/sources.list.d/bananian.list +rm -f /etc/kernel/postinst.d/bananian-kernel-postinst +chsh -s /bin/bash +echo "Armbian lite" > /etc/motd +echo "" >> /etc/motd +fi +if [ ! -f "/etc/apt/sources.list.d/armbian.list" ]; then + echo -e "[\e[0;32m o.k. \x1B[0m] Updating package list. Please wait" + echo "deb http://apt.armbian.com $RELEASE main" > /etc/apt/sources.list.d/armbian.list + apt-key adv --keyserver keys.gnupg.net --recv-keys 0x93D6889F9F0E78D5 >/dev/null 2>&1 + apt-get update >/dev/null 2>&1 +fi +} + + +get_hardware_info () +#----------------------------------------------------------------------------------------------------------------------- +# determine root and boot partitions, arhitecture, cpu, ... +#----------------------------------------------------------------------------------------------------------------------- +{ + +# arhitecture +ARCH=$(lscpu | grep Architecture | awk '{print $2}') +if [[ "$ARCH" != arm* ]]; then + echo -e "[\e[0;31m error \x1B[0m] Architecture not supported"; exit; +fi + +# CPU +# in volumio builder we are running in qemu +# HARDWARE=$(cat /proc/cpuinfo | grep Hardware | awk '{print $3}') +if [[ !( "$HARDWARE" == "sun7i" || "$HARDWARE" == "Allwinner" || "$HARDWARE" == "sun4i" ) ]]; then + echo -e "[\e[0;31m error \x1B[0m] Unsupported hw"; exit; +fi + +# boot partition +bootdevice="/dev/mmcblk0p1"; + +# if mmc is not present than boot can only be nand1 +if [[ "$(grep nand /proc/partitions)" != "" && "$(grep mmc /proc/partitions)" == "" ]]; then +bootdevice="/dev/nand1"; +fi + +# root partition +root_device=$(mountpoint -d /) +for file in /dev/* ; do +CURRENT_DEVICE=$(printf "%d:%d" $(stat --printf="0x%t 0x%T" $file)) +if [ $CURRENT_DEVICE = $root_device ]; then + rootdevice=$file + break; +fi +done +rootdevice="/dev/"$(sed -n 's/^DEVNAME=//p' /sys/dev/block/$(mountpoint -d /)/uevent) +} + + +mount_boot_device () +#----------------------------------------------------------------------------------------------------------------------- +# mount boot device +#----------------------------------------------------------------------------------------------------------------------- +{ +if [[ "$bootdevice" == "/dev/mmcblk0p1" && "$rootdevice" != "/dev/mmcblk0p1" ]]; then + umount /boot /media/mmc + mkdir -p /media/mmc/boot + mount /dev/mmcblk0p1 /media/mmc/ + if [ -d "/media/mmc/boot/" ]; then + mount --bind /media/mmc/boot/ /boot/ + else + mount --bind /media/mmc /boot/ + fi +fi +if [[ "$bootdevice" == "/dev/nand1" ]]; then + umount /boot /mnt + mount /dev/nand1 /boot +fi +} + + +select_boards () +#----------------------------------------------------------------------------------------------------------------------- +# This might be changed once with board detection which is already very accurate +#----------------------------------------------------------------------------------------------------------------------- +{ + +if [ -z "$BOARD" ]; then + IFS=" " + Options="Cubieboard A10 Cubieboard2 A20 Cubietruck A20 Lime-A10 A10 Lime \ +A20 Lime2 A20 Micro A20 Bananapi A20 Lamobo-R1 A20 Orangepi A20 Pcduino3nano A20" + BoardOptions=($Options); + BoardCmd=(dialog --title "Choose a board:" --backtitle "$backtitle" --menu "\n$infos" 20 60 26) + BoardChoices=$("${BoardCmd[@]}" "${BoardOptions[@]}" 2>&1 >/dev/tty) + BOARD=${BoardChoices,,} +fi +# exit the script on cancel +if [ "$BOARD" == "" ]; then echo "ERROR: You have to choose one board"; exit; fi + + +if [ -z "$BRANCH" ]; then + IFS="'" + declare -a Options=("legacy'3.4.x - 3.14.x most supported'vanilla'4.x Vanilla from www.kernel.org"); + # Exceptions + if [[ $BOARD == "cubox-i" || $BOARD == "udoo-neo" || "$bootdevice" == "/dev/nand1" ]]; then + declare -a Options=("legacy'3.4.x - 3.14.x most supported"); + fi + BoardOptions=($Options); + BoardCmd=(dialog --title "Choose a board:" --backtitle "$backtitle" --menu "\n$infos" 10 60 16) + BoardChoices=$("${BoardCmd[@]}" "${BoardOptions[@]}" 2>&1 >/dev/tty) + BRANCH=${BoardChoices,,} +fi + +# exit the script on cancel +if [ "$BRANCH" == "" ]; then echo "ERROR: You have to choose one branch"; exit; fi + + +if [[ $BRANCH == "vanilla" ]] ; then + ROOT_BRACH="-next" + else + ROOT_BRACH="" +fi + +# ROOTBRACH2 is only for u-boot package +if [[ $BRANCH == "vanilla" ]] ; then + ROOTBRACH2="-next" + touch /boot/.next + else + ROOTBRACH2="-default" +fi + +case $BOARD in +bananapi | bananapipro | lamobo-r1 | orangepi | orangepimini) +LINUXFAMILY="sun7i" +if [[ $BRANCH == "vanilla" ]] ; then LINUXFAMILY="sunxi"; fi +;; +cubox-i) +LINUXFAMILY="cubox" +;; +cubieboard | lime-a10) +LINUXFAMILY="sun4i" +if [[ $BRANCH == "vanilla" ]] ; then LINUXFAMILY="sunxi"; fi +;; +udoo | udoo-neo) +LINUXFAMILY="udoo" +;; +*) +LINUXFAMILY="sun7i" +if [[ $BRANCH == "vanilla" ]] ; then LINUXFAMILY="sunxi"; fi +;; +esac + +if [[ $BOARD == "cubox-i" || $BOARD == udoo* || $BRANCH == "vanilla" ]]; + then PACKETS="linux-dtb$ROOT_BRACH-$LINUXFAMILY"; +fi + +PACKETS="linux-image$ROOT_BRACH-$LINUXFAMILY linux-firmware-image$ROOT_BRACH-$LINUXFAMILY \ +linux-u-boot-$BOARD$ROOTBRACH2=5.23 linux-headers$ROOT_BRACH-$LINUXFAMILY linux-$RELEASE-root$ROOT_BRACH-$BOARD $PACKETS" +} + + +remove_old () +#----------------------------------------------------------------------------------------------------------------------- +# Delete previous kernel +#----------------------------------------------------------------------------------------------------------------------- +{ +# clear +# dialog --title "$title" --backtitle "$backtitle" --infobox "\nRemoving conflicting packages ..." 5 41 +echo title "$title" backtitle "$backtitle" infobox "\nRemoving conflicting packages ..." 5 41 +aptitude remove ~nlinux-dtb --quiet=100 >> upgrade.log +aptitude remove ~nlinux-u-boot --quiet=100 >> upgrade.log +aptitude remove ~nlinux-image --quiet=100 >> upgrade.log +aptitude remove ~nlinux-headers --quiet=100 >> upgrade.log +aptitude remove ~nlinux-firmware --quiet=100 >> upgrade.log +aptitude remove ~nlinux-$RELEASE-root --quiet=100 >> upgrade.log +} + + +install_new () +#----------------------------------------------------------------------------------------------------------------------- +# install new one +#----------------------------------------------------------------------------------------------------------------------- +{ +IFS=" " +# apt-get $1 -y install $PACKETS 2>&1 | dialog --title "$title" --backtitle "$backtitle" --progressbox "$2" 20 80 +apt-get $1 -y install $PACKETS +if [ $? -ne 0 ]; then +# dialog --title "$title" --backtitle "$backtitle" --infobox "\nError downloadiing." 5 41 +echo title "$title" backtitle "$backtitle" infobox "\nError downloadiing." 5 41 +exit 1; +fi +} + +copy_boot0 () +#------------- +# copy board specific boot sector for further processing +# outside of chroot environment +#------------- +{ +# . /usr/lib/u-boot/platform_install.sh +DIR=`find /usr/lib/ | grep u-boot-sunxi-with-spl.bin` +if [ -f $DIR ]; then + cp $DIR /boot +else + echo "ERROR: cannot find board specific boot0 sector" + find /usr/lib|grep -i sunxi +fi +} + +#----------------------------------------------------------------------------------------------------------------------- +# +# Program start +# +#----------------------------------------------------------------------------------------------------------------------- +# This tool must run under root +#----------------------------------------------------------------------------------------------------------------------- +if [[ ${EUID} -ne 0 ]]; then + echo "This tool must run as root. Exiting ..." + exit 1 +fi + +dl_dependencies() +#----------------------------------------------------------------------------------------------------------------------- +# Downloading dependencies +#----------------------------------------------------------------------------------------------------------------------- +{ +if [[ $(dpkg-query -W -f='${Status}' dialog 2>/dev/null | grep -c "ok installed") -eq 0 || \ + $(dpkg-query -W -f='${Status}' u-boot-tools 2>/dev/null | grep -c "ok installed") -eq 0 || \ + $(dpkg-query -W -f='${Status}' debconf-utils 2>/dev/null | grep -c "ok installed") -eq 0 || \ + $(dpkg-query -W -f='${Status}' lsb-release 2>/dev/null | grep -c "ok installed") -eq 0 || \ + $(dpkg-query -W -f='${Status}' aptitude 2>/dev/null | grep -c "ok installed") -eq 0 \ + ]]; then +echo "Downloading dependencies ... please wait" +apt-get install -qq -y dialog u-boot-tools debconf-utils lsb-release aptitude +# >/dev/null 2>&1 +fi +} + +# dl_dependencies +display_warning +install_repo +# get_hardware_info # not for volumio +# mount_boot_device # not for volumio +create_boot_script +select_boards +install_new "-d" "Downloading packages..." +remove_old +install_new "" "Installing packages..." +copy_boot0 + +# apt-get -y upgrade 2>&1 | dialog --title "$title" --backtitle "$backtitle" --progressbox "System upgrade" 20 80 +echo title "$title" backtitle "$backtitle" progressbox "System upgrade" 20 80 +# apt-get -y upgrade 2>&1 + +# [[ "$bootdevice" == "/dev/nand1" ]] && sed -e 's,script=.*,script=script.bin,g' -i /boot/uEnv.txt +# ln -sf /boot/bin/$BOARD.bin /boot/script.bin || cp /boot/bin/$BOARD.bin /boot/script.bin + +# dialog --title "$title" --backtitle "$backtitle" --yes-label "Reboot" --no-label "Exit" --yesno "\nAll done." 7 60 +# if [ $? -eq 0 ]; then reboot; fi + +echo "All done\nVisit: forum.armbian.com in case of troubles or just for fun ;)" +echo "" From c9bb4be29d49b90829d57584549621135e09a485 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 20 Feb 2017 16:33:17 +0100 Subject: [PATCH 022/673] fix odroidc1 build script --- scripts/odroidc1config.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/odroidc1config.sh b/scripts/odroidc1config.sh index 0fc60da95..8a5ca9b8f 100755 --- a/scripts/odroidc1config.sh +++ b/scripts/odroidc1config.sh @@ -36,13 +36,6 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc fbset -echo "Installing winbind here, since it freezes networking" -apt-get install -y winbind libnss-winbind - -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules @@ -71,6 +64,15 @@ rm -rf ${PATCH} fi rm /patch +#MUST BE PLACED AFTER EVERYTHING THAT NEEDS NETWORKING +echo "Installing winbind here, since it freezes networking" +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + echo "Changing to 'modules=dep'" echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf From c569bacc8af5802be0761d785d7fd3925a30ddd1 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 22 Feb 2017 13:19:36 +0100 Subject: [PATCH 023/673] Revert "mpd 0.20.4" This reverts commit bdcc46bb5bda7ee6453f620efff006c7d208e793. --- scripts/volumioconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index d9924e252..7c5a54f77 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -144,9 +144,9 @@ if [ $(uname -m) = armv7l ]; then cd / echo "Installing custom MPD version" - wget http://repo.volumio.org//Packages/Mpd/arm/mpd_0.20.4-1_armhf.deb - dpkg -i mpd_0.20.4-1_armhf.deb - rm /mpd_0.20.4-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.19.19-1_armhf.deb + dpkg -i mpd_0.19.19-1_armhf.deb + rm /mpd_0.19.19-1_armhf.deb echo "Installing Shairport for Airplay emulation" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_arm.tar.gz @@ -253,9 +253,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] cd / echo "Installing custom MPD version" - wget http://repo.volumio.org/Packages/Mpd/x86/mpd_0.20.4-1_i386.deb - dpkg -i mpd_0.20.4-1_i386.deb - rm /mpd_0.20.4-1_i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.19.19-1_i386.deb + dpkg -i mpd_0.19.19-1_i386.deb + rm /mpd_0.19.19-1_i386.deb echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb From febc60ab0e4bc95d7b384918d0647485693f1c50 Mon Sep 17 00:00:00 2001 From: Volumio Date: Wed, 22 Feb 2017 14:46:44 +0100 Subject: [PATCH 024/673] No sync mount for external media This caused painfully slow write operations --- volumio/etc/udisks-glue.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/volumio/etc/udisks-glue.conf b/volumio/etc/udisks-glue.conf index c4c844b91..be09361d7 100644 --- a/volumio/etc/udisks-glue.conf +++ b/volumio/etc/udisks-glue.conf @@ -28,7 +28,7 @@ match volumio-data { match ntfs-partitions { automount = true - automount_options = { sync, noatime, "dmask=0000", "fmask=0000" } + automount_options = { noatime, "dmask=0000", "fmask=0000" } post_mount_command = "/usr/bin/mpc update USB" post_unmount_command = "/usr/bin/mpc update USB" post_removal_command = "/usr/bin/mpc update USB" @@ -36,7 +36,7 @@ match ntfs-partitions { match vfat-partitions { automount = true - automount_options = { sync, noatime, "dmask=0000", "fmask=0000" } + automount_options = { noatime, "dmask=0000", "fmask=0000" } post_mount_command = "/usr/bin/mpc update USB" post_unmount_command = "/usr/bin/mpc update USB" post_removal_command = "/usr/bin/mpc update USB" @@ -44,7 +44,7 @@ match vfat-partitions { match other-partitions { automount = true - automount_options = { sync, noatime } + automount_options = { noatime } post_mount_command = "/usr/bin/mpc update USB" post_unmount_command = "/usr/bin/mpc update USB" post_removal_command = "/usr/bin/mpc update USB" From d6ec78610ca511952a35e7896e093357dabb36b8 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 25 Feb 2017 10:43:52 +0100 Subject: [PATCH 025/673] Disable dhcp servers startup --- scripts/volumioconfig.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 7c5a54f77..689f84b44 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -358,6 +358,10 @@ echo "Setting Mpd to SystemD instead of Init" update-rc.d mpd remove systemctl enable mpd.service +echo "Preventing un-needed dhcp servers to start automatically" +systemctl disable isc-dhcp-server.service +systemctl disable dhcpd.service + ##################### #Audio Optimizations#----------------------------------------- ##################### From 67f6857d8d9c4598ccd2675f3df58f90954174a3 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 25 Feb 2017 15:51:34 +0100 Subject: [PATCH 026/673] djmount for upnp browsing --- recipes/arm.conf | 2 +- recipes/armv7.conf | 4 ++-- recipes/armv8.conf | 2 +- recipes/x86.conf | 2 +- scripts/volumioconfig.sh | 3 +++ volumio/lib/systemd/system/djmount.service | 16 ++++++++++++++++ 6 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 volumio/lib/systemd/system/djmount.service diff --git a/recipes/arm.conf b/recipes/arm.conf index 675b285da..071d0d8e4 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -36,7 +36,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 7b708eac6..844d2b943 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -12,7 +12,7 @@ addimportant=false omitrequired=false [Base] -packages=busybox acl dmsetup insserv libbz2-1.0 libcap2 libcap2-bin libdebconfclient0 libdevmapper1.02.1 libgpg-error0 libprocps3 libsemanage-common libsemanage1 systemd libsystemd0 libudev1 udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common base-files base-passwd bash debconf debconf-i18n debianutils e2fslibs e2fsprogs gcc-4.8-base gcc-4.9-base initscripts libacl1 libattr1 libaudit-common libaudit1 libblkid1 libc-bin libc6 libcomerr2 libcryptsetup4 libdb5.3 libgcc1 libgcrypt20 libkmod2 liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsepol1 libslang2 libsmartcols1 libss2 libtinfo5 libustr-1.0-1 libuuid1 lsb-base mawk multiarch-support ncurses-base ncurses-bin procps startpar tzdata util-linux zlib1g apt apt-transport-https sudo xz-utils +packages=busybox acl dmsetup insserv libbz2-1.0 libcap2 libcap2-bin libdebconfclient0 libdevmapper1.02.1 libgpg-error0 libprocps3 libsemanage-common libsemanage1 systemd libsystemd0 libudev1 udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common base-files base-passwd bash debconf debconf-i18n debianutils e2fslibs e2fsprogs gcc-4.8-base gcc-4.9-base initscripts libacl1 libattr1 libaudit-common libaudit1 libblkid1 libc-bin libc6 libcomerr2 libcryptsetup4 libdb5.3 libgcc1 libgcrypt20 libkmod2 liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsepol1 libslang2 libsmartcols1 libss2 libtinfo5 libustr-1.0-1 libuuid1 lsb-base mawk multiarch-support ncurses-base ncurses-bin procps startpar tzdata util-linux zlib1g apt apt-transport-https sudo xz-utils source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index d1e5786d0..5bc12c395 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 348b9f729..d0053d5ca 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -43,7 +43,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 689f84b44..46c2ef39f 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -319,6 +319,9 @@ ln -s /media /mnt/USB mkdir /data/INTERNAL ln -s /data/INTERNAL /mnt/INTERNAL +#UPNP Folder +mkdir /mnt/UPNP + #Permissions chmod -R 777 /mnt chmod -R 777 /media diff --git a/volumio/lib/systemd/system/djmount.service b/volumio/lib/systemd/system/djmount.service new file mode 100644 index 000000000..f3137966e --- /dev/null +++ b/volumio/lib/systemd/system/djmount.service @@ -0,0 +1,16 @@ +[Unit] +Description = DJMmount + +[Service] +ExecStart=/usr/bin/djmount -o iocharset=utf8 /mnt/UPNP +ExecStop=/usr/bin/killall djmount && fusermount -u /mnt/UPNP +Restart=always +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=djmount +User=volumio +Group=volumio + + +[Install] +WantedBy=multi-user.target From eaae96f70a2174aadc208e3b4a7c4bab497296cf Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 25 Feb 2017 16:13:35 +0100 Subject: [PATCH 027/673] djmount fix --- volumio/lib/systemd/system/djmount.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/lib/systemd/system/djmount.service b/volumio/lib/systemd/system/djmount.service index f3137966e..a84f9cc4e 100644 --- a/volumio/lib/systemd/system/djmount.service +++ b/volumio/lib/systemd/system/djmount.service @@ -3,7 +3,7 @@ Description = DJMmount [Service] ExecStart=/usr/bin/djmount -o iocharset=utf8 /mnt/UPNP -ExecStop=/usr/bin/killall djmount && fusermount -u /mnt/UPNP +Type=forking Restart=always StandardOutput=syslog StandardError=syslog From def7be0bb807aaa78315825abc1f9179613e4e47 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 25 Feb 2017 19:06:25 +0100 Subject: [PATCH 028/673] Mpd socket and mount opts --- scripts/volumioconfig.sh | 3 +++ volumio/lib/systemd/system/djmount.service | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 46c2ef39f..e3f70c242 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -337,6 +337,9 @@ touch /var/lib/mpd/tag_cache chmod 777 /var/lib/mpd/tag_cache chmod 777 /var/lib/mpd/playlists +echo "Setting mpc to bind to unix socket" +export MPD_HOST=/run/mpd/socket + echo "Setting Permissions for /etc/modules" chmod 777 /etc/modules diff --git a/volumio/lib/systemd/system/djmount.service b/volumio/lib/systemd/system/djmount.service index a84f9cc4e..94120538f 100644 --- a/volumio/lib/systemd/system/djmount.service +++ b/volumio/lib/systemd/system/djmount.service @@ -2,7 +2,7 @@ Description = DJMmount [Service] -ExecStart=/usr/bin/djmount -o iocharset=utf8 /mnt/UPNP +ExecStart=/usr/bin/djmount -o iocharset=utf8,allow_other /mnt/UPNP Type=forking Restart=always StandardOutput=syslog From 954fa38b0a091facbfb89759e1ec6a65816a6b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 26 Feb 2017 01:51:17 +0100 Subject: [PATCH 029/673] Remove neo additions --- scripts/udooqdlconfig.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/udooqdlconfig.sh b/scripts/udooqdlconfig.sh index 5cbd39065..8205c6416 100755 --- a/scripts/udooqdlconfig.sh +++ b/scripts/udooqdlconfig.sh @@ -32,12 +32,7 @@ EOF chmod +x /usr/sbin/policy-rc.d echo "Installing additional packages" -echo "Adding UDOO's Repository" -echo "deb http://repository.udoo.org udoobuntu main" >> /etc/apt/sources.list - apt-get update -echo "Installing Firmware and Modules" -apt-get -y install firmware-udooneo-wl1831 udev-udooneo-rules udooneo-bluetooth apt-get -y install u-boot-tools echo "Installing winbind here, since it freezes networking" apt-get install -y winbind libnss-winbind From ad8afdd734f1947c97a3d284517928b7caf50159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 26 Feb 2017 12:26:10 +0100 Subject: [PATCH 030/673] Syncing the scripts, add ftp.nl.debian.org to x86 sources list --- scripts/bpiproconfig.sh | 7 +++++++ scripts/cuboxiconfig.sh | 9 +++++++-- scripts/odroidc2config.sh | 2 -- scripts/sparkyconfig.sh | 9 +++++++-- scripts/udooneoconfig.sh | 9 +++++++-- scripts/udooqdlconfig.sh | 9 +++++++-- volumio/etc/apt/sources.list.x86 | 4 ++-- 7 files changed, 37 insertions(+), 12 deletions(-) diff --git a/scripts/bpiproconfig.sh b/scripts/bpiproconfig.sh index 86d8805af..a7723362b 100755 --- a/scripts/bpiproconfig.sh +++ b/scripts/bpiproconfig.sh @@ -73,6 +73,13 @@ echo "Changing to 'modules=dep'" echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind +echo "Cleaning APT Cache" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + #First Boot operations echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart diff --git a/scripts/cuboxiconfig.sh b/scripts/cuboxiconfig.sh index 8e99433b8..bca81e8d4 100755 --- a/scripts/cuboxiconfig.sh +++ b/scripts/cuboxiconfig.sh @@ -34,8 +34,6 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additional packages" apt-get update apt-get -y install u-boot-tools -echo "Installing winbind here, since it freezes networking" -apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean @@ -73,6 +71,13 @@ echo "Changing to 'modules=dep'" echo "(otherwise cuboxi may not boot due to size of initrd)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind +echo "Cleaning APT Cache" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + #First Boot operations echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart diff --git a/scripts/odroidc2config.sh b/scripts/odroidc2config.sh index a02f36131..d4e678a89 100755 --- a/scripts/odroidc2config.sh +++ b/scripts/odroidc2config.sh @@ -36,8 +36,6 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc fbset -echo "Installing winbind here, since it freezes networking" -apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* diff --git a/scripts/sparkyconfig.sh b/scripts/sparkyconfig.sh index 53b747136..9e9d50ae5 100755 --- a/scripts/sparkyconfig.sh +++ b/scripts/sparkyconfig.sh @@ -30,8 +30,6 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools -echo "Installing winbind here, since it freezes networking" -apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* @@ -69,6 +67,13 @@ echo "Changing to 'modules=dep'" echo "(otherwise sparky may not boot due to size of initrd)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind +echo "Cleaning APT Cache" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + #First Boot operations echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart diff --git a/scripts/udooneoconfig.sh b/scripts/udooneoconfig.sh index db19da73b..c5cefc0de 100755 --- a/scripts/udooneoconfig.sh +++ b/scripts/udooneoconfig.sh @@ -33,8 +33,6 @@ chmod +x /usr/sbin/policy-rc.d apt-get update apt-get -y install u-boot-tools -echo "Installing winbind here, since it freezes networking" -apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean @@ -72,6 +70,13 @@ echo "Changing to 'modules=dep'" echo "(otherwise udoo may not boot due to size of initrd)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind +echo "Cleaning APT Cache" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + #First Boot operations echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart diff --git a/scripts/udooqdlconfig.sh b/scripts/udooqdlconfig.sh index 8205c6416..47b7b1ff9 100755 --- a/scripts/udooqdlconfig.sh +++ b/scripts/udooqdlconfig.sh @@ -34,8 +34,6 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additional packages" apt-get update apt-get -y install u-boot-tools -echo "Installing winbind here, since it freezes networking" -apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean @@ -73,6 +71,13 @@ echo "Changing to 'modules=dep'" echo "(otherwise udoo may not boot due to size of initrd)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind +echo "Cleaning APT Cache" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + #First Boot operations echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart diff --git a/volumio/etc/apt/sources.list.x86 b/volumio/etc/apt/sources.list.x86 index 5cb0c363c..842b1a3f3 100644 --- a/volumio/etc/apt/sources.list.x86 +++ b/volumio/etc/apt/sources.list.x86 @@ -1,2 +1,2 @@ -deb http://httpredir.debian.org/debian/ jessie main contrib non-free -deb-src http://httpredir.debian.org/debian/ jessie main contrib non-free +deb http://ftp.nl.debian.org/debian/ jessie main contrib non-free +deb-src http://ftp.nl.debian.org/debian/ jessie main contrib non-free From 15ebf7695a40c324f52cf4ac4a4a16e2208ebf5c Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 27 Feb 2017 02:34:02 +0100 Subject: [PATCH 031/673] Increased default size for all partitions --- scripts/armbianimage.sh | 22 +++++++++++----------- scripts/bbbimage.sh | 8 ++++---- scripts/bpim2uimage.sh | 22 +++++++++++----------- scripts/bpiproimage.sh | 22 +++++++++++----------- scripts/cuboxiimage.sh | 26 ++++++++++++-------------- scripts/odroidc1image.sh | 28 +++++++++++++--------------- scripts/odroidc2image.sh | 28 +++++++++++++--------------- scripts/odroidx2image.sh | 30 +++++++++++++++--------------- scripts/odroidxu4image.sh | 28 ++++++++++++++-------------- scripts/pine64image.sh | 23 +++++++++++------------ scripts/raspberryimage.sh | 8 +++----- scripts/sparkyimage.sh | 22 +++++++++++----------- scripts/udooneoimage.sh | 24 +++++++++++------------- scripts/udooqdlimage.sh | 24 +++++++++++------------- scripts/x86image.sh | 4 ++-- 15 files changed, 153 insertions(+), 166 deletions(-) diff --git a/scripts/armbianimage.sh b/scripts/armbianimage.sh index 36d4e201d..0ade346b6 100755 --- a/scripts/armbianimage.sh +++ b/scripts/armbianimage.sh @@ -21,7 +21,7 @@ done old="$IFS" set -f; IFS='_' set -- $DEVICE -BOARD=$2 +BOARD=$2 BRANCH=$3 set +f IFS="$old" @@ -37,8 +37,8 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` @@ -46,8 +46,8 @@ LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` parted -s "${LOOP_DEV}" mklabel msdos # parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -73,13 +73,13 @@ mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -126,14 +126,14 @@ dd if=/mnt/volumio/rootfs/boot/u-boot-sunxi-with-spl.bin of=${LOOP_DEV} bs=1024 rm /mnt/volumio/rootfs/armbianconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" -echo "==> BPI-PRO device installed" +echo "==> BPI-PRO device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" diff --git a/scripts/bbbimage.sh b/scripts/bbbimage.sh index 16ce69043..b840f86e4 100755 --- a/scripts/bbbimage.sh +++ b/scripts/bbbimage.sh @@ -32,8 +32,8 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=896 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo Copying bootloader and U-Boot dd if=platform-bbb/opt/backup/uboot/MLO of=${IMG_FILE} count=1 seek=1 bs=128k conv=notrunc @@ -45,8 +45,8 @@ LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 4 63 -parted -s "${LOOP_DEV}" mkpart primary ext3 64 831 -parted -s "${LOOP_DEV}" mkpart primary ext3 832 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 64 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" diff --git a/scripts/bpim2uimage.sh b/scripts/bpim2uimage.sh index 104bb6fb0..77facfc8a 100755 --- a/scripts/bpim2uimage.sh +++ b/scripts/bpim2uimage.sh @@ -26,16 +26,16 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1700 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` # Note: leave the first 20Mb free for the firmware parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 105 172 -parted -s "${LOOP_DEV}" mkpart primary ext3 172 1650 -parted -s "${LOOP_DEV}" mkpart primary ext3 1650 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 172 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -61,7 +61,7 @@ sync echo "Preparing for the banana bpi-m2u kernel/ platform files" if [ -d platform-banana ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-banana folder # that will refresh all the bananapi platforms, see below @@ -85,13 +85,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -151,14 +151,14 @@ mv /mnt/volumio/rootfs/boot/uInitrd /mnt/volumio/rootfs/boot/bananapi/bpi-m2u/li rm /mnt/volumio/rootfs/bpim2uconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" -echo "==> BPI-M2U device installed" +echo "==> BPI-M2U device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" diff --git a/scripts/bpiproimage.sh b/scripts/bpiproimage.sh index 85fe949de..a19790399 100755 --- a/scripts/bpiproimage.sh +++ b/scripts/bpiproimage.sh @@ -26,16 +26,16 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` # Note: leave the first 20Mb free for the firmware parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -61,7 +61,7 @@ sync echo "Preparing for the banana bpi-pro kernel/ platform files" if [ -d platform-banana ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-banana folder # that will refresh all the bananapi platforms, see below @@ -90,13 +90,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -147,14 +147,14 @@ EOF rm /mnt/volumio/rootfs/bpiproconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" -echo "==> BPI-PRO device installed" +echo "==> BPI-PRO device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index f86dc2ef4..b5f47cf7f 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -25,16 +25,16 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -60,7 +60,7 @@ sync echo "Preparing for the cubox kernel/ platform files" if [ -d platform-cuboxi ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-cuboxi folder else @@ -81,13 +81,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -140,11 +140,11 @@ EOF rm /mnt/volumio/rootfs/cuboxiconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> cuboxi device installed" +echo "==> cuboxi device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -188,5 +188,3 @@ rm -rf /mnt/volumio /mnt/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index f06966ddc..d441e539a 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -26,16 +26,16 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -61,13 +61,13 @@ sync echo "Preparing for the Odroid C1/C1+ kernel/ platform files" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidc1 ]; then - tar xfJ odroidc1.tar.xz + tar xfJ odroidc1.tar.xz fi cd .. else @@ -87,13 +87,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -152,16 +152,16 @@ EOF rm /mnt/volumio/rootfs/odroidc1config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys echo "Copying LIRC configuration files for HK stock remote" cp platform-odroid/odroidc1/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc1/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc1/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -echo "==> Odroid-C1 device installed" +echo "==> Odroid-C1 device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -205,5 +205,3 @@ rm -rf /mnt/volumio /mnt/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index 6e76f28db..563784eb4 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -26,16 +26,16 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -61,13 +61,13 @@ sync echo "Preparing for the Odroid C2 kernel/ platform files" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidc2 ]; then - tar xfJ odroidc2.tar.xz + tar xfJ odroidc2.tar.xz fi cd .. else @@ -87,13 +87,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -148,16 +148,16 @@ EOF rm /mnt/volumio/rootfs/odroidc2config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys echo "Copying LIRC configuration files for HK stock remote" cp platform-odroid/odroidc2/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc2/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc cp platform-odroid/odroidc2/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -echo "==> Odroid-C2 device installed" +echo "==> Odroid-C2 device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -201,5 +201,3 @@ rm -rf /mnt/volumio /mnt/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/odroidx2image.sh b/scripts/odroidx2image.sh index b9c99604a..ddc7324ac 100755 --- a/scripts/odroidx2image.sh +++ b/scripts/odroidx2image.sh @@ -26,16 +26,16 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 3072s 64 -parted -s "${LOOP_DEV}" mkpart primary ext4 64 1500 -parted -s "${LOOP_DEV}" mkpart primary ext4 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext4 64 2500 +parted -s "${LOOP_DEV}" mkpart primary ext4 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -61,13 +61,13 @@ sync echo "Get the Odroid kernel/ platform files from repo" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidx2 ]; then - tar xfJ odroidx2.tar.xz + tar xfJ odroidx2.tar.xz fi cd .. else @@ -75,7 +75,7 @@ else git clone https://github.com/gkkpch/Platform-Odroid.git platform-odroid echo "Unpack the X2 platform files" cd platform-odroid - tar xfJ odroidx2.tar.xz + tar xfJ odroidx2.tar.xz cd .. fi @@ -85,7 +85,7 @@ dd iflag=dsync oflag=dsync if=platform-odroid/odroidx2/uboot/bl2.signed.bin of=$ dd iflag=dsync oflag=dsync if=platform-odroid/odroidx2/uboot/u-boot.bin of=${LOOP_DEV} seek=63 dd iflag=dsync oflag=dsync if=platform-odroid/odroidx2/uboot/E4412_S.tzsw.signed.bin of=${LOOP_DEV} seek=2111 -echo "Erasing and writing u-boot environment" +echo "Erasing and writing u-boot environment" dd if=/dev/zero of=${LOOP_DEV} bs=1 seek=1310720 count=4096 echo "${LOOP_DEV} 0x140000 0x1000" > /etc/fw_env.config fw_setenv bootcmd 'run loadscript' @@ -99,13 +99,13 @@ sync echo "Copying Volumio RootFs" if [ -d /mnt ] -then +then echo "/mnt/folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -159,12 +159,12 @@ EOF rm /mnt/volumio/rootfs/odroidx2config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys sync -echo "Odroid-XU4 device installed" +echo "Odroid-XU4 device installed" echo "Preparing rootfs base for SquashFS" diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index fd32fc483..aa97e24cf 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -26,16 +26,16 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 3072s 64 -parted -s "${LOOP_DEV}" mkpart primary ext4 64 1500 -parted -s "${LOOP_DEV}" mkpart primary ext4 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext4 64 2500 +parted -s "${LOOP_DEV}" mkpart primary ext4 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" @@ -61,13 +61,13 @@ sync echo "Get the Odroid kernel/ platform files from repo" if [ -d platform-odroid ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-odroid folder # that will refresh all the odroid platforms, see below cd platform-odroid if [ ! -d odroidxu4 ]; then - tar xfJ odroidxu4.tar.xz + tar xfJ odroidxu4.tar.xz fi cd .. else @@ -75,7 +75,7 @@ else git clone https://github.com/gkkpch/Platform-Odroid.git platform-odroid echo "Unpack the XU4 platform files" cd platform-odroid - tar xfJ odroidxu4.tar.xz + tar xfJ odroidxu4.tar.xz cd .. fi @@ -91,13 +91,13 @@ sync echo "Copying Volumio RootFs" if [ -d /mnt ] -then +then echo "/mnt/folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -146,15 +146,15 @@ EOF rm /mnt/volumio/rootfs/odroidxu4config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #TODO echo "Copying inittab" #TODO cp platform-odroid/odroidxu4/etc/inittab /mnt/volumio/etc/ sync -echo "Odroid-XU4 device installed" +echo "Odroid-XU4 device installed" echo "Preparing rootfs base for SquashFS" diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 2d7623c3e..0500e7cc9 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -26,17 +26,17 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` # Note: leave the first 20Mb free for the firmware sudo parted -s "${LOOP_DEV}" mklabel msdos sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 1520 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 1520 100% +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% sudo parted -s "${LOOP_DEV}" set 1 boot on sudo parted -s "${LOOP_DEV}" print sudo partprobe "${LOOP_DEV}" @@ -62,7 +62,7 @@ sync echo "Preparing for the pine64 kernel/ platform files" if [ -d platform-pine64 ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-pine64 folder # that will refresh all the odroid platforms, see below @@ -82,13 +82,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else sudo mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -143,16 +143,16 @@ EOF rm /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" #sudo cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc #sudo cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc #sudo cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -echo "==> Pine64 device installed" +echo "==> Pine64 device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -196,4 +196,3 @@ rm -rf /mnt/volumio /mnt/boot sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync - diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 908369223..f28b0d6d1 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -20,13 +20,13 @@ echo "Creating Image Bed" echo "Image file: ${IMG_FILE}" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=2700 +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` sudo parted -s "${LOOP_DEV}" mklabel msdos sudo parted -s "${LOOP_DEV}" mkpart primary fat32 0 64 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 64 2300 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2300 2700 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 64 2500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 2800 sudo parted -s "${LOOP_DEV}" set 1 boot on sudo parted -s "${LOOP_DEV}" print sudo partprobe "${LOOP_DEV}" @@ -146,5 +146,3 @@ rm -rf /mnt/volumio /mnt/boot dmsetup remove_all sudo losetup -d ${LOOP_DEV} - - diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index 8ba358e92..6e10fc84d 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -26,15 +26,15 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + sudo parted -s "${LOOP_DEV}" mklabel msdos sudo parted -s "${LOOP_DEV}" mkpart primary fat32 8 71 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 71 1500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 71 2500 sudo parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% sudo parted -s "${LOOP_DEV}" set 1 boot on sudo parted -s "${LOOP_DEV}" print @@ -61,7 +61,7 @@ sync echo "Preparing for the sparky kernel/ platform files" if [ -d platform-sparky ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-sparky folder else @@ -80,13 +80,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else sudo mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -136,11 +136,11 @@ EOF rm /mnt/volumio/rootfs/sparkyconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> sparky device installed" +echo "==> sparky device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 81a94b727..d16870e86 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -26,15 +26,15 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print @@ -61,7 +61,7 @@ sync echo "Preparing for the udoo kernel/ platform files" if [ -d platform-udoo ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-udoo folder else @@ -82,13 +82,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -134,11 +134,11 @@ EOF rm /mnt/volumio/rootfs/udooneoconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> udoo-neo device installed" +echo "==> udoo-neo device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -182,5 +182,3 @@ rm -rf /mnt/volumio /mnt/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index 75d7beebd..37eca2104 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -26,15 +26,15 @@ else DISTRO="Debian 32bit" fi -echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=1600 +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - + parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 65 1500 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print @@ -61,7 +61,7 @@ sync echo "Preparing for the udoo kernel/ platform files" if [ -d platform-udoo ] -then +then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-udoo folder else @@ -82,13 +82,13 @@ sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] -then +then echo "/mount folder exist" else mkdir /mnt fi if [ -d /mnt/volumio ] -then +then echo "Volumio Temp Directory Exists - Cleaning it" rm -rf /mnt/volumio/* else @@ -132,11 +132,11 @@ EOF rm /mnt/volumio/rootfs/udooqdlconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys -echo "==> udoo-qdl device installed" +echo "==> udoo-qdl device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -180,5 +180,3 @@ rm -rf /mnt/volumio /mnt/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync - - diff --git a/scripts/x86image.sh b/scripts/x86image.sh index d4be3234b..a1863ac68 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -16,12 +16,12 @@ IMG_FILE="Volumio${VERSION}-${BUILDDATE}-x86.img" echo "Creating Image Bed" echo "Image file: ${IMG_FILE}" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=3500 +dd if=/dev/zero of=${IMG_FILE} bs=1M count=3900 LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` sudo parted -s "${LOOP_DEV}" mklabel gpt sudo parted -s "${LOOP_DEV}" mkpart primary 1 512 #legacy and uefi boot -sudo parted -s "${LOOP_DEV}" mkpart primary 512 3200 #volumio +sudo parted -s "${LOOP_DEV}" mkpart primary 512 3500 #volumio sudo parted -s "${LOOP_DEV}" mkpart primary 3200 100% #data sudo parted -s "${LOOP_DEV}" set 1 legacy_boot on sudo parted -s "${LOOP_DEV}" set 1 esp on From 63414f81565cc9fd06bc210648aa1b7c617f826f Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 1 Mar 2017 12:12:45 +0100 Subject: [PATCH 032/673] UDOO Neo coherent image naming --- scripts/udooneoimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index d16870e86..3f93644d5 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-udoo-neo.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-udooneo.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" From ed3e63a935d3a287ee1308a51d4370271e8db2ec Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 1 Mar 2017 15:58:49 +0100 Subject: [PATCH 033/673] extract files --- scripts/udooneoimage.sh | 9 +++++++-- scripts/udooqdlimage.sh | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 3f93644d5..c6a3084df 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -64,10 +64,15 @@ if [ -d platform-udoo ] then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platforms-udoo folder + cd platform-udoo + tar xfJ udoo-neo.tar.xz + tar xfJ udoo-qdl.tar.xz + cd .. + else - echo "Clone all cubox files from repo" + echo "Clone all UDOO files from repo" git clone https://github.com/volumio/platform-udoo.git platform-udoo - echo "Unpack the cubox platform files" + echo "Unpack the UDOO platform files" cd platform-udoo tar xfJ udoo-neo.tar.xz cd .. diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index 37eca2104..2499f9383 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -18,7 +18,7 @@ while getopts ":v:p:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-udoo-qdl.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-udooqdl.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" From d9c908b2f4743e8116bc82494c8f7a64cb95d63f Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 1 Mar 2017 22:51:20 +0100 Subject: [PATCH 034/673] Adding MrEngman drivers for armv6 Replaces #154 After more careful reading, depmod for armv7 and armv6 in each install.sh will work under armv7 QEMU BTW: if depmod in firststart.sh was for this, then it can be safely removed (anyway a reboot is required for such change to take effect, and it does not seem firststart.sh triggers a reboot) --- scripts/raspberryconfig.sh | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 220552f37..d85be7c0a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -173,30 +173,54 @@ KERNEL_REV="884" mkdir wifi cd wifi -echo "WIFI: 8192EU" +echo "WIFI: 8192EU for armv7" wget https://dl.dropboxusercontent.com/u/80256631/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * -echo "WIFI: 8812AU" +echo "WIFI: 8192EU for armv6" +wget https://dl.dropboxusercontent.com/u/80256631/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +tar xf 8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +./install.sh +rm -rf * + +echo "WIFI: 8812AU for armv7" wget https://dl.dropboxusercontent.com/u/80256631/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * -echo "WIFI: 8188EU" +echo "WIFI: 8812AU for armv6" +wget https://dl.dropboxusercontent.com/u/80256631/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz +tar xf 8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz +./install.sh +rm -rf * + +echo "WIFI: 8188EU for armv7" wget https://dl.dropboxusercontent.com/u/80256631/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * -echo "WIFI: MT7610" +echo "WIFI: 8188EU for armv6" +wget https://dl.dropboxusercontent.com/u/80256631/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +tar xf 8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +./install.sh +rm -rf * + +echo "WIFI: MT7610 for armv7" wget https://dl.dropboxusercontent.com/u/80256631/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * +echo "WIFI: MT7610 for armv6" +wget https://dl.dropboxusercontent.com/u/80256631/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz +tar xf mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz +./install.sh +rm -rf * + cd .. rm -rf wifi From 89a655261d3e90f6b1c2a32ed3d76eb1b3a8956a Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 1 Mar 2017 23:35:34 +0100 Subject: [PATCH 035/673] avoid services start during install --- scripts/raspberryconfig.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d85be7c0a..54082ac63 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -29,6 +29,13 @@ echo " i2c-dev " >> /etc/modules +echo "Prevent services starting during install, running under chroot" +echo "(avoids unnecessary errors)" +cat > /usr/sbin/policy-rc.d << EOF +exit 101 +EOF +chmod +x /usr/sbin/policy-rc.d + echo "Alsa Raspberry PI Card Ordering" echo " options snd-usb-audio nrpacks=1 From 92c65b4a32304ccf0788f23819c0ab72547c2c2d Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 2 Mar 2017 00:58:07 +0100 Subject: [PATCH 036/673] better prevention of service start --- scripts/raspberryconfig.sh | 7 ------- scripts/volumioconfig.sh | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 54082ac63..d85be7c0a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -29,13 +29,6 @@ echo " i2c-dev " >> /etc/modules -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Alsa Raspberry PI Card Ordering" echo " options snd-usb-audio nrpacks=1 diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index e3f70c242..c7b1f584a 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -2,6 +2,13 @@ # This script will be run in chroot under qemu. +echo "Prevent services starting during install, running under chroot" +echo "(avoids unnecessary errors)" +cat > /usr/sbin/policy-rc.d << EOF +exit 101 +EOF +chmod +x /usr/sbin/policy-rc.d + export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true export LC_ALL=C LANGUAGE=C LANG=C /var/lib/dpkg/info/dash.preinst install From 89eb4a38f18e60b1f10322509d9b015f396e3858 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 2 Mar 2017 01:31:43 +0100 Subject: [PATCH 037/673] Harmonization of policy-rc.d --- scripts/armbianconfig.sh | 24 ++++++++++-------------- scripts/bbbconfig.sh | 15 +++------------ scripts/bpim2uconfig.sh | 4 +++- scripts/bpiproconfig.sh | 11 ++++++----- scripts/cuboxiconfig.sh | 19 +++++++------------ scripts/odroidc1config.sh | 9 +-------- scripts/odroidc2config.sh | 11 +++-------- scripts/odroidx2config.sh | 16 +++------------- scripts/odroidxu4config.sh | 12 ++++-------- scripts/pine64config.sh | 12 +++--------- scripts/raspberryconfig.sh | 5 +++-- scripts/sparkyconfig.sh | 16 +++------------- scripts/udooneoconfig.sh | 15 +++------------ scripts/udooqdlconfig.sh | 15 +++------------ 14 files changed, 55 insertions(+), 129 deletions(-) diff --git a/scripts/armbianconfig.sh b/scripts/armbianconfig.sh index 568d62395..e3866c459 100755 --- a/scripts/armbianconfig.sh +++ b/scripts/armbianconfig.sh @@ -10,7 +10,7 @@ echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 # /dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 /dev/mmcblk0p1 /boot ext4 defaults -tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -27,24 +27,12 @@ tmpfs /dev/shm tmpfs defaults 0 0 #echo "Blacklisting 8723bs_vq0" #echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-pine64.conf -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - apt-get update apt-get -y install u-boot-tools liblircclient0 lirc aptitude bc echo "Installing additonal packages" . /root/upgrade_armbian.sh -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d - echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules echo "overlayfs" >> /etc/initramfs-tools/modules @@ -73,6 +61,15 @@ rm -rf ${PATCH} fi rm /patch +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + echo "Changing to 'modules=dep'" echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf @@ -88,4 +85,3 @@ echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/volumiord echo "Cleaning up" # rm /boot/volumio.initrd - diff --git a/scripts/bbbconfig.sh b/scripts/bbbconfig.sh index 997462c44..98533f642 100755 --- a/scripts/bbbconfig.sh +++ b/scripts/bbbconfig.sh @@ -16,22 +16,11 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults 0 0 " > /etc/fstab -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d - echo "Adding custom modules loop, overlayfs, squashfs, nls_cp437, usb-storage and nls_iso8859_1" echo "loop" >> /etc/initramfs-tools/modules echo "overlay" >> /etc/initramfs-tools/modules @@ -72,9 +61,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" diff --git a/scripts/bpim2uconfig.sh b/scripts/bpim2uconfig.sh index 8cb42f28d..7f1145bd9 100755 --- a/scripts/bpim2uconfig.sh +++ b/scripts/bpim2uconfig.sh @@ -76,9 +76,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" diff --git a/scripts/bpiproconfig.sh b/scripts/bpiproconfig.sh index a7723362b..9e68f9c41 100755 --- a/scripts/bpiproconfig.sh +++ b/scripts/bpiproconfig.sh @@ -9,7 +9,7 @@ echo "# BPI-PRO fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 -tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -26,7 +26,7 @@ tmpfs /dev/shm tmpfs defaults 0 0 #echo "Blacklisting 8723bs_vq0" #echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-pine64.conf -echo "Prevent services starting during install, running under chroot" +echo "Prevent services starting during install, running under chroot" echo "(avoids unnecessary errors)" cat > /usr/sbin/policy-rc.d << EOF exit 101 @@ -35,7 +35,7 @@ chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update -apt-get -y install u-boot-tools liblircclient0 lirc +apt-get -y install u-boot-tools liblircclient0 lirc echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* @@ -76,9 +76,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" @@ -91,4 +93,3 @@ echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd echo "Cleaning up" # rm /boot/volumio.initrd - diff --git a/scripts/cuboxiconfig.sh b/scripts/cuboxiconfig.sh index bca81e8d4..9854cafa4 100755 --- a/scripts/cuboxiconfig.sh +++ b/scripts/cuboxiconfig.sh @@ -24,20 +24,9 @@ echo "Adding sound modules" #..... #" >> /etc/modules -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Installing additional packages" apt-get update apt-get -y install u-boot-tools -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules @@ -74,9 +63,15 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" diff --git a/scripts/odroidc1config.sh b/scripts/odroidc1config.sh index 8a5ca9b8f..be7288a3c 100755 --- a/scripts/odroidc1config.sh +++ b/scripts/odroidc1config.sh @@ -26,13 +26,6 @@ echo "#!/bin/sh -e /usr/local/bin/c1-init.sh exit 0" > /etc/rc.local -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc fbset @@ -64,8 +57,8 @@ rm -rf ${PATCH} fi rm /patch -#MUST BE PLACED AFTER EVERYTHING THAT NEEDS NETWORKING echo "Installing winbind here, since it freezes networking" +apt-get update apt-get install -y winbind libnss-winbind echo "Cleaning APT Cache and remove policy file" diff --git a/scripts/odroidc2config.sh b/scripts/odroidc2config.sh index d4e678a89..09fb5abd9 100755 --- a/scripts/odroidc2config.sh +++ b/scripts/odroidc2config.sh @@ -26,13 +26,6 @@ echo "#!/bin/sh -e /usr/local/bin/c2-init.sh exit 0" > /etc/rc.local -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc fbset @@ -76,9 +69,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" diff --git a/scripts/odroidx2config.sh b/scripts/odroidx2config.sh index 885558203..9be0cab0e 100755 --- a/scripts/odroidx2config.sh +++ b/scripts/odroidx2config.sh @@ -19,22 +19,10 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults 0 0 " > /etc/fstab -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools -echo "Cleaning APT Cache" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d - echo "Adding custom module squashfs" echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules @@ -71,9 +59,11 @@ rm /patch echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations diff --git a/scripts/odroidxu4config.sh b/scripts/odroidxu4config.sh index 976e1f44d..0a19efd44 100755 --- a/scripts/odroidxu4config.sh +++ b/scripts/odroidxu4config.sh @@ -19,12 +19,6 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults 0 0 " > /etc/fstab -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d echo "Installing additonal packages" apt-get update @@ -33,7 +27,7 @@ apt-get -y install u-boot-tools echo "Cleaning APT Cache" rm -f /var/lib/apt/lists/*archive* apt-get clean -rm /usr/sbin/policy-rc.d + echo "Adding custom module squashfs" echo "overlay" >> /etc/initramfs-tools/modules @@ -80,9 +74,11 @@ rm /patch echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations diff --git a/scripts/pine64config.sh b/scripts/pine64config.sh index feb956c74..6ea0afec9 100755 --- a/scripts/pine64config.sh +++ b/scripts/pine64config.sh @@ -26,13 +26,6 @@ sunxi_sndcodec echo "Blacklisting 8723bs_vq0" echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-pine64.conf -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc @@ -40,7 +33,6 @@ apt-get -y install u-boot-tools liblircclient0 lirc echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean -rm /usr/sbin/policy-rc.d echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules @@ -76,9 +68,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d85be7c0a..a7d07666a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -288,12 +288,13 @@ fi echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations - echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart diff --git a/scripts/sparkyconfig.sh b/scripts/sparkyconfig.sh index 9e9d50ae5..c22064a38 100755 --- a/scripts/sparkyconfig.sh +++ b/scripts/sparkyconfig.sh @@ -20,22 +20,10 @@ tmpfs /dev/shm tmpfs defaults 0 0 #echo "snd-soc-allo-piano-dac-plus #snd-soc-allo-piano-dac" >> /etc/modules -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d - echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules @@ -70,9 +58,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" diff --git a/scripts/udooneoconfig.sh b/scripts/udooneoconfig.sh index c5cefc0de..3b1b033ea 100755 --- a/scripts/udooneoconfig.sh +++ b/scripts/udooneoconfig.sh @@ -24,19 +24,8 @@ echo "Adding sound modules" #..... #" >> /etc/modules -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - apt-get update apt-get -y install u-boot-tools -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules @@ -73,9 +62,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" diff --git a/scripts/udooqdlconfig.sh b/scripts/udooqdlconfig.sh index 47b7b1ff9..d2c74a6e3 100755 --- a/scripts/udooqdlconfig.sh +++ b/scripts/udooqdlconfig.sh @@ -24,20 +24,9 @@ echo "Adding sound modules" #..... #" >> /etc/modules -echo "Prevent services starting during install, running under chroot" -echo "(avoids unnecessary errors)" -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - echo "Installing additional packages" apt-get update apt-get -y install u-boot-tools -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules @@ -74,9 +63,11 @@ sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache" + +echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean +rm /usr/sbin/policy-rc.d #First Boot operations echo "Signalling the init script to re-size the volumio data partition" From 63f44cb8f560ec3f64dbacba6536bb74d6756622 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 2 Mar 2017 01:37:02 +0100 Subject: [PATCH 038/673] libupnp6_1.6.20.jfd5 --- scripts/volumioconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index c7b1f584a..5a6a1f854 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -163,15 +163,15 @@ if [ $(uname -m) = armv7l ]; then echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/arm/upmpdcli_1.2.12-1_armhf.deb wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnpp2_0.14.1-1_armhf.deb - wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnp6_1.6.20.jfd5-1_armhf.deb + wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnp6_1.6.19.jfd3-1_armhf.deb wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnpp3_0.15.1-1_armhf.deb dpkg -i libupnpp3_0.15.1-1_armhf.deb dpkg -i libupnpp2_0.14.1-1_armhf.deb - dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb + dpkg -i libupnp6_1.6.19.jfd3-1_armhf.deb dpkg -i upmpdcli_1.2.12-1_armhf.deb rm /libupnpp3_0.15.1-1_armhf.deb rm /upmpdcli_1.2.12-1_armhf.deb - rm /libupnp6_1.6.20.jfd5-1_armhf.deb + rm /libupnp6_1.6.19.jfd3-1_armhf.deb rm /libupnpp2_0.14.1-1_armhf.deb #Remove autostart of upmpdcli From 9b7de0ee990593b665cb5a41ddfdcb5720a3ff00 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 2 Mar 2017 19:07:10 +0100 Subject: [PATCH 039/673] commented strip --- scripts/configure.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index 268260364..065a07f96 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -90,12 +90,12 @@ echo 'Done Copying Custom Volumio System Files' echo "Stripping binaries and libraries to save space" -echo "Size before strip"$( du -sh build/$BUILD/root/ ) -find build/$BUILD/root/usr/lib -type f -name \*.a -exec strip --strip-debug {} ';' -find build/$BUILD/root/usr/lib -type f -name \*.so* -exec strip --strip-unneeded {} ';' -find build/$BUILD/root/lib -type f -name \*.so* -exec strip --strip-unneeded {} ';' -find build/$BUILD/root/sbin -type f -exec strip --strip-all {} ';' -find build/$BUILD/root/bin -type f -exec strip --strip-all {} ';' -find build/$BUILD/root/usr/bin -type f -exec strip --strip-all {} ';' -find build/$BUILD/root/usr/sbin -type f -exec strip --strip-all {} ';' -echo "Size after strip"$( du -sh build/$BUILD/root/ ) +#echo "Size before strip"$( du -sh build/$BUILD/root/ ) +#find build/$BUILD/root/usr/lib -type f -name \*.a -exec strip --strip-debug {} ';' +#find build/$BUILD/root/usr/lib -type f -name \*.so* -exec strip --strip-unneeded {} ';' +#find build/$BUILD/root/lib -type f -name \*.so* -exec strip --strip-unneeded {} ';' +#find build/$BUILD/root/sbin -type f -exec strip --strip-all {} ';' +#find build/$BUILD/root/bin -type f -exec strip --strip-all {} ';' +#find build/$BUILD/root/usr/bin -type f -exec strip --strip-all {} ';' +#find build/$BUILD/root/usr/sbin -type f -exec strip --strip-all {} ';' +#echo "Size after strip"$( du -sh build/$BUILD/root/ ) From 06c3418cc05b00bbf37aaf871488636b46c96467 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 2 Mar 2017 19:08:28 +0100 Subject: [PATCH 040/673] USB and NAS via network --- volumio/etc/samba/smb.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/volumio/etc/samba/smb.conf b/volumio/etc/samba/smb.conf index c2386fa2e..48aee51b9 100644 --- a/volumio/etc/samba/smb.conf +++ b/volumio/etc/samba/smb.conf @@ -15,3 +15,16 @@ os level = 30 path = /data/INTERNAL read only = no guest ok = yes + +[USB] + comment = Volumio Internal Music Folder + path = /mnt/USB + read only = no + guest ok = yes + +[NAS] + comment = Volumio Internal Music Folder + path = /mnt/NAS + read only = no + guest ok = yes + From d03de7bef831745f012342548009153f553dc530 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 3 Mar 2017 17:51:13 +0100 Subject: [PATCH 041/673] Adding depmod to finalize any driver installs We are adding depmod statement at the end to make sure custom drivers are properly installed for both kernels. Note: KERNEL_VERSION and KERNEL_REV definitions (also used for MrEngman wifi drivers) are moved close to where kernel is downloaded, so that all are eventually changed together in the future to avoid mismatch!... --- scripts/raspberryconfig.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index a7d07666a..7dacc4ae6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -58,6 +58,8 @@ mkdir /lib/modules # Kernel 4.4.9 for Pi3 Support # see https://github.com/raspberrypi/firmware/commit/cc6d7bf8b4c03a2a660ff9fdf4083fc165620866 # and https://github.com/Hexxeh/rpi-firmware/issues/118 +KERNEL_VERSION="4.4.9" +KERNEL_REV="884" echo y | SKIP_BACKUP=1 rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f71140155 @@ -167,9 +169,6 @@ chmod a+x /bin/wifistart.sh echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" -KERNEL_VERSION="4.4.9" -KERNEL_REV="884" - mkdir wifi cd wifi @@ -289,6 +288,10 @@ echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind +echo "Finalising drivers installation with depmod on $KERNEL_VERSION+ and $KERNEL_VERSION-v7+" +depmod $KERNEL_VERSION+ +depmod $KERNEL_VERSION-v7+ + echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean From c7940f91788700340ebff1479baf13466ea84e00 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 3 Mar 2017 17:55:02 +0100 Subject: [PATCH 042/673] remove depmod from firststart.sh Is not necessary here: better be done in platform specific scripts (would need additional reboot to have any effect). --- volumio/bin/firststart.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/volumio/bin/firststart.sh b/volumio/bin/firststart.sh index d8f2bd309..7c93715b0 100755 --- a/volumio/bin/firststart.sh +++ b/volumio/bin/firststart.sh @@ -1,17 +1,5 @@ #!/bin/bash -KERNEL="4.4.9" - -echo "Volumio first start configuration script" - -echo "Doing Depmod, to install additional firmware and modules" -echo "Doing depmod for ordinary kernel" -cd /lib/modules/${KERNEL}+ -depmod -echo "Doing depmod for v7 kernel" -cd /lib/modules/${KERNEL}-v7+ -depmod - echo "configuring unconfigured packages" dpkg --configure --pending From 4942828afd81d69bd4e0ce015c9c97d51082ffbd Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 3 Mar 2017 17:57:25 +0100 Subject: [PATCH 043/673] Update firststart.sh --- volumio/bin/firststart.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/volumio/bin/firststart.sh b/volumio/bin/firststart.sh index 7c93715b0..a9883d49a 100755 --- a/volumio/bin/firststart.sh +++ b/volumio/bin/firststart.sh @@ -1,5 +1,7 @@ #!/bin/bash +echo "Volumio first start configuration script" + echo "configuring unconfigured packages" dpkg --configure --pending From eba8d6981834a1c83e57fb5f6133311b13e568fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 3 Mar 2017 19:55:46 +0100 Subject: [PATCH 044/673] Linux header files added to /usr/include --- scripts/cuboxiimage.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index b5f47cf7f..e9516eb6a 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -108,6 +108,8 @@ echo "Copying cuboxi boot files, Kernel, Modules and Firmware" cp platform-cuboxi/cuboxi/boot/* /mnt/volumio/rootfs/boot cp -pdR platform-cuboxi/cuboxi/lib/modules /mnt/volumio/rootfs/lib cp -pdR platform-cuboxi/cuboxi/lib/firmware /mnt/volumio/rootfs/lib +cp -pdR platform-cuboxi/cuboxi/usr /mnt/volumio/rootfs + cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4329-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4330-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ From 1ae258b5f9ebdea05a2f5aa70a79ad6ff22f3cdc Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 3 Mar 2017 21:26:48 +0100 Subject: [PATCH 045/673] improper git option (typo) -bmaster vs -b master in Volumio2 clone --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 019163af1..10173955a 100755 --- a/build.sh +++ b/build.sh @@ -148,7 +148,7 @@ if [ -n "$BUILD" ]; then echo 'Cloning Volumio Node Backend' mkdir build/$BUILD/root/volumio - git clone --depth 1 -bmaster --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git build/$BUILD/root/volumio/http/www From 51b7180e865bc7eb67fe0c09f79c3351645ec622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 4 Mar 2017 11:38:35 +0100 Subject: [PATCH 046/673] Add linux-headers as a tarball --- scripts/cuboxiconfig.sh | 4 ---- scripts/cuboxiimage.sh | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/cuboxiconfig.sh b/scripts/cuboxiconfig.sh index 9854cafa4..27e61fbb3 100755 --- a/scripts/cuboxiconfig.sh +++ b/scripts/cuboxiconfig.sh @@ -64,10 +64,6 @@ echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Installing winbind here, since it freezes networking" -apt-get update -apt-get install -y winbind libnss-winbind - echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index e9516eb6a..166630d89 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -108,7 +108,7 @@ echo "Copying cuboxi boot files, Kernel, Modules and Firmware" cp platform-cuboxi/cuboxi/boot/* /mnt/volumio/rootfs/boot cp -pdR platform-cuboxi/cuboxi/lib/modules /mnt/volumio/rootfs/lib cp -pdR platform-cuboxi/cuboxi/lib/firmware /mnt/volumio/rootfs/lib -cp -pdR platform-cuboxi/cuboxi/usr /mnt/volumio/rootfs +tar cfJ /mnt/volumio/rootfs/usr/linux-headers.tar.xz platform-cuboxi/cuboxi/usr/include cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4329-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4330-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ From 8a71b11c34a136722f1faa0f456ad34c33f57661 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 4 Mar 2017 19:17:37 +0100 Subject: [PATCH 047/673] Fixed ata modules copy --- scripts/x86image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/x86image.sh b/scripts/x86image.sh index a1863ac68..32f18f5d2 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -93,7 +93,7 @@ cp volumio/splash/volumio.png /mnt/volumio/rootfs/boot cp scripts/initramfs/init-x86 /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin -cp volumio/etc/ata-modules.x86 /mnt/volumio/rootfs/root/ata-modules.x86 +cp volumio/etc/ata-modules.x86 /mnt/volumio/rootfs/ata-modules.x86 #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater @@ -125,7 +125,7 @@ EOF rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-image-*.deb rm /mnt/volumio/rootfs/linux-firmware-*.deb /mnt/volumio/rootfs/e1000e.ko rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86config.sh -rm /mnt/volumio/rootfs/root/ata-modules.x86 +rm /mnt/volumio/rootfs/ata-modules.x86 sync echo "Unmounting Temp Devices" From 905604af8f8718a1817f6bb7dc032a656e4f02c4 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 5 Mar 2017 00:40:42 +0100 Subject: [PATCH 048/673] fix x86 size --- scripts/x86image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 32f18f5d2..786e9c360 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -22,7 +22,7 @@ LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` sudo parted -s "${LOOP_DEV}" mklabel gpt sudo parted -s "${LOOP_DEV}" mkpart primary 1 512 #legacy and uefi boot sudo parted -s "${LOOP_DEV}" mkpart primary 512 3500 #volumio -sudo parted -s "${LOOP_DEV}" mkpart primary 3200 100% #data +sudo parted -s "${LOOP_DEV}" mkpart primary 3500 100% #data sudo parted -s "${LOOP_DEV}" set 1 legacy_boot on sudo parted -s "${LOOP_DEV}" set 1 esp on sudo partprobe "${LOOP_DEV}" From ddc7b98ecb6291b94d3dae03e6f4cae824499446 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 5 Mar 2017 00:54:12 +0100 Subject: [PATCH 049/673] Commit references --- build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 10173955a..0cec46b9a 100755 --- a/build.sh +++ b/build.sh @@ -55,6 +55,7 @@ function check_os_release { fi echo "VOLUMIO_VERSION=\"${VERSION}\"" >> build/${ARCH_BUILD}/root/etc/os-release echo "VOLUMIO_HARDWARE=\"${DEVICE}\"" >> build/${ARCH_BUILD}/root/etc/os-release + echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/${ARCH_BUILD}/root/etc/os-release } @@ -149,9 +150,10 @@ if [ -n "$BUILD" ]; then echo 'Cloning Volumio Node Backend' mkdir build/$BUILD/root/volumio git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio - + echo "VOLUMIO_BE_VERSION=\"$(git --git-dir /volumio/.git rev-parse HEAD)\"" >> os-release echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git build/$BUILD/root/volumio/http/www + echo "VOLUMIO_FE_VERSION=\"$(git --git-dir /volumio/http/www/.git rev-parse HEAD)\"" >> os-release if [ ! "$BUILD" = x86 ]; then chroot build/$BUILD/root /bin/bash -x <<'EOF' From 3fe05f4ead9758f52124922eb20639d6c6409ce5 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 5 Mar 2017 01:10:57 +0100 Subject: [PATCH 050/673] fix image sizes --- scripts/sparkyimage.sh | 2 +- scripts/udooneoimage.sh | 2 +- scripts/udooqdlimage.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index 6e10fc84d..1e8147ecc 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -35,7 +35,7 @@ LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` sudo parted -s "${LOOP_DEV}" mklabel msdos sudo parted -s "${LOOP_DEV}" mkpart primary fat32 8 71 sudo parted -s "${LOOP_DEV}" mkpart primary ext3 71 2500 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% sudo parted -s "${LOOP_DEV}" set 1 boot on sudo parted -s "${LOOP_DEV}" print sudo partprobe "${LOOP_DEV}" diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index c6a3084df..c034bc626 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -35,7 +35,7 @@ LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index 2499f9383..f24484a08 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -35,7 +35,7 @@ LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` parted -s "${LOOP_DEV}" mklabel msdos parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 -parted -s "${LOOP_DEV}" mkpart primary ext3 1500 100% +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on parted -s "${LOOP_DEV}" print partprobe "${LOOP_DEV}" From 03dff5c416c44bdab9bea0b90e41dab62c970861 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 5 Mar 2017 01:31:35 +0100 Subject: [PATCH 051/673] info in os-release --- build.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index 0cec46b9a..abe07de5c 100755 --- a/build.sh +++ b/build.sh @@ -26,7 +26,7 @@ Switches: Options for the target architecture are 'arm' (Raspbian), 'armv7' (Debian arm64), 'armv8' (Debian arm64) or 'x86' (Debian i386). -d Create Image for Specific Devices. Supported device names: pi, udooneo, udooqdl, cuboxi, cubietruck, compulab, - odroidc1, odroidc2, odroidxu4, sparky, bbb, pine64, + odroidc1, odroidc2, odroidxu4, sparky, bbb, pine64, bpim2u, bpipro -v Version must be a dot separated number. Example 1.102 . @@ -56,6 +56,8 @@ function check_os_release { echo "VOLUMIO_VERSION=\"${VERSION}\"" >> build/${ARCH_BUILD}/root/etc/os-release echo "VOLUMIO_HARDWARE=\"${DEVICE}\"" >> build/${ARCH_BUILD}/root/etc/os-release echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/${ARCH_BUILD}/root/etc/os-release + echo "VOLUMIO_BE_VERSION=\"$(git --git-dir /volumio/.git rev-parse HEAD)\"" >> os-release + echo "VOLUMIO_FE_VERSION=\"$(git --git-dir /volumio/http/www/.git rev-parse HEAD)\"" >> os-release } @@ -160,16 +162,11 @@ if [ -n "$BUILD" ]; then su - ./volumioconfig.sh EOF - else + else echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register chroot build/$BUILD/root /volumioconfig.sh fi - echo "Adding information in os-release" - echo ' - -' >> build/$BUILD/root/etc/os-release - echo "Base System Installed" rm build/$BUILD/root/volumioconfig.sh ###Dirty fix for mpd.conf TODO use volumio repo @@ -253,7 +250,7 @@ case $DEVICE in bpipro) echo 'Writing Banana PI PRO Image File' check_os_release "armv7" $VERSION $DEVICE sh scripts/bpiproimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + ;; armbian_*) echo 'Writing armbian-based Image File' check_os_release "arm" $VERSION $DEVICE From af7d5d65ad7455d8b2c0c965b698c051d5061ef2 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 5 Mar 2017 01:34:55 +0100 Subject: [PATCH 052/673] final os-release info --- build.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index abe07de5c..5a39b822a 100755 --- a/build.sh +++ b/build.sh @@ -55,9 +55,6 @@ function check_os_release { fi echo "VOLUMIO_VERSION=\"${VERSION}\"" >> build/${ARCH_BUILD}/root/etc/os-release echo "VOLUMIO_HARDWARE=\"${DEVICE}\"" >> build/${ARCH_BUILD}/root/etc/os-release - echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/${ARCH_BUILD}/root/etc/os-release - echo "VOLUMIO_BE_VERSION=\"$(git --git-dir /volumio/.git rev-parse HEAD)\"" >> os-release - echo "VOLUMIO_FE_VERSION=\"$(git --git-dir /volumio/http/www/.git rev-parse HEAD)\"" >> os-release } @@ -152,10 +149,14 @@ if [ -n "$BUILD" ]; then echo 'Cloning Volumio Node Backend' mkdir build/$BUILD/root/volumio git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio - echo "VOLUMIO_BE_VERSION=\"$(git --git-dir /volumio/.git rev-parse HEAD)\"" >> os-release echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git build/$BUILD/root/volumio/http/www - echo "VOLUMIO_FE_VERSION=\"$(git --git-dir /volumio/http/www/.git rev-parse HEAD)\"" >> os-release + + + echo "Adding os-release infos" + echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/${ARCH_BUILD}/root/etc/os-release + echo "VOLUMIO_FE_VERSION=\"$(git --git-dir /volumio/http/www/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release + echo "VOLUMIO_BE_VERSION=\"$(git --git-dir /volumio/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release if [ ! "$BUILD" = x86 ]; then chroot build/$BUILD/root /bin/bash -x <<'EOF' From 3947d48222a1ee26e59ce6e3897786373053870d Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 5 Mar 2017 02:00:33 +0100 Subject: [PATCH 053/673] another fix for os release --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 5a39b822a..5a8cd48b1 100755 --- a/build.sh +++ b/build.sh @@ -154,9 +154,9 @@ if [ -n "$BUILD" ]; then echo "Adding os-release infos" - echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/${ARCH_BUILD}/root/etc/os-release - echo "VOLUMIO_FE_VERSION=\"$(git --git-dir /volumio/http/www/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release - echo "VOLUMIO_BE_VERSION=\"$(git --git-dir /volumio/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release + echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release + echo "VOLUMIO_FE_VERSION=\"$(git --git-dir build/$BUILD/root/volumio/http/www/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release + echo "VOLUMIO_BE_VERSION=\"$(git --git-dir build/$BUILD/root/volumio/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release if [ ! "$BUILD" = x86 ]; then chroot build/$BUILD/root /bin/bash -x <<'EOF' From 5e379a94149eb26f1dc493a83236a9c85006a94a Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 7 Mar 2017 16:17:32 +0100 Subject: [PATCH 054/673] Use proper branch for rpi-update rpi-update master branch is now on 4.9.y Use stable branch while volumio sits on 4.4.y --- scripts/raspberryconfig.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7dacc4ae6..96522f243 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -61,10 +61,11 @@ mkdir /lib/modules KERNEL_VERSION="4.4.9" KERNEL_REV="884" -echo y | SKIP_BACKUP=1 rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f71140155 +# using rpi-update stable branch for 4.4.y as master is now on 4.9.y +echo y | SKIP_BACKUP=1 BRANCH=stable rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f71140155 echo "Updating ELF" -echo y | SKIP_KERNEL=1 rpi-update +echo y | SKIP_KERNEL=1 BRANCH=stable rpi-update echo "Adding PI3 Wireless firmware" wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.txt -P /lib/firmware/brcm/ From 89b59bb7f6772af9b840781e6b53d54c9b280e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 8 Mar 2017 13:46:44 +0100 Subject: [PATCH 055/673] Fixed USB update for late detected usb devices --- scripts/initramfs/init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 629bf61fb..ac0b7647c 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -140,6 +140,7 @@ fi #Check eventually for USB updates (could be vfat or ext4 partion --> mount auto) echo "Check for USB updates" +[ -e /dev/sda1 ] || mdev -s if [ -e /dev/sda1 ]; then [ -d /mnt/usb ] || mkdir /mnt/usb mount -t auto /dev/sda1 /mnt/usb @@ -159,6 +160,8 @@ if [ -e /dev/sda1 ]; then fi umount /dev/sda1 rm -r /mnt/usb +else + echo "No USB device detected (when incorrect, try adding 'bootdelay=5' to your boot cmdline)" fi @@ -244,4 +247,3 @@ exec switch_root /mnt/ext/union /sbin/init echo "Failed to switch_root, dropping to a shell" exec sh - From 8eecb8d4c49d353efc75f073ab31decb4ad8c1c6 Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 8 Mar 2017 16:17:28 +0100 Subject: [PATCH 056/673] updating a comment --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 96522f243..5cbf3d035 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ KERNEL_REV="884" # using rpi-update stable branch for 4.4.y as master is now on 4.9.y echo y | SKIP_BACKUP=1 BRANCH=stable rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f71140155 -echo "Updating ELF" +echo "Updating *.elf *.dat *.bin" echo y | SKIP_KERNEL=1 BRANCH=stable rpi-update echo "Adding PI3 Wireless firmware" From 6594420f565f9fe80b84dae0ec408e029b95e41e Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 8 Mar 2017 17:51:23 +0100 Subject: [PATCH 057/673] more comment :) --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 5cbf3d035..8f2152246 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ KERNEL_REV="884" # using rpi-update stable branch for 4.4.y as master is now on 4.9.y echo y | SKIP_BACKUP=1 BRANCH=stable rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f71140155 -echo "Updating *.elf *.dat *.bin" +echo "Updating bootloader files *.elf *.dat *.bin" echo y | SKIP_KERNEL=1 BRANCH=stable rpi-update echo "Adding PI3 Wireless firmware" From 53d6f2cc45f85ef3c47bb18c7cedf2ae23142c2b Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 8 Mar 2017 20:13:35 +0100 Subject: [PATCH 058/673] protect /dev/shm just a good practice https://www.cyberciti.biz/faq/linux-add-nodev-nosuid-noexec-options-to-temporary-storage-partitions/ --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7dacc4ae6..be1eca251 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -21,7 +21,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab echo "Adding PI Modules" From 347a680770a1adb0a862fba10dcb1d02c72f77f7 Mon Sep 17 00:00:00 2001 From: macmpi Date: Mon, 13 Mar 2017 14:14:56 +0100 Subject: [PATCH 059/673] Pi: Block unwanted firmware & kernel updates This hold critical packages to prevent direct or indirect (through dependencies) installation of libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel which critically upgrades kernel & firmware files. This may happen when installing packages such as chromium, sense-hat, python-picamera... This change has been tested in a new build. Confirmed newer Touchscreen plugin still installs fine after this change. --- scripts/raspberryconfig.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 8f2152246..4055c20b4 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,6 +67,19 @@ echo y | SKIP_BACKUP=1 BRANCH=stable rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f echo "Updating bootloader files *.elf *.dat *.bin" echo y | SKIP_KERNEL=1 BRANCH=stable rpi-update +echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" +# these packages critically update kernel & firmware files and break Volumio +# may be triggered by manual or plugin installs explicitly or through dependencies like chromium, sense-hat, picamera,... +echo "Package: raspberrypi-bootloader +Pin: release * +Pin-Priority: -1 + +Package: raspberrypi-kernel +Pin: release * +Pin-Priority: -1" > /etc/apt/preferences +apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depends on raspberrypi-bootloader + + echo "Adding PI3 Wireless firmware" wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.txt -P /lib/firmware/brcm/ wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.bin -P /lib/firmware/brcm/ From 99aa96a2abbbc497dfc91a916178d34369b2dca6 Mon Sep 17 00:00:00 2001 From: macmpi Date: Mon, 13 Mar 2017 16:23:05 +0100 Subject: [PATCH 060/673] Initial support for PiZero W wireless Add necessary bcm2708-rpi-0-w.dtb from 4.4 stable branch Probably won't be necessary anymore when Kernel is updated, so it's a conditional install for now Reported working by several users in Forum. https://volumio.org/forum/with-new-rpi-zero-t6050-20.html#p29932 (note: uses same chipset than Pi3 so no need for new wireless firmware) --- scripts/raspberryconfig.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 4055c20b4..d35743732 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -79,12 +79,16 @@ Pin: release * Pin-Priority: -1" > /etc/apt/preferences apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depends on raspberrypi-bootloader +if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels +echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" +wget -P /boot/overlays/ https://github.com/raspberrypi/firmware/raw/stable/boot/bcm2708-rpi-0-w.dtb +fi -echo "Adding PI3 Wireless firmware" +echo "Adding PI3 & PiZero W Wireless firmware" wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.txt -P /lib/firmware/brcm/ wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.bin -P /lib/firmware/brcm/ -echo "Adding PI WIFI Wireless firmware" +echo "Adding PI WIFI Wireless dongle firmware" wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /lib/firmware/brcm/ #echo "Adding raspi-config" From aa30edfa64c7646ba1709ff0ab1b79da1135b18a Mon Sep 17 00:00:00 2001 From: macmpi Date: Mon, 13 Mar 2017 16:35:06 +0100 Subject: [PATCH 061/673] fix typo in path --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d35743732..b9a700bd3 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -81,7 +81,7 @@ apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depen if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" -wget -P /boot/overlays/ https://github.com/raspberrypi/firmware/raw/stable/boot/bcm2708-rpi-0-w.dtb +wget -P /boot/. https://github.com/raspberrypi/firmware/raw/stable/boot/bcm2708-rpi-0-w.dtb fi echo "Adding PI3 & PiZero W Wireless firmware" From 3178328316a94ed24f24c99f3f345e45bb5a5a3f Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 00:03:43 +0100 Subject: [PATCH 062/673] Remove Pi3 wifi driver blacklist & forced reload We will manage USB dongle priority over built-in wifi with udev rule. Just keep wifistart.sh for power save off which may help many wifi chips --- scripts/raspberryconfig.sh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b9a700bd3..1a533e92f 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -167,23 +167,6 @@ ln -s /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so ln -s /opt/vc/bin/vcgencmd /usr/bin/vcgencmd ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so -echo "Adding raspi blackist" -#this way if another USB WIFI dongle is present, it will always be the default one -echo " -#wifi -blacklist brcmfmac -blacklist brcmutil -" > /etc/modprobe.d/raspi-blacklist.conf - -#Load PI3 wifi module just before wifi stack starts -echo " -#!/bin/sh -sudo /sbin/modprobe brcmfmac -sudo /sbin/modprobe brcmutil -sudo /sbin/iw dev wlan0 set power_save off -" >> /bin/wifistart.sh -echo "Give proper permissions to wifistart.sh" -chmod a+x /bin/wifistart.sh echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" From d6e8516a95cb49d683b22cabf38c7ec45d621e3a Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 00:21:08 +0100 Subject: [PATCH 063/673] udev rules to prioritize network interfaces Setting udev rules to give USB network adapters priority over Built-in interfaces if connected: - If USB adapters are connected they take precedence for wlan0 or eth0 over built-in interfaces. - If no external adapter are connected, built-in interfaces get wlan0 or eth0 names. This method applies equally to all devices and does not need specific logic to blacklist/force-load modules. It may work on other HW platforms, although more tests would be needed due to potential HW diversity: so we keep it for Pi at teh moment. --- scripts/raspberryconfig.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 1a533e92f..2d2992a7d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -167,6 +167,11 @@ ln -s /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so ln -s /opt/vc/bin/vcgencmd /usr/bin/vcgencmd ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so +echo "Setting udev rules to give USB network adapters priority over Built-in interfaces if connected" +echo "# Give priority to wlan or eth USB network dongles if connected +ACTION==\"add\", SUBSYSTEM==\"net\", SUBSYSTEMS==\"usb\", KERNEL==\"wlan*\", ATTR{type}==\"1\", NAME=\"wlan0\" +ACTION==\"add\", SUBSYSTEM==\"net\", SUBSYSTEMS==\"usb\", KERNEL==\"eth*\", DRIVERS!=\"smsc95*\", ATTR{type}==\"1\", NAME=\"eth0\"" +> /etc/udev/rules.d/70-persistent-net.rules echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" From 0003310e63e1f9acfb559bbf024f90f1bd7c5d82 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 10:24:38 +0100 Subject: [PATCH 064/673] fix linefeed --- scripts/raspberryconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 2d2992a7d..8e68c21b0 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -170,8 +170,8 @@ ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so echo "Setting udev rules to give USB network adapters priority over Built-in interfaces if connected" echo "# Give priority to wlan or eth USB network dongles if connected ACTION==\"add\", SUBSYSTEM==\"net\", SUBSYSTEMS==\"usb\", KERNEL==\"wlan*\", ATTR{type}==\"1\", NAME=\"wlan0\" -ACTION==\"add\", SUBSYSTEM==\"net\", SUBSYSTEMS==\"usb\", KERNEL==\"eth*\", DRIVERS!=\"smsc95*\", ATTR{type}==\"1\", NAME=\"eth0\"" -> /etc/udev/rules.d/70-persistent-net.rules +ACTION==\"add\", SUBSYSTEM==\"net\", SUBSYSTEMS==\"usb\", KERNEL==\"eth*\", DRIVERS!=\"smsc95*\", ATTR{type}==\"1\", NAME=\"eth0\" +" > /etc/udev/rules.d/70-persistent-net.rules echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" From 27affc0d59cdf742455ddfd030afeb450d5d42df Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:31:20 +0100 Subject: [PATCH 065/673] protect /dev/shm --- scripts/armbianconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/armbianconfig.sh b/scripts/armbianconfig.sh index e3866c459..dbfe6a377 100755 --- a/scripts/armbianconfig.sh +++ b/scripts/armbianconfig.sh @@ -14,7 +14,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab #echo "Adding default sound modules and wifi" From cc1ffa970474dc8e6829906466b4df59b074b51a Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:32:08 +0100 Subject: [PATCH 066/673] protect /dev/shm --- scripts/bbbconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bbbconfig.sh b/scripts/bbbconfig.sh index 98533f642..843db689f 100755 --- a/scripts/bbbconfig.sh +++ b/scripts/bbbconfig.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab From 56d626dbc9a6573fcddb8e0229e0e81614bf241f Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:32:53 +0100 Subject: [PATCH 067/673] protect /dev/shm --- scripts/bpim2uconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bpim2uconfig.sh b/scripts/bpim2uconfig.sh index 7f1145bd9..99b80d60b 100755 --- a/scripts/bpim2uconfig.sh +++ b/scripts/bpim2uconfig.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab #echo "Adding default sound modules and wifi" From 176b6d5bb294fbc2f9f1be2045bef34f96b7481f Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:33:41 +0100 Subject: [PATCH 068/673] protect /dev/shm --- scripts/bpiproconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bpiproconfig.sh b/scripts/bpiproconfig.sh index 9e68f9c41..578963f44 100755 --- a/scripts/bpiproconfig.sh +++ b/scripts/bpiproconfig.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab #echo "Adding default sound modules and wifi" From 009070397b22957d482966839507b11468622ba2 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:34:35 +0100 Subject: [PATCH 069/673] protect /dev/shm --- scripts/cuboxiconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cuboxiconfig.sh b/scripts/cuboxiconfig.sh index 27e61fbb3..6e58d7dbd 100755 --- a/scripts/cuboxiconfig.sh +++ b/scripts/cuboxiconfig.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab From 3457ed8d7abadf02a9445b078d5b01fb24b49c8c Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:35:26 +0100 Subject: [PATCH 070/673] protect /dev/shm --- scripts/odroidc1config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/odroidc1config.sh b/scripts/odroidc1config.sh index be7288a3c..4e2bdb969 100755 --- a/scripts/odroidc1config.sh +++ b/scripts/odroidc1config.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab echo "Adding default sound modules" From e5e77527984d16c118f22d34584a9d8937b6bf88 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:36:20 +0100 Subject: [PATCH 071/673] protect /dev/shm --- scripts/odroidc2config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/odroidc2config.sh b/scripts/odroidc2config.sh index 09fb5abd9..e5eddb587 100755 --- a/scripts/odroidc2config.sh +++ b/scripts/odroidc2config.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab echo "Adding default sound modules" From e434463418d1ecf5720d8b931bb6728327c29dbb Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:37:23 +0100 Subject: [PATCH 072/673] protect /dev/shm --- scripts/odroidx2config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/odroidx2config.sh b/scripts/odroidx2config.sh index 9be0cab0e..5f7a11b54 100755 --- a/scripts/odroidx2config.sh +++ b/scripts/odroidx2config.sh @@ -16,7 +16,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab echo "Installing additonal packages" From df587e29e0f6aab9dbfe1d01dba67d6596f03bee Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:38:20 +0100 Subject: [PATCH 073/673] protect /dev/shm --- scripts/odroidxu4config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/odroidxu4config.sh b/scripts/odroidxu4config.sh index 0a19efd44..b073d6962 100755 --- a/scripts/odroidxu4config.sh +++ b/scripts/odroidxu4config.sh @@ -16,7 +16,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab From 615fb568f989b144969cc073489f37caa6fe10a3 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:39:13 +0100 Subject: [PATCH 074/673] protect /dev/shm --- scripts/pine64config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pine64config.sh b/scripts/pine64config.sh index 6ea0afec9..72e42f815 100755 --- a/scripts/pine64config.sh +++ b/scripts/pine64config.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab echo "Adding default sound modules and wifi" From 8fcbe21ed32eb0124a3ab2ecc7683cfe6bbbd23f Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:40:04 +0100 Subject: [PATCH 075/673] protect /dev/shm --- scripts/sparkyconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sparkyconfig.sh b/scripts/sparkyconfig.sh index c22064a38..fc6b7525f 100755 --- a/scripts/sparkyconfig.sh +++ b/scripts/sparkyconfig.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab #echo "Adding default sound module" From 5bb101d2b5f8e49a7f7f4c69574511fa34e70f6d Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:40:54 +0100 Subject: [PATCH 076/673] protect /dev/shm --- scripts/udooneoconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/udooneoconfig.sh b/scripts/udooneoconfig.sh index 3b1b033ea..a1450ee02 100755 --- a/scripts/udooneoconfig.sh +++ b/scripts/udooneoconfig.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab From 71d1563d8089af890a216f590255d72fc51b8f37 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 15:41:57 +0100 Subject: [PATCH 077/673] protect /dev/shm --- scripts/udooqdlconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/udooqdlconfig.sh b/scripts/udooqdlconfig.sh index d2c74a6e3..975f32fc5 100755 --- a/scripts/udooqdlconfig.sh +++ b/scripts/udooqdlconfig.sh @@ -13,7 +13,7 @@ tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab From 40ebdf03feda7517b12e4873ea52edbbfa622179 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 21:02:30 +0100 Subject: [PATCH 078/673] Pi: add pi3-disable-wifi.dtbo This allows users to completely turn off pi3 wireless chip, by setting dtoverlay=pi3-disable-wifi in /boot/config.txt --- scripts/raspberryconfig.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b9a700bd3..ecc1f5d6f 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -82,6 +82,8 @@ apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depen if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/raspberrypi/firmware/raw/stable/boot/bcm2708-rpi-0-w.dtb +echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" +wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/blob/stable/overlays/pi3-disable-wifi.dtbo fi echo "Adding PI3 & PiZero W Wireless firmware" From c061be2c16c1079c57a7ac3be6cd01b9abcaeded Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 21:12:28 +0100 Subject: [PATCH 079/673] use https://github.com/raspberrypi/firmware --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index ecc1f5d6f..11daebc28 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -83,7 +83,7 @@ if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/raspberrypi/firmware/raw/stable/boot/bcm2708-rpi-0-w.dtb echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" -wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/blob/stable/overlays/pi3-disable-wifi.dtbo +wget -P /boot/overlays/. https://github.com/raspberrypi/firmware/blob/stable/boot/overlays/pi3-disable-wifi.dtbo fi echo "Adding PI3 & PiZero W Wireless firmware" From 8639c8fa15c4751870100bde59508d78a67bc0db Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 14 Mar 2017 21:19:16 +0100 Subject: [PATCH 080/673] this time url is good! sorry for failed cut&paste --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 11daebc28..d4e48c495 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -83,7 +83,7 @@ if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/raspberrypi/firmware/raw/stable/boot/bcm2708-rpi-0-w.dtb echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" -wget -P /boot/overlays/. https://github.com/raspberrypi/firmware/blob/stable/boot/overlays/pi3-disable-wifi.dtbo +wget -P /boot/overlays/. https://github.com/raspberrypi/firmware/raw/stable/boot/overlays/pi3-disable-wifi.dtbo fi echo "Adding PI3 & PiZero W Wireless firmware" From a7ef12abf4dd10eb3d7adf03630c6836fe9b510d Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 16 Mar 2017 11:54:20 +0100 Subject: [PATCH 081/673] Add firmware for Atheros AR9170 wifi USB dongle Reported working by @chsims1 with that addition on Pi (Home wifi AP only, not Volumio Hotspot at this point) https://github.com/volumio/Build/pull/167#issuecomment-286980405 --- recipes/arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 071d0d8e4..a4d2095b7 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -48,7 +48,7 @@ keyring=debian-archive-keyring suite=jessie [Firmware] -packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 +packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring components=main non-free From 87c055750a2384c54d954ab01db94a11c9a235ff Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 16 Mar 2017 15:40:42 +0100 Subject: [PATCH 082/673] Pi: Fixing MrEngman repo Repo has changed location since recent Dropbox policy change Put base repo in variable in case of further changes to be more future-proof. Tested recomposed URLs seems good now. --- scripts/raspberryconfig.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index f88268ace..d30acf1d4 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -186,54 +186,54 @@ echo "Give proper permissions to wifistart.sh" chmod a+x /bin/wifistart.sh echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" - +MRENGMAN_REPO="http://www.fars-robotics.net" mkdir wifi cd wifi echo "WIFI: 8192EU for armv7" -wget https://dl.dropboxusercontent.com/u/80256631/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * echo "WIFI: 8192EU for armv6" -wget https://dl.dropboxusercontent.com/u/80256631/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz ./install.sh rm -rf * echo "WIFI: 8812AU for armv7" -wget https://dl.dropboxusercontent.com/u/80256631/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * echo "WIFI: 8812AU for armv6" -wget https://dl.dropboxusercontent.com/u/80256631/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz ./install.sh rm -rf * echo "WIFI: 8188EU for armv7" -wget https://dl.dropboxusercontent.com/u/80256631/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * echo "WIFI: 8188EU for armv6" -wget https://dl.dropboxusercontent.com/u/80256631/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz ./install.sh rm -rf * echo "WIFI: MT7610 for armv7" -wget https://dl.dropboxusercontent.com/u/80256631/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz ./install.sh rm -rf * echo "WIFI: MT7610 for armv6" -wget https://dl.dropboxusercontent.com/u/80256631/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz ./install.sh rm -rf * From bdc2d385a646cbcf6e751208ca93a13f0e73e984 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 20 Mar 2017 03:53:37 +0100 Subject: [PATCH 083/673] adding pisound --- scripts/raspberryconfig.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d30acf1d4..c540fea7c 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -300,6 +300,12 @@ agreement, including executable only versions of the TI component libraries, or the PCM5142 Audio DAC and not with Audio DAC Devices manufactured by or for an entity other than TI, and (ii) is sold by or for an original equipment manufacturer (“OEM”) bearing such OEM brand name and part number. " > /lib/firmware/alloPiano/LICENSE + +echo "Adding Pisound Kernel Module and dtbo" +wget http://repo.volumio.org/Volumio2/Firmwares/pisound_volumio_4.4.9.tar.gz +echo "Extracting PiSound Modules" +tar xf pisound_volumio_4.4.9.tar.gz +rm pisound_volumio_4.4.9.tar.gz fi echo "Installing winbind here, since it freezes networking" From 2ca705f0d79c85b99844a18e9adc848764732f42 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 23 Mar 2017 09:49:31 +0100 Subject: [PATCH 084/673] Remove wifistart.sh power_save statement Not needed as already taken care of for all platforms and wlan chipsets by: https://github.com/volumio/Build/blob/master/volumio/etc/network/if-pre-up.d/powersavedisable Currently file is empty: did not remove as is used in https://github.com/volumio/Build/blob/master/volumio/lib/systemd/system/wireless.service (ExecStartPre=-/bin/wifistart.sh), and may be a placehoder for other stuff? If removed in the end, reference should also be removed in here https://github.com/volumio/Build/blob/master/scripts/configure.sh#L86-L88 --- volumio/bin/wifistart.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/volumio/bin/wifistart.sh b/volumio/bin/wifistart.sh index 9062037dd..1a2485251 100644 --- a/volumio/bin/wifistart.sh +++ b/volumio/bin/wifistart.sh @@ -1,2 +1 @@ #!/bin/sh -sudo /sbin/iw dev wlan0 set power_save off From 278b5e562987f3fa46b4b1cddb78bfddc1084a98 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 23 Mar 2017 11:32:15 +0100 Subject: [PATCH 085/673] add Atheros & brcm firmware sync with other arm recipes --- recipes/arm-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm-dev.conf b/recipes/arm-dev.conf index 9535b21df..45103ec13 100644 --- a/recipes/arm-dev.conf +++ b/recipes/arm-dev.conf @@ -54,7 +54,7 @@ keyring=debian-archive-keyring suite=jessie [Firmware] -packages=firmware-atheros firmware-ralink firmware-realtek +packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring components=main non-free From 10b24f563d5e68a75ed9e7a7e569894056555487 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 23 Mar 2017 11:33:06 +0100 Subject: [PATCH 086/673] add Atheros firmware --- recipes/armv7-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv7-dev.conf b/recipes/armv7-dev.conf index 5c852e845..ced65e5e3 100644 --- a/recipes/armv7-dev.conf +++ b/recipes/armv7-dev.conf @@ -54,7 +54,7 @@ keyring=debian-archive-keyring suite=jessie [Firmware] -packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 +packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free From a8a08d13ade7865c78813902f4c6bb4855565992 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 23 Mar 2017 11:33:33 +0100 Subject: [PATCH 087/673] add Atheros firmware --- recipes/armv7.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 844d2b943..7e45da345 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -48,7 +48,7 @@ keyring=debian-archive-keyring suite=jessie [Firmware] -packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 +packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free From b2ffbcae534e3ff214e3408c03d0b9c75f1dcefd Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 23 Mar 2017 11:34:12 +0100 Subject: [PATCH 088/673] add Atheros firmware --- recipes/armv8-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv8-dev.conf b/recipes/armv8-dev.conf index 21099947c..36650638b 100644 --- a/recipes/armv8-dev.conf +++ b/recipes/armv8-dev.conf @@ -60,7 +60,7 @@ keyring=debian-archive-keyring suite=jessie [Firmware] -packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 +packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free From 4d8aaaf757208c9f3221bf1402097b9971b387e7 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 23 Mar 2017 11:34:46 +0100 Subject: [PATCH 089/673] add Atheros firmware --- recipes/armv8.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv8.conf b/recipes/armv8.conf index 5bc12c395..fd65d5fed 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -48,7 +48,7 @@ keyring=debian-archive-keyring suite=jessie [Firmware] -packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 +packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free From f817b1f9b285684411237d9940334d3d35098cb8 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 15:04:03 +0200 Subject: [PATCH 090/673] Create 99-Volumio-net.rules Udev rule to prioritize USB network interfaces over built-in ones. Rule relies on a script to actually change name, as renaming to base kernel interface names may fail with some drivers. --- volumio/etc/udev/rules.d/99-Volumio-net.rules | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 volumio/etc/udev/rules.d/99-Volumio-net.rules diff --git a/volumio/etc/udev/rules.d/99-Volumio-net.rules b/volumio/etc/udev/rules.d/99-Volumio-net.rules new file mode 100644 index 000000000..4a7b37252 --- /dev/null +++ b/volumio/etc/udev/rules.d/99-Volumio-net.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}=="wlan", ATTR{type}=="1", KERNEL=="wlan*", KERNEL!="wlan0", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" +ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}!="wlan", ATTR{type}=="1", KERNEL=="eth*", KERNEL!="eth0", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" From f60830988fe6b9dbf9ddb9fc1784fc20a66d8043 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 15:06:45 +0200 Subject: [PATCH 091/673] Create rename_netiface0.sh This script, called by Volumio udev rules change network interface name. --- volumio/bin/rename_netiface0.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 volumio/bin/rename_netiface0.sh diff --git a/volumio/bin/rename_netiface0.sh b/volumio/bin/rename_netiface0.sh new file mode 100644 index 000000000..91804f10e --- /dev/null +++ b/volumio/bin/rename_netiface0.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# This script is called by Volumio udev rule to set/swap name to eth0 or wlan0 +# as udev renaming sometimes fails with some module drivers +# it assumes legacy style interface names such as ethX, wlanX + + +if_name=$1 +if_type=${if_name%%[0-9]*} + +ifconfig $if_type"0" down +ifconfig $if_name down +ip link set dev $if_type"0" name temp_name +ip link set dev $if_name name $if_type"0" +ip link set dev temp_name name $if_name +ifconfig $if_name up +ifconfig $if_type"0" up From dba23986ed94fe8f295c7b32079261fb46c16add Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 15:14:27 +0200 Subject: [PATCH 092/673] udev script (rename_netiface0.sh) in build move rename_netiface0.sh at right place during Build and set execution permissions --- scripts/configure.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/configure.sh b/scripts/configure.sh index 065a07f96..2323707fc 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -86,6 +86,10 @@ cp -rp volumio/etc/dhcpcd.conf build/$BUILD/root/etc/ #wifi pre script cp volumio/bin/wifistart.sh build/$BUILD/root/bin/wifistart.sh chmod a+x build/$BUILD/root/bin/wifistart.sh +#udev script +cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh +chmod a+x build/$BUILD/root/bin/rename_netiface0.sh + echo 'Done Copying Custom Volumio System Files' echo "Stripping binaries and libraries to save space" From c8b80f972439c67826cf9a321b9b5910708e3f92 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 15:16:52 +0200 Subject: [PATCH 093/673] Removed specifi Pi udev rule Now available (and working) in all platforms --- scripts/raspberryconfig.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 8e68c21b0..e37cc19b5 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -167,12 +167,6 @@ ln -s /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so ln -s /opt/vc/bin/vcgencmd /usr/bin/vcgencmd ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so -echo "Setting udev rules to give USB network adapters priority over Built-in interfaces if connected" -echo "# Give priority to wlan or eth USB network dongles if connected -ACTION==\"add\", SUBSYSTEM==\"net\", SUBSYSTEMS==\"usb\", KERNEL==\"wlan*\", ATTR{type}==\"1\", NAME=\"wlan0\" -ACTION==\"add\", SUBSYSTEM==\"net\", SUBSYSTEMS==\"usb\", KERNEL==\"eth*\", DRIVERS!=\"smsc95*\", ATTR{type}==\"1\", NAME=\"eth0\" -" > /etc/udev/rules.d/70-persistent-net.rules - echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" mkdir wifi From aca80cba5e53f173beb5b3b63505a352a24e81dd Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 15:46:24 +0200 Subject: [PATCH 094/673] simpler name matching --- volumio/etc/udev/rules.d/99-Volumio-net.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/etc/udev/rules.d/99-Volumio-net.rules b/volumio/etc/udev/rules.d/99-Volumio-net.rules index 4a7b37252..797f446c0 100644 --- a/volumio/etc/udev/rules.d/99-Volumio-net.rules +++ b/volumio/etc/udev/rules.d/99-Volumio-net.rules @@ -1,2 +1,2 @@ -ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}=="wlan", ATTR{type}=="1", KERNEL=="wlan*", KERNEL!="wlan0", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" -ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}!="wlan", ATTR{type}=="1", KERNEL=="eth*", KERNEL!="eth0", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" +ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}=="wlan", ATTR{type}=="1", KERNEL=="wlan[1-9]*", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" +ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}!="wlan", ATTR{type}=="1", KERNEL=="eth[1-9]*", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" From 877e6cbe7a9416bf478f05cb018a63143b046460 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 15:59:29 +0200 Subject: [PATCH 095/673] Update 99-Volumio-net.rules add comment --- volumio/etc/udev/rules.d/99-Volumio-net.rules | 1 + 1 file changed, 1 insertion(+) diff --git a/volumio/etc/udev/rules.d/99-Volumio-net.rules b/volumio/etc/udev/rules.d/99-Volumio-net.rules index 797f446c0..259e059ff 100644 --- a/volumio/etc/udev/rules.d/99-Volumio-net.rules +++ b/volumio/etc/udev/rules.d/99-Volumio-net.rules @@ -1,2 +1,3 @@ +# Give Volumio interface priority to external wlan or eth USB network dongles if connected ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}=="wlan", ATTR{type}=="1", KERNEL=="wlan[1-9]*", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ENV{DEVTYPE}!="wlan", ATTR{type}=="1", KERNEL=="eth[1-9]*", RUN+="/bin/rename_netiface0.sh '%E{INTERFACE}'" From df5c0859a1528e32c92861f00ad1f734c8051eda Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 19:00:53 +0200 Subject: [PATCH 096/673] Customize udev Rule for Pi ethernet Exclude internal eth interface (smsc95xx driver) from interface priority renaming rule --- scripts/raspberryconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index e37cc19b5..cf01655e0 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -167,6 +167,9 @@ ln -s /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so ln -s /opt/vc/bin/vcgencmd /usr/bin/vcgencmd ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so +# changing external ethX priority rule for Pi as built-in eth _is_ on USB (smsc95xx driver) +sed -i 's/KERNEL==\"eth/DRIVERS!=\"smsc95xx\", &/' /etc/udev/rules.d/99-Volumio-net.rules + echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" mkdir wifi From ee544c49354b204ddaa4c1c4635028bc7bcb9bb2 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 20:01:02 +0200 Subject: [PATCH 097/673] optimize name swap handles situation where script may be called for eth and wlan before first one is terminated. use one _temp_name per interface type to avoid potential collisions. --- volumio/bin/rename_netiface0.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/volumio/bin/rename_netiface0.sh b/volumio/bin/rename_netiface0.sh index 91804f10e..2123c04a4 100644 --- a/volumio/bin/rename_netiface0.sh +++ b/volumio/bin/rename_netiface0.sh @@ -1,7 +1,7 @@ #!/bin/sh -# This script is called by Volumio udev rule to set/swap name to eth0 or wlan0 -# as udev renaming sometimes fails with some module drivers -# it assumes legacy style interface names such as ethX, wlanX +# This script is called by Volumio udev rule to set/swap name for eth0 or wlan0 +# since udev renaming sometimes fails with some module drivers +# It assumes System uses legacy style interface names such as ethX, wlanX if_name=$1 @@ -9,8 +9,8 @@ if_type=${if_name%%[0-9]*} ifconfig $if_type"0" down ifconfig $if_name down -ip link set dev $if_type"0" name temp_name +ip link set dev $if_type"0" name $if_type"_temp_name" ip link set dev $if_name name $if_type"0" -ip link set dev temp_name name $if_name +ip link set dev $if_type"_temp_name" name $if_name ifconfig $if_name up ifconfig $if_type"0" up From 965d48cbade311a3c0a0182b8797504bc9c878f8 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 26 Mar 2017 20:04:34 +0200 Subject: [PATCH 098/673] reverse change on wifistart.sf reversed https://github.com/volumio/Build/pull/167/commits/2ca705f0d79c85b99844a18e9adc848764732f42 --- volumio/bin/wifistart.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/volumio/bin/wifistart.sh b/volumio/bin/wifistart.sh index 1a2485251..9062037dd 100644 --- a/volumio/bin/wifistart.sh +++ b/volumio/bin/wifistart.sh @@ -1 +1,2 @@ #!/bin/sh +sudo /sbin/iw dev wlan0 set power_save off From 77f0581d8ba159648735d7f80bc2c692f087bc74 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 27 Mar 2017 20:58:28 +0200 Subject: [PATCH 099/673] Update Allo modules --- scripts/raspberryconfig.sh | 42 +++++++++++++------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 26fa498dd..b2ce3458e 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -266,23 +266,11 @@ if [ "$PATCH" = "volumio" ]; then ### Allo I2S Firmware echo "Getting Allo Modules" cd / -echo "Getting Allo Piano 2.1 Modules" -wget http://repo.volumio.org/Volumio2/Firmwares/volumio-RPi4.4.9_pianoDAC_22122016.tgz -echo "Extracting Allo Piano 2.1 modules" -tar xf volumio-RPi4.4.9_pianoDAC_22122016.tgz -rm volumio-RPi4.4.9_pianoDAC_22122016.tgz - -echo "Getting Allo Boss Modules" -wget http://repo.volumio.org/Volumio2/Firmwares/volumio-RPi4.4.9_pianoDAC_22122016.tgz -echo "Extracting Allo Boss modules" -tar xf volumio-RPi4.4.9_pianoDAC_22122016.tgz -rm volumio-RPi4.4.9_pianoDAC_22122016.tgz - -echo "Getting Allo Piano Firmwares" -wget http://repo.volumio.org/Volumio2/Firmwares/alloPianoDACfw_01122016.tgz -echo "Extracting Allo Firmwares" -tar xf alloPianoDACfw_01122016.tgz -rm alloPianoDACfw_01122016.tgz +echo "Getting Allo DAC Modules" +wget http://repo.volumio.org/Volumio2/Firmwares/rpi-volumio-4_4_9-AlloDAC-modules.tgz +echo "Extracting Allo DAC modules" +tar xf rpi-volumio-4_4_9-AlloDAC-modules.tgz +rm rpi-volumio-4_4_9-AlloDAC-modules.tgz echo "Getting Allo BOSS Firmwares" wget http://repo.volumio.org/Volumio2/Firmwares/volumio-RPi4.4.9_boss_03022017.tgz @@ -290,18 +278,16 @@ echo "Extracting Allo Firmwares" tar xf volumio-RPi4.4.9_boss_03022017.tgz rm volumio-RPi4.4.9_boss_03022017.tgz -echo "Allo modules and firmware installed" - -echo "Adding license info" +echo "Getting Allo Piano Firmwares" +wget --no-check-certificate https://github.com/allocom/piano-firmware/archive/master.tar.gz +echo "Extracting Allo Firmwares" +tar xf master.tar.gz +cp -rp /piano-firmware-master/* / +rm -rf /piano-firmware-master +rm /README.md +rm master.tar.gz -echo "You may royalty free distribute object and executable versions of the TI component libraries, and its derivatives -(“derivative” shall mean adding the TI component library to an audio signal flow of a product to make a new audio signal chain without -changing the algorithm of the TI component library), to use and integrate the software with any other software, these files are only -licensed to be used on the TI PCM 5142 DAC IC , but are freely distributable and re-distributable , subject to acceptance of the license -agreement, including executable only versions of the TI component libraries, or its derivatives, that execute solely and exclusively with -the PCM5142 Audio DAC and not with Audio DAC Devices manufactured by or for an entity other than TI, and (ii) is sold by or for an original - equipment manufacturer (“OEM”) bearing such OEM brand name and part number. -" > /lib/firmware/alloPiano/LICENSE +echo "Allo modules and firmware installed" echo "Adding Pisound Kernel Module and dtbo" wget http://repo.volumio.org/Volumio2/Firmwares/pisound_volumio_4.4.9.tar.gz From 625c380d4230f6e6e050789ab772893fd9b1e1a5 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 28 Mar 2017 10:29:56 +0200 Subject: [PATCH 100/673] CRDA install clean-up is already in arm.conf recipe, so duplicate install in raspberryconfig.sh It is also present in all other platforms recipes, except in arm-dev.conf and x86-dev.conf, so adding there too. --- scripts/raspberryconfig.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b2ce3458e..d9f46a03c 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -120,9 +120,6 @@ SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c' "'chown -R root:gpio /sys/class/gpio && echo "adding volumio to gpio group" sudo adduser volumio gpio -echo "Fixing crda domain error" -apt-get -y install crda wireless-regdb - echo "Removing unneeded binaries" apt-get -y remove binutils From ce06fc5969336d3e780a7538aab9c347b6e04ff1 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 28 Mar 2017 10:34:10 +0200 Subject: [PATCH 101/673] adding wireless-regdb crda --- recipes/arm-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm-dev.conf b/recipes/arm-dev.conf index 45103ec13..40ce1885d 100644 --- a/recipes/arm-dev.conf +++ b/recipes/arm-dev.conf @@ -18,7 +18,7 @@ keyring=debian-archive-keyring suite=jessie [Net] -packages=netbase ifupdown iproute net-tools iptables isc-dhcp-client openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev +packages=netbase ifupdown iproute net-tools iptables isc-dhcp-client openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev wireless-regdb crda source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From 9f4b368b334b1cd30cb9b4540e911a20c05fe78a Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 28 Mar 2017 10:35:40 +0200 Subject: [PATCH 102/673] add wireless-regdb crda --- recipes/x86-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/x86-dev.conf b/recipes/x86-dev.conf index a063cb299..6a128f3cc 100755 --- a/recipes/x86-dev.conf +++ b/recipes/x86-dev.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=wheezy [Net] -packages=netbase ifupdown iproute net-tools iptables isc-dhcp-client openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev +packages=netbase ifupdown iproute net-tools iptables isc-dhcp-client openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev wireless-regdb crda source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 814ee460ad43eaf66943a0414b6e1444bf527323 Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 29 Mar 2017 15:43:24 +0200 Subject: [PATCH 103/673] Pi: prepare to test new kernels --- scripts/raspberryconfig.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b2ce3458e..cedc84537 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -59,13 +59,20 @@ mkdir /lib/modules # see https://github.com/raspberrypi/firmware/commit/cc6d7bf8b4c03a2a660ff9fdf4083fc165620866 # and https://github.com/Hexxeh/rpi-firmware/issues/118 KERNEL_VERSION="4.4.9" -KERNEL_REV="884" -# using rpi-update stable branch for 4.4.y as master is now on 4.9.y -echo y | SKIP_BACKUP=1 BRANCH=stable rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f71140155 +case $KERNEL_VERSION in + "4.4.9") + KERNEL_REV="884" + KERNEL_BRANCH="stable" + KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" + ;; +esac + +# using rpi-update relevant to defined kernel version +echo y | SKIP_BACKUP=1 BRANCH=$KERNEL_BRANCH rpi-update $KERNEL_COMMIT echo "Updating bootloader files *.elf *.dat *.bin" -echo y | SKIP_KERNEL=1 BRANCH=stable rpi-update +echo y | SKIP_KERNEL=1 BRANCH=$KERNEL_BRANCH rpi-update echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" # these packages critically update kernel & firmware files and break Volumio From 44f91b677e7cfc6725ff65bb4c4d2cbfe55ddf1f Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 29 Mar 2017 19:25:50 +0200 Subject: [PATCH 104/673] PI: add 4.9.17 kernel case No change to default 4.4.9 kernel. Just adds case parameters for manual test build --- scripts/raspberryconfig.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index e9c6b983b..dce057ba6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -66,6 +66,11 @@ case $KERNEL_VERSION in KERNEL_BRANCH="stable" KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" ;; + "4.9.17") + KERNEL_REV="981" + KERNEL_BRANCH="master" + KERNEL_COMMIT="41561448388d90f19f2e40ac62ce1c21c2e064ec" + ;; esac # using rpi-update relevant to defined kernel version From de478a5fa105690e54ca9419138018fbc42a5aff Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 29 Mar 2017 23:06:16 +0200 Subject: [PATCH 105/673] differentiation for third party modules --- scripts/raspberryconfig.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index dce057ba6..a603cf9b9 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -272,6 +272,11 @@ rm /patch if [ "$PATCH" = "volumio" ]; then + +echo "Adding third party kernel modules" + +if [ "$KERNEL_VERSION" = "4.4.9" ]; then + ### Allo I2S Firmware echo "Getting Allo Modules" cd / @@ -305,6 +310,8 @@ tar xf pisound_volumio_4.4.9.tar.gz rm pisound_volumio_4.4.9.tar.gz fi +fi + echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind From aff7d9367c8d185720ab9f02b93bab606de0137b Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 30 Mar 2017 16:36:58 +0200 Subject: [PATCH 106/673] git clone differentiation --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index 5a8cd48b1..45570a6ee 100755 --- a/build.sh +++ b/build.sh @@ -148,7 +148,12 @@ if [ -n "$BUILD" ]; then echo 'Cloning Volumio Node Backend' mkdir build/$BUILD/root/volumio + if [ -n "$PATCH" ]; then + echo "Cloning Volumio with all its history" + git clone -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + else git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git build/$BUILD/root/volumio/http/www From 62371da3ab04fa1de355b817f63245e901ec3141 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 3 Apr 2017 10:36:27 +0200 Subject: [PATCH 107/673] fix allo modules --- scripts/raspberryconfig.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index a603cf9b9..0b6845be7 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -281,16 +281,10 @@ if [ "$KERNEL_VERSION" = "4.4.9" ]; then echo "Getting Allo Modules" cd / echo "Getting Allo DAC Modules" -wget http://repo.volumio.org/Volumio2/Firmwares/rpi-volumio-4_4_9-AlloDAC-modules.tgz +wget http://repo.volumio.org/Volumio2/Firmwares/rpi-volumio-4.4.9-AlloDAC-modules.tgz echo "Extracting Allo DAC modules" -tar xf rpi-volumio-4_4_9-AlloDAC-modules.tgz -rm rpi-volumio-4_4_9-AlloDAC-modules.tgz - -echo "Getting Allo BOSS Firmwares" -wget http://repo.volumio.org/Volumio2/Firmwares/volumio-RPi4.4.9_boss_03022017.tgz -echo "Extracting Allo Firmwares" -tar xf volumio-RPi4.4.9_boss_03022017.tgz -rm volumio-RPi4.4.9_boss_03022017.tgz +tar xf rpi-volumio-4.4.9-AlloDAC-modules.tgz +rm rpi-volumio-4.4.9-AlloDAC-modules.tgz echo "Getting Allo Piano Firmwares" wget --no-check-certificate https://github.com/allocom/piano-firmware/archive/master.tar.gz From 1cccef8f6734c1d99e9ca4828694b1906ed8a1bc Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 3 Apr 2017 10:37:36 +0200 Subject: [PATCH 108/673] fix pisound modules --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 0b6845be7..f78664f12 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -298,10 +298,10 @@ rm master.tar.gz echo "Allo modules and firmware installed" echo "Adding Pisound Kernel Module and dtbo" -wget http://repo.volumio.org/Volumio2/Firmwares/pisound_volumio_4.4.9.tar.gz +wget http://repo.volumio.org/Volumio2/Firmwares/rpi-volumio-4.4.9-pisound-modules.tgz echo "Extracting PiSound Modules" -tar xf pisound_volumio_4.4.9.tar.gz -rm pisound_volumio_4.4.9.tar.gz +tar xf rpi-volumio-4.4.9-pisound-modules.tgz +rm rpi-volumio-4.4.9-pisound-modules.tgz fi fi From 1437a44e8ed5b5cf8dbafb253f17e33fa6ff3be7 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 4 Apr 2017 14:20:03 +0200 Subject: [PATCH 109/673] Revert "loop0 device might be missing and it must be created manually" This reverts commit 6ea08321845e0b3cc81391581c48c98221070c34. --- scripts/initramfs/init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index ac0b7647c..6daec4188 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -166,13 +166,13 @@ fi # 2) init a loop pointing to the image file -[ -e /dev/loop0 ] || mknod /dev/loop0 b 7 0 -losetup /dev/loop0 /mnt/imgpart/${IMGFILE} +loop_free=$(losetup -f | sed s#p/#p#) +losetup $loop_free /mnt/imgpart/${IMGFILE} # 3) mount the squashfs to /mnt/static [ -d /mnt/static ] || mkdir /mnt/static -mount -t squashfs /dev/loop0 /mnt/static +mount -t squashfs $loop_free /mnt/static VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" From 0937fa664adf60f37d74f538715b39bde85a1cb6 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 4 Apr 2017 16:27:07 +0200 Subject: [PATCH 110/673] auto reboot on kernel panic after factory reset --- scripts/initramfs/init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 6daec4188..713662bb3 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -185,7 +185,12 @@ if [ -e "/mnt/factory/factory_reset" ]; then echo "Factory reset executed: part I" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset + sync echo "Factory reset executed: part II - end" + + #Setting 5 second for rebooting after kernel panic (sometimes it happens after factory reset) + echo 5 > /proc/sys/kernel/panic + fi if [ -e "/mnt/factory/user_data" ]; then echo "Deleting User Data" From fe7d0aec4aec4a5fadb08962a2bbe1f095ad24a3 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 4 Apr 2017 16:57:45 +0200 Subject: [PATCH 111/673] adding bootdelay to restore USB factory reset --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index f39864ba3..ad8b2eb5c 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -145,7 +145,7 @@ disable_splash=1" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N " >> /boot/cmdline.txt +echo "dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5" >> /boot/cmdline.txt echo "Cleaning APT Cache" rm -f /var/lib/apt/lists/*archive* From f883ecf6ce73962d4d3d16eb4e748f645563d763 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 4 Apr 2017 17:41:03 +0200 Subject: [PATCH 112/673] remove factory reset file after doing it --- scripts/initramfs/init | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 713662bb3..548652375 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -157,6 +157,7 @@ if [ -e /dev/sda1 ]; then echo " " > /mnt/factory/factory_reset umount /mnt/factory rm -r /mnt/factory + rm /mnt/usb/factory_reset fi umount /dev/sda1 rm -r /mnt/usb From f7e749020640014fc69db137a832ea88f9c2ed7a Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 4 Apr 2017 19:35:30 +0200 Subject: [PATCH 113/673] init updater align --- scripts/raspberryimage.sh | 3 --- scripts/volumioconfig.sh | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index f28b0d6d1..a21897dd4 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -79,9 +79,6 @@ cp scripts/raspberryconfig.sh /mnt/volumio/rootfs cp scripts/initramfs/init /mnt/volumio/rootfs/root cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin -#copy the scripts for updating from usb -wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater - mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 5a6a1f854..7322a63a0 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -182,6 +182,9 @@ if [ $(uname -m) = armv7l ]; then #dpkg -i sc2mpd_0.11.0-1_armhf.deb #rm /sc2mpd_0.11.0-1_armhf.deb + echo "Volumio Init Updater" + wget -P /usr/local/sbin/ http://repo.volumio.org/Volumio2/Binaries/arm/volumio-init-updater + chmod a+x /usr/local/sbin/volumio-init-updater echo "Installing Snapcast for multiroom" wget http://repo.volumio.org/Volumio2/Binaries/arm/snapserver -P /usr/sbin/ @@ -290,7 +293,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /sc2mpd_1.1.1-1_i386.deb echo "Volumio Init Updater" - wget -P /usr/local/sbin/volumio-init-updater http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater + wget -P /usr/local/sbin/ http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater chmod a+x /usr/local/sbin/volumio-init-updater echo "Zsync" From a920a5fb15b6ba36d7f3ce3a4c1f26ed90b26d1b Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 7 Apr 2017 19:57:05 +0200 Subject: [PATCH 114/673] remove outdated WiringPi from raspberryconfig more recent versions available in main repo --- scripts/raspberryconfig.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index ad8b2eb5c..143c2181b 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -110,11 +110,6 @@ wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /l #dpkg -i /raspi/raspi-config_20151019_all.deb #rm -Rf /raspi -echo "Installing WiringPi" -wget http://repo.volumio.org/Volumio2/Binaries/wiringpi_2.24_armhf.deb -dpkg -i wiringpi_2.24_armhf.deb -rm /wiringpi_2.24_armhf.deb - echo "adding gpio group and permissions" cd / From 4819c8b72c5f6a322d7e38746d45e7d9338aa3e9 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 7 Apr 2017 20:07:05 +0200 Subject: [PATCH 115/673] Installing WiringPi from Raspberrypi.org Repo more current & future-proof... --- scripts/raspberryconfig.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 143c2181b..30f268285 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -110,6 +110,8 @@ wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /l #dpkg -i /raspi/raspi-config_20151019_all.deb #rm -Rf /raspi +echo "Installing WiringPi from Raspberrypi.org Repo" +apt-get -y install wiringpi echo "adding gpio group and permissions" cd / From e47a56cecd74b1a1a6ba63d52ea26c19755747f8 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 7 Apr 2017 20:10:45 +0200 Subject: [PATCH 116/673] remove unused gpio-admin is also not irrelevant since Jessie https://github.com/quick2wire/quick2wire-gpio-admin --- scripts/raspberryconfig.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 30f268285..64c204577 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -114,13 +114,7 @@ echo "Installing WiringPi from Raspberrypi.org Repo" apt-get -y install wiringpi echo "adding gpio group and permissions" -cd / -wget http://repo.volumio.org/Volumio2/Binaries/gpio-admin.tar.gz -tar xvf gpio-admin.tar.gz -rm /gpio-admin.tar.gz groupadd -f --system gpio -chgrp gpio /usr/local/bin/gpio-admin -chmod u=rwxs,g=rx,o= /usr/local/bin/gpio-admin touch /lib/udev/rules.d/91-gpio.rules echo 'KERNEL=="spidev*", GROUP="spi", MODE="0660" From b5d74520bf4f6a816cbb8e6da61339de14d22cea Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 7 Apr 2017 20:18:56 +0200 Subject: [PATCH 117/673] /etc/udev/rules.d/99-com.rules use Jessie rule to set properly set I/O rights and aliases (gpio, serial, i2c, spi) --- scripts/raspberryconfig.sh | 41 ++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 64c204577..0cd2bc423 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -116,13 +116,46 @@ apt-get -y install wiringpi echo "adding gpio group and permissions" groupadd -f --system gpio -touch /lib/udev/rules.d/91-gpio.rules -echo 'KERNEL=="spidev*", GROUP="spi", MODE="0660" -SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c' "'chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio; chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio; chown -R root:gpio /sys/devices/platform/soc/*.gpio/gpio && chmod -R 770 /sys/devices/platform/soc/*.gpio/gpio'"'"' > /lib/udev/rules.d/91-gpio.rules - echo "adding volumio to gpio group" sudo adduser volumio gpio +echo "Use up-to-date jessie rules for gpio & al." +read -rd '' Rule_String <<"EOF" +SUBSYSTEM=="input", GROUP="input", MODE="0660" +SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660" +SUBSYSTEM=="spidev", GROUP="spi", MODE="0660" +SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660" + +SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\ + chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ + chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\ + chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\ +'" + +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ + ALIASES=/proc/device-tree/aliases; \ + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \ + echo 0;\ + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \ + echo 1; \ + else \ + exit 1; \ + fi\ +'", SYMLINK+="serial%c" + +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ + ALIASES=/proc/device-tree/aliases; \ + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \ + echo 0; \ + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \ + echo 1; \ + else \ + exit 1; \ + fi \ +'", SYMLINK+="serial%c" +EOF +echo "${Rule_String}" > /etc/udev/rules.d/99-com.rules + echo "Removing unneeded binaries" apt-get -y remove binutils From e5871a6614a3c18cc27d2cdab98e7950b51de905 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 7 Apr 2017 21:28:37 +0200 Subject: [PATCH 118/673] update volumio groups use usermod as adduser creates home directory which already exists (created in volumioconfig) --- scripts/raspberryconfig.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 0cd2bc423..94ef9f5d7 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -113,11 +113,12 @@ wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /l echo "Installing WiringPi from Raspberrypi.org Repo" apt-get -y install wiringpi -echo "adding gpio group and permissions" +echo "adding gpio & spi group and permissions" groupadd -f --system gpio +groupadd -f --system spi -echo "adding volumio to gpio group" -sudo adduser volumio gpio +echo "adding volumio to gpio group and al" +usermod -a -G gpio,i2c,spi,input volumio echo "Use up-to-date jessie rules for gpio & al." read -rd '' Rule_String <<"EOF" From f408d26ff901809ad4822687188a96840518cb2e Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 9 Apr 2017 12:07:51 +0200 Subject: [PATCH 119/673] Pi: bump next kernel test case to 4.9.20 4.9.20 now includes up-to date pisound, allo & hifiberry DAC drivers & overlays This change does NOT affect standard build of Volumio on 4.4.9 --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index ad8b2eb5c..e33bb4124 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -66,10 +66,10 @@ case $KERNEL_VERSION in KERNEL_BRANCH="stable" KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" ;; - "4.9.17") - KERNEL_REV="981" + "4.9.20") + KERNEL_REV="985" KERNEL_BRANCH="master" - KERNEL_COMMIT="41561448388d90f19f2e40ac62ce1c21c2e064ec" + KERNEL_COMMIT="3ff94f1fc459f88d3e2530542fb609643a7bd1a6" ;; esac From fc674c0207905c8c48b757d567ea66b8546fe02b Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 9 Apr 2017 15:01:17 +0200 Subject: [PATCH 120/673] Hostpad-edimax use: improved compatibility Custom hostpad-edimax is only launched if used 8192cu module driver does NOT support cfg80211 (pre kernel 4.4.13) Indeed since Pi Kernel 4.4.13, driver has been fixed and requires standard hostapd. Note: this fix does not alter operations on current 4.4.9-based Volumio, as it indeed keeps using hostpad-edimax as usual. It will also work with other ARM platform according to the driver they use. --- volumio/bin/hotspot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/bin/hotspot.sh b/volumio/bin/hotspot.sh index 30245e2db..5550f97d2 100755 --- a/volumio/bin/hotspot.sh +++ b/volumio/bin/hotspot.sh @@ -2,10 +2,10 @@ case "$1" in 'start') -DRIVER=`/sbin/ethtool -i wlan0 | grep driver | awk -F": " '{print $2}'` +MODULE=$(basename $(readlink /sys/class/net/wlan0/device/driver/module)) ARCH=`/usr/bin/dpkg --print-architecture` -if [ $DRIVER = "rtl8192cu" -a $ARCH = "armhf" ] ; then +if [ $MODULE = "8192cu" -a $ARCH = "armhf" ] && !(modinfo $MODULE | grep "cfg80211" > /dev/null) ; then echo "Launching Hostapd Edimax" /usr/sbin/hostapd-edimax /etc/hostapd/hostapd-edimax.conf else From 8dab9b27adc6363f22c86a751dbd4593271fbf20 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 9 Apr 2017 17:03:53 +0200 Subject: [PATCH 121/673] improved grep regex --- volumio/bin/hotspot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/bin/hotspot.sh b/volumio/bin/hotspot.sh index 5550f97d2..a4c47bf59 100755 --- a/volumio/bin/hotspot.sh +++ b/volumio/bin/hotspot.sh @@ -5,7 +5,7 @@ case "$1" in MODULE=$(basename $(readlink /sys/class/net/wlan0/device/driver/module)) ARCH=`/usr/bin/dpkg --print-architecture` -if [ $MODULE = "8192cu" -a $ARCH = "armhf" ] && !(modinfo $MODULE | grep "cfg80211" > /dev/null) ; then +if [ $MODULE = "8192cu" -a $ARCH = "armhf" ] && !(modinfo $MODULE | grep '^depends:.*cfg80211.*' > /dev/null) ; then echo "Launching Hostapd Edimax" /usr/sbin/hostapd-edimax /etc/hostapd/hostapd-edimax.conf else From 577518850ab9969a3168ba3133023b5f9c2bc47e Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 14 Apr 2017 10:57:27 +0200 Subject: [PATCH 122/673] remove /etc/resolv.conf.tail This Google DNS fallback is no longer necessary (and potantially conflicting) with addition of custom DNS settings here: https://github.com/volumio/Volumio2/pull/1061 Both PRs should be merged at same time. --- scripts/volumioconfig.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 7322a63a0..f3033819f 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -432,11 +432,6 @@ echo "Hostapd conf files" cp /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.tmpl chmod -R 777 /etc/hostapd -echo "Setting fallback DNS with Google's DNS" -echo "# Google nameservers -nameserver 8.8.8.8 -nameserver 8.8.4.4" >> /etc/resolv.conf.tail - echo "Removing Avahi Service for UDISK-SSH" rm /etc/avahi/services/udisks.service From 973be9512559bd929efd8797a311d85a348f4b44 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 14 Apr 2017 11:39:14 +0200 Subject: [PATCH 123/673] add empty /etc/resolv.conf.head for use by custom DNS settings --- scripts/volumioconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index f3033819f..b8c1a753b 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -432,6 +432,9 @@ echo "Hostapd conf files" cp /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.tmpl chmod -R 777 /etc/hostapd +echo "Empty resolv.conf.head for custom DNS settings" +touch /etc/resolv.conf.head + echo "Removing Avahi Service for UDISK-SSH" rm /etc/avahi/services/udisks.service From fc34b505475970009175468e8c57d686b9a7926a Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 19 Apr 2017 16:32:57 +0200 Subject: [PATCH 124/673] fix raspberry pi key --- scripts/raspberryconfig.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index a4c8f2531..0573e9ad1 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -42,7 +42,8 @@ deb-src http://archive.raspberrypi.org/debian/ jessie main ui " >> /etc/apt/sources.list.d/raspi.list echo "Adding Raspberrypi.org Repo Key" -wget https://www.raspberrypi.org/raspberrypi.gpg.key -O - | sudo apt-key add - + +wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key -O - | sudo apt-key add - echo "Installing R-pi specific binaries" apt-get update From e919477c0c35405f773d5ec10198d44c52e0ccfc Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 24 Apr 2017 18:42:19 +0200 Subject: [PATCH 125/673] differential mpd install --- build.sh | 2 +- scripts/volumioconfig.sh | 32 ++++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/build.sh b/build.sh index 45570a6ee..1d57aa52b 100755 --- a/build.sh +++ b/build.sh @@ -162,7 +162,7 @@ if [ -n "$BUILD" ]; then echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release echo "VOLUMIO_FE_VERSION=\"$(git --git-dir build/$BUILD/root/volumio/http/www/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release echo "VOLUMIO_BE_VERSION=\"$(git --git-dir build/$BUILD/root/volumio/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release - + echo "VOLUMIO_ARCH=\"${BUILD}\"" >> build/$BUILD/root/etc/os-release if [ ! "$BUILD" = x86 ]; then chroot build/$BUILD/root /bin/bash -x <<'EOF' su - diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 7322a63a0..3608970d8 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -150,11 +150,6 @@ if [ $(uname -m) = armv7l ]; then echo "Installing Custom Packages" cd / - echo "Installing custom MPD version" - wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.19.19-1_armhf.deb - dpkg -i mpd_0.19.19-1_armhf.deb - rm /mpd_0.19.19-1_armhf.deb - echo "Installing Shairport for Airplay emulation" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_arm.tar.gz tar xf shairport-sync_arm.tar.gz @@ -262,11 +257,6 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Custom Packages" cd / - echo "Installing custom MPD version" - wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.19.19-1_i386.deb - dpkg -i mpd_0.19.19-1_i386.deb - rm /mpd_0.19.19-1_i386.deb - echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb @@ -308,6 +298,28 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] fi +ARCH=$(cat /etc/os-release | grep ^VOLUMIO_ARCH | tr -d 'VOLUMIO_ARCH="') +echo $ARCH +echo "Installing custom MPD depending on system architecture" +if [ $ARCH = arm ]; then +echo "Installing MPD for armv6" +wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv6.deb +dpkg -i mpd_0.20.6-1_armv6.deb +rm mpd_0.20.6-1_armv6.deb +elif [ $ARCH = armv7 ]; then +echo "Installing MPD for armv7" +wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv7.deb +dpkg -i mpd_0.20.6-1_armv7.deb +rm mpd_0.20.6-1_armv7.deb +else +echo "Installing MPD for i386" +wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.20.6-1_i386.deb +dpkg -i mpd_0.20.6-1_i386.deb +rm mpd_0.20.6-1_i386.deb +fi + + + echo "Installing Upmpdcli Streaming Modules" wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-gmusic_1.2.12-1_all.deb wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-qobuz_1.2.12-1_all.deb From b0e065e4e4b59b337779f479e86c30584f7ae609 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 26 Apr 2017 13:45:46 +0000 Subject: [PATCH 126/673] adding volumio theme --- .../plymouth/themes/volumio/volumio.plymouth | 8 ++++++++ .../share/plymouth/themes/volumio/volumio.png | Bin 0 -> 62231 bytes .../plymouth/themes/volumio/volumio.script | 17 +++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio.plymouth create mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio.png create mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio.script diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio.plymouth b/volumio/usr/share/plymouth/themes/volumio/volumio.plymouth new file mode 100644 index 000000000..e4533281e --- /dev/null +++ b/volumio/usr/share/plymouth/themes/volumio/volumio.plymouth @@ -0,0 +1,8 @@ +[Plymouth Theme] +Name=Volumio +Description=Volumio theme +ModuleName=script + +[script] +ImageDir=/usr/share/plymouth/themes/volumio +ScriptFile=/usr/share/plymouth/themes/volumio/volumio.script diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio.png b/volumio/usr/share/plymouth/themes/volumio/volumio.png new file mode 100644 index 0000000000000000000000000000000000000000..c6fe6fe6d0820f6a2810ed4440c55107566e612e GIT binary patch literal 62231 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 literal 0 HcmV?d00001 diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio.script b/volumio/usr/share/plymouth/themes/volumio/volumio.script new file mode 100644 index 000000000..02dda91e2 --- /dev/null +++ b/volumio/usr/share/plymouth/themes/volumio/volumio.script @@ -0,0 +1,17 @@ +screen_width = Window.GetWidth(); +screen_height = Window.GetHeight(); + +theme_image = Image("volumio.png"); +resized_wallpaper_image = theme_image.Scale(screen_width, screen_height); +sprite = Sprite(resized_wallpaper_image); +sprite.SetZ(-100); + +message_sprite = Sprite(); +message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.8, 10000); + +fun message_callback (text) { + my_image = Image.Text(text, 1, 1, 1); + message_sprite.SetImage(my_image); +} + +Plymouth.SetUpdateStatusFunction(message_callback); From 88fb127d6b6efd2761aac8eaf42ad375a56a8505 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 26 Apr 2017 13:47:48 +0000 Subject: [PATCH 127/673] copy plymouth files --- scripts/configure.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index 2323707fc..5d93d7d2b 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -89,7 +89,8 @@ chmod a+x build/$BUILD/root/bin/wifistart.sh #udev script cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh chmod a+x build/$BUILD/root/bin/rename_netiface0.sh - +#Plymouth +cp volumio/usr/* build/$BUILD/usr/ echo 'Done Copying Custom Volumio System Files' echo "Stripping binaries and libraries to save space" From 5642f99371e32d33da85f50a7c0bd8d47fb3e02c Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 26 Apr 2017 13:55:44 +0000 Subject: [PATCH 128/673] plymouth default theme --- scripts/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/configure.sh b/scripts/configure.sh index 5d93d7d2b..727a88ffd 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -91,6 +91,7 @@ cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh chmod a+x build/$BUILD/root/bin/rename_netiface0.sh #Plymouth cp volumio/usr/* build/$BUILD/usr/ +plymouth-set-default-theme volumio echo 'Done Copying Custom Volumio System Files' echo "Stripping binaries and libraries to save space" From 709e89d170bc8d739e814c1138a35c21b33c9291 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 25 Apr 2017 17:52:47 +0200 Subject: [PATCH 129/673] adding plymouth to arm --- recipes/arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index a4d2095b7..aee387e4f 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged plymouth source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From 928655004284520fc008e64af8276df48729c7c2 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 25 Apr 2017 21:13:34 +0200 Subject: [PATCH 130/673] add .tail back with OpenDNS enabled sudoer for ln/unlink now used for custom DNS settings --- scripts/volumioconfig.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index b8c1a753b..13b06f5a9 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -91,7 +91,7 @@ alias volumio="/volumio/app/plugins/system_controller/volumio_command_line_clien #Sudoers Nopasswd echo 'Adding Safe Sudoers NoPassw permissions' -echo "volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid" >> /etc/sudoers +echo "volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink" >> /etc/sudoers echo volumio > /etc/hostname chmod 777 /etc/hostname @@ -435,6 +435,13 @@ chmod -R 777 /etc/hostapd echo "Empty resolv.conf.head for custom DNS settings" touch /etc/resolv.conf.head +echo "Setting fallback DNS with OpenDNS nameservers" +echo "# OpenDNS nameservers +nameserver 208.67.222.222 +nameserver 208.67.220.220" > /etc/resolv.conf.tail.tmpl +ln -s /etc/resolv.conf.tail.tmpl /etc/resolv.conf.tail +chmod 666 /etc/resolv.conf.* + echo "Removing Avahi Service for UDISK-SSH" rm /etc/avahi/services/udisks.service From 8c57b8b278f1d25fdb3993fdfa9f65a731bb0205 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 26 Apr 2017 15:48:15 +0200 Subject: [PATCH 131/673] Differential install for upmpdcli too --- scripts/volumioconfig.sh | 92 +++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index cc40287ee..784ec9569 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -150,33 +150,54 @@ if [ $(uname -m) = armv7l ]; then echo "Installing Custom Packages" cd / + ARCH=$(cat /etc/os-release | grep ^VOLUMIO_ARCH | tr -d 'VOLUMIO_ARCH="') + echo $ARCH + echo "Installing custom MPD depending on system architecture" + + if [ $ARCH = arm ]; then + + echo "Installing MPD for armv6" + wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv6.deb + dpkg -i mpd_0.20.6-1_armv6.deb + rm mpd_0.20.6-1_armv6.deb + + echo "Installing Upmpdcli for armv6" + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnpp3_0.15.1-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnp6_1.6.20.jfd5-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/upmpdcli_1.2.12-1_armhf.deb + dpkg -i libupnpp3_0.15.1-1_armhf.deb + dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb + dpkg -i upmpdcli_1.2.12-1_armhf.deb + rm libupnpp3_0.15.1-1_armhf.deb + rm libupnp6_1.6.20.jfd5-1_armhf.deb + rm upmpdcli_1.2.12-1_armhf.deb + + else [ $ARCH = armv7 ]; then + echo "Installing MPD for armv7" + wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv7.deb + dpkg -i mpd_0.20.6-1_armv7.deb + rm mpd_0.20.6-1_armv7.deb + + echo "Installing Upmpdcli for armv7" + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnp6_1.6.20.jfd5-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/upmpdcli_1.2.12-1_armhf.deb + dpkg -i libupnpp3_0.15.1-1_armhf.deb + dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb + dpkg -i upmpdcli_1.2.12-1_armhf.deb + rm libupnpp3_0.15.1-1_armhf.deb + rm libupnp6_1.6.20.jfd5-1_armhf.deb + rm upmpdcli_1.2.12-1_armhf.deb + fi + #Remove autostart of upmpdcli + update-rc.d upmpdcli remove + + echo "Installing Shairport for Airplay emulation" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_arm.tar.gz tar xf shairport-sync_arm.tar.gz rm /shairport-sync_arm.tar.gz - echo "Installing Upmpdcli" - wget http://repo.volumio.org/Packages/Upmpdcli/arm/upmpdcli_1.2.12-1_armhf.deb - wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnpp2_0.14.1-1_armhf.deb - wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnp6_1.6.19.jfd3-1_armhf.deb - wget http://repo.volumio.org/Packages/Upmpdcli/arm/libupnpp3_0.15.1-1_armhf.deb - dpkg -i libupnpp3_0.15.1-1_armhf.deb - dpkg -i libupnpp2_0.14.1-1_armhf.deb - dpkg -i libupnp6_1.6.19.jfd3-1_armhf.deb - dpkg -i upmpdcli_1.2.12-1_armhf.deb - rm /libupnpp3_0.15.1-1_armhf.deb - rm /upmpdcli_1.2.12-1_armhf.deb - rm /libupnp6_1.6.19.jfd3-1_armhf.deb - rm /libupnpp2_0.14.1-1_armhf.deb - - #Remove autostart of upmpdcli - update-rc.d upmpdcli remove - - #echo "Installing LINN Songcast module" - #wget http://repo.volumio.org/Packages/Upmpdcli/sc2mpd_0.11.0-1_armhf.deb - #dpkg -i sc2mpd_0.11.0-1_armhf.deb - #rm /sc2mpd_0.11.0-1_armhf.deb - echo "Volumio Init Updater" wget -P /usr/local/sbin/ http://repo.volumio.org/Volumio2/Binaries/arm/volumio-init-updater chmod a+x /usr/local/sbin/volumio-init-updater @@ -257,6 +278,11 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Custom Packages" cd / + echo "Installing MPD for i386" + wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.20.6-1_i386.deb + dpkg -i mpd_0.20.6-1_i386.deb + rm mpd_0.20.6-1_i386.deb + echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb @@ -298,28 +324,6 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] fi -ARCH=$(cat /etc/os-release | grep ^VOLUMIO_ARCH | tr -d 'VOLUMIO_ARCH="') -echo $ARCH -echo "Installing custom MPD depending on system architecture" -if [ $ARCH = arm ]; then -echo "Installing MPD for armv6" -wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv6.deb -dpkg -i mpd_0.20.6-1_armv6.deb -rm mpd_0.20.6-1_armv6.deb -elif [ $ARCH = armv7 ]; then -echo "Installing MPD for armv7" -wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv7.deb -dpkg -i mpd_0.20.6-1_armv7.deb -rm mpd_0.20.6-1_armv7.deb -else -echo "Installing MPD for i386" -wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.20.6-1_i386.deb -dpkg -i mpd_0.20.6-1_i386.deb -rm mpd_0.20.6-1_i386.deb -fi - - - echo "Installing Upmpdcli Streaming Modules" wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-gmusic_1.2.12-1_all.deb wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-qobuz_1.2.12-1_all.deb From 3908cc7ce03b0ab0f35f725085b67264148f8a20 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 26 Apr 2017 18:20:51 +0200 Subject: [PATCH 132/673] fix install of upmpdcli --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 784ec9569..ad9e96a97 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -172,7 +172,7 @@ if [ $(uname -m) = armv7l ]; then rm libupnp6_1.6.20.jfd5-1_armhf.deb rm upmpdcli_1.2.12-1_armhf.deb - else [ $ARCH = armv7 ]; then + elif [ $ARCH = armv7 ]; then echo "Installing MPD for armv7" wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv7.deb dpkg -i mpd_0.20.6-1_armv7.deb From 565e0aa4988541a1f851275826e50986461419b5 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 27 Apr 2017 14:17:44 +0200 Subject: [PATCH 133/673] chmod 666 /etc/resolv.conf.* before symlinking do not try to change symlink access modes --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 784ec9569..1f1a7c759 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -455,8 +455,8 @@ echo "Setting fallback DNS with OpenDNS nameservers" echo "# OpenDNS nameservers nameserver 208.67.222.222 nameserver 208.67.220.220" > /etc/resolv.conf.tail.tmpl -ln -s /etc/resolv.conf.tail.tmpl /etc/resolv.conf.tail chmod 666 /etc/resolv.conf.* +ln -s /etc/resolv.conf.tail.tmpl /etc/resolv.conf.tail echo "Removing Avahi Service for UDISK-SSH" rm /etc/avahi/services/udisks.service From a2b5f37a259e45b4e862d5714ed482c77796a152 Mon Sep 17 00:00:00 2001 From: Ghembs Date: Fri, 28 Apr 2017 17:50:01 +0200 Subject: [PATCH 134/673] added failure check for the update process --- scripts/initramfs/init | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index d0f3c129e..3938e743e 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -205,6 +205,36 @@ fi umount /mnt/factory rm -r /mnt/factory +# if the update failed before completion +mkdir boot +mount -t vfat /dev/mmcblk0p1 /boot +if [-e "/boot/update_process" ]; then +echo "Previous update attempt failed, restoring fallbacks" + cp /mnt/imgpart/kernel_fallback.tar /mnt/imgpart/kernel_current.tar + cp /mnt/imgpart/volumio_fallback.tar /mnt/imgpart/volumio_current.tar + if [-e "/boot/kernel_update" ]; then + rm /boot/kernel_update + fi + rm /boot/update_process +fi +umount /boot +rm -rf /boot + +# if the kernel has been updated +mkdir boot +mount -t vfat /dev/mmcblk0p1 /boot +if [ -e "/boot/kernel_update" ]; then +echo "unpacking kernel" + tar xf /mnt/imgpart/kernel_current.tar /boot + if [ -e "/mnt/imgpart/config.txt.bak" ]; then + cp /mnt/imgpart/config.txt.bak /boot/config.txt + rm /mnt/imgpart/config.txt.bak + fi + rm /boot/kernel_update +fi +umount /boot +rm -rf /boot + mkdir boot mount -t vfat /dev/mmcblk0p1 /boot if [ -e "/boot/resize-volumio-datapart" ]; then From fce184054c273e9a7bb42cde778a06f4f17b5b9d Mon Sep 17 00:00:00 2001 From: Ghembs Date: Fri, 28 Apr 2017 19:24:36 +0200 Subject: [PATCH 135/673] Update init --- scripts/initramfs/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 3938e743e..61dbb4e23 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -225,7 +225,7 @@ mkdir boot mount -t vfat /dev/mmcblk0p1 /boot if [ -e "/boot/kernel_update" ]; then echo "unpacking kernel" - tar xf /mnt/imgpart/kernel_current.tar /boot + tar xf /mnt/imgpart/kernel_current.tar -C /boot if [ -e "/mnt/imgpart/config.txt.bak" ]; then cp /mnt/imgpart/config.txt.bak /boot/config.txt rm /mnt/imgpart/config.txt.bak From a34295633ac96885a589e889c4566571fc935b20 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 28 Apr 2017 19:30:06 +0200 Subject: [PATCH 136/673] rsync --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/armv8.conf | 2 +- recipes/x86.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 2a2935eb4..749d4a297 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 18a18689e..3d29f7dc4 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index 58ea50cfd..d1d58195f 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index bdbb99791..dd56694f3 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -31,7 +31,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge rsync source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 3765b8b401a8467e74cc52581db258655ff8aff9 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 30 Apr 2017 15:22:05 +0200 Subject: [PATCH 137/673] Pi: bump next kernel test case to 4.9.25 4.9.25 includes various improvements over 4.9.20 (networking, i2s,...) As always, this change does NOT affect standard build of Volumio on 4.4.9 --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 0573e9ad1..c494b04bf 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,10 +67,10 @@ case $KERNEL_VERSION in KERNEL_BRANCH="stable" KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" ;; - "4.9.20") - KERNEL_REV="985" + "4.9.25") + KERNEL_REV="994" KERNEL_BRANCH="master" - KERNEL_COMMIT="3ff94f1fc459f88d3e2530542fb609643a7bd1a6" + KERNEL_COMMIT="a86bfee5b47a74c13056997f1e4d8b9d8090b398" ;; esac From 3301e3183247026fb331315bf38826a27882410e Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 May 2017 18:22:07 +0200 Subject: [PATCH 138/673] fix merge --- scripts/initramfs/init | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 1c7da0587..047752e5b 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -191,24 +191,17 @@ mount -t vfat /dev/mmcblk0p1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then echo "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data - -<<<<<<< HEAD - echo "Factory reset executed: part I" - cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset - sync - echo "Factory reset executed: part II - end" - - #Setting 5 second for rebooting after kernel panic (sometimes it happens after factory reset) - echo 5 > /proc/sys/kernel/panic - -======= echo "Factory reset executed: part I - Kernel" tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory echo "Factory reset executed: part II - Squash" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh echo "Factory reset executed: part III - end" + sync rm /mnt/factory/factory_reset ->>>>>>> kernelupdater + + #Setting 5 second for rebooting after kernel panic (sometimes it happens after factory reset) + echo 5 > /proc/sys/kernel/panic + fi if [ -e "/mnt/factory/user_data" ]; then echo "Deleting User Data" @@ -299,7 +292,4 @@ exec switch_root /mnt/ext/union /sbin/init echo "Failed to switch_root, dropping to a shell" exec sh -<<<<<<< HEAD -======= ->>>>>>> kernelupdater From 114223c7a2b5be75f9e60e31065a70091be48195 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 May 2017 19:28:34 +0200 Subject: [PATCH 139/673] Fix error in init --- scripts/initramfs/init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 047752e5b..32609c11d 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -129,6 +129,7 @@ mount -t ext4 ${IMGPART} /mnt/imgpart #create recovery image when not yet present #when already present and a bootdelay parameter was specified then give the kernel the additional headstart # + if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then echo "Creating factory image, this will take a minute, please wait..." cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh @@ -216,7 +217,7 @@ rm -r /mnt/factory # if the update failed before completion mkdir boot mount -t vfat /dev/mmcblk0p1 /boot -if [-e "/boot/update_process" ]; then +if [ -e "/boot/update_process" ]; then echo "Previous update attempt failed, restoring fallbacks" cp /mnt/imgpart/kernel_fallback.tar /mnt/imgpart/kernel_current.tar cp /mnt/imgpart/volumio_fallback.tar /mnt/imgpart/volumio_current.tar From f8c325b69e17df3611c0729bad3166e4afaf0d60 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 May 2017 21:19:41 +0200 Subject: [PATCH 140/673] new remote updater --- scripts/volumioconfig.sh | 9 +++------ .../systemd/system/volumio-remote-updater.service | 13 ------------- 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 volumio/lib/systemd/system/volumio-remote-updater.service diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 9a1f7e85a..b5f3913bd 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -214,8 +214,9 @@ if [ $(uname -m) = armv7l ]; then chmod a+x /usr/bin/zsync echo "Adding volumio-remote-updater" - wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater -P /usr/local/sbin/ - chmod a+x /usr/local/sbin/volumio-remote-updater + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.0-armhf.deb + dpkg -i volumio-remote-updater_1.0-armhf.deb + rm volumio-remote-updater_1.0-armhf.deb echo "Adding special version for edimax dongle" wget http://repo.volumio.org/Volumio2/Binaries/arm/hostapd-edimax -P /usr/sbin/ @@ -373,10 +374,6 @@ echo "Adding Volumio Parent Service to Startup" #systemctl enable volumio.service ln -s /lib/systemd/system/volumio.service /etc/systemd/system/multi-user.target.wants/volumio.service -echo "Adding Volumio Remote Updater Service to Startup" -#systemctl enable volumio-remote-updater.service -ln -s /lib/systemd/system/volumio-remote-updater.service /etc/systemd/system/multi-user.target.wants/volumio-remote-updater.service - echo "Adding Udisks-glue service to Startup" ln -s /lib/systemd/system/udisks-glue.service /etc/systemd/system/multi-user.target.wants/udisks-glue.service diff --git a/volumio/lib/systemd/system/volumio-remote-updater.service b/volumio/lib/systemd/system/volumio-remote-updater.service deleted file mode 100644 index 78df625de..000000000 --- a/volumio/lib/systemd/system/volumio-remote-updater.service +++ /dev/null @@ -1,13 +0,0 @@ -[Service] -ExecStart=/usr/local/sbin/volumio-remote-updater -Restart=always -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=volumio-remote-updater -User=volumio -Group=volumio -Environment=NODE_ENV=production - -[Install] -WantedBy=multi-user.target - From 5aafc58ac69cbee83c3049a58a13785a578b6245 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 1 May 2017 21:27:00 +0200 Subject: [PATCH 141/673] Reboot after kernel update --- scripts/initramfs/init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 32609c11d..f04160d91 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -240,6 +240,9 @@ echo "unpacking kernel" rm /mnt/imgpart/config.txt.bak fi rm /boot/kernel_update + umount /boot + rm -rf /boot + reboot fi umount /boot rm -rf /boot From 418df6b9f6a2038774392b604dade92121b7f45d Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 1 May 2017 21:37:21 +0200 Subject: [PATCH 142/673] Reboot after factory reset --- scripts/initramfs/init | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index f04160d91..7d56161f7 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -192,23 +192,24 @@ mount -t vfat /dev/mmcblk0p1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then echo "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data - echo "Factory reset executed: part I - Kernel" + echo "Factory reset executed: part I - User DATA Part" tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory - echo "Factory reset executed: part II - Squash" + echo "Factory reset executed: part II - Kernel" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh - echo "Factory reset executed: part III - end" + echo "Factory reset executed: part III - Squash" + echo "Factory reset successfully executed" sync rm /mnt/factory/factory_reset - - #Setting 5 second for rebooting after kernel panic (sometimes it happens after factory reset) - echo 5 > /proc/sys/kernel/panic + umount /mnt/factory + rm -r /mnt/factory + echo "Restarting" + reboot fi if [ -e "/mnt/factory/user_data" ]; then echo "Deleting User Data" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data rm /mnt/factory/user_data - echo "User Data successfully deleted " fi umount /mnt/factory From 00d76bb5d269af24cce6190c6118fdf31d5a126a Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 1 May 2017 21:41:33 +0200 Subject: [PATCH 143/673] Init rationalization --- scripts/initramfs/init | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 7d56161f7..524e6474c 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -227,12 +227,8 @@ echo "Previous update attempt failed, restoring fallbacks" fi rm /boot/update_process fi -umount /boot -rm -rf /boot -# if the kernel has been updated -mkdir boot -mount -t vfat /dev/mmcblk0p1 /boot +# if the kernel has been updated, and no error has occurred before completition if [ -e "/boot/kernel_update" ]; then echo "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot @@ -245,11 +241,8 @@ echo "unpacking kernel" rm -rf /boot reboot fi -umount /boot -rm -rf /boot -mkdir boot -mount -t vfat /dev/mmcblk0p1 /boot +# if data partition needs to be resized if [ -e "/boot/resize-volumio-datapart" ]; then echo "Re-sizing Volumio data partition" END="$(parted -s /dev/mmcblk0 unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" @@ -260,8 +253,10 @@ echo "Re-sizing Volumio data partition" parted -s /dev/mmcblk0 unit MB print rm /boot/resize-volumio-datapart fi + +# clear the mountpoint umount /boot -rm -r /boot +rm -rf /boot # 4) mount a filesystem for write access to the static image # unclear: memory size? -o size=1024M From 438cfea55e04dcd283a5e36faf388e6868e5aa67 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 May 2017 22:10:44 +0200 Subject: [PATCH 144/673] Variant info --- build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 1d57aa52b..a17719129 100755 --- a/build.sh +++ b/build.sh @@ -64,7 +64,7 @@ if [ $NUMARGS -eq 0 ]; then HELP fi -while getopts b:v:d:l:p:e FLAG; do +while getopts b:v:d:l:p:t:e FLAG; do case $FLAG in b) BUILD=$OPTARG @@ -86,6 +86,9 @@ while getopts b:v:d:l:p:e FLAG; do h) #show help HELP ;; + t) + VARIANT=$OPTARG + ;; /?) #unrecognized option - show help echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed." HELP @@ -101,6 +104,10 @@ if [ $(id -u) -ne 0 ]; then exit fi +if [ -z "${VARIANT}" ]; then + VARIANT="volumio" +fi + if [ -n "$BUILD" ]; then CONF=recipes/$BUILD.conf if [ "$BUILD" = arm ] || [ "$BUILD" = arm-dev ]; then @@ -181,7 +188,7 @@ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2 CUR_DATE=$(date) #Write some Version informations echo "Writing system information" - echo "VOLUMIO_VARIANT=\"volumio\" + echo "VOLUMIO_VARIANT=\"${VARIANT}\" VOLUMIO_TEST=\"FALSE\" VOLUMIO_BUILD_DATE=\"${CUR_DATE}\" " >> build/${BUILD}/root/etc/os-release From 9284335e06507dfa065a1b6f07d5e7cfd936b002 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 May 2017 22:10:44 +0200 Subject: [PATCH 145/673] Variant info --- build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 1d57aa52b..a17719129 100755 --- a/build.sh +++ b/build.sh @@ -64,7 +64,7 @@ if [ $NUMARGS -eq 0 ]; then HELP fi -while getopts b:v:d:l:p:e FLAG; do +while getopts b:v:d:l:p:t:e FLAG; do case $FLAG in b) BUILD=$OPTARG @@ -86,6 +86,9 @@ while getopts b:v:d:l:p:e FLAG; do h) #show help HELP ;; + t) + VARIANT=$OPTARG + ;; /?) #unrecognized option - show help echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed." HELP @@ -101,6 +104,10 @@ if [ $(id -u) -ne 0 ]; then exit fi +if [ -z "${VARIANT}" ]; then + VARIANT="volumio" +fi + if [ -n "$BUILD" ]; then CONF=recipes/$BUILD.conf if [ "$BUILD" = arm ] || [ "$BUILD" = arm-dev ]; then @@ -181,7 +188,7 @@ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2 CUR_DATE=$(date) #Write some Version informations echo "Writing system information" - echo "VOLUMIO_VARIANT=\"volumio\" + echo "VOLUMIO_VARIANT=\"${VARIANT}\" VOLUMIO_TEST=\"FALSE\" VOLUMIO_BUILD_DATE=\"${CUR_DATE}\" " >> build/${BUILD}/root/etc/os-release From b1f511df0222d3ad075479b302683f00ae60ecb5 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 May 2017 23:41:08 +0200 Subject: [PATCH 146/673] changing port forward invoke method to systemd service --- scripts/configure.sh | 3 --- scripts/volumioconfig.sh | 3 +++ volumio/lib/systemd/system/iptables.service | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 volumio/lib/systemd/system/iptables.service diff --git a/scripts/configure.sh b/scripts/configure.sh index 2323707fc..7734b9b23 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -62,9 +62,6 @@ cp -r volumio/lib build/$BUILD/root/ # Netplug cp -rp volumio/etc/netplug build/$BUILD/root/etc/ chmod +x build/$BUILD/root/etc/netplug/netplug -# IpTables Rules -cp volumio/etc/iptables.rules build/$BUILD/root/etc/iptables.rules -cp -r volumio/etc/network/* build/$BUILD/root/etc/network # Wpa Supplicant echo " " > build/$BUILD/root/etc/wpa_supplicant/wpa_supplicant.conf chmod 777 build/$BUILD/root/etc/wpa_supplicant/wpa_supplicant.conf diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 9a1f7e85a..7321666b6 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -386,6 +386,9 @@ ln -s /lib/systemd/system/firststart.service /etc/systemd/system/multi-user.targ echo "Adding Dynamic Swap Service" ln -s /lib/systemd/system/dynamicswap.service /etc/systemd/system/multi-user.target.wants/dynamicswap.service +echo "Adding Iptables Service" +ln -s /lib/systemd/system/iptables.service /etc/systemd/system/multi-user.target.wants/iptables.service + echo "Setting Mpd to SystemD instead of Init" update-rc.d mpd remove systemctl enable mpd.service diff --git a/volumio/lib/systemd/system/iptables.service b/volumio/lib/systemd/system/iptables.service new file mode 100644 index 000000000..b62f21648 --- /dev/null +++ b/volumio/lib/systemd/system/iptables.service @@ -0,0 +1,15 @@ +[Unit] +Description = Volumio Iptables Module + +[Service] +ExecStart=/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 +Restart=never +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=iptables +User=root +Group=root + +[Install] +WantedBy=multi-user.target + From b0744bf7f9137bdf782be9f2cc0aba4001c3e1eb Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 May 2017 23:41:08 +0200 Subject: [PATCH 147/673] changing port forward invoke method to systemd service --- scripts/configure.sh | 3 --- scripts/volumioconfig.sh | 3 +++ volumio/lib/systemd/system/iptables.service | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 volumio/lib/systemd/system/iptables.service diff --git a/scripts/configure.sh b/scripts/configure.sh index 2323707fc..7734b9b23 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -62,9 +62,6 @@ cp -r volumio/lib build/$BUILD/root/ # Netplug cp -rp volumio/etc/netplug build/$BUILD/root/etc/ chmod +x build/$BUILD/root/etc/netplug/netplug -# IpTables Rules -cp volumio/etc/iptables.rules build/$BUILD/root/etc/iptables.rules -cp -r volumio/etc/network/* build/$BUILD/root/etc/network # Wpa Supplicant echo " " > build/$BUILD/root/etc/wpa_supplicant/wpa_supplicant.conf chmod 777 build/$BUILD/root/etc/wpa_supplicant/wpa_supplicant.conf diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index b5f3913bd..3046dbb69 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -383,6 +383,9 @@ ln -s /lib/systemd/system/firststart.service /etc/systemd/system/multi-user.targ echo "Adding Dynamic Swap Service" ln -s /lib/systemd/system/dynamicswap.service /etc/systemd/system/multi-user.target.wants/dynamicswap.service +echo "Adding Iptables Service" +ln -s /lib/systemd/system/iptables.service /etc/systemd/system/multi-user.target.wants/iptables.service + echo "Setting Mpd to SystemD instead of Init" update-rc.d mpd remove systemctl enable mpd.service diff --git a/volumio/lib/systemd/system/iptables.service b/volumio/lib/systemd/system/iptables.service new file mode 100644 index 000000000..b62f21648 --- /dev/null +++ b/volumio/lib/systemd/system/iptables.service @@ -0,0 +1,15 @@ +[Unit] +Description = Volumio Iptables Module + +[Service] +ExecStart=/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 +Restart=never +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=iptables +User=root +Group=root + +[Install] +WantedBy=multi-user.target + From 297b19e2b591483e79d13764b0eee8187a013d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 2 May 2017 18:58:16 +0200 Subject: [PATCH 148/673] Add support for Asus Tinkerboard --- build.sh | 6 +- scripts/tinkerconfig.sh | 86 +++++++++++++++++++ scripts/tinkerimage.sh | 179 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 270 insertions(+), 1 deletion(-) create mode 100755 scripts/tinkerconfig.sh create mode 100755 scripts/tinkerimage.sh diff --git a/build.sh b/build.sh index 1d57aa52b..733304e49 100755 --- a/build.sh +++ b/build.sh @@ -27,7 +27,7 @@ Switches: -d Create Image for Specific Devices. Supported device names: pi, udooneo, udooqdl, cuboxi, cubietruck, compulab, odroidc1, odroidc2, odroidxu4, sparky, bbb, pine64, - bpim2u, bpipro + bpim2u, bpipro, tinkerboard -v Version must be a dot separated number. Example 1.102 . -l Create docker layer. Give a Docker Repository name as the argument. @@ -262,6 +262,10 @@ case $DEVICE in check_os_release "arm" $VERSION $DEVICE sh scripts/armbianimage.sh -v $VERSION -d "$DEVICE" -p $PATCH ;; + tinkerboard) echo 'Writing Ausus Tinkerboard Image File' + check_os_release "armv7" $VERSION $DEVICE + sh scripts/tinkerimage.sh -v $VERSION -p $PATCH -a armv7 + ;; x86) echo 'Writing x86 Image File' check_os_release "x86" $VERSION $DEVICE sh scripts/x86image.sh -v $VERSION -p $PATCH; diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh new file mode 100755 index 000000000..012b075c9 --- /dev/null +++ b/scripts/tinkerconfig.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# Tinkerboard fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk0p1 /boot ext4 defaults,user,rw 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Adding default sound modules and wifi" +#echo " +# +# +# +#8723bs +#" >> /etc/modules + + +echo "Installing additonal packages" +apt-get update +#apt-get -y install u-boot-tools liblircclient0 lirc +apt-get -y install u-boot-tools + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep'" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd +echo "Cleaning up" +# rm /boot/volumio.initrd diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh new file mode 100755 index 000000000..04a3721e8 --- /dev/null +++ b/scripts/tinkerimage.sh @@ -0,0 +1,179 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":d:v:p:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-tinkerboard.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary ext3 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -F -t ext4 -L BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the tinkerboard rockchip kernel/ platform files" +if [ -d platform-asus ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-asus folder + # that will refresh all the asus platforms, see below +else + echo "Clone asus files from repo" + git clone https://github.com/volumio/platform-asus.git platform-asus + echo "Unpack the platform files gkkpch" + cd platform-asus + tar xfJ tinkerboard.tar.xz + cd .. +fi + +echo "Copying the bootloader" +dd if=platform-asus/tinkerboard/u-boot/u-boot.img of=${LOOP_DEV} seek=64 conv=notrunc +sync + +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t ext4 "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying Tinkerboard boot files" +cp -pdR platform-asus/tinkerboard/boot/* /mnt/volumio/rootfs/boot/ +mkimage -C none -A arm -T script -d /mnt/volumio/rootfs/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr + +echo "Copying Tinkerboard modules and firmware" +cp -pdR platform-asus/tinkerboard/lib/modules /mnt/volumio/rootfs/lib/ +cp -pdR platform-asus/tinkerboard/lib/firmware /mnt/volumio/rootfs/lib/ +sync + +echo "Preparing to run chroot for more Tinkerboard configuration" +cp scripts/tinkerconfig.sh /mnt/volumio/rootfs +cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/tinkerconfig.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/tinkerconfig.sh + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> Tinkerboard device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-asus +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +echo "Cleaning build environment" +rm -rf /mnt/volumio /mnt/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync From 44630a918b0ddc7ab7281c6541f092a74b55be08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 2 May 2017 19:00:47 +0200 Subject: [PATCH 149/673] Cosmetics --- scripts/tinkerimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 04a3721e8..d00607c8f 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -64,7 +64,7 @@ then else echo "Clone asus files from repo" git clone https://github.com/volumio/platform-asus.git platform-asus - echo "Unpack the platform files gkkpch" + echo "Unpack the Tinkerboard platform files" cd platform-asus tar xfJ tinkerboard.tar.xz cd .. From ac111fcfbe134e4946d3404917ee2168d1ef65fa Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 3 May 2017 12:35:31 +0200 Subject: [PATCH 150/673] properly restart after factory reset and kernel update --- scripts/initramfs/init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 524e6474c..c9e4d42af 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -204,7 +204,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then umount /mnt/factory rm -r /mnt/factory echo "Restarting" - reboot + echo b > /proc/sysrq-trigger fi if [ -e "/mnt/factory/user_data" ]; then echo "Deleting User Data" @@ -237,9 +237,10 @@ echo "unpacking kernel" rm /mnt/imgpart/config.txt.bak fi rm /boot/kernel_update + sync umount /boot rm -rf /boot - reboot + echo b > /proc/sysrq-trigger fi # if data partition needs to be resized From 675bf7f72356a7a2c262933c41e8bd851be9fd4a Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 3 May 2017 13:59:03 +0200 Subject: [PATCH 151/673] Performance CPU governor --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/armv8.conf | 2 +- recipes/x86.conf | 2 +- scripts/volumioconfig.sh | 3 +++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index a4d2095b7..8f955e922 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 7e45da345..badfde12c 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index fd65d5fed..3514b80af 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index d0053d5ca..3824f4faf 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -31,7 +31,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge cpufrequtils source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 7321666b6..61eab96d3 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -469,3 +469,6 @@ mkdir /var/lib/dhcpcd5 touch /var/lib/dhcpcd5/dhcpcd-wlan0.lease touch /var/lib/dhcpcd5/dhcpcd-eth0.lease chmod -R 777 /var/lib/dhcpcd5 + +echo "Setting CPU governor to performance" +echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils From 98d3bf0edc65a1c5078e3ef806f7d673c9754c7f Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 4 May 2017 11:41:47 +0200 Subject: [PATCH 152/673] Pi: set firmware commit reference note: BRANCH is actually ignored by rpi-update we we set a commit# Just keeping it for now, but as at some point (when support 4.4.9 depreciated) we may sync with "stable" branch? --- scripts/raspberryconfig.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index c494b04bf..d364d3d23 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -66,11 +66,13 @@ case $KERNEL_VERSION in KERNEL_REV="884" KERNEL_BRANCH="stable" KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" + FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; "4.9.25") KERNEL_REV="994" KERNEL_BRANCH="master" KERNEL_COMMIT="a86bfee5b47a74c13056997f1e4d8b9d8090b398" + FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac @@ -78,7 +80,7 @@ esac echo y | SKIP_BACKUP=1 BRANCH=$KERNEL_BRANCH rpi-update $KERNEL_COMMIT echo "Updating bootloader files *.elf *.dat *.bin" -echo y | SKIP_KERNEL=1 BRANCH=$KERNEL_BRANCH rpi-update +echo y | SKIP_KERNEL=1 BRANCH=$KERNEL_BRANCH rpi-update $FIRMWARE_COMMIT echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" # these packages critically update kernel & firmware files and break Volumio @@ -94,9 +96,9 @@ apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depen if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" -wget -P /boot/. https://github.com/raspberrypi/firmware/raw/stable/boot/bcm2708-rpi-0-w.dtb +wget -P /boot/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/bcm2708-rpi-0-w.dtb echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" -wget -P /boot/overlays/. https://github.com/raspberrypi/firmware/raw/stable/boot/overlays/pi3-disable-wifi.dtbo +wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/overlays/pi3-disable-wifi.dtbo fi echo "Adding PI3 & PiZero W Wireless firmware" From 0d4f90acbdb33132e19d9966a025a7128d5d3cf9 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 4 May 2017 12:16:33 +0200 Subject: [PATCH 153/673] Restored etc network interfaces and deleted iptables load and save --- scripts/configure.sh | 2 ++ volumio/etc/network/if-post-down.d/iptablessave | 6 ------ volumio/etc/network/if-pre-up.d/iptablesload | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) delete mode 100755 volumio/etc/network/if-post-down.d/iptablessave delete mode 100755 volumio/etc/network/if-pre-up.d/iptablesload diff --git a/scripts/configure.sh b/scripts/configure.sh index 7734b9b23..6b79c7c23 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -62,6 +62,8 @@ cp -r volumio/lib build/$BUILD/root/ # Netplug cp -rp volumio/etc/netplug build/$BUILD/root/etc/ chmod +x build/$BUILD/root/etc/netplug/netplug +# Network +cp -r volumio/etc/network/* build/$BUILD/root/etc/network # Wpa Supplicant echo " " > build/$BUILD/root/etc/wpa_supplicant/wpa_supplicant.conf chmod 777 build/$BUILD/root/etc/wpa_supplicant/wpa_supplicant.conf diff --git a/volumio/etc/network/if-post-down.d/iptablessave b/volumio/etc/network/if-post-down.d/iptablessave deleted file mode 100755 index c74ee177c..000000000 --- a/volumio/etc/network/if-post-down.d/iptablessave +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -iptables-save -c > /etc/iptables.rules -if [ -f /etc/iptables.downrules ]; then - iptables-restore < /etc/iptables.downrules -fi -exit 0 diff --git a/volumio/etc/network/if-pre-up.d/iptablesload b/volumio/etc/network/if-pre-up.d/iptablesload deleted file mode 100755 index 6fb1ab03c..000000000 --- a/volumio/etc/network/if-pre-up.d/iptablesload +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -iptables-restore < /etc/iptables.rules -exit 0 From ae65ba677eb39fd69498fd96782188959b4e0e8e Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 4 May 2017 04:24:19 +0200 Subject: [PATCH 154/673] Direct DSD Playback for X86 --- scripts/volumioconfig.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 61eab96d3..d4c7b47d3 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -279,9 +279,20 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] cd / echo "Installing MPD for i386" - wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.20.6-1_i386.deb - dpkg -i mpd_0.20.6-1_i386.deb - rm mpd_0.20.6-1_i386.deb + # First we manually install a newer alsa-lib to achieve Direct DSD support + + echo "Installing alsa-lib 1.1.3" + wget http://repo.volumio.org/Volumio2/Binaries/x86/libasound2/i386/libasound2_1.1.3-5_i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/x86/libasound2/i386/libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2_1.1.3-5_i386.deb + rm libasound2-data_1.1.3-5_all.deb + rm libasound2_1.1.3-5_i386.deb + + echo "Installing MPD 20.6 with Direct DSD Support" + wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.20.6-1_i386-DSD.deb + dpkg -i mpd_0.20.6-1_i386-DSD.deb + rm mpd_0.20.6-1_i386-DSD.deb echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb From 942bc16ac9adc2eb229f4397dd5181549eba7b82 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 5 May 2017 00:43:59 +0200 Subject: [PATCH 155/673] init updater v2 --- scripts/volumioconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 3046dbb69..fdcf021e2 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -199,7 +199,7 @@ if [ $(uname -m) = armv7l ]; then rm /shairport-sync_arm.tar.gz echo "Volumio Init Updater" - wget -P /usr/local/sbin/ http://repo.volumio.org/Volumio2/Binaries/arm/volumio-init-updater + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater chmod a+x /usr/local/sbin/volumio-init-updater echo "Installing Snapcast for multiroom" @@ -310,7 +310,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /sc2mpd_1.1.1-1_i386.deb echo "Volumio Init Updater" - wget -P /usr/local/sbin/ http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater chmod a+x /usr/local/sbin/volumio-init-updater echo "Zsync" From 065253c5a534b3a6ad4da22100af24612e1b9018 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 5 May 2017 03:16:46 +0200 Subject: [PATCH 156/673] usb update file naming --- scripts/initramfs/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index c9e4d42af..216e8e936 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -154,7 +154,7 @@ if [ -e /dev/sda1 ]; then [ -d /mnt/usb ] || mkdir /mnt/usb mount -t auto /dev/sda1 /mnt/usb #If there is a firmware file inside the usb - if [ -e /mnt/usb/volumio.fir ]; then + if [ -e /mnt/usb/*.fir ]; then echo "Firmware found, updating will take a few minutes, please wait..." #when the partitions are mounted we can launch the update script volumio-init-updater From ec8a983f81ca5dbbd90ceedc9432cf7b0244abf0 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 5 May 2017 05:39:30 +0200 Subject: [PATCH 157/673] new fir location --- scripts/initramfs/init | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 216e8e936..e6fe1d8a3 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -130,6 +130,7 @@ mount -t ext4 ${IMGPART} /mnt/imgpart #when already present and a bootdelay parameter was specified then give the kernel the additional headstart # + if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then echo "Creating factory image, this will take a minute, please wait..." cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh From a0800941ccd8b012d5781e86f5dac9052336bc17 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 5 May 2017 05:46:56 +0200 Subject: [PATCH 158/673] fix x86 path --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index d4c7b47d3..001a807f6 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -290,7 +290,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm libasound2_1.1.3-5_i386.deb echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/x86/mpd_0.20.6-1_i386-DSD.deb + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_i386-DSD.deb dpkg -i mpd_0.20.6-1_i386-DSD.deb rm mpd_0.20.6-1_i386-DSD.deb From d590cd4ebba5344530e741a2fc1fa2e5a104f82e Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 5 May 2017 05:54:22 +0200 Subject: [PATCH 159/673] mpd DSD for armv6 --- scripts/volumioconfig.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 001a807f6..a46c80062 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -157,9 +157,20 @@ if [ $(uname -m) = armv7l ]; then if [ $ARCH = arm ]; then echo "Installing MPD for armv6" - wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv6.deb - dpkg -i mpd_0.20.6-1_armv6.deb - rm mpd_0.20.6-1_armv6.deb + # First we manually install a newer alsa-lib to achieve Direct DSD support + + echo "Installing alsa-lib 1.1.3" + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2_1.1.3-5_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2_1.1.3-5_armhf.deb + rm libasound2-data_1.1.3-5_all.deb + rm libasound2_1.1.3-5_armhf.deb + + echo "Installing MPD 20.6 with Direct DSD Support" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv6-DSD.deb + dpkg -i mpd_0.20.6-1_armv6-DSD.deb + rm mpd_0.20.6-1_armv6-DSD.deb echo "Installing Upmpdcli for armv6" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnpp3_0.15.1-1_armhf.deb From 04c85a42e0f794423a61e8f67d574b8ab315bd28 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 6 May 2017 15:42:46 +0200 Subject: [PATCH 160/673] Pi: give-up on KERNEL_BRANCH references Got confirmation from https://github.com/Hexxeh/rpi-firmware/ repo maintainers there's not plan to notify on drastic branches changes. Therefore we are safer to just stick to commit# while we use rpi-update. --- scripts/raspberryconfig.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d364d3d23..eb8d68bc1 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,23 +64,21 @@ KERNEL_VERSION="4.4.9" case $KERNEL_VERSION in "4.4.9") KERNEL_REV="884" - KERNEL_BRANCH="stable" KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; "4.9.25") KERNEL_REV="994" - KERNEL_BRANCH="master" KERNEL_COMMIT="a86bfee5b47a74c13056997f1e4d8b9d8090b398" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac # using rpi-update relevant to defined kernel version -echo y | SKIP_BACKUP=1 BRANCH=$KERNEL_BRANCH rpi-update $KERNEL_COMMIT +echo y | SKIP_BACKUP=1 rpi-update $KERNEL_COMMIT echo "Updating bootloader files *.elf *.dat *.bin" -echo y | SKIP_KERNEL=1 BRANCH=$KERNEL_BRANCH rpi-update $FIRMWARE_COMMIT +echo y | SKIP_KERNEL=1 rpi-update $FIRMWARE_COMMIT echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" # these packages critically update kernel & firmware files and break Volumio From 4baa4ae6a964f7e364bdda5f1ce066bf01d1c7ae Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 6 May 2017 16:02:20 +0200 Subject: [PATCH 161/673] fix download path for libasound on x86 --- scripts/volumioconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index a46c80062..7e6da1336 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -293,8 +293,8 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] # First we manually install a newer alsa-lib to achieve Direct DSD support echo "Installing alsa-lib 1.1.3" - wget http://repo.volumio.org/Volumio2/Binaries/x86/libasound2/i386/libasound2_1.1.3-5_i386.deb - wget http://repo.volumio.org/Volumio2/Binaries/x86/libasound2/i386/libasound2-data_1.1.3-5_all.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2_1.1.3-5_i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-data_1.1.3-5_all.deb dpkg --force-all -i libasound2-data_1.1.3-5_all.deb dpkg --force-all -i libasound2_1.1.3-5_i386.deb rm libasound2-data_1.1.3-5_all.deb From be861cd4bac140a4fc258517624f444a4e519031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 6 May 2017 20:41:44 +0200 Subject: [PATCH 162/673] Tinkerboard: fixed booting from vfat, resize and factory reset now working --- scripts/initramfs/init | 8 ++++---- scripts/tinkerconfig.sh | 10 +++------- scripts/tinkerimage.sh | 9 ++++----- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 548652375..d09d7cd14 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -138,8 +138,7 @@ elif [ ! -z "${BOOTDELAY}" ]; then sleep ${BOOTDELAY} fi -#Check eventually for USB updates (could be vfat or ext4 partion --> mount auto) -echo "Check for USB updates" +echo "Checking for USB updates" [ -e /dev/sda1 ] || mdev -s if [ -e /dev/sda1 ]; then [ -d /mnt/usb ] || mkdir /mnt/usb @@ -178,8 +177,9 @@ mount -t squashfs $loop_free /mnt/static VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" #if there is factory file then format data partition +# mkdir /mnt/factory -mount -t vfat /dev/mmcblk0p1 /mnt/factory +mount -t auto /dev/mmcblk0p1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then echo "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data @@ -204,7 +204,7 @@ umount /mnt/factory rm -r /mnt/factory mkdir boot -mount -t vfat /dev/mmcblk0p1 /boot +mount -t auto /dev/mmcblk0p1 /boot if [ -e "/boot/resize-volumio-datapart" ]; then echo "Re-sizing Volumio data partition" END="$(parted -s /dev/mmcblk0 unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 012b075c9..7e06ed113 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -8,7 +8,7 @@ echo "Creating \"fstab\"" echo "# Tinkerboard fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -/dev/mmcblk0p1 /boot ext4 defaults,user,rw 0 1 +/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -16,15 +16,11 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab -echo "Adding default sound modules and wifi" +echo "Adding default sound modules" #echo " # -# -# -#8723bs #" >> /etc/modules - echo "Installing additonal packages" apt-get update #apt-get -y install u-boot-tools liblircclient0 lirc @@ -83,4 +79,4 @@ mkinitramfs-custom.sh -o /tmp/initramfs-tmp echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd echo "Cleaning up" -# rm /boot/volumio.initrd +rm /boot/volumio.initrd diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index d00607c8f..0c991a56d 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -29,7 +29,7 @@ dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` parted -s "${LOOP_DEV}" mklabel msdos -parted -s "${LOOP_DEV}" mkpart primary ext3 1 64 +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on @@ -50,7 +50,7 @@ then fi echo "Creating boot and rootfs filesystems" -mkfs -F -t ext4 -L BOOT "${BOOT_PART}" +mkfs -t vfat -n BOOT "${BOOT_PART}" mkfs -F -t ext4 -L volumio "${SYS_PART}" mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync @@ -95,13 +95,12 @@ mount -t ext4 "${SYS_PART}" /mnt/volumio/images mkdir /mnt/volumio/rootfs echo "Creating mount point for the boot partition" mkdir /mnt/volumio/rootfs/boot -mount -t ext4 "${BOOT_PART}" /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying Tinkerboard boot files" -cp -pdR platform-asus/tinkerboard/boot/* /mnt/volumio/rootfs/boot/ -mkimage -C none -A arm -T script -d /mnt/volumio/rootfs/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr +cp -R platform-asus/tinkerboard/boot/* /mnt/volumio/rootfs/boot/ echo "Copying Tinkerboard modules and firmware" cp -pdR platform-asus/tinkerboard/lib/modules /mnt/volumio/rootfs/lib/ From b7a2832af7a9557a1f557497824d9f4327b975d0 Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 9 May 2017 00:49:09 +0200 Subject: [PATCH 163/673] MPD with direct DSD support for Armv7 --- scripts/volumioconfig.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 7e6da1336..51f21fa17 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -185,9 +185,20 @@ if [ $(uname -m) = armv7l ]; then elif [ $ARCH = armv7 ]; then echo "Installing MPD for armv7" - wget http://repo.volumio.org/Volumio2/Binaries/arm/mpd_0.20.6-1_armv7.deb - dpkg -i mpd_0.20.6-1_armv7.deb - rm mpd_0.20.6-1_armv7.deb + # First we manually install a newer alsa-lib to achieve Direct DSD support + + echo "Installing alsa-lib 1.1.3" + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2_1.1.3-5_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2_1.1.3-5_armhf.deb + rm libasound2-data_1.1.3-5_all.deb + rm libasound2_1.1.3-5_armhf.deb + + echo "Installing MPD 20.6 with Direct DSD Support" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv7-DSD.deb + dpkg -i mpd_0.20.6-1_armv7-DSD.deb + rm mpd_0.20.6-1_armv7-DSD.deb echo "Installing Upmpdcli for armv7" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb From 5b8413c78725b117a73618cb717e340129367be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 11 May 2017 12:48:57 +0200 Subject: [PATCH 164/673] Tinkerboard: Changed dwc2_hsotg:usb1 smp affinity to cpu1 --- scripts/tinkerconfig.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 7e06ed113..585744a73 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -21,6 +21,15 @@ echo "Adding default sound modules" # #" >> /etc/modules +echo "#!/bin/sh +echo 2 > /proc/irq/45/smp_affinity +" > /usr/local/bin/tinker-init.sh +chmod +x /usr/local/bin/tinker-init.sh + +echo "#!/bin/sh -e +/usr/local/bin/tinker-init.sh +exit 0" > /etc/rc.local + echo "Installing additonal packages" apt-get update #apt-get -y install u-boot-tools liblircclient0 lirc From e049912a6f8302e904bf2640fee04dd0ec4edb50 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 12 May 2017 15:23:34 +0200 Subject: [PATCH 165/673] added jq and curl command line client --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/armv8.conf | 2 +- recipes/x86.conf | 2 +- scripts/volumioconfig.sh | 5 ++++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 8f955e922..0e9159a4a 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index badfde12c..9a574718c 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index 3514b80af..f0127d1f4 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 3824f4faf..0620bfa9e 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -31,7 +31,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge cpufrequtils +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge cpufrequtils jq source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 51f21fa17..5ecec5847 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -86,7 +86,6 @@ alias systemctl="sudo /bin/systemctl" alias killall="sudo /usr/bin/killall" alias service="sudo /usr/sbin/service" alias ifconfig="sudo /sbin/ifconfig" -alias volumio="/volumio/app/plugins/system_controller/volumio_command_line_client/volumio.sh" ' >> /etc/bash.bashrc #Sudoers Nopasswd @@ -430,6 +429,10 @@ echo "Preventing un-needed dhcp servers to start automatically" systemctl disable isc-dhcp-server.service systemctl disable dhcpd.service +echo "Linking Volumio Command Line Client" +ln -s /volumio/app/plugins/system_controller/volumio_command_line_client/volumio.sh /usr/local/bin/volumio +chmod a+x /usr/local/bin/volumio + ##################### #Audio Optimizations#----------------------------------------- ##################### From b0208b2555ed2fa6946337b440a437147c0d9535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 15 May 2017 18:51:25 +0200 Subject: [PATCH 166/673] [Initrd] Ensure loop device exists before calling 'losetup' --- scripts/initramfs/init | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index d09d7cd14..9258f4025 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -167,9 +167,14 @@ fi # 2) init a loop pointing to the image file loop_free=$(losetup -f | sed s#p/#p#) +if [ ! -e ${loop_free} ]; then + echo "Device node does not exist, creating it..." + # use last char from loop_device as minor device number + minor=$(echo ${loop_free} | sed 's/.*\(.\)/\1/') + mknod $loop_free b 7 $minor +fi losetup $loop_free /mnt/imgpart/${IMGFILE} - # 3) mount the squashfs to /mnt/static [ -d /mnt/static ] || mkdir /mnt/static mount -t squashfs $loop_free /mnt/static From bf822819e92503427a2f3bba11bbef4635a84ff2 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 24 May 2017 20:50:28 +0000 Subject: [PATCH 167/673] Start immediately hotspot if network is not configured --- volumio/bin/wireless.js | 369 ++++++++++++++++++++-------------------- 1 file changed, 189 insertions(+), 180 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 8880073a8..5f85d911d 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -19,118 +19,118 @@ var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan var execSync = require('child_process').execSync; function kill(process, callback) { - var all = process.split(" "); - var process = all[0]; - var command = 'kill `pgrep -f "^' + process + '"` || true'; - console.log("killing: " + command); - return thus.exec(command, callback); + var all = process.split(" "); + var process = all[0]; + var command = 'kill `pgrep -f "^' + process + '"` || true'; + console.log("killing: " + command); + return thus.exec(command, callback); } function launch(fullprocess, name, sync, callback) { - if (sync) { - var child = thus.exec(fullprocess, {}, callback); - child.stdout.on('data', function(data) { - console.log(name + 'stdout: ' + data); - }); - - child.stderr.on('data', function(data) { - console.log(name + 'stderr: ' + data); - }); - - child.on('close', function(code) { - console.log(name + 'child process exited with code ' + code); - }); - } else { - var all = fullprocess.split(" "); - var process = all[0]; - if (all.length > 0) { - all.splice(0, 1); - } - console.log("launching " + process + " args: "); - console.log(all); - var child = thus.spawn(process, all, {}); - child.stdout.on('data', function(data) { - console.log(name + 'stdout: ' + data); - }); - - child.stderr.on('data', function(data) { - console.log(name + 'stderr: ' + data); - }); - - child.on('close', function(code) { - console.log(name + 'child process exited with code ' + code); - }); - callback(); - } - - return + if (sync) { + var child = thus.exec(fullprocess, {}, callback); + child.stdout.on('data', function(data) { + console.log(name + 'stdout: ' + data); + }); + + child.stderr.on('data', function(data) { + console.log(name + 'stderr: ' + data); + }); + + child.on('close', function(code) { + console.log(name + 'child process exited with code ' + code); + }); + } else { + var all = fullprocess.split(" "); + var process = all[0]; + if (all.length > 0) { + all.splice(0, 1); + } + console.log("launching " + process + " args: "); + console.log(all); + var child = thus.spawn(process, all, {}); + child.stdout.on('data', function(data) { + console.log(name + 'stdout: ' + data); + }); + + child.stderr.on('data', function(data) { + console.log(name + 'stderr: ' + data); + }); + + child.on('close', function(code) { + console.log(name + 'child process exited with code ' + code); + }); + callback(); + } + + return } function startHotspot() { - stopHotspot(function(err) { - var hotspotenabled = true; - try { - var hotspotjson = fs.readJsonSync('/data/configuration/system_controller/network/config.json', {throws: false}); - } catch(e) { - console.log('First boot, starting Hotspot'); - launch(ifconfigHotspot, "confighotspot", true, function(err) { - console.log("ifconfig " + err); - launch(starthostapd,"hotspot" , false, function() { - wstatus("hotspot"); - }); - }); - } - - if (hotspotjson != undefined && hotspotjson.enable_hotspot != undefined && hotspotjson.enable_hotspot.value != undefined && !hotspotjson.enable_hotspot.value) { - console.log('Hotspot is disabled, not starting it'); - launch(ifconfigWlan, "configwlanup", true, function(err) { - console.log("ifconfig " + err); - }); - } else { - - launch(ifconfigHotspot, "confighotspot", true, function(err) { - console.log("ifconfig " + err); - launch(starthostapd,"hotspot" , false, function() { - wstatus("hotspot"); - }); - }); - } - }); + stopHotspot(function(err) { + var hotspotenabled = true; + try { + var hotspotjson = fs.readJsonSync('/data/configuration/system_controller/network/config.json', {throws: false}); + } catch(e) { + console.log('First boot, starting Hotspot'); + launch(ifconfigHotspot, "confighotspot", true, function(err) { + console.log("ifconfig " + err); + launch(starthostapd,"hotspot" , false, function() { + wstatus("hotspot"); + }); + }); + } + + if (hotspotjson != undefined && hotspotjson.enable_hotspot != undefined && hotspotjson.enable_hotspot.value != undefined && !hotspotjson.enable_hotspot.value) { + console.log('Hotspot is disabled, not starting it'); + launch(ifconfigWlan, "configwlanup", true, function(err) { + console.log("ifconfig " + err); + }); + } else { + + launch(ifconfigHotspot, "confighotspot", true, function(err) { + console.log("ifconfig " + err); + launch(starthostapd,"hotspot" , false, function() { + wstatus("hotspot"); + }); + }); + } + }); } function stopHotspot(callback) { - launch(stophostapd, "stophotspot" , true, function(err) { - launch(ifdeconfig, "ifdeconfig", true, callback); - }); + launch(stophostapd, "stophotspot" , true, function(err) { + launch(ifdeconfig, "ifdeconfig", true, callback); + }); } function startAP(callback) { - console.log("Stopped hotspot (if there).."); - launch(ifdeconfig, "ifdeconfig", true, function(err) { - console.log("Conf " + ifdeconfig); - launch(wpasupp, "wpa supplicant", false, function(err) { - console.log("wpasupp " + err); - wpaerr = err; - try { - dhclient = fs.readFileSync('/data/configuration/wlanstatic', 'utf8'); - console.log("FIXED IP"); - } catch (e) { - console.log("DHCP IP "); - } - launch(dhclient,"dhclient", false, callback); - }); - }); + console.log("Stopped hotspot (if there).."); + launch(ifdeconfig, "ifdeconfig", true, function(err) { + console.log("Conf " + ifdeconfig); + launch(wpasupp, "wpa supplicant", false, function(err) { + console.log("wpasupp " + err); + wpaerr = err; + try { + dhclient = fs.readFileSync('/data/configuration/wlanstatic', 'utf8'); + console.log("FIXED IP"); + } catch (e) { + console.log("DHCP IP "); + } + launch(dhclient,"dhclient", false, callback); + }); + }); } function stopAP(callback) { - kill(justdhclient, function(err) { - kill(wpasupp, function(err) { - callback(); - }); - }); + kill(justdhclient, function(err) { + kill(wpasupp, function(err) { + callback(); + }); + }); } var wpaerr; var lesstimer; @@ -140,104 +140,113 @@ var actualTime = 0; var apstopped = 0 function startFlow() { - try { - var wirelessjson = fs.readJsonSync('/data/configuration/system_controller/network/config.json', {throws: false}); - } catch (e) { - console.log(''); - } - if (wirelessjson != undefined && wirelessjson.wireless_enabled != undefined && wirelessjson.wireless_enabled.value != undefined && !wirelessjson.wireless_enabled.value) { - console.log('Wireless Networking DISABLED, not starting wireless flow'); - } else { - console.log("Start wireless flow"); - startAP(function () { - console.log("Start ap"); - lesstimer = setInterval(function () { - actualTime += pollingTime; - if (wpaerr > 0) actualTime = totalSecondsForConnection + 1; - - if (actualTime > totalSecondsForConnection) { - console.log("Overtime, starting plan B"); - apstopped = 1; - clearTimeout(lesstimer); - stopAP(function () { - setTimeout(function () { - startHotspot(function () { - - - }); - }, settleTime); - }); - } else { - var SSID = undefined; - var ifconfig = require('wireless-tools/ifconfig'); - console.log("trying..."); - try { - var SSID = execSync("/usr/bin/sudo /sbin/iwgetid -r", { uid: 1000, gid: 1000, encoding: 'utf8'}); - console.log('Connected to: ----'+SSID+'----'); - } catch(e) { - //console.log('ERROR: '+e) - } - - - if (SSID != undefined) { - ifconfig.status(wlan, function (err, ifstatus) { - console.log("... joined AP, wlan0 IPv4 is " + ifstatus.ipv4_address + ", ipV6 is " + ifstatus.ipv6_address); - if (((ifstatus.ipv4_address != undefined) && - (ifstatus.ipv4_address.length > "0.0.0.0".length)) - || - ((ifstatus.ipv6_address != undefined) && - (ifstatus.ipv6_address.length > "::".length))) { - if (apstopped == 0) { - console.log("It's done! AP"); - wstatus("ap"); - clearTimeout(lesstimer); - restartAvahi(); - } - } - }); - } - - } - }, pollingTime * 1000); - }); -} + try { + var wirelessjson = fs.statSync('/data/configuration/netconfigured'); + } catch (e) { + var directhotspot = true; + } + try { + var wirelessjson = fs.readJsonSync('/data/configuration/system_controller/network/config.json', {throws: false}); + } catch (e) { + console.log(''); + } + if (wirelessjson != undefined && wirelessjson.wireless_enabled != undefined && wirelessjson.wireless_enabled.value != undefined && !wirelessjson.wireless_enabled.value) { + console.log('Wireless Networking DISABLED, not starting wireless flow'); + } else if (directhotspot){ + startHotspot(function () { + + }); + } else { + console.log("Start wireless flow"); + startAP(function () { + console.log("Start ap"); + lesstimer = setInterval(function () { + actualTime += pollingTime; + if (wpaerr > 0) actualTime = totalSecondsForConnection + 1; + + if (actualTime > totalSecondsForConnection) { + console.log("Overtime, starting plan B"); + apstopped = 1; + clearTimeout(lesstimer); + stopAP(function () { + setTimeout(function () { + startHotspot(function () { + + + }); + }, settleTime); + }); + } else { + var SSID = undefined; + var ifconfig = require('wireless-tools/ifconfig'); + console.log("trying..."); + try { + var SSID = execSync("/usr/bin/sudo /sbin/iwgetid -r", { uid: 1000, gid: 1000, encoding: 'utf8'}); + console.log('Connected to: ----'+SSID+'----'); + } catch(e) { + //console.log('ERROR: '+e) + } + + + if (SSID != undefined) { + ifconfig.status(wlan, function (err, ifstatus) { + console.log("... joined AP, wlan0 IPv4 is " + ifstatus.ipv4_address + ", ipV6 is " + ifstatus.ipv6_address); + if (((ifstatus.ipv4_address != undefined) && + (ifstatus.ipv4_address.length > "0.0.0.0".length)) + || + ((ifstatus.ipv6_address != undefined) && + (ifstatus.ipv6_address.length > "::".length))) { + if (apstopped == 0) { + console.log("It's done! AP"); + wstatus("ap"); + clearTimeout(lesstimer); + restartAvahi(); + } + } + }); + } + + } + }, pollingTime * 1000); + }); + } } function stop(callback) { - stopAP(function() { - stopHotspot(callback); - }); + stopAP(function() { + stopHotspot(callback); + }); } if (process.argv.length < 2) { - console.log("Use: start|stop"); + console.log("Use: start|stop"); } else { - var args = process.argv[2]; - console.log(args); - - switch (args) { - case "start": - console.log("Cleaning previous..."); - stopHotspot(function () { - stopAP(function() { - console.log("Stopped aP"); - startFlow(); - })}); - break; - case "stop": - stopAP(function() {}); - break; - case "test": - wstatus("test"); - break; - } + var args = process.argv[2]; + console.log(args); + + switch (args) { + case "start": + console.log("Cleaning previous..."); + stopHotspot(function () { + stopAP(function() { + console.log("Stopped aP"); + startFlow(); + })}); + break; + case "stop": + stopAP(function() {}); + break; + case "test": + wstatus("test"); + break; + } } function wstatus(nstatus) { - thus.exec("echo " + nstatus + " >/tmp/networkstatus", null); + thus.exec("echo " + nstatus + " >/tmp/networkstatus", null); } function restartAvahi() { - //thus.exec("/bin/systemctl restart avahi-daemon"); + //thus.exec("/bin/systemctl restart avahi-daemon"); } From 304ce9801623678b9e2813039e6ff364b410a594 Mon Sep 17 00:00:00 2001 From: Volumio Date: Wed, 24 May 2017 22:57:08 +0200 Subject: [PATCH 168/673] Setting CPU governor to ondemand --- scripts/volumioconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 5ecec5847..03ffaab6a 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -506,5 +506,5 @@ touch /var/lib/dhcpcd5/dhcpcd-wlan0.lease touch /var/lib/dhcpcd5/dhcpcd-eth0.lease chmod -R 777 /var/lib/dhcpcd5 -echo "Setting CPU governor to performance" -echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils +echo "Setting CPU governor to ondemand" +echo 'GOVERNOR="ondemand"' > /etc/default/cpufrequtils From 14af7e1ab068334b97134edd90e6e40a82a4df1d Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 25 May 2017 00:33:32 +0200 Subject: [PATCH 169/673] Installing libasound2-dev --- scripts/volumioconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 03ffaab6a..1344a235e 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -161,10 +161,13 @@ if [ $(uname -m) = armv7l ]; then echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2_1.1.3-5_armhf.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2-data_1.1.3-5_all.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2-dev_1.1.3-5_armhf.deb dpkg --force-all -i libasound2-data_1.1.3-5_all.deb dpkg --force-all -i libasound2_1.1.3-5_armhf.deb + dpkg --force-all -i libasound2-dev_1.1.3-5_armhf.deb rm libasound2-data_1.1.3-5_all.deb rm libasound2_1.1.3-5_armhf.deb + rm libasound2-dev_1.1.3-5_armhf.deb echo "Installing MPD 20.6 with Direct DSD Support" wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv6-DSD.deb From 212f30678af98e77b706df79c2f7f83c335ddc44 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 25 May 2017 15:36:47 +0200 Subject: [PATCH 170/673] USB card 5 in x86 --- scripts/x86config.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 135c971b1..2f98db3ce 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -21,6 +21,10 @@ ln -s /usr/bin/nodejs /usr/local/bin/nodejs echo "Blacklisting PC speaker" echo "blacklist snd_pcsp" >> /etc/modprobe.d/blacklist.conf +echo "X86 USB Card Ordering" +echo "# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + echo "Installing Syslinux Legacy BIOS" syslinux -v syslinux "${BOOT_PART}" From 22227e3ff85f84b54d2266e38239062745bd3805 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 28 May 2017 02:33:35 +0200 Subject: [PATCH 171/673] Use dosmkfs for first partition of PI --- scripts/raspberryimage.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index a21897dd4..9ccf54a8e 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -42,7 +42,9 @@ then fi echo "Creating filesystems" -sudo mkfs.vfat "${BOOT_PART}" -n boot +#sudo mkfs.vfat "${BOOT_PART}" -n boot +# Using mkdosfs because pi seems to be picky with first partition block size +mkdosfs -n boot -F 32 -v "${BOOT_PART}" sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${IMG_PART}" -L volumio sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${DATA_PART}" -L volumio_data sync From 2ee94eb4a3a15929a8443b26a7b3344e5121545e Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 31 May 2017 17:08:35 +0200 Subject: [PATCH 172/673] Pi: Adding Allo Firmware independently of Kernel Version Only modules and dtbo may be kernel-dependant. Firmware always need to be installed. --- scripts/raspberryconfig.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index eb8d68bc1..94c69f1d7 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -284,20 +284,9 @@ rm /patch if [ "$PATCH" = "volumio" ]; then -echo "Adding third party kernel modules" - -if [ "$KERNEL_VERSION" = "4.4.9" ]; then - -### Allo I2S Firmware -echo "Getting Allo Modules" +echo "Adding third party Firmware" cd / -echo "Getting Allo DAC Modules" -wget http://repo.volumio.org/Volumio2/Firmwares/rpi-volumio-4.4.9-AlloDAC-modules.tgz -echo "Extracting Allo DAC modules" -tar xf rpi-volumio-4.4.9-AlloDAC-modules.tgz -rm rpi-volumio-4.4.9-AlloDAC-modules.tgz - -echo "Getting Allo Piano Firmwares" +echo "Getting Allo Piano Firmware" wget --no-check-certificate https://github.com/allocom/piano-firmware/archive/master.tar.gz echo "Extracting Allo Firmwares" tar xf master.tar.gz @@ -305,8 +294,19 @@ cp -rp /piano-firmware-master/* / rm -rf /piano-firmware-master rm /README.md rm master.tar.gz +echo "Allo firmware installed" + + +if [ "$KERNEL_VERSION" = "4.4.9" ]; then + +### Allo I2S Modules +echo "Getting Allo DAC Modules" +wget http://repo.volumio.org/Volumio2/Firmwares/rpi-volumio-4.4.9-AlloDAC-modules.tgz +echo "Extracting Allo DAC modules" +tar xf rpi-volumio-4.4.9-AlloDAC-modules.tgz +rm rpi-volumio-4.4.9-AlloDAC-modules.tgz -echo "Allo modules and firmware installed" +echo "Allo modules installed" echo "Adding Pisound Kernel Module and dtbo" wget http://repo.volumio.org/Volumio2/Firmwares/rpi-volumio-4.4.9-pisound-modules.tgz From 87688793ee8afe8d6f24f8ef677a0544252ee240 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 1 Jun 2017 17:43:58 +0200 Subject: [PATCH 173/673] Fix copy of Volumio splash --- scripts/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index 829207c5d..8befce99c 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -89,7 +89,7 @@ chmod a+x build/$BUILD/root/bin/wifistart.sh cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh chmod a+x build/$BUILD/root/bin/rename_netiface0.sh #Plymouth -cp volumio/usr/* build/$BUILD/usr/ +cp -rp volumio/usr/* build/$BUILD/usr/ plymouth-set-default-theme volumio echo 'Done Copying Custom Volumio System Files' From d48f0387ce8d27b1887ee3b6a9dfe5278da92684 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 1 Jun 2017 17:56:57 +0200 Subject: [PATCH 174/673] Shairport-Sync 3.0.2 for X86 --- scripts/volumioconfig.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 1344a235e..b47fb9f56 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -330,13 +330,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /libupnp6_1.6.20.jfd5-1_i386.deb echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/x86/shairport-sync_2.8.4-1_i386.deb - wget http://repo.volumio.org/Volumio2/Binaries/x86/libssl1.0.2_1.0.2h-1_i386.deb - dpkg -i libssl1.0.2_1.0.2h-1_i386.deb - echo N | dpkg -i shairport-sync_2.8.4-1_i386.deb - rm /libssl1.0.2_1.0.2h-1_i386.deb - rm /shairport-sync_2.8.4-1_i386.deb - + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz + tar xf shairport-sync-3.0.2-i386.tar.gz + rm /shairport-sync-3.0.2-i386.tar.gz echo "Installing LINN Songcast module" wget http://repo.volumio.org/Packages/Upmpdcli/x86/sc2mpd_1.1.1-1_i386.deb From 15ddd478bef0a9c97f26b89451f734be4f5f298e Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 1 Jun 2017 18:07:18 +0200 Subject: [PATCH 175/673] Shairport-sync metadata reader for x86 --- scripts/volumioconfig.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index b47fb9f56..6415f6f1d 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -333,6 +333,12 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz tar xf shairport-sync-3.0.2-i386.tar.gz rm /shairport-sync-3.0.2-i386.tar.gz + + echo "Installing Shairport-Sync Metadata Reader" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz + tar xf shairport-sync-metadata-reader-i386.tar.gz + rm /shairport-sync-metadata-reader-i386.tar.gz + echo "Installing LINN Songcast module" wget http://repo.volumio.org/Packages/Upmpdcli/x86/sc2mpd_1.1.1-1_i386.deb From 6a8797c53f2054c6c49813d93d371b8f1b2680d4 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 1 Jun 2017 18:53:50 +0200 Subject: [PATCH 176/673] Japanese, Korean, Chinese and Taiwanese fonts in kiosk mode --- scripts/x86config.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 2f98db3ce..3a963da80 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -113,6 +113,9 @@ cp /etc/fstab /etc/fstab.tmpl echo "Editing fstab to use UUID=" sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /etc/fstab +echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" +apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core + echo "Setting up in kiosk-mode" echo " Creating chromium kiosk start script" echo "#!/bin/bash From c9e48d6bd6f53bd89d927922ba658a42da8937ff Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 1 Jun 2017 19:01:03 +0200 Subject: [PATCH 177/673] Shairport-sync 3.0.2 for arm --- scripts/volumioconfig.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 6415f6f1d..fbee841bd 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -217,10 +217,15 @@ if [ $(uname -m) = armv7l ]; then update-rc.d upmpdcli remove - echo "Installing Shairport for Airplay emulation" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_arm.tar.gz - tar xf shairport-sync_arm.tar.gz - rm /shairport-sync_arm.tar.gz + echo "Installing Shairport-Sync" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz + tar xf shairport-sync-metadata-reader-arm.tar.gz + rm /shairport-sync-metadata-reader-arm.tar.gz + + echo "Installing Shairport-Sync Metadata Reader" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-arm.tar.gz + tar xf shairport-sync-3.0.2-arm.tar.gz + rm /shairport-sync-3.0.2-arm.tar.gz echo "Volumio Init Updater" wget -P /usr/local/sbin/ http://repo.volumio.org/Volumio2/Binaries/arm/volumio-init-updater From 5d4bbbf11f297ab26ae1d8cd7da691afc0c836be Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 1 Jun 2017 21:14:05 +0200 Subject: [PATCH 178/673] adding libasound-dev for x86 --- scripts/volumioconfig.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 1344a235e..dbb08a1ca 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -308,11 +308,14 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2_1.1.3-5_i386.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-data_1.1.3-5_all.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-dev_1.1.3-5_i386.deb dpkg --force-all -i libasound2-data_1.1.3-5_all.deb dpkg --force-all -i libasound2_1.1.3-5_i386.deb + dpkg --force-all -i libasound2-dev_1.1.3-5_i386.deb rm libasound2-data_1.1.3-5_all.deb rm libasound2_1.1.3-5_i386.deb - + rm libasound2-dev_1.1.3-5_i386.deb + echo "Installing MPD 20.6 with Direct DSD Support" wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_i386-DSD.deb dpkg -i mpd_0.20.6-1_i386-DSD.deb From 167c5158f982583b94b900058ebfe90bfb5023cf Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 2 Jun 2017 16:33:22 +0200 Subject: [PATCH 179/673] Pi: remove duplicate apt cache cleanup One remains at the end of the script. --- scripts/raspberryconfig.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index eb8d68bc1..23f335846 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -173,10 +173,6 @@ disable_splash=1" >> /boot/config.txt echo "Writing cmdline.txt file" echo "dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5" >> /boot/cmdline.txt -echo "Cleaning APT Cache" -rm -f /var/lib/apt/lists/*archive* -apt-get clean - echo "Exporting /opt/vc/bin variable" export LD_LIBRARY_PATH=/opt/vc/lib/:LD_LIBRARY_PATH From 4d0e05d06d43b70ca3940cfea7893c18cb187ef9 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 3 Jun 2017 01:22:39 +0200 Subject: [PATCH 180/673] remove restart never --- volumio/lib/systemd/system/iptables.service | 1 - 1 file changed, 1 deletion(-) diff --git a/volumio/lib/systemd/system/iptables.service b/volumio/lib/systemd/system/iptables.service index b62f21648..e451a63f3 100644 --- a/volumio/lib/systemd/system/iptables.service +++ b/volumio/lib/systemd/system/iptables.service @@ -3,7 +3,6 @@ Description = Volumio Iptables Module [Service] ExecStart=/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 -Restart=never StandardOutput=syslog StandardError=syslog SyslogIdentifier=iptables From e49c4446cd503f262aae09f61bbf68f8b0e1e13c Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 7 Jun 2017 17:48:10 +0200 Subject: [PATCH 181/673] Pi: bump next kernel test case to 4.9.30 As always, this change does NOT affect standard build of Volumio on 4.4.9 --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 23f335846..eb55127b6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,9 +67,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.25") - KERNEL_REV="994" - KERNEL_COMMIT="a86bfee5b47a74c13056997f1e4d8b9d8090b398" + "4.9.30") + KERNEL_REV="1001" + KERNEL_COMMIT="684be4bc8cc343f60fdc3240c6d55d41d0a5b56c" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From c9394014bbce943533ed87ce8b71a8cc5322811a Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 8 Jun 2017 01:03:11 +0200 Subject: [PATCH 182/673] upnp conf in tmp --- volumio/lib/systemd/system/upmpdcli.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/lib/systemd/system/upmpdcli.service b/volumio/lib/systemd/system/upmpdcli.service index 4023c5695..e93cb201a 100644 --- a/volumio/lib/systemd/system/upmpdcli.service +++ b/volumio/lib/systemd/system/upmpdcli.service @@ -4,7 +4,7 @@ After=syslog.target [Service] Type=simple -ExecStart=/usr/bin/upmpdcli -c /volumio/app/plugins/audio_interface/upnp/upmpdcli.conf +ExecStart=/usr/bin/upmpdcli -c /tmp/upmpdcli.conf StandardOutput=syslog StandardError=syslog SyslogIdentifier=volumio From 8af4da1b4060d156f262a911ede04cb0f4390fa1 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 8 Jun 2017 01:04:42 +0200 Subject: [PATCH 183/673] Fixing UPNP L16 Playback issue --- scripts/volumioconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 4cd477155..d426836ca 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -466,6 +466,9 @@ touch /var/lib/alsa/asound.state echo '#' > /var/lib/alsa/asound.state chmod 777 /var/lib/alsa/asound.state +echo "Fixing UPNP L16 Playback issue" +grep -v '^@ENABLEL16' /usr/share/upmpdcli/protocolinfo.txt > /usr/share/upmpdcli/protocolinfo.txtrepl && mv /usr/share/upmpdcli/protocolinfo.txtrepl /usr/share/upmpdcli/protocolinfo.txt + ##################### #Network Settings and Optimizations#----------------------------------------- ##################### From 7141ee24dab22c8cb06fbaf1ff8094ca262efbcc Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 8 Jun 2017 17:21:16 +0200 Subject: [PATCH 184/673] volumio splash theme --- .../themes/volumio/volumio-logo16.png | Bin 0 -> 3519 bytes .../themes/volumio/volumio-scale-2.plymouth | 8 + .../themes/volumio/volumio-scale-2.script | 1166 +++++++++++++++++ .../plymouth/themes/volumio/volumio.grub | 3 + .../plymouth/themes/volumio/volumio.plymouth | 2 +- .../share/plymouth/themes/volumio/volumio.png | Bin 62231 -> 0 bytes .../plymouth/themes/volumio/volumio.script | 1056 ++++++++++++++- 7 files changed, 2222 insertions(+), 13 deletions(-) create mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio-logo16.png create mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.plymouth create mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.script create mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio.grub delete mode 100644 volumio/usr/share/plymouth/themes/volumio/volumio.png diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio-logo16.png b/volumio/usr/share/plymouth/themes/volumio/volumio-logo16.png new file mode 100644 index 0000000000000000000000000000000000000000..1e4aaea1e75e951e7b895276e96f2920750533a0 GIT binary patch literal 3519 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 literal 0 HcmV?d00001 diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.plymouth b/volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.plymouth new file mode 100644 index 000000000..87c41d121 --- /dev/null +++ b/volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.plymouth @@ -0,0 +1,8 @@ +[Plymouth Theme] +Name=Volumio Logo (Scale x2) +Description=A theme that features a blank background with a logo. +ModuleName=script + +[script] +ImageDir=/usr/share/plymouth/themes/volumio +ScriptFile=/usr/share/plymouth/themes/volumio/volumio-scale-2.script diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.script b/volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.script new file mode 100644 index 000000000..8eb59646d --- /dev/null +++ b/volumio/usr/share/plymouth/themes/volumio/volumio-scale-2.script @@ -0,0 +1,1166 @@ +# volumio.script - boot splash plugin +# +# Original Copyright (C) 2009 Canonical Ltd. +# Modified and adapted for Volumio by Michelangelo Guarise +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# Written by: Alberto Milone +# +# Based on the example provided with the "script plugin" written by: +# Charlie Brej +# +# Question stuff written by: Markus Waas +# +# + +# Set the text colour in (rgb / 256) +text_colour.red = 1.0; +text_colour.green = 1.0; +text_colour.blue = 1.0; + +# Tinted text #988592 +tinted_text_colour.red = 0.59; +tinted_text_colour.green = 0.52; +tinted_text_colour.blue = 0.57; + +# Action Text - #ffffff - RGB 255 255 255 +action_text_colour.red = 1.0; +action_text_colour.green = 1.0; +action_text_colour.blue = 1.0; + +# Orange - #ff4012 - RGB 255 64 18 +debugsprite = Sprite(); +debugsprite_bottom = Sprite(); +debugsprite_medium = Sprite(); + +# Ubuntu Font +ubuntufont = "Ubuntu 11"; +ubuntualignment = "center"; + +# Scale factor +scalefactor = 2; + +# are we currently prompting for a password? +prompt_active = 0; + +# Generic scalable image loader +fun LoadScaleImage (imagepath) { + image = Image (imagepath); + image = image.Scale (image.GetWidth() * scalefactor, image.GetHeight() * scalefactor); + return image; +} + +# General purpose function to create text +fun WriteText (text, colour) { + image = Image.Text (text, colour.red, colour.green, colour.blue, color.alpha, ubuntufont, ubuntualignment); + image = image.Scale (image.GetWidth() * scalefactor, image.GetHeight() * scalefactor); + return image; +} + +fun ImageToText (text) { + image = WriteText (text, text_colour); + return image; +} + +fun ImageToTintedText (text) { + image = WriteText (text, tinted_text_colour); + return image; +} + +fun ImageToActionText (text) { + image = WriteText (text, action_text_colour); + return image; +} + +fun Debug(text) { + debugsprite.SetImage(ImageToText (text)); +} + +fun DebugBottom(text) { + debugsprite_bottom.SetImage(ImageToText (text)); + debugsprite_bottom.SetPosition(0, (Window.GetHeight (0) - 20), 1); +} + +fun DebugMedium(text) { + debugsprite_medium.SetImage(ImageToText (text)); + debugsprite_medium.SetPosition(0, (Window.GetHeight (0) - 60), 1); +} + +fun TextYOffset() { + local.y; + local.text_height; + local.min_height; + + # Put the 1st line below the logo + some spacing + y = logo.y + logo.height + (progress_indicator.bullet_height * 7 ); # + logo_spacing; + + text_height = first_line_height * 7.5; + + min_height = Window.GetHeight(); + if (y + text_height > min_height) + y = min_height - text_height; + + if (y < progress_indicator.y + progress_indicator.height) + return progress_indicator.y + progress_indicator.height; + return y; +} + +#------------------------------String functions------------------------------- + +# This is the equivalent for strstr() +fun StringString(string, substring) { + start = 0; + while (String(string).CharAt (start)) { + walk = 0; + while (String(substring).CharAt (walk) == String(string).CharAt (start + walk) ) { + walk++; + if (!String(substring).CharAt (walk)) return start; + } + start++; + } + + return NULL; +} + +fun StringLength (string) { + index = 0; + while (String(string).CharAt(index)) index++; + return index; +} + +fun StringCopy (source, beginning, end) { + local.destination = ""; + for (index = beginning; ( ( (end == NULL) || (index <= end) ) && (String(source).CharAt(index)) ); index++) { + local.destination += String(source).CharAt(index); + } + + return local.destination; +} + +fun StringReplace (source, pattern, replacement) { + local.found = StringString(source, pattern); + if (local.found == NULL) + return source; + + local.new_string = StringCopy (source, 0, local.found - 1) + + replacement + + StringCopy (source, local.found + StringLength(pattern), NULL); + + return local.new_string; +} + +# it makes sense to use it only for +# numbers up to 100 +fun StringToInteger (str) { + int = -1; + for (i=0; i<=100; i++) { + if (i+"" == str) { + int = i; + break; + } + } + return int; +} + +#----------------------------------------------------------------------------- +# Previous background colour +# #300a24 --> 0.19, 0.04, 0.14 +# New background colour +# #2c001e --> 0.16, 0.00, 0.12 +# +Window.SetBackgroundTopColor (0.16, 0.00, 0.12); # Nice colour on top of the screen fading to +Window.SetBackgroundBottomColor (0.16, 0.00, 0.12); # an equally nice colour on the bottom + +bits_per_pixel = Window.GetBitsPerPixel (); +if (bits_per_pixel == 4) { + logo_filename = "volumio-logo16.png"; + progress_dot_off_filename = "progress-dot-off16.png"; + progress_dot_on_filename = "progress-dot-on16.png"; + password_field_filename = "password-field16.png"; + question_field_filename = "password-field16.png"; +} else { + logo_filename = "volumio-logo.png"; + progress_dot_off_filename = "progress-dot-off.png"; + progress_dot_on_filename = "progress-dot-on.png"; + password_field_filename = "password-field.png"; + question_field_filename = "password-field.png"; +} + +logo.image = LoadScaleImage (logo_filename); +logo.sprite = Sprite (); +logo.sprite.SetImage (logo.image); +logo.width = logo.image.GetWidth (); +logo.height = logo.image.GetHeight (); +logo.x = Window.GetX () + Window.GetWidth () / 2 - logo.width / 2; +logo.y = Window.GetY () + Window.GetHeight () / 2 - logo.height; +logo.z = 1000; +logo.sprite.SetX (logo.x); +logo.sprite.SetY (logo.y); +logo.sprite.SetZ (logo.z); +logo.sprite.SetOpacity (1); + +# Spacing below the logo - in pixels +logo_spacing = logo.height * 4; + +message_notification[0].image = ImageToTintedText (""); +message_notification[1].image = ImageToTintedText (""); +fsck_notification.image = ImageToActionText (""); + +status = "normal"; + +progress_indicator.bullet_off = LoadScaleImage (progress_dot_off_filename); +progress_indicator.bullet_on = LoadScaleImage (progress_dot_on_filename); +progress_indicator.bullet_width = progress_indicator.bullet_off.GetWidth (); +progress_indicator.bullet_height = progress_indicator.bullet_off.GetHeight (); +progress_indicator.bullet_hspacing = progress_indicator.bullet_width * 1.1; +progress_indicator.width = progress_indicator.bullet_width * 5; +progress_indicator.height = progress_indicator.bullet_height; +progress_indicator.y = logo.y + logo.height + (logo.height / 4); +progress_indicator.x = Window.GetX () + Window.GetWidth () / 2 - progress_indicator.width / 2; # logo.x + 26; + +# use a fixed string with ascending and descending stems to calibrate the +# bounding box for the first message, so the messages below don't move up +# and down according to *their* height. +first_line_height = ImageToTintedText ("AfpqtM").GetHeight(); + +# if the user has a 640x480 or 800x600 display, we can't quite fit everything +# (including passphrase prompts) with the target spacing, so scoot the text up +# a bit if needed. +top_of_the_text = TextYOffset(); + +#-----------------------------------------Logo functions------------------------------ + +# Call this when updating the screen +fun draw_logo () { + logo.sprite.SetX (logo.x); + logo.sprite.SetY (logo.y); + logo.sprite.SetZ (logo.z); + logo.sprite.SetOpacity (1); +} + + +#-----------------------------------------Progress Indicator-------------------------- +fun set_progress_indicator () { + + + # Here we assume that we can store half bullets on each half of the screen + # together with some spacing + local.x = progress_indicator.x; + + for (index = 0; index <= 4; index++) { + # Set the "off" bullets + progress_indicator.bullets_off[index].sprite = Sprite (progress_indicator.bullet_off); + progress_indicator.bullets_off[index].sprite.SetPosition (local.x, progress_indicator.y, 1000); + progress_indicator.bullets_off[index].x = local.x; + progress_indicator.bullets_off[index].y = progress_indicator.y; + progress_indicator.bullets_off[index].sprite.SetOpacity (1); + + #local.debug_medium_string = "Progress indicator " + index + ": x = " + progress_indicator.bullets_off[index].x + + # ", y = " + progress_indicator.bullets_off[index].y + ", logo width = " + logo.width + + # ", logo height = " + logo.height + " " + screen_width + " " + screen_height; + # + #(index % 2) && DebugMedium (local.debug_medium_string) || DebugBottom (local.debug_medium_string); + + # Set the "on" bullets on top of the "off" bullets and make them transparent + progress_indicator.bullets_on[index].sprite = Sprite (progress_indicator.bullet_on); + progress_indicator.bullets_on[index].x = progress_indicator.bullets_off[index].x; + progress_indicator.bullets_on[index].y = progress_indicator.bullets_off[index].y; + progress_indicator.bullets_on[index].sprite.SetPosition (progress_indicator.bullets_on[index].x, progress_indicator.bullets_on[index].y, 10000); + + progress_indicator.bullets_on[index].sprite.SetOpacity (0); + + local.x += progress_indicator.bullet_hspacing; + } + #local.debug_string = "Progress indicator: x1 = " + progress_indicator.x + ", x2 = " + local.x + ", y = " + progress_indicator.y + + # ", x logo = " + logo.x + ", y logo = " + logo.y + ", indicator width = " + progress_indicator.width; + #Debug(progress_indicator.bullets_off[0].x); +} + + +# We have 2 bullets, one on top of the other: +# The white one is on top of the red one and the former should +# slowly fade so as to get a nice transition effect. +fun switch_on_bullet (bullets_off, bullets_on, bullet_number, opacity) { + local.x = bullets_on[bullet_number].x; + local.y = bullets_on[bullet_number].y; + local.z = bullets_on[bullet_number].z; + + # Hide the bullets which are off + bullets_off[bullet_number].sprite.SetOpacity (0); + + # Show the bullets which are on + bullets_on[bullet_number].sprite.SetPosition (local.x, local.y, local.z); + bullets_on[bullet_number].sprite.SetOpacity (opacity); + + # Bump the number of times we have switched on bullets + global.times_bullets_switched++; +} + +fun switch_off_bullets () { + # Debug("Switching off progress indicator"); + + set_progress_indicator (); + global.times_bullets_switched = 0; + global.on_off = 1; +} + +# This is something that we can call when we exit +fun switch_on_bullets () { + # Debug("Switching off progress indicator"); + if (!global.progress_indicator.bullets_on) set_progress_indicator (); + local = global.progress_indicator; + + for (index = 0; bullets_on[index]; index++) { + switch_on_bullet (bullets_off, bullets_on, index, 1.0); + } +} + + +# Implement in boot progress callback +fun animate_progress_indicator (progress, time) { + if (global.progress_time == NULL) { + global.progress_time = progress; #time; + switch_off_bullets (); + } + +# Debug ("progress = " + progress + ", time = " + time + " times switched = " + global.times_bullets_switched + " on_off " + global.on_off); + +# if (global.times_bullets_switched == NULL) +# global.times_bullets_switched = 5; + +# if (global.on_off == NULL) +# global.on_off = 0; + + if ((progress - global.progress_time) >= 1.0) { + global.progress_time = progress; + + if (global.times_bullets_switched == 5) { + # Change which bullets are switched on + # and which ones are switched off + global.on_off = !global.on_off; + global.times_bullets_switched = 0; + } + + if (global.on_off) { + switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on, + global.times_bullets_switched, 1.0); + } + else { + switch_on_bullet (progress_indicator.bullets_on, progress_indicator.bullets_off, + global.times_bullets_switched, 1.0); + } + } + + + # Start setting bullets to "on" with translucency +# for (index = 0; index <= 5; index++) { +# opacity = 0.0; +# while (opacity <= 1.0) { +# switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on, +# index, opacity); +# opacity += 0.1; +# } +# } +} + + +#-----------------------------------------Label utility functions--------------------- + +# label should be either a string or NULL +# Images for n lines will be created and returned as items of the +# message_label array +# +fun get_message_label (label, is_fake, is_action_line) { + # Debug("Get Label position"); + local.message_label; + + if (is_fake) + # Create a fake label so as to get the y coordinate of + # a standard-length label. + local.message_image = ImageToTintedText ("This is a fake message"); + else + local.message_image = (is_action_line) && ImageToActionText (label) || ImageToTintedText (label); + + message_label.width = message_image.GetWidth (); + message_label.height = message_image.GetHeight (); + + # Center the line horizontally + message_label.x = Window.GetX () + Window.GetWidth () / 2 - message_label.width / 2; + + message_label.y = top_of_the_text; + + # Put the 2nd line below the fsck line + if (is_action_line) { + local.fsck_label.y = message_label.y + (first_line_height + first_line_height / 2); + message_label.y = local.fsck_label.y + (first_line_height * 2); + } + + # Debug("action label x = " + message_label.x + " y = " + message_label.y ); + +# message_debug = "msg_x = " + message_label.x + " msg_y = " + message_label.y + +# "msg_width = " + message_label.width + " msg_height = " + +# message_label.height + " message = " + label; +# Debug(message_debug); + + return message_label; + +} + +# Create an fsck label and/or get its position +fun get_fsck_label (label, is_fake) { + # Debug("Get Label position"); + local.fsck_label = global.progress_label; + + if (is_fake) + fsck_label.image = ImageToTintedText ("This is a fake message"); + else + fsck_label.image = ImageToTintedText (label); + + fsck_label.width = fsck_label.image.GetWidth (); + fsck_label.height = fsck_label.image.GetHeight (); + + # Centre the label horizontally + fsck_label.x = Window.GetX () + Window.GetWidth () / 2 - fsck_label.width / 2; + + local.first_label = get_message_label (label, 1, 0); + + # Place the label below the 1st message line + fsck_label.y = local.first_label.y + local.first_label.height + (local.first_label.height / 2); + +# message_debug = "msg_x = " + fsck_label.x + " msg_y = " + fsck_label.y + +# "msg_width = " + fsck_label.width + " msg_height = " + +# fsck_label.height + " message = " + label; +# Debug(message_debug); + + return fsck_label; +} + +#-----------------------------------------Message stuff -------------------------------- +# + +# Set up a message label +# +# NOTE: this is called when doing something like 'plymouth message "hello world"' +# +fun setup_message (message_text, x, y, z, index) { + # Debug("Message setup"); + global.message_notification[index].image = (index) && ImageToActionText (message_text) || ImageToTintedText (message_text); + + # Set up the text message, if any + message_notification[index].x = x; + message_notification[index].y = y; + message_notification[index].z = z; + + message_notification[index].sprite = Sprite (); + message_notification[index].sprite.SetImage (message_notification[index].image); + message_notification[index].sprite.SetX (message_notification[index].x); + message_notification[index].sprite.SetY (message_notification[index].y); + message_notification[index].sprite.SetZ (message_notification[index].z); + +} + +fun show_message (index) { + if (global.message_notification[index].sprite) global.message_notification[index].sprite.SetOpacity(1); +} + +fun hide_message (index) { + if (global.message_notification[index].sprite) global.message_notification[index].sprite.SetOpacity(0); +} + + + + +# the callback function is called when new message should be displayed. +# First arg is message to display. +fun message_callback (message) +{ + # Debug("Message callback"); + is_fake = 0; + if (!message || (message == "")) is_fake = 1; + + local.substring = "keys:"; + + # Look for the "keys:" prefix + local.keys = StringString(message, local.substring); + + local.is_action_line = (keys != NULL); + #Debug("keys " + local.keys + " substring length = " + StringLength(local.substring)); + + # Get the message without the "keys:" prefix + if (keys != NULL) + message = StringCopy (message, keys + StringLength(local.substring), NULL); + + # Get the message without the "fsckd-cancel-msg" prefix as we don't support i18n + substring = "fsckd-cancel-msg:"; + keys = StringString(message, substring); + if (keys != NULL) + message = StringCopy(message, keys + StringLength(substring), NULL); + + local.label.is_fake = is_fake; + label = get_message_label(message, is_fake, is_action_line); + label.z = 10000; + + setup_message (message, label.x, label.y, label.z, is_action_line); + if (prompt_active && local.is_action_line) + hide_message (is_action_line); + else + show_message (is_action_line); + +} + + +#-----------------------------------------Display Password stuff ----------------------- +# + +fun password_dialogue_setup (message_label) { + # Debug("Password dialog setup"); + + local.entry; + local.bullet_image; + bullet_image = LoadScaleImage (progress_dot_off_filename); + entry.image = LoadScaleImage (password_field_filename); + + # Hide the normal labels + prompt_active = 1; + if (message_notification[1].sprite) hide_message (1); + + # Set the prompt label + label = get_message_label(message_label, 0, 1); + label.z = 10000; + + setup_message (message_label, label.x, label.y, label.z, 2); + show_message (2); + + # Set up the text entry which contains the bullets + entry.sprite = Sprite (); + entry.sprite.SetImage (entry.image); + + # Centre the box horizontally + entry.x = Window.GetX () + Window.GetWidth () / 2 - entry.image.GetWidth () / 2; + + # Put the entry below the second label. + entry.y = message_notification[2].y + label.height; + + #Debug ("entry x = " + entry.x + ", y = " + entry.y); + entry.z = 10000; + entry.sprite.SetX (entry.x); + entry.sprite.SetY (entry.y); + entry.sprite.SetZ (entry.z); + + global.password_dialogue = local; +} + +fun password_dialogue_opacity (opacity) { + # Debug("Password dialog opacity"); + global.password_dialogue.opacity = opacity; + local = global.password_dialogue; + + # You can make the box translucent with a float + # entry.sprite.SetOpacity (0.3); + entry.sprite.SetOpacity (opacity); + label.sprite.SetOpacity (opacity); + + if (bullets) { + for (index = 0; bullets[index]; index++) { + bullets[index].sprite.SetOpacity (opacity); + } + } +} + + +# The callback function is called when the display should display a password dialogue. +# First arg is prompt string, the second is the number of bullets. +fun display_password_callback (prompt, bullets) { + # Debug("Password dialog setup"); + + global.status = "password"; + if (!global.password_dialogue) password_dialogue_setup(prompt); + password_dialogue_opacity (1); + bullet_width = password_dialogue.bullet_image.GetWidth(); + bullet_y = password_dialogue.entry.y + + password_dialogue.entry.image.GetHeight () / 2 - + password_dialogue.bullet_image.GetHeight () / 2; + margin = bullet_width; + spaces = Math.Int( (password_dialogue.entry.image.GetWidth () - (margin * 2) ) / ( 2 * bullet_width / 3 ) ); + #Debug ("spaces = " + spaces + ", bullets = " + bullets); + bullets_area.width = margin + spaces * ( 2 * bullet_width / 3); + bullets_area.x = Window.GetX () + Window.GetWidth () / 2 - bullets_area.width / 2; + #DebugBottom ("pwd_entry x = " + password_dialogue.entry.x + ", bullets_area.x = " + bullets_area.x + ", bullets_area.width = " + bullets_area.width); + if (bullets > spaces) + bullets = spaces; + for (index = 0; password_dialogue.bullets[index] || index < spaces ; index++){ + if (!password_dialogue.bullets[index]) { + password_dialogue.bullets[index].sprite = Sprite (); + password_dialogue.bullets[index].sprite.SetImage (password_dialogue.bullet_image); + password_dialogue.bullets[index].x = bullets_area.x + # password_dialogue.entry.x + margin + + index * ( 2 * bullet_width / 3 ) ; + password_dialogue.bullets[index].sprite.SetX (password_dialogue.bullets[index].x); + password_dialogue.bullets[index].y = bullet_y; + password_dialogue.bullets[index].sprite.SetY (password_dialogue.bullets[index].y); + password_dialogue.bullets[index].z = password_dialogue.entry.z + 100 - index; + password_dialogue.bullets[index].sprite.SetZ (password_dialogue.bullets[index].z); + } + + password_dialogue.bullets[index].sprite.SetOpacity (0); + + if (index < bullets ) { + password_dialogue.bullets[index].sprite.SetOpacity (1); + } + } +} + +Plymouth.SetDisplayPasswordFunction (display_password_callback); + +Plymouth.SetMessageFunction (message_callback); + +Plymouth.SetBootProgressFunction (animate_progress_indicator); + +# Plymouth.SetBootProgressFunction: the callback function is called with two numbers, the progress (between 0 and 1) and the time spent booting so far +# Plymouth.SetRootMountedFunction: the callback function is called when a new root is mounted +# Plymouth.SetKeyboardInputFunction: the callback function is called with a string containing a new character entered on the keyboard + +#----------------------------------------- FSCK Counter -------------------------------- + +# Initialise the counter +fun init_fsck_count () { + # The number of fsck checks in this cycle + global.counter.total = 0; + # The number of fsck checks already performed + the current one + global.counter.current = 1; + # The previous fsck + global.counter.last = 0; +} + +# Increase the total counter +fun increase_fsck_count () { + global.counter.total++; +} + +fun increase_current_fsck_count () { + global.counter.last = global.counter.current++; +} + +# Clear the counter +fun clear_fsck_count () { + global.counter = NULL; + init_fsck_count (); +} + +#----------------------------------------- Progress Label ------------------------------ + + +# Change the opacity level of a progress label +# +# opacity = 1 -> show +# opacity = 0 -> hide +# opacity = 0.3 (or any other float) -> translucent +# +fun set_progress_label_opacity (opacity) { + # the label + progress_label.sprite.SetOpacity (opacity); + + # Make the slot available again when hiding the bar + # So that another bar can take its place + if (opacity == 0) { + progress_label.is_available = 1; + progress_label.device = ""; + } +} + +# Set up a new Progress Bar +# +# TODO: Make it possible to reuse (rather than recreate) a bar +# if .is_available = 1. Ideally this would just reset the +# label, the associated +# device and the image size of the sprite. + +fun init_progress_label (device, status_string) { + # Make the slot unavailable + global.progress_label.is_available = 0; + progress_label.progress = 0; + progress_label.device = device; + progress_label.status_string = status_string; +} + +# See if the progress label is keeping track of the fsck +# of "device" +# +fun device_has_progress_label (device) { + #DebugBottom ("label device = " + progress_label.device + " checking device " + device); + return (progress_label.device == device); +} + +# Update the Progress bar which corresponds to index +# +fun update_progress_label (progress) { + # If progress is NULL then we just refresh the label. + # This happens when only counter.total has changed. + if (progress != NULL) { + progress_label.progress = progress; + + #Debug("device " + progress_label.device + " progress " + progress); + + # If progress >= 100% hide the label and make it available again + if (progress >= 100) { + set_progress_label_opacity (0); + + # See if we any other fsck check is complete + # and, if so, hide the progress bars and the labels + on_fsck_completed (); + + return 0; + } + } + # Update progress label here + # + # FIXME: the queue logic from this theme should really be moved into mountall + # instead of using string replacement to deal with localised strings. + label = StringReplace (progress_label.status_string[0], "%1$d", global.counter.current); + label = StringReplace (label, "%2$d", global.counter.total); + label = StringReplace (label, "%3$d", progress_label.progress); + label = StringReplace (label, "%%", "%"); + + progress_label = get_fsck_label (label, 0); + #progress_label.progress = progress; + + progress_label.sprite = Sprite (progress_label.image); + + # Set up the bar + progress_label.sprite.SetPosition(progress_label.x, progress_label.y, 1); + + set_progress_label_opacity (1); + +} + +# Refresh the label so as to update counters +fun refresh_progress_label () { + update_progress_label (NULL); +} + +#----------------------------------------- FSCK Queue ---------------------------------- + +# Initialise the fsck queue +fun init_queue () { + global.fsck_queue[0].device; + global.fsck_queue[0].progress; + global.fsck_queue.counter = 0; + global.fsck_queue.biggest_item = 0; +} + +fun clear_queue () { + global.fsck_queue = NULL; + init_queue (); +} + +# Return either the device index in the queue or -1 +fun queue_look_up_by_device (device) { + for (i=0; i <= fsck_queue.biggest_item; i++) { + if ((fsck_queue[i]) && (fsck_queue[i].device == device)) + return i; + } + return -1; +} + +# Keep track of an fsck process in the queue +fun add_fsck_to_queue (device, progress) { + # Look for an empty slot in the queue + for (i=0; global.fsck_queue[i].device; i++) { + continue; + } + local.index = i; + + # Set device and progress + global.fsck_queue[local.index].device = device; + global.fsck_queue[local.index].progress = progress; + + # Increase the queue counter + global.fsck_queue.counter++; + + # Update the max index of the array for iterations + if (local.index > global.fsck_queue.biggest_item) + global.fsck_queue.biggest_item = local.index; + + #DebugMedium ("Adding " + device + " at " + local.index); +} + +fun is_queue_empty () { + return (fsck_queue.counter == 0); +} + +fun is_progress_label_available () { + return (progress_label.is_available == 1); +} + + +# This should cover the case in which the fsck checks in +# the queue are completed before the ones showed in the +# progress label +fun on_queued_fsck_completed () { + if (!is_queue_empty ()) + return; + + # Hide the extra label, if any + #if (progress_bar.extra_label.sprite) + # progress_bar.extra_label.sprite.SetOpacity(0); +} + +fun remove_fsck_from_queue (index) { + # Free memory which was previously allocated for + # device and progress + global.fsck_queue[index].device = NULL; + global.fsck_queue[index].progress = NULL; + + # Decrease the queue counter + global.fsck_queue.counter--; + + # See if there are other processes in the queue + # if not, clear the extra_label + on_queued_fsck_completed (); +} + +fun on_fsck_completed () { + # We have moved on to tracking the next fsck + increase_current_fsck_count (); + + if (!is_progress_label_available ()) + return; + + if (!is_queue_empty ()) + return; + + # Hide the progress label + if (progress_label.sprite) + progress_label.sprite.SetOpacity (0); + + # Clear the queue + clear_queue (); + + # Clear the fsck counter + clear_fsck_count (); +} + +# Update an fsck process that we keep track of in the queue +fun update_progress_in_queue (index, device, progress) { + # If the fsck is complete, remove it from the queue + if (progress >= 100) { + remove_fsck_from_queue (index); + on_queued_fsck_completed (); + return; + } + + global.fsck_queue[index].device = device; + global.fsck_queue[index].progress = progress; + +} + +# TODO: Move it to some function +# Create an empty queue +#init_queue (); + + +#----------------------------------------- FSCK Functions ------------------------------ + + +# Either add a new bar for fsck checks or update an existing bar +# +# NOTE: no more than "progress_bar.max_number" bars are allowed +# +fun fsck_check (device, progress, status_string) { + + # The 1st time this will take place + if (!global.progress_label) { + # Increase the fsck counter + increase_fsck_count (); + + # Set up a new label for the check + init_progress_label (device, status_string); + update_progress_label (progress); + + return; + } + + + if (device_has_progress_label (device)) { + # Update the progress of the existing label + update_progress_label (progress); + } + else { + # See if there's already a slot in the queue for the device + local.queue_device_index = queue_look_up_by_device(device); + + # See if the progress_label is available + if (progress_label.is_available) { + +# local.my_string = "available index " + local.available_index + " progress_bar counter is " + progress_bar.counter; +# Debug(local.my_string); + + + # If the fsck check for the device was in the queue, then + # remove it from the queue + if (local.queue_device_index >= 0) { + remove_fsck_from_queue (index); + } + else { + # Increase the fsck counter + increase_fsck_count (); + } + +# local.my_string += local.message; + #Debug("setting new label for device " + device + " progress " + progress); + + # Set up a new label for the check + init_progress_label (device, status_string); + update_progress_label (progress); + + } + # If the progress_label is not available + else { + + # If the fsck check for the device is already in the queue + # just update its progress in the queue + if (local.queue_device_index >= 0) { + #DebugMedium("Updating queue at " + local.queue_device_index + " for device " + device); + update_progress_in_queue (local.queue_device_index, device, progress); + } + # Otherwise add the check to the queue + else { + #DebugMedium("Adding device " + device + " to queue at " + local.queue_device_index); + add_fsck_to_queue (device, progress); + + # Increase the fsck counter + increase_fsck_count (); + + refresh_progress_label (); + } + + } + } + +# if (!is_queue_empty ()) { +# DebugBottom("Extra label for "+ device); + #} +# else { +# DebugBottom("No extra label for " + device + ". 1st Device in the queue "+ fsck_queue[0].device + " counter = " + global.fsck_queue.counter); +# } +} + + +#-----------------------------------------Update Status stuff -------------------------- +# +# The update_status_callback is what we can use to pass plymouth whatever we want so +# as to make use of features which are available only in this program (as opposed to +# being available for any theme for the script plugin). +# +# Example: +# +# Thanks to the current implementation, some scripts can call "plymouth --update=fsck:sda1:40" +# and this program will know that 1) we're performing and fsck check, 2) we're checking sda1, +# 3) the program should set the label progress to 40% +# +# Other features can be easily added by parsing the string that we pass plymouth with "--update" +# +fun update_status_callback (status) { +# Debug(status); + if (!status) return; + + string_it = 0; + update_strings[string_it] = ""; + + for (i=0; (String(status).CharAt(i) != ""); i++) { + local.temp_char = String(status).CharAt(i); + if (temp_char != ":") + update_strings[string_it] += temp_char; + else + update_strings[++string_it] = ""; + } + +# my_string = update_strings[0] + " " + update_strings[1] + " " + update_strings[2]; +# Debug(my_string); + # Let's assume that we're dealing with these strings fsck:sda1:40 + if ((string_it >= 2) && (update_strings[0] == "fsck")) { + + device = update_strings[1]; + progress = update_strings[2]; + status_string[0] = update_strings[3]; # "Checking disk %1$d of %2$d (%3$d %% complete)" + if (!status_string[0]) + status_string[0] = "Checking disk %1$d of %2$d (%3$d %% complete)"; + + if ((device != "") && (progress != "")) { + progress = StringToInteger (progress); + + # Make sure that the fsck_queue is initialised + if (!global.fsck_queue) + init_queue (); + + # Make sure that the fsck counter is initialised + if (!global.counter) + init_fsck_count (); + +# if (!global.progress_bar.extra_label.sprite) +# create_extra_fsck_label (); + + # Keep track of the fsck check + fsck_check (device, progress, status_string); + } + + } + + # systemd-fsckd pass fsckd::: + if (update_strings[0] == "fsckd") { + number_devices = StringToInteger(update_strings[1]); + + if (number_devices > 0) { + label = update_strings[3]; + + progress_label = get_fsck_label (label, 0); + progress_label.sprite = Sprite (progress_label.image); + progress_label.sprite.SetPosition(progress_label.x, progress_label.y, 1); + progress_label.sprite.SetOpacity (1); + } else { + if (progress_label.sprite) + progress_label.sprite.SetOpacity (0); + } + } + +} +Plymouth.SetUpdateStatusFunction (update_status_callback); + +#-----------------------------------------Display Question stuff ----------------------- + +fun question_dialogue_setup (message_label, text_image) { + #Debug("Question dialog setup"); + + local.field; + local.content; + local.margin; + + field.image = LoadScaleImage (question_field_filename); + content = Sprite (); + bullet_image = LoadScaleImage (progress_dot_off_filename); + margin = bullet_image.GetWidth() / 2; + + # Hide the normal labels + prompt_active = 1; + if (message_notification[1].sprite) hide_message (1); + + # Set the prompt label + label = get_message_label(message_label, 0, 1); + label.z = 10000; + + setup_message (message_label, label.x, label.y, label.z, 2); + show_message (2); + + # Set up the text field which contains the contents + field.sprite = Sprite (); + field.sprite.SetImage (field.image); + + # Centre the box horizontally + field.x = Window.GetX () + Window.GetWidth () / 2 - field.image.GetWidth () / 2; + content_x = field.x + margin; + + # Put the field below the second label. + field.y = message_notification[2].y + label.height; + content_y = field.y + field.image.GetHeight () / 2 - text_image.GetHeight () / 2; + + #Debug ("field x = " + field.x + ", y = " + field.y); + field.z = 10000; + field.sprite.SetX (field.x); + field.sprite.SetY (field.y); + field.sprite.SetZ (field.z); + + #Debug ("content_x = " + content_x + " content_y = " + content_y); + content_z = field.z + 1; + content.SetPosition (content_x, content_y, content_z); + + global.question_dialogue = local; +} + +# The callback function is called when the display should display a question dialogue. +# First arg is prompt string, the second is the field contents. +fun display_question_callback (prompt, contents) { + global.status = "question"; + #Debug ("Reply: " + contents); + + textImage = ImageToText(contents); + if (!global.question_dialogue) { + question_dialogue_setup(prompt, textImage); + } + + margin = global.question_dialogue.margin; + fieldWidth = global.question_dialogue.field.image.GetWidth (); + for (i = 0; ( (textImage.GetWidth () + 2 * margin ) > fieldWidth ); i++) { + textImage = ImageToText(StringCopy (contents, i, StringLength (contents))); + } + + global.question_dialogue.content.SetImage (textImage); +} + + +Plymouth.SetDisplayQuestionFunction (display_question_callback); + +#-----------------------------------------Refresh stuff -------------------------------- +# +# Calling Plymouth.SetRefreshFunction with a function will set that function to be +# called up to 50 times every second, e.g. +# +# NOTE: if a refresh function is not set, Plymouth doesn't seem to be able to update +# the screen correctly +# +fun refresh_callback () +{ + draw_logo (); +} +Plymouth.SetRefreshFunction (refresh_callback); + + +#-----------------------------------------Display Normal stuff ----------------------- +# +# The callback function is called when the display should return to normal +fun display_normal_callback () +{ + global.status = "normal"; + if (global.password_dialogue) { + password_dialogue_opacity (0); + global.password_dialogue = NULL; + if (message_notification[2].sprite) hide_message(2); + prompt_active = 0; + } + if (global.question_dialogue) { + question_dialogue_opacity (0); + global.question_dialogue = NULL; + if (message_notification[2].sprite) hide_message(2); + prompt_active = 0; + } + + if (message_notification[1].sprite) show_message (1); + +} + +Plymouth.SetDisplayNormalFunction (display_normal_callback); + + +#----------------------------------------- Quit -------------------------------- + +# TODO: Maybe we should also hide any other dialog +# Show the logo and make the progress indicator look full when on exit +fun quit_callback () +{ + logo.sprite.SetOpacity (1); + switch_on_bullets (); +} + +Plymouth.SetQuitFunction(quit_callback); diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio.grub b/volumio/usr/share/plymouth/themes/volumio/volumio.grub new file mode 100644 index 000000000..0ec161acd --- /dev/null +++ b/volumio/usr/share/plymouth/themes/volumio/volumio.grub @@ -0,0 +1,3 @@ +if background_color 44,0,30,0; then + clear +fi diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio.plymouth b/volumio/usr/share/plymouth/themes/volumio/volumio.plymouth index e4533281e..8186c3e86 100644 --- a/volumio/usr/share/plymouth/themes/volumio/volumio.plymouth +++ b/volumio/usr/share/plymouth/themes/volumio/volumio.plymouth @@ -1,6 +1,6 @@ [Plymouth Theme] Name=Volumio -Description=Volumio theme +Description=A theme that features a blank background with a logo. ModuleName=script [script] diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio.png b/volumio/usr/share/plymouth/themes/volumio/volumio.png deleted file mode 100644 index c6fe6fe6d0820f6a2810ed4440c55107566e612e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 62231 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 diff --git a/volumio/usr/share/plymouth/themes/volumio/volumio.script b/volumio/usr/share/plymouth/themes/volumio/volumio.script index 02dda91e2..1857eaa90 100644 --- a/volumio/usr/share/plymouth/themes/volumio/volumio.script +++ b/volumio/usr/share/plymouth/themes/volumio/volumio.script @@ -1,17 +1,1049 @@ -screen_width = Window.GetWidth(); -screen_height = Window.GetHeight(); +# volumio.script - boot splash plugin +# +# Original Copyright (C) 2009 Canonical Ltd. +# Modified and adapted for Volumio by Michelangelo Guarise +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# Written by: Alberto Milone +# +# Based on the example provided with the "script plugin" written by: +# Charlie Brej +# +# Question stuff written by: Markus Waas +# +# -theme_image = Image("volumio.png"); -resized_wallpaper_image = theme_image.Scale(screen_width, screen_height); -sprite = Sprite(resized_wallpaper_image); -sprite.SetZ(-100); +# Set the text colour in (rgb / 256) +text_colour.red = 1.0; +text_colour.green = 1.0; +text_colour.blue = 1.0; -message_sprite = Sprite(); -message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.8, 10000); +# Tinted text #988592 +tinted_text_colour.red = 1.0; +tinted_text_colour.green = 1.0; +tinted_text_colour.blue = 1.0; -fun message_callback (text) { - my_image = Image.Text(text, 1, 1, 1); - message_sprite.SetImage(my_image); +# Action Text - #ffffff - RGB 255 255 255 +action_text_colour.red = 1.0; +action_text_colour.green = 1.0; +action_text_colour.blue = 1.0; + +# Orange - #ff4012 - RGB 255 64 18 +debugsprite = Sprite(); +debugsprite_bottom = Sprite(); +debugsprite_medium = Sprite(); + +# are we currently prompting for a password? +prompt_active = 0; + +# General purpose function to create text +fun WriteText (text, colour) { + image = Image.Text (text, colour.red, colour.green, colour.blue); + return image; +} + +fun ImageToText (text) { + image = WriteText (text, text_colour); + return image; +} + +fun ImageToTintedText (text) { + image = WriteText (text, tinted_text_colour); + return image; +} + +fun ImageToActionText (text) { + image = WriteText (text, action_text_colour); + return image; +} + +fun Debug(text) { + debugsprite.SetImage(ImageToText (text)); +} + +fun DebugBottom(text) { + debugsprite_bottom.SetImage(ImageToText (text)); + debugsprite_bottom.SetPosition(0, (Window.GetHeight (0) - 20), 1); +} + +fun DebugMedium(text) { + debugsprite_medium.SetImage(ImageToText (text)); + debugsprite_medium.SetPosition(0, (Window.GetHeight (0) - 60), 1); +} + +fun TextYOffset() { + local.y; + local.text_height; + local.min_height; + + # Put the 1st line below the logo + some spacing + y = logo.y + logo.height + (progress_indicator.bullet_height * 7 ); # + logo_spacing; + + text_height = first_line_height * 7.5; + + min_height = Window.GetHeight(); + if (y + text_height > min_height) + y = min_height - text_height; + + if (y < progress_indicator.y + progress_indicator.height) + return progress_indicator.y + progress_indicator.height; + return y; +} + +#------------------------------String functions------------------------------- + +# This is the equivalent for strstr() +fun StringString(string, substring) { + start = 0; + while (String(string).CharAt (start)) { + walk = 0; + while (String(substring).CharAt (walk) == String(string).CharAt (start + walk) ) { + walk++; + if (!String(substring).CharAt (walk)) return start; + } + start++; + } + + return NULL; +} + +fun StringLength (string) { + index = 0; + while (String(string).CharAt(index)) index++; + return index; +} + +fun StringCopy (source, beginning, end) { + local.destination = ""; + for (index = beginning; ( ( (end == NULL) || (index <= end) ) && (String(source).CharAt(index)) ); index++) { + local.destination += String(source).CharAt(index); + } + + return local.destination; +} + +fun StringReplace (source, pattern, replacement) { + local.found = StringString(source, pattern); + if (local.found == NULL) + return source; + + local.new_string = StringCopy (source, 0, local.found - 1) + + replacement + + StringCopy (source, local.found + StringLength(pattern), NULL); + + return local.new_string; +} + +# it makes sense to use it only for +# numbers up to 100 +fun StringToInteger (str) { + int = -1; + for (i=0; i<=100; i++) { + if (i+"" == str) { + int = i; + break; + } + } + return int; +} + +#----------------------------------------------------------------------------- +# Previous background colour +# #300a24 --> 0.19, 0.04, 0.14 +# New background colour +# #2c001e --> 0.16, 0.00, 0.12 +# +Window.SetBackgroundTopColor (0.0, 0.00, 0.0); # Nice colour on top of the screen fading to +Window.SetBackgroundBottomColor (0.0, 0.00, 0.0); # an equally nice colour on the bottom + +bits_per_pixel = Window.GetBitsPerPixel (); +if (bits_per_pixel == 4) { + logo_filename = "volumio-logo16.png"; + progress_dot_off_filename = "progress-dot-off16.png"; + progress_dot_on_filename = "progress-dot-on16.png"; + password_field_filename = "password-field16.png"; + question_field_filename = "password-field16.png"; +} else { + logo_filename = "volumio-logo16.png"; + progress_dot_off_filename = "progress-dot-off.png"; + progress_dot_on_filename = "progress-dot-on.png"; + password_field_filename = "password-field.png"; + question_field_filename = "password-field.png"; +} + +logo.image = Image (logo_filename); +logo.sprite = Sprite (); +logo.sprite.SetImage (logo.image); +logo.width = logo.image.GetWidth (); +logo.height = logo.image.GetHeight (); +logo.x = Window.GetX () + Window.GetWidth () / 2 - logo.width / 2; +logo.y = Window.GetY () + Window.GetHeight () / 2 - logo.height; +logo.z = 1000; +logo.sprite.SetX (logo.x); +logo.sprite.SetY (logo.y); +logo.sprite.SetZ (logo.z); +logo.sprite.SetOpacity (1); + +# Spacing below the logo - in pixels +logo_spacing = logo.height * 4; + +message_notification[0].image = ImageToTintedText (""); +message_notification[1].image = ImageToTintedText (""); +fsck_notification.image = ImageToActionText (""); + +status = "normal"; + +progress_indicator.bullet_off = Image (progress_dot_off_filename); +progress_indicator.bullet_on = Image (progress_dot_on_filename); +progress_indicator.bullet_width = progress_indicator.bullet_off.GetWidth (); +progress_indicator.bullet_height = progress_indicator.bullet_off.GetHeight (); +progress_indicator.bullet_hspacing = progress_indicator.bullet_width * 1.1; +progress_indicator.width = progress_indicator.bullet_width * 5; +progress_indicator.height = progress_indicator.bullet_height; +progress_indicator.y = logo.y + logo.height + (logo.height / 4); +progress_indicator.x = Window.GetX () + Window.GetWidth () / 2 - progress_indicator.width / 2; # logo.x + 26; + +# use a fixed string with ascending and descending stems to calibrate the +# bounding box for the first message, so the messages below don't move up +# and down according to *their* height. +first_line_height = ImageToTintedText ("AfpqtM").GetHeight(); + +# if the user has a 640x480 or 800x600 display, we can't quite fit everything +# (including passphrase prompts) with the target spacing, so scoot the text up +# a bit if needed. +top_of_the_text = TextYOffset(); + +#-----------------------------------------Logo functions------------------------------ + +# Call this when updating the screen +fun draw_logo () { + logo.sprite.SetX (logo.x); + logo.sprite.SetY (logo.y); + logo.sprite.SetZ (logo.z); + logo.sprite.SetOpacity (1); +} + + +#-----------------------------------------Progress Indicator-------------------------- +fun set_progress_indicator () { + + + # Here we assume that we can store half bullets on each half of the screen + # together with some spacing + local.x = progress_indicator.x; + + for (index = 0; index <= 4; index++) { + # Set the "off" bullets + progress_indicator.bullets_off[index].sprite = Sprite (progress_indicator.bullet_off); + progress_indicator.bullets_off[index].sprite.SetPosition (local.x, progress_indicator.y, 1000); + progress_indicator.bullets_off[index].x = local.x; + progress_indicator.bullets_off[index].y = progress_indicator.y; + progress_indicator.bullets_off[index].sprite.SetOpacity (1); + + #local.debug_medium_string = "Progress indicator " + index + ": x = " + progress_indicator.bullets_off[index].x + + # ", y = " + progress_indicator.bullets_off[index].y + ", logo width = " + logo.width + + # ", logo height = " + logo.height + " " + screen_width + " " + screen_height; + # + #(index % 2) && DebugMedium (local.debug_medium_string) || DebugBottom (local.debug_medium_string); + + # Set the "on" bullets on top of the "off" bullets and make them transparent + progress_indicator.bullets_on[index].sprite = Sprite (progress_indicator.bullet_on); + progress_indicator.bullets_on[index].x = progress_indicator.bullets_off[index].x; + progress_indicator.bullets_on[index].y = progress_indicator.bullets_off[index].y; + progress_indicator.bullets_on[index].sprite.SetPosition (progress_indicator.bullets_on[index].x, progress_indicator.bullets_on[index].y, 10000); + + progress_indicator.bullets_on[index].sprite.SetOpacity (0); + + local.x += progress_indicator.bullet_hspacing; + } + #local.debug_string = "Progress indicator: x1 = " + progress_indicator.x + ", x2 = " + local.x + ", y = " + progress_indicator.y + + # ", x logo = " + logo.x + ", y logo = " + logo.y + ", indicator width = " + progress_indicator.width; + #Debug(progress_indicator.bullets_off[0].x); +} + + +# We have 2 bullets, one on top of the other: +# The white one is on top of the red one and the former should +# slowly fade so as to get a nice transition effect. +fun switch_on_bullet (bullets_off, bullets_on, bullet_number, opacity) { + local.x = bullets_on[bullet_number].x; + local.y = bullets_on[bullet_number].y; + local.z = bullets_on[bullet_number].z; + + # Hide the bullets which are off + bullets_off[bullet_number].sprite.SetOpacity (0); + + # Show the bullets which are on + bullets_on[bullet_number].sprite.SetPosition (local.x, local.y, local.z); + bullets_on[bullet_number].sprite.SetOpacity (opacity); + + # Bump the number of times we have switched on bullets + global.times_bullets_switched++; +} + +fun switch_off_bullets () { + # Debug("Switching off progress indicator"); + + set_progress_indicator (); + global.times_bullets_switched = 0; + global.on_off = 1; +} + +# This is something that we can call when we exit +fun switch_on_bullets () { + # Debug("Switching off progress indicator"); + if (!global.progress_indicator.bullets_on) set_progress_indicator (); + local = global.progress_indicator; + + for (index = 0; bullets_on[index]; index++) { + switch_on_bullet (bullets_off, bullets_on, index, 1.0); + } +} + + +# Implement in boot progress callback +fun animate_progress_indicator (progress, time) { + if (global.progress_time == NULL) { + global.progress_time = progress; #time; + switch_off_bullets (); + } + +# Debug ("progress = " + progress + ", time = " + time + " times switched = " + global.times_bullets_switched + " on_off " + global.on_off); + +# if (global.times_bullets_switched == NULL) +# global.times_bullets_switched = 5; + +# if (global.on_off == NULL) +# global.on_off = 0; + + if ((progress - global.progress_time) >= 1.0) { + global.progress_time = progress; + + if (global.times_bullets_switched == 5) { + # Change which bullets are switched on + # and which ones are switched off + global.on_off = !global.on_off; + global.times_bullets_switched = 0; + } + + if (global.on_off) { + switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on, + global.times_bullets_switched, 1.0); + } + else { + switch_on_bullet (progress_indicator.bullets_on, progress_indicator.bullets_off, + global.times_bullets_switched, 1.0); + } + } + + + # Start setting bullets to "on" with translucency +# for (index = 0; index <= 5; index++) { +# opacity = 0.0; +# while (opacity <= 1.0) { +# switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on, +# index, opacity); +# opacity += 0.1; +# } +# } +} + + +#-----------------------------------------Label utility functions--------------------- + +# label should be either a string or NULL +# Images for n lines will be created and returned as items of the +# message_label array +# +fun get_message_label (label, is_fake, is_action_line) { + # Debug("Get Label position"); + local.message_label; + + if (is_fake) + # Create a fake label so as to get the y coordinate of + # a standard-length label. + local.message_image = ImageToTintedText ("This is a fake message"); + else + local.message_image = (is_action_line) && ImageToActionText (label) || ImageToTintedText (label); + + message_label.width = message_image.GetWidth (); + message_label.height = message_image.GetHeight (); + + # Center the line horizontally + message_label.x = Window.GetX () + Window.GetWidth () / 2 - message_label.width / 2; + + message_label.y = top_of_the_text; + + # Put the 2nd line below the fsck line + if (is_action_line) { + local.fsck_label.y = message_label.y + (first_line_height + first_line_height / 2); + message_label.y = local.fsck_label.y + (first_line_height * 2); + } + + # Debug("action label x = " + message_label.x + " y = " + message_label.y ); + +# message_debug = "msg_x = " + message_label.x + " msg_y = " + message_label.y + +# "msg_width = " + message_label.width + " msg_height = " + +# message_label.height + " message = " + label; +# Debug(message_debug); + + return message_label; + +} + +# Create an fsck label and/or get its position +fun get_fsck_label (label, is_fake) { + # Debug("Get Label position"); + local.fsck_label = global.progress_label; + + if (is_fake) + fsck_label.image = ImageToTintedText ("This is a fake message"); + else + fsck_label.image = ImageToTintedText (label); + + fsck_label.width = fsck_label.image.GetWidth (); + fsck_label.height = fsck_label.image.GetHeight (); + + # Centre the label horizontally + fsck_label.x = Window.GetX () + Window.GetWidth () / 2 - fsck_label.width / 2; + + local.first_label = get_message_label (label, 1, 0); + + # Place the label below the 1st message line + fsck_label.y = local.first_label.y + local.first_label.height + (local.first_label.height / 2); + +# message_debug = "msg_x = " + fsck_label.x + " msg_y = " + fsck_label.y + +# "msg_width = " + fsck_label.width + " msg_height = " + +# fsck_label.height + " message = " + label; +# Debug(message_debug); + + return fsck_label; +} + +#-----------------------------------------Message stuff -------------------------------- +# + +# Set up a message label +# +# NOTE: this is called when doing something like 'plymouth message "hello world"' +# +fun setup_message (message_text, x, y, z, index) { + # Debug("Message setup"); + global.message_notification[index].image = (index) && ImageToActionText (message_text) || ImageToTintedText (message_text); + + # Set up the text message, if any + message_notification[index].x = x; + message_notification[index].y = y; + message_notification[index].z = z; + + message_notification[index].sprite = Sprite (); + message_notification[index].sprite.SetImage (message_notification[index].image); + message_notification[index].sprite.SetX (message_notification[index].x); + message_notification[index].sprite.SetY (message_notification[index].y); + message_notification[index].sprite.SetZ (message_notification[index].z); + +} + +fun show_message (index) { + if (global.message_notification[index].sprite) global.message_notification[index].sprite.SetOpacity(1); +} + +fun hide_message (index) { + if (global.message_notification[index].sprite) global.message_notification[index].sprite.SetOpacity(0); +} + + + + +# the callback function is called when new message should be displayed. +# First arg is message to display. +fun message_callback (message) +{ + # Debug("Message callback"); + is_fake = 0; + if (!message || (message == "")) is_fake = 1; + + local.substring = "keys:"; + + # Look for the "keys:" prefix + local.keys = StringString(message, local.substring); + + local.is_action_line = (keys != NULL); + #Debug("keys " + local.keys + " substring length = " + StringLength(local.substring)); + + # Get the message without the "keys:" prefix + if (keys != NULL) + message = StringCopy (message, keys + StringLength(local.substring), NULL); + + # Get the message without the "fsckd-cancel-msg" prefix as we don't support i18n + substring = "fsckd-cancel-msg:"; + keys = StringString(message, substring); + if (keys != NULL) + message = StringCopy(message, keys + StringLength(substring), NULL); + + local.label.is_fake = is_fake; + label = get_message_label(message, is_fake, is_action_line); + label.z = 10000; + + setup_message (message, label.x, label.y, label.z, is_action_line); + if (prompt_active && local.is_action_line) + hide_message (is_action_line); + else + show_message (is_action_line); + +} + + +Plymouth.SetMessageFunction (message_callback); + +Plymouth.SetBootProgressFunction (animate_progress_indicator); + +# Plymouth.SetBootProgressFunction: the callback function is called with two numbers, the progress (between 0 and 1) and the time spent booting so far +# Plymouth.SetRootMountedFunction: the callback function is called when a new root is mounted +# Plymouth.SetKeyboardInputFunction: the callback function is called with a string containing a new character entered on the keyboard + +#----------------------------------------- FSCK Counter -------------------------------- + +# Initialise the counter +fun init_fsck_count () { + # The number of fsck checks in this cycle + global.counter.total = 0; + # The number of fsck checks already performed + the current one + global.counter.current = 1; + # The previous fsck + global.counter.last = 0; +} + +# Increase the total counter +fun increase_fsck_count () { + global.counter.total++; +} + +fun increase_current_fsck_count () { + global.counter.last = global.counter.current++; +} + +# Clear the counter +fun clear_fsck_count () { + global.counter = NULL; + init_fsck_count (); +} + +#----------------------------------------- Progress Label ------------------------------ + + +# Change the opacity level of a progress label +# +# opacity = 1 -> show +# opacity = 0 -> hide +# opacity = 0.3 (or any other float) -> translucent +# +fun set_progress_label_opacity (opacity) { + # the label + progress_label.sprite.SetOpacity (opacity); + + # Make the slot available again when hiding the bar + # So that another bar can take its place + if (opacity == 0) { + progress_label.is_available = 1; + progress_label.device = ""; + } +} + +# Set up a new Progress Bar +# +# TODO: Make it possible to reuse (rather than recreate) a bar +# if .is_available = 1. Ideally this would just reset the +# label, the associated +# device and the image size of the sprite. + +fun init_progress_label (device, status_string) { + # Make the slot unavailable + global.progress_label.is_available = 0; + progress_label.progress = 0; + progress_label.device = device; + progress_label.status_string = status_string; +} + +# See if the progress label is keeping track of the fsck +# of "device" +# +fun device_has_progress_label (device) { + #DebugBottom ("label device = " + progress_label.device + " checking device " + device); + return (progress_label.device == device); +} + +# Update the Progress bar which corresponds to index +# +fun update_progress_label (progress) { + # If progress is NULL then we just refresh the label. + # This happens when only counter.total has changed. + if (progress != NULL) { + progress_label.progress = progress; + + #Debug("device " + progress_label.device + " progress " + progress); + + # If progress >= 100% hide the label and make it available again + if (progress >= 100) { + set_progress_label_opacity (0); + + # See if we any other fsck check is complete + # and, if so, hide the progress bars and the labels + on_fsck_completed (); + + return 0; + } + } + # Update progress label here + # + # FIXME: the queue logic from this theme should really be moved into mountall + # instead of using string replacement to deal with localised strings. + label = StringReplace (progress_label.status_string[0], "%1$d", global.counter.current); + label = StringReplace (label, "%2$d", global.counter.total); + label = StringReplace (label, "%3$d", progress_label.progress); + label = StringReplace (label, "%%", "%"); + + progress_label = get_fsck_label (label, 0); + #progress_label.progress = progress; + + progress_label.sprite = Sprite (progress_label.image); + + # Set up the bar + progress_label.sprite.SetPosition(progress_label.x, progress_label.y, 1); + + set_progress_label_opacity (1); + +} + +# Refresh the label so as to update counters +fun refresh_progress_label () { + update_progress_label (NULL); +} + +#----------------------------------------- FSCK Queue ---------------------------------- + +# Initialise the fsck queue +fun init_queue () { + global.fsck_queue[0].device; + global.fsck_queue[0].progress; + global.fsck_queue.counter = 0; + global.fsck_queue.biggest_item = 0; +} + +fun clear_queue () { + global.fsck_queue = NULL; + init_queue (); +} + +# Return either the device index in the queue or -1 +fun queue_look_up_by_device (device) { + for (i=0; i <= fsck_queue.biggest_item; i++) { + if ((fsck_queue[i]) && (fsck_queue[i].device == device)) + return i; + } + return -1; +} + +# Keep track of an fsck process in the queue +fun add_fsck_to_queue (device, progress) { + # Look for an empty slot in the queue + for (i=0; global.fsck_queue[i].device; i++) { + continue; + } + local.index = i; + + # Set device and progress + global.fsck_queue[local.index].device = device; + global.fsck_queue[local.index].progress = progress; + + # Increase the queue counter + global.fsck_queue.counter++; + + # Update the max index of the array for iterations + if (local.index > global.fsck_queue.biggest_item) + global.fsck_queue.biggest_item = local.index; + + #DebugMedium ("Adding " + device + " at " + local.index); +} + +fun is_queue_empty () { + return (fsck_queue.counter == 0); +} + +fun is_progress_label_available () { + return (progress_label.is_available == 1); +} + + +# This should cover the case in which the fsck checks in +# the queue are completed before the ones showed in the +# progress label +fun on_queued_fsck_completed () { + if (!is_queue_empty ()) + return; + + # Hide the extra label, if any + #if (progress_bar.extra_label.sprite) + # progress_bar.extra_label.sprite.SetOpacity(0); +} + +fun remove_fsck_from_queue (index) { + # Free memory which was previously allocated for + # device and progress + global.fsck_queue[index].device = NULL; + global.fsck_queue[index].progress = NULL; + + # Decrease the queue counter + global.fsck_queue.counter--; + + # See if there are other processes in the queue + # if not, clear the extra_label + on_queued_fsck_completed (); +} + +fun on_fsck_completed () { + # We have moved on to tracking the next fsck + increase_current_fsck_count (); + + if (!is_progress_label_available ()) + return; + + if (!is_queue_empty ()) + return; + + # Hide the progress label + if (progress_label.sprite) + progress_label.sprite.SetOpacity (0); + + # Clear the queue + clear_queue (); + + # Clear the fsck counter + clear_fsck_count (); +} + +# Update an fsck process that we keep track of in the queue +fun update_progress_in_queue (index, device, progress) { + # If the fsck is complete, remove it from the queue + if (progress >= 100) { + remove_fsck_from_queue (index); + on_queued_fsck_completed (); + return; + } + + global.fsck_queue[index].device = device; + global.fsck_queue[index].progress = progress; + +} + +# TODO: Move it to some function +# Create an empty queue +#init_queue (); + + +#----------------------------------------- FSCK Functions ------------------------------ + + +# Either add a new bar for fsck checks or update an existing bar +# +# NOTE: no more than "progress_bar.max_number" bars are allowed +# +fun fsck_check (device, progress, status_string) { + + # The 1st time this will take place + if (!global.progress_label) { + # Increase the fsck counter + increase_fsck_count (); + + # Set up a new label for the check + init_progress_label (device, status_string); + update_progress_label (progress); + + return; + } + + + if (device_has_progress_label (device)) { + # Update the progress of the existing label + update_progress_label (progress); + } + else { + # See if there's already a slot in the queue for the device + local.queue_device_index = queue_look_up_by_device(device); + + # See if the progress_label is available + if (progress_label.is_available) { + +# local.my_string = "available index " + local.available_index + " progress_bar counter is " + progress_bar.counter; +# Debug(local.my_string); + + + # If the fsck check for the device was in the queue, then + # remove it from the queue + if (local.queue_device_index >= 0) { + remove_fsck_from_queue (index); + } + else { + # Increase the fsck counter + increase_fsck_count (); + } + +# local.my_string += local.message; + #Debug("setting new label for device " + device + " progress " + progress); + + # Set up a new label for the check + init_progress_label (device, status_string); + update_progress_label (progress); + + } + # If the progress_label is not available + else { + + # If the fsck check for the device is already in the queue + # just update its progress in the queue + if (local.queue_device_index >= 0) { + #DebugMedium("Updating queue at " + local.queue_device_index + " for device " + device); + update_progress_in_queue (local.queue_device_index, device, progress); + } + # Otherwise add the check to the queue + else { + #DebugMedium("Adding device " + device + " to queue at " + local.queue_device_index); + add_fsck_to_queue (device, progress); + + # Increase the fsck counter + increase_fsck_count (); + + refresh_progress_label (); + } + + } + } + +# if (!is_queue_empty ()) { +# DebugBottom("Extra label for "+ device); + #} +# else { +# DebugBottom("No extra label for " + device + ". 1st Device in the queue "+ fsck_queue[0].device + " counter = " + global.fsck_queue.counter); +# } +} + + +#-----------------------------------------Update Status stuff -------------------------- +# +# The update_status_callback is what we can use to pass plymouth whatever we want so +# as to make use of features which are available only in this program (as opposed to +# being available for any theme for the script plugin). +# +# Example: +# +# Thanks to the current implementation, some scripts can call "plymouth --update=fsck:sda1:40" +# and this program will know that 1) we're performing and fsck check, 2) we're checking sda1, +# 3) the program should set the label progress to 40% +# +# Other features can be easily added by parsing the string that we pass plymouth with "--update" +# +fun update_status_callback (status) { +# Debug(status); + if (!status) return; + + string_it = 0; + update_strings[string_it] = ""; + + for (i=0; (String(status).CharAt(i) != ""); i++) { + local.temp_char = String(status).CharAt(i); + if (temp_char != ":") + update_strings[string_it] += temp_char; + else + update_strings[++string_it] = ""; + } + +# my_string = update_strings[0] + " " + update_strings[1] + " " + update_strings[2]; +# Debug(my_string); + # Let's assume that we're dealing with these strings fsck:sda1:40 + if ((string_it >= 2) && (update_strings[0] == "fsck")) { + + device = update_strings[1]; + progress = update_strings[2]; + status_string[0] = update_strings[3]; # "Checking disk %1$d of %2$d (%3$d %% complete)" + if (!status_string[0]) + status_string[0] = "Checking disk %1$d of %2$d (%3$d %% complete)"; + + if ((device != "") && (progress != "")) { + progress = StringToInteger (progress); + + # Make sure that the fsck_queue is initialised + if (!global.fsck_queue) + init_queue (); + + # Make sure that the fsck counter is initialised + if (!global.counter) + init_fsck_count (); + +# if (!global.progress_bar.extra_label.sprite) +# create_extra_fsck_label (); + + # Keep track of the fsck check + fsck_check (device, progress, status_string); + } + + } + + # systemd-fsckd pass fsckd::: + if (update_strings[0] == "fsckd") { + number_devices = StringToInteger(update_strings[1]); + + if (number_devices > 0) { + label = update_strings[3]; + + progress_label = get_fsck_label (label, 0); + progress_label.sprite = Sprite (progress_label.image); + progress_label.sprite.SetPosition(progress_label.x, progress_label.y, 1); + progress_label.sprite.SetOpacity (1); + } else { + if (progress_label.sprite) + progress_label.sprite.SetOpacity (0); + } + } + +} +Plymouth.SetUpdateStatusFunction (update_status_callback); + +#-----------------------------------------Display Question stuff ----------------------- + +fun question_dialogue_setup (message_label, text_image) { + #Debug("Question dialog setup"); + + local.field; + local.content; + local.margin; + + field.image = Image (question_field_filename); + content = Sprite (); + bullet_image = Image (progress_dot_off_filename); + margin = bullet_image.GetWidth() / 2; + + # Hide the normal labels + prompt_active = 1; + if (message_notification[1].sprite) hide_message (1); + + # Set the prompt label + label = get_message_label(message_label, 0, 1); + label.z = 10000; + + setup_message (message_label, label.x, label.y, label.z, 2); + show_message (2); + + # Set up the text field which contains the contents + field.sprite = Sprite (); + field.sprite.SetImage (field.image); + + # Centre the box horizontally + field.x = Window.GetX () + Window.GetWidth () / 2 - field.image.GetWidth () / 2; + content_x = field.x + margin; + + # Put the field below the second label. + field.y = message_notification[2].y + label.height; + content_y = field.y + field.image.GetHeight () / 2 - text_image.GetHeight () / 2; + + #Debug ("field x = " + field.x + ", y = " + field.y); + field.z = 10000; + field.sprite.SetX (field.x); + field.sprite.SetY (field.y); + field.sprite.SetZ (field.z); + + #Debug ("content_x = " + content_x + " content_y = " + content_y); + content_z = field.z + 1; + content.SetPosition (content_x, content_y, content_z); + + global.question_dialogue = local; +} + +# The callback function is called when the display should display a question dialogue. +# First arg is prompt string, the second is the field contents. +fun display_question_callback (prompt, contents) { + global.status = "question"; + #Debug ("Reply: " + contents); + + textImage = ImageToText(contents); + if (!global.question_dialogue) { + question_dialogue_setup(prompt, textImage); + } + + margin = global.question_dialogue.margin; + fieldWidth = global.question_dialogue.field.image.GetWidth (); + for (i = 0; ( (textImage.GetWidth () + 2 * margin ) > fieldWidth ); i++) { + textImage = ImageToText(StringCopy (contents, i, StringLength (contents))); + } + + global.question_dialogue.content.SetImage (textImage); +} + + +Plymouth.SetDisplayQuestionFunction (display_question_callback); + +#-----------------------------------------Refresh stuff -------------------------------- +# +# Calling Plymouth.SetRefreshFunction with a function will set that function to be +# called up to 50 times every second, e.g. +# +# NOTE: if a refresh function is not set, Plymouth doesn't seem to be able to update +# the screen correctly +# +fun refresh_callback () +{ + draw_logo (); +} +Plymouth.SetRefreshFunction (refresh_callback); + + +#-----------------------------------------Display Normal stuff ----------------------- +# +# The callback function is called when the display should return to normal +fun display_normal_callback () +{ + global.status = "normal"; + if (global.password_dialogue) { + password_dialogue_opacity (0); + global.password_dialogue = NULL; + if (message_notification[2].sprite) hide_message(2); + prompt_active = 0; + } + if (global.question_dialogue) { + question_dialogue_opacity (0); + global.question_dialogue = NULL; + if (message_notification[2].sprite) hide_message(2); + prompt_active = 0; + } + + if (message_notification[1].sprite) show_message (1); + +} + +Plymouth.SetDisplayNormalFunction (display_normal_callback); + + +#----------------------------------------- Quit -------------------------------- + +# TODO: Maybe we should also hide any other dialog +# Show the logo and make the progress indicator look full when on exit +fun quit_callback () +{ + logo.sprite.SetOpacity (1); + switch_on_bullets (); } -Plymouth.SetUpdateStatusFunction(message_callback); +Plymouth.SetQuitFunction(quit_callback); From c864aca12395e1780f7bb5dd670c2855f140c6dc Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 8 Jun 2017 17:25:19 +0200 Subject: [PATCH 185/673] add plymouth to x86 --- recipes/x86.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index 0620bfa9e..d4796918d 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -43,7 +43,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount plymouth source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 4c9c3b7b00ffb8e9eed5b46f2bb6b7fb3383d0c2 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 8 Jun 2017 17:26:12 +0200 Subject: [PATCH 186/673] add plymouth-drm to arm recipe --- recipes/arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 4f96e649d..fe24609e2 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq plymouth +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq plymouth plymouth-drm source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From f770aa9d216df1839cedfe314e7e6d4c53264d82 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 8 Jun 2017 18:50:07 +0200 Subject: [PATCH 187/673] remove plymouth-drm --- recipes/arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index fe24609e2..4f96e649d 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq plymouth plymouth-drm +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq plymouth source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From 396a8554e85347a25181fb3a6ef7203b57b7f776 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 8 Jun 2017 19:53:21 +0200 Subject: [PATCH 188/673] fix copy of plymouth theme --- scripts/configure.sh | 2 +- volumio/etc/default/grub | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index 8befce99c..e8a8fdd1e 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -89,7 +89,7 @@ chmod a+x build/$BUILD/root/bin/wifistart.sh cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh chmod a+x build/$BUILD/root/bin/rename_netiface0.sh #Plymouth -cp -rp volumio/usr/* build/$BUILD/usr/ +cp -rp volumio/usr/* build/$BUILD/root/usr/ plymouth-set-default-theme volumio echo 'Done Copying Custom Volumio System Files' diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index 12793f3b1..c67a20a7b 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -4,9 +4,9 @@ # info -f grub -n 'Simple configuration' GRUB_DEFAULT='' -GRUB_TIMEOUT=5 +GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Volumio Audiophile Music player" -GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh quiet" +GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs From 28747410cbc29968c5643ec8c579039ba52ee1b9 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 8 Jun 2017 20:11:02 +0200 Subject: [PATCH 189/673] Splash on pi (WIP) --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 23f335846..346f8e918 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -171,7 +171,7 @@ disable_splash=1" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5" >> /boot/cmdline.txt echo "Exporting /opt/vc/bin variable" export LD_LIBRARY_PATH=/opt/vc/lib/:LD_LIBRARY_PATH From 152bf63030825dcb63d0a2f93682a9f43cd706b6 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 9 Jun 2017 01:45:57 +0200 Subject: [PATCH 190/673] working plymouth on pi --- scripts/configure.sh | 2 +- scripts/raspberryconfig.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index e8a8fdd1e..7f6bc6f23 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -90,7 +90,7 @@ cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh chmod a+x build/$BUILD/root/bin/rename_netiface0.sh #Plymouth cp -rp volumio/usr/* build/$BUILD/root/usr/ -plymouth-set-default-theme volumio + echo 'Done Copying Custom Volumio System Files' echo "Stripping binaries and libraries to save space" diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 346f8e918..47334da3c 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -121,6 +121,10 @@ groupadd -f --system spi echo "adding volumio to gpio group and al" usermod -a -G gpio,i2c,spi,input volumio +echo "Configuring boot splash" +apt-get -y install plymouth plymouth-themes +plymouth-set-default-theme volumio + echo "Use up-to-date jessie rules for gpio & al." read -rd '' Rule_String <<"EOF" SUBSYSTEM=="input", GROUP="input", MODE="0660" @@ -171,7 +175,7 @@ disable_splash=1" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt echo "Exporting /opt/vc/bin variable" export LD_LIBRARY_PATH=/opt/vc/lib/:LD_LIBRARY_PATH From a4282672778bc8560b712972ec3cc112f6840cba Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 9 Jun 2017 14:24:34 +0200 Subject: [PATCH 191/673] Pi: apply standard Jessie system configuration provided by raspberrypi-sys-mods package --- scripts/raspberryconfig.sh | 60 +++++++++----------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 47334da3c..48241774d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -114,54 +114,10 @@ wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /l echo "Installing WiringPi from Raspberrypi.org Repo" apt-get -y install wiringpi -echo "adding gpio & spi group and permissions" -groupadd -f --system gpio -groupadd -f --system spi - -echo "adding volumio to gpio group and al" -usermod -a -G gpio,i2c,spi,input volumio - echo "Configuring boot splash" apt-get -y install plymouth plymouth-themes plymouth-set-default-theme volumio -echo "Use up-to-date jessie rules for gpio & al." -read -rd '' Rule_String <<"EOF" -SUBSYSTEM=="input", GROUP="input", MODE="0660" -SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660" -SUBSYSTEM=="spidev", GROUP="spi", MODE="0660" -SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660" - -SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\ - chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ - chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\ - chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\ -'" - -KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ - ALIASES=/proc/device-tree/aliases; \ - if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \ - echo 0;\ - elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \ - echo 1; \ - else \ - exit 1; \ - fi\ -'", SYMLINK+="serial%c" - -KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ - ALIASES=/proc/device-tree/aliases; \ - if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \ - echo 0; \ - elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \ - echo 1; \ - else \ - exit 1; \ - fi \ -'", SYMLINK+="serial%c" -EOF -echo "${Rule_String}" > /etc/udev/rules.d/99-com.rules - echo "Removing unneeded binaries" apt-get -y remove binutils @@ -173,9 +129,21 @@ dtparam=audio=on dtparam=i2c_arm=on disable_splash=1" >> /boot/config.txt - echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt + +echo "adding gpio & spi group and permissions" +groupadd -f --system gpio +groupadd -f --system spi + +echo "adding volumio to gpio group and al" +usermod -a -G gpio,i2c,spi,input volumio + +echo "Installing raspberrypi-sys-mods System customizations (& removing few bits)" +apt-get -y install raspberrypi-sys-mods +rm /etc/sudoers.d/010_pi-nopasswd +unlink /etc/systemd/system/multi-user.target.wants/sshswitch.service +rm /lib/systemd/system/sshswitch.service echo "Exporting /opt/vc/bin variable" export LD_LIBRARY_PATH=/opt/vc/lib/:LD_LIBRARY_PATH From 658d7748f4c69031590eea7fd35a56e7da4ffe1f Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 9 Jun 2017 14:49:15 +0200 Subject: [PATCH 192/673] plymouth x86 --- scripts/x86config.sh | 11 ++++++++++- volumio/etc/default/grub | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 3a963da80..94ba86543 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -41,7 +41,7 @@ echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash ${DEBUG} + APPEND ro imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd " > /boot/syslinux.cfg @@ -59,6 +59,11 @@ sed -i "s/initrd=\"\$i\"/initrd=\"volumio.initrd\"/g" /etc/grub.d/10_linux sed -i "s/LINUX_ROOT_DEVICE=\${GRUB_DEVICE}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux sed -i "s/LINUX_ROOT_DEVICE=UUID=\${GRUB_DEVICE_UUID}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux +echo "Setting grub image" +cp /usr/share/plymouth/themes/volumio/volumio-logo16.png /boot/volumio.png + + + echo " Creating grub config folder" mkdir -p /boot/grub @@ -177,6 +182,10 @@ echo "nls_utf8" >> /etc/initramfs-tools/modules echo "vfat" >> /etc/initramfs-tools/modules echo " Adding ata modules for various chipsets" cat /ata-modules.x86 >> /etc/initramfs-tools/modules +echo " Adding modules for Plymouth" +echo "intel_agp" >> /etc/initramfs-tools/modules +echo "drm" >> /etc/initramfs-tools/modules +echo "i915 modeset=1" >> /etc/initramfs-tools/modules echo " Copying volumio initramfs updater" cd /root/ diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index c67a20a7b..984859729 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -6,7 +6,7 @@ GRUB_DEFAULT='' GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Volumio Audiophile Music player" -GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet" +GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 " GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs From 1806eb9490b0802526da96e22a66c085cb7d3d7a Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 9 Jun 2017 15:42:56 +0200 Subject: [PATCH 193/673] move to 4.9.31 many fixes, including support for new Allo Digione driver --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index eb55127b6..e4f346799 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,9 +67,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.30") - KERNEL_REV="1001" - KERNEL_COMMIT="684be4bc8cc343f60fdc3240c6d55d41d0a5b56c" + "4.9.31") + KERNEL_REV="1005" + KERNEL_COMMIT="9e6a1a545ef33ac6cc3805845cb3ecac26514a41" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 70b7dcfadf59f1ebdb0f8f9420ad351c711b9f92 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 10 Jun 2017 08:32:57 +0200 Subject: [PATCH 194/673] bump kernel to 4.9.31 --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 916fd4235..f9e2e87fc 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -59,7 +59,7 @@ mkdir /lib/modules # Kernel 4.4.9 for Pi3 Support # see https://github.com/raspberrypi/firmware/commit/cc6d7bf8b4c03a2a660ff9fdf4083fc165620866 # and https://github.com/Hexxeh/rpi-firmware/issues/118 -KERNEL_VERSION="4.4.9" +KERNEL_VERSION="4.9.31" case $KERNEL_VERSION in "4.4.9") From bc067ebd3c4a242f87aeed3741a0ec0b0bba3101 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 10 Jun 2017 08:34:25 +0200 Subject: [PATCH 195/673] branch volumionext --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index fd0f99555..9d77b9027 100755 --- a/build.sh +++ b/build.sh @@ -159,7 +159,7 @@ if [ -n "$BUILD" ]; then echo "Cloning Volumio with all its history" git clone -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio else - git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone --depth 1 -b volumionext --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git build/$BUILD/root/volumio/http/www From 86d1766481247d2506d7d372acb31c56b497bab6 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 10 Jun 2017 09:34:08 +0200 Subject: [PATCH 196/673] fix iptables service --- volumio/lib/systemd/system/iptables.service | 4 ---- 1 file changed, 4 deletions(-) diff --git a/volumio/lib/systemd/system/iptables.service b/volumio/lib/systemd/system/iptables.service index 7ab558484..e451a63f3 100644 --- a/volumio/lib/systemd/system/iptables.service +++ b/volumio/lib/systemd/system/iptables.service @@ -3,10 +3,6 @@ Description = Volumio Iptables Module [Service] ExecStart=/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 -<<<<<<< HEAD -Restart=never -======= ->>>>>>> volumionext StandardOutput=syslog StandardError=syslog SyslogIdentifier=iptables From 96322a28f3ace9b6a3edc8c6f0e7f8648abaeeb0 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 10 Jun 2017 11:21:20 +0200 Subject: [PATCH 197/673] userspace splash (WIP) --- volumio/bin/volumiosplash.sh | 3 +++ volumio/lib/systemd/system/volumiosplash.service | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 volumio/bin/volumiosplash.sh create mode 100644 volumio/lib/systemd/system/volumiosplash.service diff --git a/volumio/bin/volumiosplash.sh b/volumio/bin/volumiosplash.sh new file mode 100755 index 000000000..c39ba4688 --- /dev/null +++ b/volumio/bin/volumiosplash.sh @@ -0,0 +1,3 @@ +#!/bin/sh +/sbin/plymouthd +/bin/plymouth --show-splash diff --git a/volumio/lib/systemd/system/volumiosplash.service b/volumio/lib/systemd/system/volumiosplash.service new file mode 100644 index 000000000..6b825c5d9 --- /dev/null +++ b/volumio/lib/systemd/system/volumiosplash.service @@ -0,0 +1,14 @@ +[Unit] +Description = Volumio Splash + + +[Service] +ExecStart=/bin/volumiosplash.sh +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=volumio-splash +User=root +Group=root + +[Install] +WantedBy=multi-user.target From 1a39fdadedaf1628ce975589abc4dde3264af5f7 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 10 Jun 2017 12:50:47 +0200 Subject: [PATCH 198/673] Make sure swapiness is always set correctly Was not set at boot if swap file already existed. now always set the same way --- volumio/bin/dynswap.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/volumio/bin/dynswap.sh b/volumio/bin/dynswap.sh index 9e9c45f5f..0c0de3b8d 100755 --- a/volumio/bin/dynswap.sh +++ b/volumio/bin/dynswap.sh @@ -4,21 +4,19 @@ RAMSIZE=`cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'` SWAPDEVS=`cat /proc/swaps | wc -l` if [ ${RAMSIZE} -le 512844 -a ${SWAPDEVS} -le 1 ]; then - echo "512 MB or less RAM Detected, need to enable swap" - if [ -e /data/swapfile ]; then - echo "Enabling Swap" - swapon /data/swapfile - else - echo "No Swapfile present, creating it..." + echo "512 MB or less RAM Detected, need to enable swap" + if [ ! -e /data/swapfile ]; then + echo "No Swapfile present, creating it..." fallocate -l 512M /data/swapfile echo "Securing Swap permissions" chown root:root /data/swapfile chmod 0600 /data/swapfile echo "Preparing SwapFile" mkswap /data/swapfile - echo "Enabling Swap" - swapon /data/swapfile - echo "Setting swappiness to 40" - sysctl vm.swappiness=40 fi + + echo "Enabling Swap" + swapon /data/swapfile + echo "Setting swappiness to 40" + sysctl vm.swappiness=40 fi From a960db083986f1a855161237cf263eca3a0b1c16 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 11 Jun 2017 20:06:11 +0200 Subject: [PATCH 199/673] x86 build without build-essentials, vim and dh-autoreconf --- recipes/x86.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index d4796918d..70fe79408 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -1,7 +1,7 @@ [General] noauth=true unpack=true -debootstrap=Base Net Utils Assets FS DevTools Firmware +debootstrap=Base Net Utils Assets FS Tools Firmware aptsources=Debian cleanup=true arch=i386 @@ -54,8 +54,14 @@ source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie +[Tools] +packages=subversion initramfs-tools xz-utils +source=http://httpredir.debian.org/debian +keyring=debian-archive-keyring +suite=jessie + [DevTools] -packages=build-essential cmake dh-autoreconf subversion vim initramfs-tools +packages=build-essential cmake dh-autoreconf vim source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From f710cee3cd41f18259ca157548f6a29759b4ea59 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 12 Jun 2017 00:47:51 +0200 Subject: [PATCH 200/673] Fix plymoouth X86 --- recipes/x86.conf | 2 +- scripts/x86config.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index 70fe79408..8008abc8b 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -43,7 +43,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount plymouth +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 94ba86543..d93e4b55e 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -121,6 +121,10 @@ sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /etc/fstab echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core +echo "Configuring boot splash" +apt-get -y install plymouth plymouth-themes plymouth-x11 +plymouth-set-default-theme volumio + echo "Setting up in kiosk-mode" echo " Creating chromium kiosk start script" echo "#!/bin/bash From 7e943abeb6723516438966ecf2947aef22829815 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 12 Jun 2017 01:17:42 +0200 Subject: [PATCH 201/673] Do not show grub background --- volumio/etc/default/grub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index 984859729..a8f4be3a9 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -31,5 +31,5 @@ GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" -GRUB_BACKGROUND=/boot/volumio.png +#GRUB_BACKGROUND=/boot/volumio.png From e3adb568290345c318f75aa299c17b0cc7e83e40 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 12 Jun 2017 19:32:24 +0200 Subject: [PATCH 202/673] Nodejs v6.11.0 --- scripts/volumioconfig.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 0b84ce688..fc9c95a0f 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -1,5 +1,7 @@ #!/bin/bash +NODE_VERSION=6.11.0 + # This script will be run in chroot under qemu. echo "Prevent services starting during install, running under chroot" @@ -110,15 +112,13 @@ if [ $(uname -m) = armv7l ]; then wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add - echo "Installing ARM Node Environment" - # version 6.3.0 - cd / - wget http://repo.volumio.org/Volumio2/node-v6.9.1-linux-armv6l.tar.xz - tar xf node-v6.9.1-linux-armv6l.tar.xz - rm /node-v6.9.1-linux-armv6l.tar.xz - cd /node-v6.9.1-linux-armv6l + wget http://repo.volumio.org/Volumio2/node-v${NODE_VERSION}-linux-armv6l.tar.xz + tar xf node-v${NODE_VERSION}-linux-armv6l.tar.xz + rm /node-v${NODE_VERSION}-linux-armv6l.tar.xz + cd /node-v${NODE_VERSION}-linux-armv6l cp -rp bin/ include/ lib/ share/ / cd / - rm -rf /node-v6.9.1-linux-armv6l + rm -rf /node-v${NODE_VERSION}-linux-armv6l # Symlinking to legacy paths @@ -127,9 +127,9 @@ if [ $(uname -m) = armv7l ]; then echo "Installing Volumio Modules" cd /volumio - wget http://repo.volumio.org/Volumio2/node_modules_arm.tar.gz - tar xf node_modules_arm.tar.gz - rm node_modules_arm.tar.gz + wget http://repo.volumio.org/Volumio2/node_modules_arm-${NODE_VERSION}.tar.gz + tar xf node_modules_arm-${NODE_VERSION}.tar.gz + rm node_modules_arm-${NODE_VERSION}.tar.gz echo "Setting proper ownership" chown -R volumio:volumio /volumio @@ -275,13 +275,13 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing X86 Node Environment" cd / - wget http://repo.volumio.org/Volumio2/node-v6.3.0-linux-x86.tar.xz - tar xf node-v6.3.0-linux-x86.tar.xz - rm /node-v6.3.0-linux-x86.tar.xz - cd /node-v6.3.0-linux-x86 + wget http://repo.volumio.org/Volumio2/node-v${NODE_VERSION}-linux-x86.tar.xz + tar xf node-v${NODE_VERSION}-linux-x86.tar.xz + rm /node-v${NODE_VERSION}-linux-x86.tar.xz + cd /node-v${NODE_VERSION}-linux-x86 cp -rp bin/ include/ lib/ share/ / cd / - rm -rf /node-v6.3.0-linux-x86 + rm -rf /node-v${NODE_VERSION}-linux-x86 # Symlinking to legacy paths ln -s /bin/node /usr/local/bin/node @@ -289,9 +289,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Volumio Modules" cd /volumio - wget http://repo.volumio.org/Volumio2/node_modules_x86.tar.gz - tar xf node_modules_x86.tar.gz - rm node_modules_x86.tar.gz + wget http://repo.volumio.org/Volumio2/node_modules_x86-${NODE_VERSION}.tar.gz + tar xf node_modules_x86-${NODE_VERSION}.tar.gz + rm node_modules_x86-${NODE_VERSION}.tar.gz echo "Setting proper ownership" From 5b88de74eaca6cbee0ae8abb86a79aec4b420025 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 12 Jun 2017 19:32:24 +0200 Subject: [PATCH 203/673] Nodejs v6.11.0 --- scripts/volumioconfig.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index d426836ca..fc46860a1 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -1,5 +1,7 @@ #!/bin/bash +NODE_VERSION=6.11.0 + # This script will be run in chroot under qemu. echo "Prevent services starting during install, running under chroot" @@ -110,15 +112,13 @@ if [ $(uname -m) = armv7l ]; then wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add - echo "Installing ARM Node Environment" - # version 6.3.0 - cd / - wget http://repo.volumio.org/Volumio2/node-v6.9.1-linux-armv6l.tar.xz - tar xf node-v6.9.1-linux-armv6l.tar.xz - rm /node-v6.9.1-linux-armv6l.tar.xz - cd /node-v6.9.1-linux-armv6l + wget http://repo.volumio.org/Volumio2/node-v${NODE_VERSION}-linux-armv6l.tar.xz + tar xf node-v${NODE_VERSION}-linux-armv6l.tar.xz + rm /node-v${NODE_VERSION}-linux-armv6l.tar.xz + cd /node-v${NODE_VERSION}-linux-armv6l cp -rp bin/ include/ lib/ share/ / cd / - rm -rf /node-v6.9.1-linux-armv6l + rm -rf /node-v${NODE_VERSION}-linux-armv6l # Symlinking to legacy paths @@ -127,9 +127,9 @@ if [ $(uname -m) = armv7l ]; then echo "Installing Volumio Modules" cd /volumio - wget http://repo.volumio.org/Volumio2/node_modules_arm.tar.gz - tar xf node_modules_arm.tar.gz - rm node_modules_arm.tar.gz + wget http://repo.volumio.org/Volumio2/node_modules_arm-${NODE_VERSION}.tar.gz + tar xf node_modules_arm-${NODE_VERSION}.tar.gz + rm node_modules_arm-${NODE_VERSION}.tar.gz echo "Setting proper ownership" chown -R volumio:volumio /volumio @@ -274,13 +274,13 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing X86 Node Environment" cd / - wget http://repo.volumio.org/Volumio2/node-v6.3.0-linux-x86.tar.xz - tar xf node-v6.3.0-linux-x86.tar.xz - rm /node-v6.3.0-linux-x86.tar.xz - cd /node-v6.3.0-linux-x86 + wget http://repo.volumio.org/Volumio2/node-v${NODE_VERSION}-linux-x86.tar.xz + tar xf node-v${NODE_VERSION}-linux-x86.tar.xz + rm /node-v${NODE_VERSION}-linux-x86.tar.xz + cd /node-v${NODE_VERSION}-linux-x86 cp -rp bin/ include/ lib/ share/ / cd / - rm -rf /node-v6.3.0-linux-x86 + rm -rf /node-v${NODE_VERSION}-linux-x86 # Symlinking to legacy paths ln -s /bin/node /usr/local/bin/node @@ -288,9 +288,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Volumio Modules" cd /volumio - wget http://repo.volumio.org/Volumio2/node_modules_x86.tar.gz - tar xf node_modules_x86.tar.gz - rm node_modules_x86.tar.gz + wget http://repo.volumio.org/Volumio2/node_modules_x86-${NODE_VERSION}.tar.gz + tar xf node_modules_x86-${NODE_VERSION}.tar.gz + rm node_modules_x86-${NODE_VERSION}.tar.gz echo "Setting proper ownership" From bbbbc744451f8d72975d716837d71f6c2e53a0e0 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 12 Jun 2017 02:51:06 +0200 Subject: [PATCH 204/673] Revert "Nodejs v6.11.0" This reverts commit 5b88de74eaca6cbee0ae8abb86a79aec4b420025. --- scripts/volumioconfig.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index fc46860a1..d426836ca 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -1,7 +1,5 @@ #!/bin/bash -NODE_VERSION=6.11.0 - # This script will be run in chroot under qemu. echo "Prevent services starting during install, running under chroot" @@ -112,13 +110,15 @@ if [ $(uname -m) = armv7l ]; then wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add - echo "Installing ARM Node Environment" - wget http://repo.volumio.org/Volumio2/node-v${NODE_VERSION}-linux-armv6l.tar.xz - tar xf node-v${NODE_VERSION}-linux-armv6l.tar.xz - rm /node-v${NODE_VERSION}-linux-armv6l.tar.xz - cd /node-v${NODE_VERSION}-linux-armv6l + # version 6.3.0 + cd / + wget http://repo.volumio.org/Volumio2/node-v6.9.1-linux-armv6l.tar.xz + tar xf node-v6.9.1-linux-armv6l.tar.xz + rm /node-v6.9.1-linux-armv6l.tar.xz + cd /node-v6.9.1-linux-armv6l cp -rp bin/ include/ lib/ share/ / cd / - rm -rf /node-v${NODE_VERSION}-linux-armv6l + rm -rf /node-v6.9.1-linux-armv6l # Symlinking to legacy paths @@ -127,9 +127,9 @@ if [ $(uname -m) = armv7l ]; then echo "Installing Volumio Modules" cd /volumio - wget http://repo.volumio.org/Volumio2/node_modules_arm-${NODE_VERSION}.tar.gz - tar xf node_modules_arm-${NODE_VERSION}.tar.gz - rm node_modules_arm-${NODE_VERSION}.tar.gz + wget http://repo.volumio.org/Volumio2/node_modules_arm.tar.gz + tar xf node_modules_arm.tar.gz + rm node_modules_arm.tar.gz echo "Setting proper ownership" chown -R volumio:volumio /volumio @@ -274,13 +274,13 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing X86 Node Environment" cd / - wget http://repo.volumio.org/Volumio2/node-v${NODE_VERSION}-linux-x86.tar.xz - tar xf node-v${NODE_VERSION}-linux-x86.tar.xz - rm /node-v${NODE_VERSION}-linux-x86.tar.xz - cd /node-v${NODE_VERSION}-linux-x86 + wget http://repo.volumio.org/Volumio2/node-v6.3.0-linux-x86.tar.xz + tar xf node-v6.3.0-linux-x86.tar.xz + rm /node-v6.3.0-linux-x86.tar.xz + cd /node-v6.3.0-linux-x86 cp -rp bin/ include/ lib/ share/ / cd / - rm -rf /node-v${NODE_VERSION}-linux-x86 + rm -rf /node-v6.3.0-linux-x86 # Symlinking to legacy paths ln -s /bin/node /usr/local/bin/node @@ -288,9 +288,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Volumio Modules" cd /volumio - wget http://repo.volumio.org/Volumio2/node_modules_x86-${NODE_VERSION}.tar.gz - tar xf node_modules_x86-${NODE_VERSION}.tar.gz - rm node_modules_x86-${NODE_VERSION}.tar.gz + wget http://repo.volumio.org/Volumio2/node_modules_x86.tar.gz + tar xf node_modules_x86.tar.gz + rm node_modules_x86.tar.gz echo "Setting proper ownership" From a8b1e012aca57474aa4e2f90c5ab63590525f578 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 12 Jun 2017 09:21:23 +0200 Subject: [PATCH 205/673] backup firmare kernel commit --- scripts/raspberryconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 916fd4235..a1068eeb5 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -77,6 +77,9 @@ esac # using rpi-update relevant to defined kernel version echo y | SKIP_BACKUP=1 rpi-update $KERNEL_COMMIT +echo "Getting actual kernel revision with firmware revision backup" +cp /boot/.firmware_revision /boot/.firmware_revision_kernel + echo "Updating bootloader files *.elf *.dat *.bin" echo y | SKIP_KERNEL=1 rpi-update $FIRMWARE_COMMIT From 5c3c1eee05c008cdc29d3ce1973fc61d2a759ea2 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 12 Jun 2017 09:21:23 +0200 Subject: [PATCH 206/673] backup firmare kernel commit --- scripts/raspberryconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index f1f9db873..ead6705d5 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -77,6 +77,9 @@ esac # using rpi-update relevant to defined kernel version echo y | SKIP_BACKUP=1 rpi-update $KERNEL_COMMIT +echo "Getting actual kernel revision with firmware revision backup" +cp /boot/.firmware_revision /boot/.firmware_revision_kernel + echo "Updating bootloader files *.elf *.dat *.bin" echo y | SKIP_KERNEL=1 rpi-update $FIRMWARE_COMMIT From 3e003a873834fd3c3aa8cd579711b766a9deac66 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 13 Jun 2017 21:04:16 +0000 Subject: [PATCH 207/673] Disable SSH by default and allow enabling by boot file --- scripts/configure.sh | 3 +++ scripts/volumioconfig.sh | 6 ++++++ volumio/bin/volumiossh.sh | 6 ++++++ volumio/lib/systemd/system/volumiossh.service | 14 ++++++++++++++ 4 files changed, 29 insertions(+) create mode 100755 volumio/bin/volumiossh.sh create mode 100644 volumio/lib/systemd/system/volumiossh.service diff --git a/scripts/configure.sh b/scripts/configure.sh index 7f6bc6f23..ec92b738f 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -90,6 +90,9 @@ cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh chmod a+x build/$BUILD/root/bin/rename_netiface0.sh #Plymouth cp -rp volumio/usr/* build/$BUILD/root/usr/ +#SSH +cp volumio/bin/volumiossh.sh build/$BUILD/root/bin/volumiossh.sh +chmod a+x build/$BUILD/root/bin/volumiossh.sh echo 'Done Copying Custom Volumio System Files' diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index d426836ca..e02549e83 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -434,6 +434,12 @@ ln -s /lib/systemd/system/dynamicswap.service /etc/systemd/system/multi-user.tar echo "Adding Iptables Service" ln -s /lib/systemd/system/iptables.service /etc/systemd/system/multi-user.target.wants/iptables.service +echo "Disabling SSH by default" +systemctl disable ssh.service + +echo "Enable Volumio SSH enabler" +ln -s /lib/systemd/system/volumiossh.service /etc/systemd/system/multi-user.target.wants/volumiossh.service + echo "Setting Mpd to SystemD instead of Init" update-rc.d mpd remove systemctl enable mpd.service diff --git a/volumio/bin/volumiossh.sh b/volumio/bin/volumiossh.sh new file mode 100755 index 000000000..0f4ba6a61 --- /dev/null +++ b/volumio/bin/volumiossh.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -e "/boot/ssh" ]; then + echo "SSH file found, enabling SSH service" + /usr/bin/sudo /bin/systemctl start ssh +fi diff --git a/volumio/lib/systemd/system/volumiossh.service b/volumio/lib/systemd/system/volumiossh.service new file mode 100644 index 000000000..1018440f1 --- /dev/null +++ b/volumio/lib/systemd/system/volumiossh.service @@ -0,0 +1,14 @@ +[Unit] +Description = Volumio SSH enabler + +[Service] +ExecStart=/bin/volumiossh.sh +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=volumiossh +User=volumio +Group=volumio + +[Install] +WantedBy=multi-user.target + From 955966673ecef3a1df3f9afc445582249e28042c Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:03:35 +0200 Subject: [PATCH 208/673] add minizip for plugin install --- recipes/arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 4f96e649d..870733cd7 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq plymouth +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq plymouth minizip source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From 48165040ab82ba5e85c5ba0e6e4144a8ea8a7f83 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:06:35 +0200 Subject: [PATCH 209/673] add minizip for install plugins --- recipes/armv7-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv7-dev.conf b/recipes/armv7-dev.conf index ced65e5e3..7259f952a 100644 --- a/recipes/armv7-dev.conf +++ b/recipes/armv7-dev.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged minizip source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie From 72c9ba8e5bcc98924190cedccc73c3d1fc258d58 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:07:19 +0200 Subject: [PATCH 210/673] add minizip for install plugins --- recipes/arm-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm-dev.conf b/recipes/arm-dev.conf index 40ce1885d..706e1cf6b 100644 --- a/recipes/arm-dev.conf +++ b/recipes/arm-dev.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget haveged minizip source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From 6bc9f9820681cf929e7d23b4c5be964c233b92be Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:08:25 +0200 Subject: [PATCH 211/673] add minizip for plugin install --- recipes/armv7.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 9a574718c..fd95a3cc9 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq minizip source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie From 5586e7449c92e1873693879759b966d0052edd5a Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:09:07 +0200 Subject: [PATCH 212/673] add minizip for plugin install --- recipes/armv8-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv8-dev.conf b/recipes/armv8-dev.conf index 36650638b..d76d91ba2 100644 --- a/recipes/armv8-dev.conf +++ b/recipes/armv8-dev.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged minizip source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie From d0de34283d35e23108d77bb612b8494e372fc1f6 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:09:49 +0200 Subject: [PATCH 213/673] add minizip for plugin install --- recipes/armv8.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv8.conf b/recipes/armv8.conf index f0127d1f4..1f0aa93fe 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged cpufrequtils jq minizip source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie From e754821d04d62ce30a57cd44022be26b44a4dbc0 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:10:31 +0200 Subject: [PATCH 214/673] add minizip for plugin install --- recipes/minimal.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/minimal.conf b/recipes/minimal.conf index d4af45fdf..0ddd35363 100644 --- a/recipes/minimal.conf +++ b/recipes/minimal.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp +packages=nano psmisc git wget ethtool curl ca-certificates ntp minizip source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From f13e2cacc93c3763367f3629a3df516fb5ea54f8 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:11:11 +0200 Subject: [PATCH 215/673] add minizip for plugin install --- recipes/x86-dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/x86-dev.conf b/recipes/x86-dev.conf index 6a128f3cc..700f0c1d2 100755 --- a/recipes/x86-dev.conf +++ b/recipes/x86-dev.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp +packages=nano psmisc git wget ethtool curl ca-certificates ntp minizip source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 0b3634c0f75443cf0a78dd89ef462aec542d5210 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 17 Jun 2017 00:11:47 +0200 Subject: [PATCH 216/673] add minizip for plugin install --- recipes/x86.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index 8008abc8b..5ee79e7c5 100755 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -31,7 +31,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge cpufrequtils jq +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge cpufrequtils jq minizip source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 7c60774f7dd49da35c782c5189bfc7020b7cefde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 21 Jun 2017 15:19:08 +0200 Subject: [PATCH 217/673] Fixed hardcoded arm issue --- scripts/bpiproimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bpiproimage.sh b/scripts/bpiproimage.sh index a19790399..402a8ce1a 100755 --- a/scripts/bpiproimage.sh +++ b/scripts/bpiproimage.sh @@ -113,7 +113,7 @@ mkdir /mnt/volumio/rootfs/boot mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" -cp -pdR build/arm/root/* /mnt/volumio/rootfs +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying BPI-PRO boot files" cp platform-banana/bpi-pro/boot/uImage /mnt/volumio/rootfs/boot/ cp platform-banana/bootp01/* /mnt/volumio/rootfs/boot/ From 5ed5b01566a89408ae5446629bdea4bfec4b43c0 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 22 Jun 2017 16:20:06 +0800 Subject: [PATCH 218/673] Improve shellscript syntax --- build.sh | 204 +++++++++++++++--------------- volumio/bin/dynswap.sh | 32 ++--- volumio/bin/hotspot.sh | 34 ++--- volumio/bin/rename_netiface0.sh | 14 +- volumio/opt/vc/bin/dtoverlay-post | 6 +- volumio/opt/vc/bin/dtoverlay-pre | 6 +- 6 files changed, 149 insertions(+), 147 deletions(-) diff --git a/build.sh b/build.sh index fd0f99555..98755c124 100755 --- a/build.sh +++ b/build.sh @@ -8,9 +8,9 @@ # parted squashfs-tools dosfstools multistrap qemu binfmt-support qemu-user-static kpartx #Set fonts for Help. -NORM=`tput sgr0` -BOLD=`tput bold` -REV=`tput smso` +NORM=$(tput sgr0) +BOLD=$(tput bold) +REV=$(tput smso) ARCH=none #Help function @@ -43,24 +43,24 @@ Example: Build a Raspberry PI image from scratch, version 2.0 : #$1 = ${BUILD} $2 = ${VERSION} $3 = ${DEVICE}" function check_os_release { ARCH_BUILD=$1 - HAS_VERSION=$(grep -c VOLUMIO_VERSION build/${ARCH_BUILD}/root/etc/os-release) + HAS_VERSION=$(grep -c VOLUMIO_VERSION "build/${ARCH_BUILD}/root/etc/os-release") VERSION=$2 DEVICE=$3 if [ "$HAS_VERSION" -ne "0" ]; then # os-release already has a VERSION number # cut the last 2 lines in case other devices are being built from the same rootfs - head -n -2 build/${ARCH_BUILD}/root/etc/os-release > build/${ARCH_BUILD}/root/etc/tmp-release - mv build/${ARCH_BUILD}/root/etc/tmp-release build/${ARCH_BUILD}/root/etc/os-release + head -n -2 "build/${ARCH_BUILD}/root/etc/os-release" > "build/${ARCH_BUILD}/root/etc/tmp-release" + mv "build/${ARCH_BUILD}/root/etc/tmp-release" "build/${ARCH_BUILD}/root/etc/os-release" fi - echo "VOLUMIO_VERSION=\"${VERSION}\"" >> build/${ARCH_BUILD}/root/etc/os-release - echo "VOLUMIO_HARDWARE=\"${DEVICE}\"" >> build/${ARCH_BUILD}/root/etc/os-release + echo "VOLUMIO_VERSION=\"${VERSION}\"" >> "build/${ARCH_BUILD}/root/etc/os-release" + echo "VOLUMIO_HARDWARE=\"${DEVICE}\"" >> "build/${ARCH_BUILD}/root/etc/os-release" } #Check the number of arguments. If none are passed, print help and exit. NUMARGS=$# -if [ $NUMARGS -eq 0 ]; then +if [ "$NUMARGS" -eq 0 ]; then HELP fi @@ -99,7 +99,7 @@ done shift $((OPTIND-1)) echo "Checking whether we are running as root" -if [ $(id -u) -ne 0 ]; then +if [ "$(id -u)" -ne 0 ]; then echo "Please run the build script as root" exit fi @@ -109,30 +109,30 @@ if [ -z "${VARIANT}" ]; then fi if [ -n "$BUILD" ]; then - CONF=recipes/$BUILD.conf + CONF="recipes/$BUILD.conf" if [ "$BUILD" = arm ] || [ "$BUILD" = arm-dev ]; then ARCH="armhf" - BUILD=arm + BUILD="arm" echo "Building ARM Base System with Raspbian" elif [ "$BUILD" = armv7 ] || [ "$BUILD" = armv7-dev ]; then ARCH="armhf" - BUILD="armv7" + BUILD="armv7" echo "Building ARMV7 Base System with Debian" elif [ "$BUILD" = armv8 ] || [ "$BUILD" = armv8-dev ]; then ARCH="arm64" - BUILD="armv8" + BUILD="armv8" echo "Building ARMV8 (arm64) Base System with Debian" elif [ "$BUILD" = x86 ] || [ "$BUILD" = x86-dev ]; then echo 'Building X86 Base System with Debian' ARCH="i386" - BUILD="x86" + BUILD="x86" elif [ ! -f recipes/$BUILD.conf ]; then echo "Unexpected Base System architecture '$BUILD' - aborting." exit fi - if [ -d build/$BUILD ]; then + if [ -d "build/$BUILD" ]; then echo "Build folder exists, cleaning it" - rm -rf build/$BUILD + rm -rf "build/$BUILD" elif [ -d build ]; then echo "Build folder exists, leaving it" else @@ -140,50 +140,52 @@ if [ -n "$BUILD" ]; then mkdir build fi - mkdir build/$BUILD - mkdir build/$BUILD/root - multistrap -a $ARCH -f $CONF + mkdir "build/$BUILD" + mkdir "build/$BUILD/root" + multistrap -a "$ARCH" -f "$CONF" if [ ! "$BUILD" = x86 ]; then - echo "Build for arm/armv7/armv8 platform, copying qemu" - cp /usr/bin/qemu-arm-static build/$BUILD/root/usr/bin/ + echo "Build for arm/armv7/armv8 platform, copying qemu" + cp /usr/bin/qemu-arm-static "build/$BUILD/root/usr/bin/" fi - cp scripts/volumioconfig.sh build/$BUILD/root + cp scripts/volumioconfig.sh "build/$BUILD/root" - mount /dev build/$BUILD/root/dev -o bind - mount /proc build/$BUILD/root/proc -t proc - mount /sys build/$BUILD/root/sys -t sysfs + mount /dev "build/$BUILD/root/dev" -o bind + mount /proc "build/$BUILD/root/proc" -t proc + mount /sys "build/$BUILD/root/sys" -t sysfs echo 'Cloning Volumio Node Backend' - mkdir build/$BUILD/root/volumio + mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then - echo "Cloning Volumio with all its history" - git clone -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio - else - git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + echo "Cloning Volumio with all its history" + git clone -b master --single-branch https://github.com/volumio/Volumio2.git "build/$BUILD/root/volumio" + else + git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git "build/$BUILD/root/volumio" fi echo 'Cloning Volumio UI' - git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git build/$BUILD/root/volumio/http/www + git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" echo "Adding os-release infos" - echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release - echo "VOLUMIO_FE_VERSION=\"$(git --git-dir build/$BUILD/root/volumio/http/www/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release - echo "VOLUMIO_BE_VERSION=\"$(git --git-dir build/$BUILD/root/volumio/.git rev-parse HEAD)\"" >> build/$BUILD/root/etc/os-release - echo "VOLUMIO_ARCH=\"${BUILD}\"" >> build/$BUILD/root/etc/os-release + { + echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" + echo "VOLUMIO_FE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/http/www/.git" rev-parse HEAD)\"" + echo "VOLUMIO_BE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/.git" rev-parse HEAD)\"" + echo "VOLUMIO_ARCH=\"${BUILD}\"" + } >> "build/$BUILD/root/etc/os-release" if [ ! "$BUILD" = x86 ]; then - chroot build/$BUILD/root /bin/bash -x <<'EOF' + chroot "build/$BUILD/root" /bin/bash -x <<'EOF' su - ./volumioconfig.sh EOF else -echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register - chroot build/$BUILD/root /volumioconfig.sh + echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register + chroot "build/$BUILD/root" /volumioconfig.sh fi echo "Base System Installed" - rm build/$BUILD/root/volumioconfig.sh + rm "build/$BUILD/root/volumioconfig.sh" ###Dirty fix for mpd.conf TODO use volumio repo - cp volumio/etc/mpd.conf build/$BUILD/root/etc/mpd.conf + cp volumio/etc/mpd.conf "build/$BUILD/root/etc/mpd.conf" CUR_DATE=$(date) #Write some Version informations @@ -191,97 +193,97 @@ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2 echo "VOLUMIO_VARIANT=\"${VARIANT}\" VOLUMIO_TEST=\"FALSE\" VOLUMIO_BUILD_DATE=\"${CUR_DATE}\" -" >> build/${BUILD}/root/etc/os-release +" >> "build/${BUILD}/root/etc/os-release" echo "Unmounting Temp devices" - umount -l build/$BUILD/root/dev - umount -l build/$BUILD/root/proc - umount -l build/$BUILD/root/sys + umount -l "build/$BUILD/root/dev" + umount -l "build/$BUILD/root/proc" + umount -l "build/$BUILD/root/sys" # Setting up cgmanager under chroot/qemu leaves a mounted fs behind, clean it up - umount -l build/$BUILD/root/run/cgmanager/fs - sh scripts/configure.sh -b $BUILD + umount -l "build/$BUILD/root/run/cgmanager/fs" + sh scripts/configure.sh -b "$BUILD" fi if [ -n "$PATCH" ]; then echo "Copying Patch to Rootfs" - cp -rp $PATCH build/$BUILD/root/ + cp -rp "$PATCH" "build/$BUILD/root/" else PATCH='volumio' fi -case $DEVICE in +case "$DEVICE" in pi) echo 'Writing Raspberry Pi Image File' - check_os_release "arm" $VERSION $DEVICE - sh scripts/raspberryimage.sh -v $VERSION -p $PATCH - ;; + check_os_release "arm" "$VERSION" "$DEVICE" + sh scripts/raspberryimage.sh -v "$VERSION" -p "$PATCH" + ;; cuboxi) echo 'Writing Cubox-i Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/cuboxiimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/cuboxiimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; odroidc1) echo 'Writing Odroid-C1/C1+ Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/odroidc1image.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/odroidc1image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; odroidc2) echo 'Writing Odroid-C2 Image File' - check_os_release "armv7" $VERSION $DEVICE + check_os_release "armv7" "$VERSION" "$DEVICE" # this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 - sh scripts/odroidc2image.sh -v $VERSION -p $PATCH -a armv7 - ;; + sh scripts/odroidc2image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; odroidxu4) echo 'Writing Odroid-XU4 Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/odroidxu4image.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/odroidxu4image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; odroidx2) echo 'Writing Odroid-X2 Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/odroidx2image.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/odroidx2image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; sparky) echo 'Writing Sparky Image File' - check_os_release "arm" $VERSION $DEVICE - sh scripts/sparkyimage.sh -v $VERSION -p $PATCH -a arm - ;; + check_os_release "arm" "$VERSION" "$DEVICE" + sh scripts/sparkyimage.sh -v "$VERSION" -p "$PATCH" -a arm + ;; bbb) echo 'Writing BeagleBone Black Image File' - check_os_release "arm" $VERSION $DEVICE - sh scripts/bbbimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "arm" "$VERSION" "$DEVICE" + sh scripts/bbbimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; udooneo) echo 'Writing UDOO NEO Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/udooneoimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/udooneoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; udooqdl) echo 'Writing UDOO Quad/Dual Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/udooqdlimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/udooqdlimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; pine64) echo 'Writing Pine64 Image File' - check_os_release "armv7" $VERSION $DEVICE + check_os_release "armv7" "$VERSION" "$DEVICE" # this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 - sh scripts/pine64image.sh -v $VERSION -p $PATCH -a armv7 - ;; + sh scripts/pine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; bpim2u) echo 'Writing BPI-M2U Image File' - check_os_release "arm" $VERSION $DEVICE - sh scripts/bpim2uimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "arm" "$VERSION" "$DEVICE" + sh scripts/bpim2uimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; bpipro) echo 'Writing Banana PI PRO Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/bpiproimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/bpiproimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; armbian_*) - echo 'Writing armbian-based Image File' - check_os_release "arm" $VERSION $DEVICE - sh scripts/armbianimage.sh -v $VERSION -d "$DEVICE" -p $PATCH - ;; + echo 'Writing armbian-based Image File' + check_os_release "arm" "$VERSION" "$DEVICE" + sh scripts/armbianimage.sh -v "$VERSION" -d "$DEVICE" -p "$PATCH" + ;; tinkerboard) echo 'Writing Ausus Tinkerboard Image File' - check_os_release "armv7" $VERSION $DEVICE - sh scripts/tinkerimage.sh -v $VERSION -p $PATCH -a armv7 - ;; + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/tinkerimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; x86) echo 'Writing x86 Image File' - check_os_release "x86" $VERSION $DEVICE - sh scripts/x86image.sh -v $VERSION -p $PATCH; - ;; + check_os_release "x86" "$VERSION" "$DEVICE" + sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; + ;; esac #When the tar is created we can build the docker layer -if [ "$CREATE_DOCKER_LAYER" = 1 ]; then +if [ "$CREATE_DOCKER_LAYER" = 1 ]; then echo 'Creating docker layer' - DOCKER_UID="$(sudo docker import VolumioRootFS$VERSION.tar.gz $DOCKER_REPOSITORY_NAME)" - echo $DOCKER_UID + DOCKER_UID="$(sudo docker import "VolumioRootFS$VERSION.tar.gz" "$DOCKER_REPOSITORY_NAME")" + echo "$DOCKER_UID" fi diff --git a/volumio/bin/dynswap.sh b/volumio/bin/dynswap.sh index 9e9c45f5f..4fb335666 100755 --- a/volumio/bin/dynswap.sh +++ b/volumio/bin/dynswap.sh @@ -1,24 +1,24 @@ #!/bin/sh -RAMSIZE=`cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'` -SWAPDEVS=`cat /proc/swaps | wc -l` +RAMSIZE=$(grep MemTotal /proc/meminfo | awk '{ print $2 }') +SWAPDEVS=$(wc -l /proc/swaps) -if [ ${RAMSIZE} -le 512844 -a ${SWAPDEVS} -le 1 ]; then - echo "512 MB or less RAM Detected, need to enable swap" +if [ "${RAMSIZE}" -le 512844 ] && [ "${SWAPDEVS}" -le 1 ]; then + echo "512 MB or less RAM Detected, need to enable swap" if [ -e /data/swapfile ]; then - echo "Enabling Swap" - swapon /data/swapfile + echo "Enabling Swap" + swapon /data/swapfile else - echo "No Swapfile present, creating it..." - fallocate -l 512M /data/swapfile - echo "Securing Swap permissions" - chown root:root /data/swapfile - chmod 0600 /data/swapfile - echo "Preparing SwapFile" - mkswap /data/swapfile - echo "Enabling Swap" - swapon /data/swapfile - echo "Setting swappiness to 40" + echo "No Swapfile present, creating it..." + fallocate -l 512M /data/swapfile + echo "Securing Swap permissions" + chown root:root /data/swapfile + chmod 0600 /data/swapfile + echo "Preparing SwapFile" + mkswap /data/swapfile + echo "Enabling Swap" + swapon /data/swapfile + echo "Setting swappiness to 40" sysctl vm.swappiness=40 fi fi diff --git a/volumio/bin/hotspot.sh b/volumio/bin/hotspot.sh index a4c47bf59..76564e941 100755 --- a/volumio/bin/hotspot.sh +++ b/volumio/bin/hotspot.sh @@ -1,24 +1,24 @@ #!/bin/bash case "$1" in -'start') -MODULE=$(basename $(readlink /sys/class/net/wlan0/device/driver/module)) -ARCH=`/usr/bin/dpkg --print-architecture` + 'start') + MODULE=$(basename $(readlink /sys/class/net/wlan0/device/driver/module)) + ARCH=`/usr/bin/dpkg --print-architecture` -if [ $MODULE = "8192cu" -a $ARCH = "armhf" ] && !(modinfo $MODULE | grep '^depends:.*cfg80211.*' > /dev/null) ; then - echo "Launching Hostapd Edimax" -/usr/sbin/hostapd-edimax /etc/hostapd/hostapd-edimax.conf -else - echo "Launching Ordinary Hostapd" -/usr/sbin/hostapd /etc/hostapd/hostapd.conf -fi -;; -'stop') + if [ "$MODULE" = "8192cu" ] && [ "$ARCH" = "armhf" ] && !(modinfo "$MODULE" | grep -q '^depends:.*cfg80211.*') ; then + echo "Launching Hostapd Edimax" + /usr/sbin/hostapd-edimax /etc/hostapd/hostapd-edimax.conf + else + echo "Launching Ordinary Hostapd" + /usr/sbin/hostapd /etc/hostapd/hostapd.conf + fi + ;; -echo "Killing Hostapd" -/usr/bin/sudo /usr/bin/killall hostapd + 'stop') + echo "Killing Hostapd" + /usr/bin/sudo /usr/bin/killall hostapd -echo "Killing Dhcpd" -/usr/bin/sudo /usr/bin/killall dhcpd -;; + echo "Killing Dhcpd" + /usr/bin/sudo /usr/bin/killall dhcpd + ;; esac diff --git a/volumio/bin/rename_netiface0.sh b/volumio/bin/rename_netiface0.sh index 2123c04a4..efcc2ca31 100644 --- a/volumio/bin/rename_netiface0.sh +++ b/volumio/bin/rename_netiface0.sh @@ -7,10 +7,10 @@ if_name=$1 if_type=${if_name%%[0-9]*} -ifconfig $if_type"0" down -ifconfig $if_name down -ip link set dev $if_type"0" name $if_type"_temp_name" -ip link set dev $if_name name $if_type"0" -ip link set dev $if_type"_temp_name" name $if_name -ifconfig $if_name up -ifconfig $if_type"0" up +ifconfig "${if_type}0" down +ifconfig "$if_name" down +ip link set dev "${if_type}0" name "${if_type}_temp_name" +ip link set dev "$if_name" name "${if_type}0" +ip link set dev "${if_type}_temp_name" name "$if_name" +ifconfig "$if_name" up +ifconfig "${if_type}0" up diff --git a/volumio/opt/vc/bin/dtoverlay-post b/volumio/opt/vc/bin/dtoverlay-post index 477e32ee7..0153dea1c 100755 --- a/volumio/opt/vc/bin/dtoverlay-post +++ b/volumio/opt/vc/bin/dtoverlay-post @@ -1,10 +1,10 @@ #!/bin/bash if [ "$DISPLAY" == "" ]; then - export DISPLAY=":0.0" + export DISPLAY=":0.0" fi CMD="lxpanelctl alsastart >/dev/null" if [ $EUID -eq 0 ]; then - exec su volumio -c "$CMD" + exec su volumio -c "$CMD" else - exec $CMD + exec "$CMD" fi diff --git a/volumio/opt/vc/bin/dtoverlay-pre b/volumio/opt/vc/bin/dtoverlay-pre index 626d855a7..cd449db0a 100755 --- a/volumio/opt/vc/bin/dtoverlay-pre +++ b/volumio/opt/vc/bin/dtoverlay-pre @@ -1,10 +1,10 @@ #!/bin/bash if [ "$DISPLAY" == "" ]; then - export DISPLAY=":0.0" + export DISPLAY=":0.0" fi CMD="lxpanelctl alsastop >/dev/null" if [ $EUID -eq 0 ]; then - exec su volumio -c "$CMD" + exec su volumio -c "$CMD" else - exec $CMD + exec "$CMD" fi From 631c5bcee07796ea839b510cba083bea8f31aade Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 22 Jun 2017 16:24:35 +0800 Subject: [PATCH 219/673] Fix file permission --- recipes/x86-dev.conf | 0 recipes/x86.conf | 0 volumio/bin/rename_netiface0.sh | 0 volumio/bin/wifistart.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 recipes/x86-dev.conf mode change 100755 => 100644 recipes/x86.conf mode change 100644 => 100755 volumio/bin/rename_netiface0.sh mode change 100644 => 100755 volumio/bin/wifistart.sh diff --git a/recipes/x86-dev.conf b/recipes/x86-dev.conf old mode 100755 new mode 100644 diff --git a/recipes/x86.conf b/recipes/x86.conf old mode 100755 new mode 100644 diff --git a/volumio/bin/rename_netiface0.sh b/volumio/bin/rename_netiface0.sh old mode 100644 new mode 100755 diff --git a/volumio/bin/wifistart.sh b/volumio/bin/wifistart.sh old mode 100644 new mode 100755 From cd4bcd3797d6fffcd865a87b504fcb9c6af98bc6 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 27 Jun 2017 13:35:40 +0200 Subject: [PATCH 220/673] Adding travis for shellcheck --- .travis.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..9500c1d62 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: bash + +sudo: false + +addons: + apt: + sources: + - debian-sid + packages: + - shellcheck + - find + +script: + - find . -iname "*.sh" -exec shellcheck "{}" \; + +matrix: + fast_finish: true From 4909a7ba25556beae1e2e8bd1d07e4943f2d8395 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 27 Jun 2017 13:38:06 +0200 Subject: [PATCH 221/673] fix findutils --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9500c1d62..90ab97ae5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ addons: - debian-sid packages: - shellcheck - - find + - findutils script: - find . -iname "*.sh" -exec shellcheck "{}" \; From ecbf2b227542f3aa9dfcd5f059d4224e89cb05de Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 27 Jun 2017 13:42:19 +0200 Subject: [PATCH 222/673] remove shellcheck from recipe --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 90ab97ae5..b65264ff9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ addons: - debian-sid packages: - shellcheck - - findutils script: - find . -iname "*.sh" -exec shellcheck "{}" \; From b683717a6a7cb47b17057cd116d9e0db03f76853 Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 28 Jun 2017 10:27:16 +0200 Subject: [PATCH 223/673] Pi: removing redundant firmware installs no longer needed since addition of firmware-brcm80211 package on Mar 14, 2016 as per https://github.com/volumio/Build/commit/4ad9736e8ec06422fd61813fb200925e91f907ff#diff-e745f2542baf16ec9199d5c899b4900c apt-file list firmware-brcm80211 firmware-brcm80211: /lib/firmware/brcm/bcm43xx-0.fw firmware-brcm80211: /lib/firmware/brcm/bcm43xx_hdr-0.fw firmware-brcm80211: /lib/firmware/brcm/brcmfmac43143-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac43143.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac43241b0-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac43241b4-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac4329-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac4330-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac4334-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac4335-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac43362-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac43430-sdio.bin firmware-brcm80211: /lib/firmware/brcm/brcmfmac43430-sdio.txt firmware-brcm80211: /lib/firmware/brcm/brcmfmac4354-sdio.bin firmware-brcm80211: /usr/share/bug/firmware-brcm80211/presubj firmware-brcm80211: /usr/share/doc/firmware-brcm80211/changelog.gz firmware-brcm80211: /usr/share/doc/firmware-brcm80211/copyright --- scripts/raspberryconfig.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index a1068eeb5..2471a8fe9 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -102,13 +102,6 @@ echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/overlays/pi3-disable-wifi.dtbo fi -echo "Adding PI3 & PiZero W Wireless firmware" -wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.txt -P /lib/firmware/brcm/ -wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.bin -P /lib/firmware/brcm/ - -echo "Adding PI WIFI Wireless dongle firmware" -wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /lib/firmware/brcm/ - #echo "Adding raspi-config" #wget -P /raspi http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20151019_all.deb #dpkg -i /raspi/raspi-config_20151019_all.deb From 26007b14303f810fde1c93df5fe01e1a98575f05 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 28 Jun 2017 11:53:58 +0200 Subject: [PATCH 224/673] Revert "Pi: removing redundant firmware installs" This reverts commit b683717a6a7cb47b17057cd116d9e0db03f76853. --- scripts/raspberryconfig.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 2471a8fe9..a1068eeb5 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -102,6 +102,13 @@ echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/overlays/pi3-disable-wifi.dtbo fi +echo "Adding PI3 & PiZero W Wireless firmware" +wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.txt -P /lib/firmware/brcm/ +wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.bin -P /lib/firmware/brcm/ + +echo "Adding PI WIFI Wireless dongle firmware" +wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /lib/firmware/brcm/ + #echo "Adding raspi-config" #wget -P /raspi http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20151019_all.deb #dpkg -i /raspi/raspi-config_20151019_all.deb From 4a854c8b47541c8038306acdc144d4960623d87f Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 28 Jun 2017 14:04:39 +0200 Subject: [PATCH 225/673] restore backup of custom config.txt lines --- scripts/initramfs/init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 0f02eb5b2..d95b84436 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -239,7 +239,10 @@ if [ -e "/boot/kernel_update" ]; then echo "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot if [ -e "/mnt/imgpart/config.txt.bak" ]; then - cp /mnt/imgpart/config.txt.bak /boot/config.txt + echo "Restoring custom config.txt content" + I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` + echo "\n" >> /boot/config.txt + echo "$I2S" >> /boot/config.txt rm /mnt/imgpart/config.txt.bak fi rm /boot/kernel_update From 05f6b5ee0771959b3d9167eccfb97eb584eb20e2 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 28 Jun 2017 15:04:49 +0200 Subject: [PATCH 226/673] updater branch --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 98755c124..6e78dc896 100755 --- a/build.sh +++ b/build.sh @@ -159,7 +159,7 @@ if [ -n "$BUILD" ]; then echo "Cloning Volumio with all its history" git clone -b master --single-branch https://github.com/volumio/Volumio2.git "build/$BUILD/root/volumio" else - git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git "build/$BUILD/root/volumio" + git clone --depth 1 -b updater-rework --single-branch https://github.com/volumio/Volumio2.git "build/$BUILD/root/volumio" fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" From 975644ee5d276c4837edf0aaa1b04f8f5643eb5e Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 28 Jun 2017 18:53:22 +0200 Subject: [PATCH 227/673] upnp media info --- scripts/configure.sh | 2 +- volumio/usr/share/upmpdcli/description.xml | 35 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 volumio/usr/share/upmpdcli/description.xml diff --git a/scripts/configure.sh b/scripts/configure.sh index ec92b738f..01c51984f 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -88,7 +88,7 @@ chmod a+x build/$BUILD/root/bin/wifistart.sh #udev script cp volumio/bin/rename_netiface0.sh build/$BUILD/root/bin/rename_netiface0.sh chmod a+x build/$BUILD/root/bin/rename_netiface0.sh -#Plymouth +#Plymouth & upmpdcli files cp -rp volumio/usr/* build/$BUILD/root/usr/ #SSH cp volumio/bin/volumiossh.sh build/$BUILD/root/bin/volumiossh.sh diff --git a/volumio/usr/share/upmpdcli/description.xml b/volumio/usr/share/upmpdcli/description.xml new file mode 100644 index 000000000..b64f58b49 --- /dev/null +++ b/volumio/usr/share/upmpdcli/description.xml @@ -0,0 +1,35 @@ + + + + 1 + 0 + + + urn:schemas-upnp-org:device:MediaRenderer:1 + @FRIENDLYNAME@ + Volumio + https://volumio.org + The Audiophile Music Player + Volumio + 1.0 + https://volumio.org + 42 + uuid:@UUID@ + @ICONLIST@ + + @UPNPAV@ + + urn:schemas-upnp-org:service:ConnectionManager:1 + urn:upnp-org:serviceId:ConnectionManager + /upmpd/ConnectionManager.xml + /ctl/ConnectionManager + /evt/ConnectionManager + + @OPENHOME@ + + @PRESENTATION@ + + + @MEDIASERVER@ + + From 86bf136d410ba4744e65e642aa8aa6488551a2d7 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 1 Jul 2017 15:06:03 +0200 Subject: [PATCH 228/673] Pi: fix mrEngman install script invocation a close look at build log files shows ./install.sh invocation issues command in host OS rather in qemu. sh install.sh happens properly in wanted qemu environement checked ok with a new build. --- scripts/raspberryconfig.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index a1068eeb5..7eb3553c7 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -218,49 +218,49 @@ cd wifi echo "WIFI: 8192EU for armv7" wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * echo "WIFI: 8192EU for armv6" wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * echo "WIFI: 8812AU for armv7" wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * echo "WIFI: 8812AU for armv6" wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * echo "WIFI: 8188EU for armv7" wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * echo "WIFI: 8188EU for armv6" wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * echo "WIFI: MT7610 for armv7" wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * echo "WIFI: MT7610 for armv6" wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz -./install.sh +sh install.sh rm -rf * cd .. From da8888ef3a4e3ad987008a4ca9179b901bc86d32 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 1 Jul 2017 18:44:46 +0200 Subject: [PATCH 229/673] Pi: superfluous apt-get update just makes build longer... --- scripts/raspberryconfig.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index a1068eeb5..22acd03cb 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -321,7 +321,6 @@ fi fi echo "Installing winbind here, since it freezes networking" -apt-get update apt-get install -y winbind libnss-winbind echo "Finalising drivers installation with depmod on $KERNEL_VERSION+ and $KERNEL_VERSION-v7+" From 35ae239b8baff1141dec6d7cac6094ee991f268c Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 2 Jul 2017 10:48:50 +0200 Subject: [PATCH 230/673] Pi: mrengman install script fix It turns-out mrengman recently changed individual install scripts, moving kernel reference from explicit name to $(uname -r): https://www.raspberrypi.org/forums/viewtopic.php?p=1181745#p1181745 This breaks install under chroot as $(uname -r) refers to host build system (sth which could be improved improved in qemu use maybe with systemd-nspawn -D as per https://wiki.debian.org/RaspberryPi/qemu-user-static). So this fix restores explicit kernel name within each install scripts, so that they install fine again in Build system. --- scripts/raspberryconfig.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7eb3553c7..c62e9a7f7 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -218,48 +218,56 @@ cd wifi echo "WIFI: 8192EU for armv7" wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: 8192EU for armv6" wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh rm -rf * echo "WIFI: 8812AU for armv7" wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: 8812AU for armv6" wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh rm -rf * echo "WIFI: 8188EU for armv7" wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: 8188EU for armv6" wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh rm -rf * echo "WIFI: MT7610 for armv7" wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: MT7610 for armv6" wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz +sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh rm -rf * From 248700241ce3fe23f2f061b5346fdbae9062d547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 2 Jul 2017 15:27:35 +0200 Subject: [PATCH 231/673] initramfs: add option to echo to /dev/kmsg --- scripts/initramfs/init | 96 ++++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 41 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 9258f4025..30d1ac9df 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -15,6 +15,9 @@ mknod /dev/tty c 5 0 mdev -s +#Defaults which may be overridden by cmdline parameters +USE_KMSG="yes" + #Hardware specific adaptions HWDEVICE="$(cat /proc/cpuinfo | grep Hardware | awk '{print $3}' )" @@ -30,20 +33,16 @@ else OVERLAY=WITHWRKDIR fi -echo "Booting Volumio for $(cat /proc/cpuinfo | grep Hardware )" - -echo " This script mounts rootfs RO with an overlay RW layer." -if [ $OVERLAY == WITHWRKDIR ]; then - # For overlayfs version V22 or higher (modulename 'overlay') - modprobe overlay +# Display a message or print directly to /dev/kmsg +print_msg() { +if [ $USE_KMSG == yes ]; then + echo "initramfs:" $1 >> /dev/kmsg else - # For overlayfs version V20/V21 (modulename ='overlayfs') - modprobe overlayfs + echo "initramfs:" $1 fi -modprobe squashfs -modprobe nls_cp437 +} -# Parse the kernel command line from grub +# Parse the kernel command line CMDLINE="$(cat /proc/cmdline)" @@ -77,44 +76,59 @@ do bootdelay) BOOTDELAY=$value ;; + use_kmsg) + USE_KMSG=$value + ;; esac done +print_msg "Booting Volumio for $(cat /proc/cpuinfo | grep Hardware )" +print_msg " This script mounts rootfs RO with an overlay RW layer." +if [ $OVERLAY == WITHWRKDIR ]; then + # For overlayfs version V22 or higher (modulename 'overlay') + modprobe overlay +else + # For overlayfs version V20/V21 (modulename ='overlayfs') + modprobe overlayfs +fi +modprobe squashfs +modprobe nls_cp437 + if [ -z "${IMGPART}" ]; then - echo "Specify the squash image partition after the kernel command ${CMDLINE}" - echo "example: kernel... imgpart=/dev/sda2 imgfile=/gentoo.sqs" + print_msg "Specify the squash image partition after the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 imgfile=/gentoo.sqs" exec sh exit 0 fi if [ -z "${IMGFILE}" ]; then - echo "Specify the squash image file after the kernel command ${CMDLINE}" - echo "example: kernel... imgpart=/dev/sda2 imgfile=/gentoo.sqs" + print_msg "Specify the squash image file after the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 imgfile=/gentoo.sqs" exec sh exit 0 fi -echo IMGPART=${IMGPART} -echo IMGFILE=${IMGFILE} +print_msg IMGPART=${IMGPART} +print_msg IMGFILE=${IMGFILE} if [ ! -z "${BOOTDELAY}" ]; then - echo "Boot delay (except first time) will be ${BOOTDELAY} seconds" + print_msg "Boot delay (except first time) will be ${BOOTDELAY} seconds" fi # Retry mdev -s 3 times before throwing the towel for i in 1 2 3 4 5 6 do if [ ! -b "${IMGPART}" ]; then - echo "${IMGPART} not detected,retrying mdev in 5 seconds" + print_msg "${IMGPART} not detected,retrying mdev in 5 seconds" sleep 0.5 mdev -s else - blkid ${IMGPART} + print_msg `blkid ${IMGPART}` break fi done if [ ! -b "${IMGPART}" ]; then - echo "No partition with ${IMGPART} has been found" + print_msg "No partition with ${IMGPART} has been found" exec sh exit 0 fi @@ -130,27 +144,27 @@ mount -t ext4 ${IMGPART} /mnt/imgpart #when already present and a bootdelay parameter was specified then give the kernel the additional headstart # if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then - echo "Creating factory image, this will take a minute, please wait..." + print_msg "Creating factory image, this will take a minute, please wait..." cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh - echo "Factory image created" + print_msg "Factory image created" elif [ ! -z "${BOOTDELAY}" ]; then - echo "Doing a ${BOOTDELAY} second delay here to give kernel load a headstart" + print_msg "Doing a ${BOOTDELAY} second delay here to give kernel load a headstart" sleep ${BOOTDELAY} fi -echo "Checking for USB updates" +print_msg "Checking for USB updates" [ -e /dev/sda1 ] || mdev -s if [ -e /dev/sda1 ]; then [ -d /mnt/usb ] || mkdir /mnt/usb mount -t auto /dev/sda1 /mnt/usb #If there is a firmware file inside the usb if [ -e /mnt/usb/volumio.fir ]; then - echo "Firmware found, updating will take a few minutes, please wait..." + print_msg "Firmware found, updating will take a few minutes, please wait..." #when the partitions are mounted we can launch the update script volumio-init-updater fi if [ -e /mnt/usb/factory_reset ]; then - echo "Factory Reset on USB" + print_msg "Factory Reset on USB" mkdir /mnt/factory mount -t auto /dev/mmcblk0p1 /mnt/factory echo " " > /mnt/factory/factory_reset @@ -161,14 +175,14 @@ if [ -e /dev/sda1 ]; then umount /dev/sda1 rm -r /mnt/usb else - echo "No USB device detected (when incorrect, try adding 'bootdelay=5' to your boot cmdline)" + print_msg "No USB device detected (when incorrect, try adding 'bootdelay=5' to your boot cmdline)" fi # 2) init a loop pointing to the image file loop_free=$(losetup -f | sed s#p/#p#) if [ ! -e ${loop_free} ]; then - echo "Device node does not exist, creating it..." + print_msg "Device node does not exist, creating it..." # use last char from loop_device as minor device number minor=$(echo ${loop_free} | sed 's/.*\(.\)/\1/') mknod $loop_free b 7 $minor @@ -186,24 +200,24 @@ VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" mkdir /mnt/factory mount -t auto /dev/mmcblk0p1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then - echo "Executing factory reset" + print_msg "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data - echo "Factory reset executed: part I" + print_msg "Factory reset executed: part I" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset sync - echo "Factory reset executed: part II - end" + print_msg "Factory reset executed: part II - end" #Setting 5 second for rebooting after kernel panic (sometimes it happens after factory reset) echo 5 > /proc/sys/kernel/panic fi if [ -e "/mnt/factory/user_data" ]; then - echo "Deleting User Data" + print_msg "Deleting User Data" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data rm /mnt/factory/user_data - echo "User Data successfully deleted " + print_msg "User Data successfully deleted " fi umount /mnt/factory rm -r /mnt/factory @@ -211,12 +225,12 @@ rm -r /mnt/factory mkdir boot mount -t auto /dev/mmcblk0p1 /boot if [ -e "/boot/resize-volumio-datapart" ]; then -echo "Re-sizing Volumio data partition" +print_msg "Re-sizing Volumio data partition" END="$(parted -s /dev/mmcblk0 unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" parted -s /dev/mmcblk0 resizepart 3 ${END} e2fsck -fy /dev/mmcblk0p3 resize2fs /dev/mmcblk0p3 - echo "Volumio data partition succesfully resized" + print_msg "Volumio data partition succesfully resized" parted -s /dev/mmcblk0 unit MB print rm /boot/resize-volumio-datapart fi @@ -234,10 +248,10 @@ mount -t ext4 -o noatime /dev/mmcblk0p3 /mnt/ext # 5) mount the writable overlay to the static image if [ $OVERLAY == WITHWRKDIR ]; then [ -d /mnt/ext/work ] || mkdir -m 777 /mnt/ext/work - echo "With Option:" $OVERLAY + print_msg "With Option:" $OVERLAY mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union else - echo "Without Option:" $OVERLAY + print_msg "Without Option:" $OVERLAY mount -t overlayfs overlayfs /mnt/ext/union -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn fi @@ -251,10 +265,10 @@ chmod -R 777 /mnt/ext/union/imgpart umount /proc umount /sys -echo ${VOLUMIO_VERSION} -echo "Finish initramfs, continue booting Volumio" +print_msg ${VOLUMIO_VERSION} +print_msg "Finish initramfs, continue booting Volumio" exec switch_root /mnt/ext/union /sbin/init -echo "Failed to switch_root, dropping to a shell" +print_msg "Failed to switch_root, dropping to a shell" exec sh From 8b683085175bf285adf57b1e29b9fff301fd0ce2 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 4 Jul 2017 11:40:51 +0200 Subject: [PATCH 232/673] Pi: use Pi-Foundation wireless firmware packages firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 packages from Pi-Foundation (customized firmware-nonfree) include brcmfmac43143, brcmfmac43430-sdio, ralink mt7601u firmware & others, that Raspian & Debian repo may not have. Replaces #213 and fixes volumio/Volumio2#1080 on Pi Checked built image contains the expected files accordingly: volumio@volumio:~$ ls /lib/firmware RTL8192E ath6k mt7601u.bin rt3090.bin RTL8192SU av7110 mt7610u.bin rt3290.bin allo brcm mt7650u.bin rt73.bin ar3k carl9170-1.fw rt2561.bin rtl_nic ar5523.bin cis rt2561s.bin rtlwifi ar7010.fw dsp56k rt2661.bin usbdux_firmware.bin ar7010_1_1.fw htc_7010.fw rt2860.bin usbduxfast_firmware.bin ar9170.fw htc_9271.fw rt2870.bin usbduxsigma_firmware.bin ar9271.fw isci rt3070.bin ath3k-1.fw keyspan_pda rt3071.bin volumio@volumio:~$ ls /lib/firmware/brcm bcm43xx-0.fw brcmfmac43241b4-sdio.bin brcmfmac43362-sdio.bin bcm43xx_hdr-0.fw brcmfmac4329-sdio.bin brcmfmac43430-sdio.bin brcmfmac43143-sdio.bin brcmfmac4330-sdio.bin brcmfmac43430-sdio.txt brcmfmac43143.bin brcmfmac4334-sdio.bin brcmfmac4354-sdio.bin brcmfmac43241b0-sdio.bin brcmfmac4335-sdio.bin --- scripts/raspberryconfig.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7ec534988..e5ec0f5ee 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -42,7 +42,6 @@ deb-src http://archive.raspberrypi.org/debian/ jessie main ui " >> /etc/apt/sources.list.d/raspi.list echo "Adding Raspberrypi.org Repo Key" - wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key -O - | sudo apt-key add - echo "Installing R-pi specific binaries" @@ -95,6 +94,9 @@ Pin: release * Pin-Priority: -1" > /etc/apt/preferences apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depends on raspberrypi-bootloader +echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & few others firmware upgraging to Pi Foundations packages" +apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 + if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/bcm2708-rpi-0-w.dtb @@ -102,13 +104,6 @@ echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/overlays/pi3-disable-wifi.dtbo fi -echo "Adding PI3 & PiZero W Wireless firmware" -wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.txt -P /lib/firmware/brcm/ -wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43430-sdio.bin -P /lib/firmware/brcm/ - -echo "Adding PI WIFI Wireless dongle firmware" -wget http://repo.volumio.org/Volumio2/wireless-firmwares/brcmfmac43143.bin -P /lib/firmware/brcm/ - #echo "Adding raspi-config" #wget -P /raspi http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20151019_all.deb #dpkg -i /raspi/raspi-config_20151019_all.deb From 9be910656256f9cea531b025ea4469079845839b Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 4 Jul 2017 15:50:57 +0200 Subject: [PATCH 233/673] don't show recycle bins --- scripts/volumioconfig.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index e02549e83..0b13f0162 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -408,6 +408,11 @@ touch /var/lib/mpd/tag_cache chmod 777 /var/lib/mpd/tag_cache chmod 777 /var/lib/mpd/playlists +echo "Setting mpdignore file" +echo "@Recycle +#recycle +" > /var/lib/mpd/music/.mpdignore + echo "Setting mpc to bind to unix socket" export MPD_HOST=/run/mpd/socket From 4b77cb0bc05fab86d590df83d961a8db6b71ee3a Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 7 Jul 2017 15:22:37 +0200 Subject: [PATCH 234/673] new remote updater version --- scripts/volumioconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index fc9c95a0f..4bcb51363 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -243,9 +243,9 @@ if [ $(uname -m) = armv7l ]; then chmod a+x /usr/bin/zsync echo "Adding volumio-remote-updater" - wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.0-armhf.deb - dpkg -i volumio-remote-updater_1.0-armhf.deb - rm volumio-remote-updater_1.0-armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.1-armhf.deb + dpkg -i volumio-remote-updater_1.1-armhf.deb + rm volumio-remote-updater_1.1-armhf.deb echo "Adding special version for edimax dongle" wget http://repo.volumio.org/Volumio2/Binaries/arm/hostapd-edimax -P /usr/sbin/ From d0fbb8b5b7f735d1d44600a296f67d7777d91736 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 7 Jul 2017 15:23:03 +0200 Subject: [PATCH 235/673] revert to old kernel --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index ead6705d5..dcd4942dd 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -59,7 +59,7 @@ mkdir /lib/modules # Kernel 4.4.9 for Pi3 Support # see https://github.com/raspberrypi/firmware/commit/cc6d7bf8b4c03a2a660ff9fdf4083fc165620866 # and https://github.com/Hexxeh/rpi-firmware/issues/118 -KERNEL_VERSION="4.9.31" +KERNEL_VERSION="4.4.9" case $KERNEL_VERSION in "4.4.9") From 06a191fb757cae032d6c98d6ce36c4e64392681c Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 28 Jun 2017 14:04:39 +0200 Subject: [PATCH 236/673] restore backup of custom config.txt lines --- scripts/initramfs/init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 293c55c0b..b6cca5cfb 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -239,7 +239,10 @@ if [ -e "/boot/kernel_update" ]; then echo "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot if [ -e "/mnt/imgpart/config.txt.bak" ]; then - cp /mnt/imgpart/config.txt.bak /boot/config.txt + echo "Restoring custom config.txt content" + I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` + echo "\n" >> /boot/config.txt + echo "$I2S" >> /boot/config.txt rm /mnt/imgpart/config.txt.bak fi rm /boot/kernel_update From c0f500d8ee4aa03aaed7eb3f3b85d387d52d2eb8 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 7 Jul 2017 21:03:53 +0200 Subject: [PATCH 237/673] Almost done --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 1c8de3de8..c67dcbe5c 100755 --- a/build.sh +++ b/build.sh @@ -157,7 +157,7 @@ if [ -n "$BUILD" ]; then mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then echo "Cloning Volumio with all its history" - git clone -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone -b volumionext --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio else git clone --depth 1 -b volumionext --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi From 8d9e0a15117b8904fbd7be055bd3a942499bdd4d Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 8 Jul 2017 12:26:32 +0200 Subject: [PATCH 238/673] Fix post merge issue in arm recipe --- recipes/arm.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index c4b60eeba..ef3295131 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -25,7 +25,6 @@ suite=jessie [Utils] packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie From 5cb994835ce01b673a5bb7353f98de912e56d2db Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 8 Jul 2017 12:29:45 +0200 Subject: [PATCH 239/673] Properly fix dynswap --- volumio/bin/dynswap.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/volumio/bin/dynswap.sh b/volumio/bin/dynswap.sh index ef7a50d42..4fb335666 100755 --- a/volumio/bin/dynswap.sh +++ b/volumio/bin/dynswap.sh @@ -21,8 +21,4 @@ if [ "${RAMSIZE}" -le 512844 ] && [ "${SWAPDEVS}" -le 1 ]; then echo "Setting swappiness to 40" sysctl vm.swappiness=40 fi - echo "Enabling Swap" - swapon /data/swapfile - echo "Setting swappiness to 40" - sysctl vm.swappiness=40 fi From 521d3dff4048cdac39d7dcf9f2af3d3c83727072 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 8 Jul 2017 13:00:43 +0200 Subject: [PATCH 240/673] Update dynswap according to macmpi PR --- volumio/bin/dynswap.sh | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/volumio/bin/dynswap.sh b/volumio/bin/dynswap.sh index 4fb335666..0c0de3b8d 100755 --- a/volumio/bin/dynswap.sh +++ b/volumio/bin/dynswap.sh @@ -1,24 +1,22 @@ #!/bin/sh -RAMSIZE=$(grep MemTotal /proc/meminfo | awk '{ print $2 }') -SWAPDEVS=$(wc -l /proc/swaps) +RAMSIZE=`cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'` +SWAPDEVS=`cat /proc/swaps | wc -l` -if [ "${RAMSIZE}" -le 512844 ] && [ "${SWAPDEVS}" -le 1 ]; then +if [ ${RAMSIZE} -le 512844 -a ${SWAPDEVS} -le 1 ]; then echo "512 MB or less RAM Detected, need to enable swap" - if [ -e /data/swapfile ]; then - echo "Enabling Swap" - swapon /data/swapfile - else - echo "No Swapfile present, creating it..." - fallocate -l 512M /data/swapfile - echo "Securing Swap permissions" - chown root:root /data/swapfile - chmod 0600 /data/swapfile - echo "Preparing SwapFile" - mkswap /data/swapfile - echo "Enabling Swap" - swapon /data/swapfile - echo "Setting swappiness to 40" - sysctl vm.swappiness=40 + if [ ! -e /data/swapfile ]; then + echo "No Swapfile present, creating it..." + fallocate -l 512M /data/swapfile + echo "Securing Swap permissions" + chown root:root /data/swapfile + chmod 0600 /data/swapfile + echo "Preparing SwapFile" + mkswap /data/swapfile fi + + echo "Enabling Swap" + swapon /data/swapfile + echo "Setting swappiness to 40" + sysctl vm.swappiness=40 fi From 90801ebff98108b1d15771d5cb330d95b103bb06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 11 Jul 2017 18:37:49 +0200 Subject: [PATCH 241/673] Initial support for new hardware --- build.sh | 14 ++- scripts/initramfs/init | 44 ++++++--- scripts/initramfs/init-x86 | 110 ++++++++++++--------- scripts/rock64config.sh | 91 +++++++++++++++++ scripts/rock64image.sh | 197 ++++++++++++++++++++++++++++++++++++ scripts/sopine64image.sh | 198 +++++++++++++++++++++++++++++++++++++ scripts/vszeroconfig.sh | 90 +++++++++++++++++ scripts/vszeroimage.sh | 173 ++++++++++++++++++++++++++++++++ 8 files changed, 851 insertions(+), 66 deletions(-) create mode 100755 scripts/rock64config.sh create mode 100755 scripts/rock64image.sh create mode 100755 scripts/sopine64image.sh create mode 100755 scripts/vszeroconfig.sh create mode 100755 scripts/vszeroimage.sh diff --git a/build.sh b/build.sh index c67dcbe5c..cef177a6e 100755 --- a/build.sh +++ b/build.sh @@ -27,7 +27,7 @@ Switches: -d Create Image for Specific Devices. Supported device names: pi, udooneo, udooqdl, cuboxi, cubietruck, compulab, odroidc1, odroidc2, odroidxu4, sparky, bbb, pine64, - bpim2u, bpipro, tinkerboard + bpim2u, bpipro, tinkerboard, sopine64, rock64, voltastream0 -v Version must be a dot separated number. Example 1.102 . -l Create docker layer. Give a Docker Repository name as the argument. @@ -275,6 +275,18 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/tinkerimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + sopine64) echo 'Writing Sopine64 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/sopine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; + rock64) echo 'Writing Rock64 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/rock64image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; + voltastream0) echo 'Writing PV Voltastream0 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/vszeroimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; x86) echo 'Writing x86 Image File' check_os_release "x86" "$VERSION" "$DEVICE" sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; diff --git a/scripts/initramfs/init b/scripts/initramfs/init index f3d2fab82..20cfe40f6 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -17,21 +17,8 @@ mdev -s #Defaults which may be overridden by cmdline parameters USE_KMSG="yes" - -#Hardware specific adaptions - -HWDEVICE="$(cat /proc/cpuinfo | grep Hardware | awk '{print $3}' )" -if [ $HWDEVICE == ODROID-C2 ] ; then - exec >/dev/kmsg 2>&1 /dev/kmsg 2>&1 /dev/kmsg 2>&1 /dev/kmsg 2>&1 > /dev/kmsg +else + echo "initramfs:" $1 +fi +} + +#Defaults which may be overridden by cmdline parameters +USE_KMSG="yes" + +print_msg "Preparing Volumio Boot Process for X86" # -- checking if a firmware update is available on the # first partition of any additional USB device # -- resizing a newly flashed Volumio device @@ -36,7 +48,7 @@ echo "Preparing Volumio Boot Process for X86" # -- creating the overlay fs # (rootfs RO and volumio_data (RW) -echo "Loading the necessary modules..." +print_msg "Loading the necessary modules..." modprobe overlay modprobe squashfs @@ -62,7 +74,7 @@ modprobe hid_cherry modprobe hid_generic modprobe loop -echo "Mounting the basic files systems..." +print_msg "Mounting the basic files systems..." [ -d /proc ] || mkdir /proc mount -t proc none /proc [ -d /sys ] || mkdir /sys @@ -71,7 +83,7 @@ mount -t sysfs none /sys mknod /dev/null c 1 3 mknod /dev/tty c 5 0 -echo "Now probing usb and pci storage..." +print_msg "Now probing usb and pci storage..." modprobe usb_storage modprobe libata modprobe libahci @@ -87,13 +99,10 @@ modprobe sata_sis modprobe sata_via modprobe ata_generic -echo "Waiting for storage devices to become ready" +print_msg "Waiting for storage devices to become ready" sleep 5 mdev -s -#uncomment when console out needs to include kenel and initrd messages (debugging) -#exec >/dev/kmsg 2>&1 /dev/null 2>&1 < /dev/null 2>&1 - echo "Checking " $usb_dev"1 for a volumio rootfs update" + print_msg "Checking " $usb_dev"1 for a volumio rootfs update" if [ -e /mnt/usb/volumio.fir ]; then - echo "New rootfs firmware found" - echo "Updating will take several minutes, please wait...." + print_msg "New rootfs firmware found" + print_msg "Updating will take several minutes, please wait...." volumio-init-updater umount /mnt/usb > /dev/null 2>&1 break @@ -216,19 +228,19 @@ for devlink in /dev/sd* fi usb_done=${usb_dev} done -echo "Checking for factory reset on an additional device" +print_msg "Checking for factory reset on an additional device" for devlink in /dev/sd* do # only checking the first partition of an additional device! usb_dev=$(echo ${devlink} | sed 's/[0-9]*//g') if [ ${usb_done} != ${usb_dev} ] && [ ${BOOT_DEVICE} != ${usb_dev} ]; then mount -t auto $(echo ${usb_dev}1) /mnt/usb > /dev/null 2>&1 - echo "Checking " $usb_dev"1 for a factory reset" + print_msg "Checking " $usb_dev"1 for a factory reset" if [ -e /mnt/usb/factory_reset ]; then mkdir /mnt/factory mount -t auto ${BOOT_DEVICE}1 /mnt/factory echo " " > /mnt/factory/factory_reset - echo "Factory reset initiated" + print_msg "Factory reset initiated" umount /mnt/factory rm -r /mnt/factory umount /mnt/usb > /dev/null 2>&1 @@ -246,23 +258,23 @@ rmdir /mnt/usb # ============================================================================ # # -echo "Checking for factory or user-data reset on boot device" +print_msg "Checking for factory or user-data reset on boot device" mkdir /mnt/factory mount -t vfat ${BOOT_DEVICE}1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then - echo "Executing factory reset..." + print_msg "Executing factory reset..." mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data - echo "Factory reset executed: part I" + print_msg "Factory reset executed: part I" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset - echo "Factory reset executed: part II - end" + print_msg "Factory reset executed: part II - end" fi if [ -e "/mnt/factory/user_data" ]; then - echo "Deleting User Data..." + print_msg "Deleting User Data..." mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data rm /mnt/factory/user_data - echo "User Data successfully deleted " + print_msg "User Data successfully deleted " fi umount /mnt/factory rm -r /mnt/factory @@ -271,16 +283,16 @@ rm -r /mnt/factory # Step 5: Re-size the data partition (if sentinel file present) # ============================================================= # -echo "Checking for data partition re-size" +print_msg "Checking for data partition re-size" mkdir boot mount -t vfat ${BOOTPART} /boot if [ -e "/boot/resize-volumio-datapart" ]; then - echo "Re-sizing Volumio data partition..." + print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" parted -s ${BOOT_DEVICE} resizepart 3 ${END} e2fsck -f ${BOOT_DEVICE}3 resize2fs ${BOOT_DEVICE}3 - echo "Volumio data partition succesfully resized" + print_msg "Volumio data partition succesfully resized" parted -s ${BOOT_DEVICE} unit MB print rm /boot/resize-volumio-datapart fi @@ -330,7 +342,7 @@ chmod -R 777 /mnt/ext/union/imgpart # This step fixes that # ============================================================================================ UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) -echo "Editing fstab to use UUID=" +print_msg "Editing fstab to use UUID=" if [ -e "/mnt/ext/union/etc/fstab.prev" ]; then rm /mnt/ext/union/etc/fstab.prev fi @@ -338,14 +350,14 @@ mv /mnt/ext/union/etc/fstab /mnt/ext/union/etc/fstab.prev cp /mnt/ext/union/etc/fstab.tmpl /mnt/ext/union/etc/fstab sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /mnt/ext/union/etc/fstab -echo ${VOLUMIO_VERSION} -echo "Finishing initramfs, switching rootfs and starting the boot process..." +print_msg ${VOLUMIO_VERSION} +print_msg "Finishing initramfs, switching rootfs and starting the boot process..." umount /proc umount /sys exec switch_root /mnt/ext/union /sbin/init -echo "Failed to switch_root, dropping to a shell" +print_msg "Failed to switch_root, dropping to a shell" exec sh diff --git a/scripts/rock64config.sh b/scripts/rock64config.sh new file mode 100755 index 000000000..b769eaa10 --- /dev/null +++ b/scripts/rock64config.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# ROCK64 fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk1p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "#!/bin/sh +sysctl abi.cp15_barrier=2 +" > /usr/local/bin/rock64-init.sh +chmod +x /usr/local/bin/rock64-init.sh + +echo "#!/bin/sh -e +/usr/local/bin/rock64-init.sh +exit 0" > /etc/rc.local + +echo "Adding default sound modules" +#echo " +#" >> /etc/modules + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep'" +echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uImage from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh new file mode 100755 index 000000000..da3f5ddfb --- /dev/null +++ b/scripts/rock64image.sh @@ -0,0 +1,197 @@ +#!/bin/sh + +# Build Architecture Debian 32bit (to be changed to armv8) +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-rock64.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware (effectively needs ~16Mb) +sudo parted -s "${LOOP_DEV}" mklabel msdos +sudo parted -s "${LOOP_DEV}" mkpart primary fat32 20 84 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +sudo parted -s "${LOOP_DEV}" set 1 boot on +sudo parted -s "${LOOP_DEV}" print +sudo partprobe "${LOOP_DEV}" +sudo kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +sudo mkfs -t vfat -n BOOT "${BOOT_PART}" +sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" +sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the rock64 kernel/ platform files" +if [ -d platform-rock64 ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-rock64 folder + # that will refresh the platform files, see below +else + echo "Get rock64 files from repo" + git clone https://github.com/volumio/platform-rock64.git platform-rock64 + echo "Unpack the platform files" + cd platform-rock64 + tar xfJ rock.tar.xz + cd .. +fi + +echo "Copying the bootloader" +sudo dd if=platform-rock64/rock64/u-boot/idbloader.img of=${LOOP_DEV} seek=64 conv=notrunc +sudo dd if=platform-rock64/rock64/u-boot/uboot.img of=${LOOP_DEV} seek=16384 conv=notrunc +sudo dd if=platform-rock64/rock64/u-boot/trust.img of=${LOOP_DEV} seek=24576 conv=notrunc +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + sudo mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images +sudo mkdir /mnt/volumio/rootfs +sudo mkdir /mnt/volumio/rootfs/boot +sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs + +echo "Copying rock64 boot files" +mkdir /mnt/volumio/rootfs/boot/dtb +mkdir /mnt/volumio/rootfs/boot/extlinux +sudo cp platform-rock64/rock64/boot/Image /mnt/volumio/rootfs/boot +sudo cp platform-rock64/rock64/boot/dtb/*.dtb /mnt/volumio/rootfs/boot/ +sudo cp platform-rock64/rock64/boot/extlinux/* /mnt/volumio/rootfs/boot/extlinux +sudo cp platform-rock64/rock64/boot/config* /mnt/volumio/rootfs/boot + +echo "Copying rock64 modules and firmware" +sudo cp -pdR platform-rock64/rock64/lib/modules /mnt/volumio/rootfs/lib/ +sudo cp -pdR platform-rock64/rock64/lib/firmware /mnt/volumio/rootfs/lib/ + +sync + +echo "Preparing to run chroot for more rock64 configuration" +cp scripts/rock64config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/rock64config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/rock64config.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +#echo "Copying LIRC configuration files" +#sudo cp platform-rock64/rock64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc +#sudo cp platform-rock64/rock64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc +#sudo cp platform-rock64/rock64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc + +echo "==> rock64 device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#sudo rm -r platform-rock64 +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + sudo mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +sudo umount -l /mnt/volumio/images +sudo umount -l /mnt/volumio/rootfs/boot + +echo "Cleaning build environment" +rm -rf /mnt/volumio /mnt/boot + +sudo dmsetup remove_all +sudo losetup -d ${LOOP_DEV} +sync diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh new file mode 100755 index 000000000..ca8259d1d --- /dev/null +++ b/scripts/sopine64image.sh @@ -0,0 +1,198 @@ +#!/bin/sh + +# Build Architecture Debian 32bit (to be changed to armv8) +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-sopine64.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +sudo parted -s "${LOOP_DEV}" mklabel msdos +sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +sudo parted -s "${LOOP_DEV}" set 1 boot on +sudo parted -s "${LOOP_DEV}" print +sudo partprobe "${LOOP_DEV}" +sudo kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +sudo mkfs -t vfat -n BOOT "${BOOT_PART}" +sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" +sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the pine64 kernel/ platform files" +if [ -d platform-pine64 ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-pine64 folder + # that will refresh all the odroid platforms, see below +else + echo "Clone pine64 files from repo" + git clone https://github.com/volumio/platform-pine64.git platform-pine64 + echo "Unpack the platform files" + cd platform-pine64 + tar xfJ pine64.tar.xz + cd .. +fi + +echo "Copying the bootloader" +sudo dd if=platform-pine64/pine64/u-boot/boot0so.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 +sudo dd if=platform-pine64/pine64/u-boot/u-boot-with-dtb-so.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + sudo mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images +sudo mkdir /mnt/volumio/rootfs +sudo mkdir /mnt/volumio/rootfs/boot +sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying SOPINE A64 boot files" +mkdir /mnt/volumio/rootfs/boot/pine64 +sudo cp platform-pine64/pine64/boot/pine64/Image /mnt/volumio/rootfs/boot/pine64 +sudo cp platform-pine64/pine64/boot/pine64/*.dtb /mnt/volumio/rootfs/boot/pine64 +sudo cp platform-pine64/pine64/boot/uEnv.txt /mnt/volumio/rootfs/boot +sudo cp platform-pine64/pine64/boot/Image.version /mnt/volumio/rootfs/boot +sudo cp platform-pine64/pine64/boot/config* /mnt/volumio/rootfs/boot + +echo "Copying SOPINE A64 modules and firmware" +sudo cp -pdR platform-pine64/pine64/lib/modules /mnt/volumio/rootfs/lib/ +sudo cp -pdR platform-pine64/pine64/lib/firmware /mnt/volumio/rootfs/lib/ + +echo "Confguring ALSA with sane defaults" +sudo cp platform-pine64/pine64/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa + +sync + +echo "Preparing to run chroot for more SOPINE A64 configuration (equals pine64)" +cp scripts/pine64config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/pine64config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +#echo "Copying LIRC configuration files" +#sudo cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc +#sudo cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc +#sudo cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc + +echo "==> SOPINE A64 device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#sudo rm -r platform-pine64 +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + sudo mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +sudo umount -l /mnt/volumio/images +sudo umount -l /mnt/volumio/rootfs/boot + +echo "Cleaning build environment" +rm -rf /mnt/volumio /mnt/boot + +sudo dmsetup remove_all +sudo losetup -d ${LOOP_DEV} +sync diff --git a/scripts/vszeroconfig.sh b/scripts/vszeroconfig.sh new file mode 100755 index 000000000..1d30c31d6 --- /dev/null +++ b/scripts/vszeroconfig.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# Voltastreamer fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk1p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Adding default sound modules" +#echo " +# +#" >> /etc/modules + +echo "#!/bin/sh +echo 2 > /proc/irq/45/smp_affinity +" > /usr/local/bin/vszero-init.sh +chmod +x /usr/local/bin/vszero-init.sh + +echo "#!/bin/sh -e +/usr/local/bin/vszero-init.sh +exit 0" > /etc/rc.local + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep'" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd +echo "Cleaning up" +rm /boot/volumio.initrd diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh new file mode 100755 index 000000000..9ebb39542 --- /dev/null +++ b/scripts/vszeroimage.sh @@ -0,0 +1,173 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":d:v:p:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-voltastreamer0.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` + +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the Voltastreamer Zero kernel/ platform files" +if [ -d platform-pv ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-pv folder + # that will refresh all the pv platforms, see below +else + echo "Clone Polyvection files from repo" + git clone https://github.com/volumio/platform-pv.git platform-pv + echo "Unpack the Voltastreamer Zero platform files" + cd platform-pv + tar xfJ vszero.tar.xz + cd .. +fi + +echo "Copying the bootloader" +dd if=platform-pv/vszero/u-boot/u-boot-dtb.imx of=${LOOP_DEV} seek=1 bs=1k conv=notrunc +sync + +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying Voltastreamer boot files" +cp -R platform-pv/vszero/boot/* /mnt/volumio/rootfs/boot/ + +echo "Copying Voltastreamer modules and firmware" +cp -pdR platform-pv/vszero/lib/modules /mnt/volumio/rootfs/lib/ +cp -pdR platform-pv/vszero/lib/firmware /mnt/volumio/rootfs/lib/ +sync + +echo "Preparing to run chroot for more Voltastreamer configuration" +cp scripts/vszeroconfig.sh /mnt/volumio/rootfs +cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/vszeroconfig.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/vszeroconfig.sh + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> Voltastreamer Zero device installed" + +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +echo "Cleaning build environment" +rm -rf /mnt/volumio /mnt/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync From 903b8dc956c4c28b6db2c915293ddc14341ba947 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 12 Jul 2017 01:40:23 +0200 Subject: [PATCH 242/673] Back to master --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index cef177a6e..025764291 100755 --- a/build.sh +++ b/build.sh @@ -157,9 +157,9 @@ if [ -n "$BUILD" ]; then mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then echo "Cloning Volumio with all its history" - git clone -b volumionext --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio else - git clone --depth 1 -b volumionext --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" From 5d568ffb41f8047d1175ddf5ac2f6c82a1559592 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 12 Jul 2017 01:41:10 +0200 Subject: [PATCH 243/673] New Kernel 4.9.31 --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 06fd6ccec..fbc62bb1d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -59,7 +59,7 @@ mkdir /lib/modules # Kernel 4.4.9 for Pi3 Support # see https://github.com/raspberrypi/firmware/commit/cc6d7bf8b4c03a2a660ff9fdf4083fc165620866 # and https://github.com/Hexxeh/rpi-firmware/issues/118 -KERNEL_VERSION="4.4.9" +KERNEL_VERSION="4.9.31" case $KERNEL_VERSION in "4.4.9") From 799d012c4dd48da3f6012349d4f46ed3b0586387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 12 Jul 2017 18:24:37 +0200 Subject: [PATCH 244/673] commenting out a fail init script --- scripts/vszeroconfig.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/vszeroconfig.sh b/scripts/vszeroconfig.sh index 1d30c31d6..82254fe6f 100755 --- a/scripts/vszeroconfig.sh +++ b/scripts/vszeroconfig.sh @@ -21,14 +21,14 @@ echo "Adding default sound modules" # #" >> /etc/modules -echo "#!/bin/sh -echo 2 > /proc/irq/45/smp_affinity -" > /usr/local/bin/vszero-init.sh -chmod +x /usr/local/bin/vszero-init.sh - -echo "#!/bin/sh -e -/usr/local/bin/vszero-init.sh -exit 0" > /etc/rc.local +#echo "#!/bin/sh +#echo 2 > /proc/irq/45/smp_affinity +#" > /usr/local/bin/vszero-init.sh +#chmod +x /usr/local/bin/vszero-init.sh + +#echo "#!/bin/sh -e +#/usr/local/bin/vszero-init.sh +#exit 0" > /etc/rc.local echo "Installing additonal packages" apt-get update From 148f5204c181666f2ec4a0a0125a5830388f450d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 13 Jul 2017 19:29:48 +0200 Subject: [PATCH 245/673] Support for Kernel Updater on X86 --- scripts/initramfs/init-x86 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 4ffd7ee06..bf7bd8422 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -279,6 +279,31 @@ fi umount /mnt/factory rm -r /mnt/factory + +# if the update failed before completion +mkdir boot +mount -t vfat ${BOOTPART} /boot +if [ -e "/boot/update_process" ]; then +print_msg "Previous update attempt failed, restoring fallbacks" + cp /mnt/imgpart/kernel_fallback.tar /mnt/imgpart/kernel_current.tar + cp /mnt/imgpart/volumio_fallback.tar /mnt/imgpart/volumio_current.tar + if [-e "/boot/kernel_update" ]; then + rm /boot/kernel_update + fi + rm /boot/update_process +fi + +# if the kernel has been updated, and no error has occurred before completition +if [ -e "/boot/kernel_update" ]; then +print_msg "unpacking kernel" + tar xf /mnt/imgpart/kernel_current.tar -C /boot + rm /boot/kernel_update + sync + umount /boot + rm -rf /boot + echo b > /proc/sysrq-trigger +fi + # # Step 5: Re-size the data partition (if sentinel file present) # ============================================================= From b60b7c2616348da8072ef2dfac42eab6be947639 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 14 Jul 2017 14:02:22 +0200 Subject: [PATCH 246/673] adding remote updater x86 --- scripts/volumioconfig.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index faf1ab5d8..7fddef75b 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -364,8 +364,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] chmod a+x /usr/bin/zsync echo "Adding volumio-remote-updater" - wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater -P /usr/local/sbin/ - chmod a+x /usr/local/sbin/volumio-remote-updater + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.1-i386.deb + dpkg -i volumio-remote-updater_1.1-i386.deb + rm /volumio-remote-updater_1.1-i386.deb fi From 6e37ee51c7c82ce9916c9beec8bf69fa8a9dc934 Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 14 Jul 2017 15:47:46 +0200 Subject: [PATCH 247/673] Create kernel current tar on initx86 --- scripts/initramfs/init-x86 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index bf7bd8422..93c7a30bf 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -200,6 +200,13 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "Creating factory image, this will take a minute, please wait..." cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh print_msg "Factory image created" + print_msg "Creating archive for factory kernel..." + mkdir /mnt/factory + mount -t vfat ${BOOT_DEVICE}1 /mnt/factory + tar cf /mnt/imgpart/kernel_current.tar -C /mnt/factory . + cp /mnt/imgpart/kernel_current.tar /mnt/imgpart/kernel_factory.tar + umount /mnt/factory + rm -r /mnt/factory fi # From 584ea912b419fe12ec12850af664bc5bcb25a51a Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 14 Jul 2017 15:55:42 +0200 Subject: [PATCH 248/673] restore log messages for x86 --- volumio/etc/default/grub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index a8f4be3a9..6ad6aea03 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -6,7 +6,7 @@ GRUB_DEFAULT='' GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Volumio Audiophile Music player" -GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 " +GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 USE_KMSG=no" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs From de3d758a926f84a65c357e866c8a1ce3a12bec9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 14 Jul 2017 17:21:04 +0200 Subject: [PATCH 249/673] initramfs/init update --- scripts/initramfs/init | 28 +++++++++++++--------------- scripts/vszeroimage.sh | 14 +++++++------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 20cfe40f6..2c2e671d9 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -155,15 +155,13 @@ mount -t ext4 ${IMGPART} /mnt/imgpart #create recovery image when not yet present #when already present and a bootdelay parameter was specified then give the kernel the additional headstart # - - if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "Creating factory image, this will take a minute, please wait..." cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh print_msg "Factory image created" print_msg "Creating archive for factory kernel..." mkdir /mnt/factory - mount -t vfat /dev/mmcblk0p1 /mnt/factory + mount -t vfat /dev/${BOOTDEV}p1 /mnt/factory tar cf /mnt/imgpart/kernel_current.tar -C /mnt/factory . cp /mnt/imgpart/kernel_current.tar /mnt/imgpart/kernel_factory.tar umount /mnt/factory @@ -187,7 +185,7 @@ if [ -e /dev/sda1 ]; then if [ -e /mnt/usb/factory_reset ]; then print_msg "Factory Reset on USB" mkdir /mnt/factory - mount -t auto /dev/mmcblk0p1 /mnt/factory + mount -t auto /dev/${BOOTDEV}p1 /mnt/factory echo " " > /mnt/factory/factory_reset umount /mnt/factory rm -r /mnt/factory @@ -219,10 +217,10 @@ VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" #if there is factory file then format data partition # mkdir /mnt/factory -mount -t auto /dev/mmcblk0p1 /mnt/factory +mount -t auto /dev/${BOOTDEV}p1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset" - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/${BOOTDEV}p3 -L volumio_data print_msg "Factory reset executed: part I - User DATA Part" tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory print_msg "Factory reset executed: part II - Kernel" @@ -239,7 +237,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data" - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p3 -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/${BOOTDEV}p3 -L volumio_data rm /mnt/factory/user_data print_msg "User Data successfully deleted " fi @@ -249,7 +247,7 @@ rm -r /mnt/factory # if the update failed before completion mkdir boot -mount -t vfat /dev/mmcblk0p1 /boot +mount -t vfat /dev/${BOOTDEV}p1 /boot if [ -e "/boot/update_process" ]; then print_msg "Previous update attempt failed, restoring fallbacks" cp /mnt/imgpart/kernel_fallback.tar /mnt/imgpart/kernel_current.tar @@ -279,15 +277,15 @@ print_msg "unpacking kernel" fi # if data partition needs to be resized -mount -t auto /dev/mmcblk0p1 /boot +mount -t auto /dev/${BOOTDEV}p1 /boot if [ -e "/boot/resize-volumio-datapart" ]; then print_msg "Re-sizing Volumio data partition" - END="$(parted -s /dev/mmcblk0 unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" - parted -s /dev/mmcblk0 resizepart 3 ${END} - e2fsck -fy /dev/mmcblk0p3 - resize2fs /dev/mmcblk0p3 + END="$(parted -s /dev/${BOOTDEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" + parted -s /dev/${BOOTDEV} resizepart 3 ${END} + e2fsck -fy /dev/${BOOTDEV}p3 + resize2fs /dev/${BOOTDEV}p3 print_msg "Volumio data partition succesfully resized" - parted -s /dev/mmcblk0 unit MB print + parted -s /dev/${BOOTDEV} unit MB print rm /boot/resize-volumio-datapart fi @@ -298,7 +296,7 @@ rm -rf /boot # 4) mount a filesystem for write access to the static image # unclear: memory size? -o size=1024M [ -d /mnt/ext ] || mkdir -m 777 /mnt/ext -mount -t ext4 -o noatime /dev/mmcblk0p3 /mnt/ext +mount -t ext4 -o noatime /dev/${BOOTDEV}p3 /mnt/ext [ -d /mnt/ext/dyn ] || mkdir -m 777 /mnt/ext/dyn [ -d /mnt/ext/union ] || mkdir -m 777 /mnt/ext/union diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 9ebb39542..b365b7f69 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -15,7 +15,7 @@ while getopts ":d:v:p:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-voltastreamer0.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-voltastream0.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" @@ -53,7 +53,7 @@ mkfs -F -t ext4 -L volumio "${SYS_PART}" mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync -echo "Preparing for the Voltastreamer Zero kernel/ platform files" +echo "Preparing for the Voltastream Zero kernel/ platform files" if [ -d platform-pv ] then echo "Platform folder already exists - keeping it" @@ -62,7 +62,7 @@ then else echo "Clone Polyvection files from repo" git clone https://github.com/volumio/platform-pv.git platform-pv - echo "Unpack the Voltastreamer Zero platform files" + echo "Unpack the Voltastream Zero platform files" cd platform-pv tar xfJ vszero.tar.xz cd .. @@ -97,15 +97,15 @@ mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying Voltastreamer boot files" +echo "Copying Voltastream0 boot files" cp -R platform-pv/vszero/boot/* /mnt/volumio/rootfs/boot/ -echo "Copying Voltastreamer modules and firmware" +echo "Copying Voltastream0 modules and firmware" cp -pdR platform-pv/vszero/lib/modules /mnt/volumio/rootfs/lib/ cp -pdR platform-pv/vszero/lib/firmware /mnt/volumio/rootfs/lib/ sync -echo "Preparing to run chroot for more Voltastreamer configuration" +echo "Preparing to run chroot for more Voltastream0 configuration" cp scripts/vszeroconfig.sh /mnt/volumio/rootfs cp scripts/initramfs/init /mnt/volumio/rootfs/root cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin @@ -130,7 +130,7 @@ umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys -echo "==> Voltastreamer Zero device installed" +echo "==> Voltastream Zero device installed" sync From c8eda588e1fdbd003220b29497e6388173f00115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 15 Jul 2017 18:41:20 +0200 Subject: [PATCH 250/673] Pre-release version, with open issues --- scripts/vszeroimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index b365b7f69..95cc1f36f 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -61,7 +61,7 @@ then # that will refresh all the pv platforms, see below else echo "Clone Polyvection files from repo" - git clone https://github.com/volumio/platform-pv.git platform-pv + git clone https://github.com/gkkpch/platform-pv.git platform-pv echo "Unpack the Voltastream Zero platform files" cd platform-pv tar xfJ vszero.tar.xz From d859a5189d5b75537f8157f03181cc66c3413df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 23 Jul 2017 13:54:12 +0200 Subject: [PATCH 251/673] x86 kernel updater test prep --- scripts/vszeroimage.sh | 2 ++ scripts/x86config.sh | 11 +++-------- scripts/x86image.sh | 13 +++++++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 95cc1f36f..f6487ed74 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -103,6 +103,8 @@ cp -R platform-pv/vszero/boot/* /mnt/volumio/rootfs/boot/ echo "Copying Voltastream0 modules and firmware" cp -pdR platform-pv/vszero/lib/modules /mnt/volumio/rootfs/lib/ cp -pdR platform-pv/vszero/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying Voltastream0 inittab" +cp platform-pv/vszero/etc/inittab /mnt/volumio/rootfs/etc/ sync echo "Preparing to run chroot for more Voltastream0 configuration" diff --git a/scripts/x86config.sh b/scripts/x86config.sh index d93e4b55e..2d3012006 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -5,7 +5,6 @@ PATCH=$(cat /patch) echo "Initializing.." . init.sh - echo "Installing the kernel and creating initramfs" # Kernel version not known yet # Not brilliant, but safe enough as x86.sh only copied one image and one firmware package version @@ -14,6 +13,7 @@ dpkg -i linux-firmware-*_i386.deb KRNL=`ls -l /boot |grep vmlinuz | awk -F'vmlinuz-' '{print $2}'` cp e1000e.ko /lib/modules/$KRNL/kernel/drivers/net/ethernet/intel/e1000e/ +depmod $KRNL echo "Creating node/ nodejs symlinks to stay compatible with the armv6/v7 platforms" ln -s /usr/bin/nodejs /usr/local/bin/nodejs @@ -32,9 +32,6 @@ syslinux "${BOOT_PART}" echo " Getting the current kernel filename" KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` -#uncomment for debugging, also edit init-x86 to enable kernel & initrd messages -#DEBUG="console=ttyS0 console=tty0 ignore_loglevel" - echo " Creating syslinux.cfg template for Syslinux Legacy BIOS" echo "DEFAULT volumio @@ -62,8 +59,6 @@ sed -i "s/LINUX_ROOT_DEVICE=UUID=\${GRUB_DEVICE_UUID}/LINUX_ROOT_DEVICE=imgpart= echo "Setting grub image" cp /usr/share/plymouth/themes/volumio/volumio-logo16.png /boot/volumio.png - - echo " Creating grub config folder" mkdir -p /boot/grub @@ -83,7 +78,6 @@ EOF chmod +x /usr/sbin/policy-rc.d echo " Installing grub-efi-amd64 to make the 64bit UEFI bootloader" - apt-get update apt-get -y install grub-efi-amd64-bin grub-mkstandalone --compress=gz -O x86_64-efi -o /boot/efi/BOOT/BOOTX64.EFI -d /usr/lib/grub/x86_64-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" /boot/grub/grub.cfg @@ -91,6 +85,7 @@ if [ ! -e /boot/efi/BOOT/BOOTX64.EFI ]; then echo "Fatal error, no 64bit bootmanager created, aborting..." exit 1 fi + #we cannot install grub-efi-amd64 and grub-efi-ia32 on the same machine. #on the off-chance that we need a 32bit bootloader, we remove amd64 and install ia32 to generate one echo " Uninstalling grub-efi-amd64" @@ -115,6 +110,7 @@ rm /usr/sbin/policy-rc.d echo "Copying fstab as a template to be used in initrd" cp /etc/fstab /etc/fstab.tmpl + echo "Editing fstab to use UUID=" sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /etc/fstab @@ -157,7 +153,6 @@ WantedBy=multi-user.target " > /lib/systemd/system/volumio-kiosk.service ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service - echo " Allowing volumio to start an xsession" sed -i "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 786e9c360..47c969717 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -82,11 +82,16 @@ sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot cp scripts/x86config.sh /mnt/volumio/rootfs if [ ! -d platform-x86 ]; then echo "Platform files (packages) not available yet, getting them from the repo" - git clone http://github.com/volumio/platform-x86 + git clone http://github.com/gkkpch/platform-x86 fi -cp platform-x86/packages/linux-image-*.deb /mnt/volumio/rootfs -cp platform-x86/packages/linux-firmware-*.deb /mnt/volumio/rootfs -cp platform-x86/Intel-e1000e-3.3.4/e1000e.ko /mnt/volumio/rootfs +if [ -f platform-x86/packages/.next ]; then + cp platform-x86/packages/experimental/linux-image-*.deb /mnt/volumio/rootfs + cp platform-x86/packages/experimental/linux-firmware-*.deb /mnt/volumio/rootfs +else + cp platform-x86/packages/linux-image-*.deb /mnt/volumio/rootfs + cp platform-x86/packages/linux-firmware-*.deb /mnt/volumio/rootfs +fi +#cp platform-x86/Intel-e1000e-3.3.4/e1000e.ko /mnt/volumio/rootfs cp volumio/splash/volumio.png /mnt/volumio/rootfs/boot From 03253b75f659d8392641c1974a5552090ef7c63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 24 Jul 2017 13:56:17 +0200 Subject: [PATCH 252/673] Fixing initrd --- scripts/initramfs/init | 2 ++ scripts/initramfs/init-x86 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 2c2e671d9..0236b5a0f 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -257,6 +257,8 @@ print_msg "Previous update attempt failed, restoring fallbacks" fi rm /boot/update_process fi +umount /boot +rm -rf /boot # if the kernel has been updated, and no error has occurred before completition if [ -e "/boot/kernel_update" ]; then diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 93c7a30bf..1c03e23a9 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -299,6 +299,8 @@ print_msg "Previous update attempt failed, restoring fallbacks" fi rm /boot/update_process fi +umount /boot +rm -rf /boot # if the kernel has been updated, and no error has occurred before completition if [ -e "/boot/kernel_update" ]; then From d3b39a3ef6f0b2d4f22b1f74e0a67b216dfd5aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 24 Jul 2017 14:42:45 +0200 Subject: [PATCH 253/673] x86image.sh: create tarball from current kernel --- scripts/x86image.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 47c969717..9afc7621e 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -153,6 +153,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* From 12d37fcd38648efa3203d22e12e0276754bf22ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 24 Jul 2017 16:46:15 +0200 Subject: [PATCH 254/673] revert arm init change, modify init-86 --- scripts/initramfs/init | 2 -- scripts/initramfs/init-x86 | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 0236b5a0f..2c2e671d9 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -257,8 +257,6 @@ print_msg "Previous update attempt failed, restoring fallbacks" fi rm /boot/update_process fi -umount /boot -rm -rf /boot # if the kernel has been updated, and no error has occurred before completition if [ -e "/boot/kernel_update" ]; then diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 1c03e23a9..b9872a97f 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -299,8 +299,6 @@ print_msg "Previous update attempt failed, restoring fallbacks" fi rm /boot/update_process fi -umount /boot -rm -rf /boot # if the kernel has been updated, and no error has occurred before completition if [ -e "/boot/kernel_update" ]; then @@ -318,8 +316,8 @@ fi # ============================================================= # print_msg "Checking for data partition re-size" -mkdir boot -mount -t vfat ${BOOTPART} /boot +#mkdir boot +#mount -t vfat ${BOOTPART} /boot if [ -e "/boot/resize-volumio-datapart" ]; then print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" From a77f555340748245f64686830ec61e8aca217de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 24 Jul 2017 20:17:53 +0200 Subject: [PATCH 255/673] x86 kernel update: swap UUIDs in boot configs --- scripts/initramfs/init-x86 | 35 +++++++++++++++++++++++++---------- scripts/x86config.sh | 15 +++++++++++---- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index b9872a97f..a4db0bac3 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -286,12 +286,15 @@ fi umount /mnt/factory rm -r /mnt/factory - +# +# Step 5: Handling of kernel updates +# =========================================================== +# # if the update failed before completion mkdir boot mount -t vfat ${BOOTPART} /boot if [ -e "/boot/update_process" ]; then -print_msg "Previous update attempt failed, restoring fallbacks" + print_msg "Previous update attempt failed, restoring fallbacks" cp /mnt/imgpart/kernel_fallback.tar /mnt/imgpart/kernel_current.tar cp /mnt/imgpart/volumio_fallback.tar /mnt/imgpart/volumio_current.tar if [-e "/boot/kernel_update" ]; then @@ -301,9 +304,21 @@ print_msg "Previous update attempt failed, restoring fallbacks" fi # if the kernel has been updated, and no error has occurred before completition +# Retrieve current UUID of boot and image partition +# These need to be edited into the new boot configs to make the new update bootable if [ -e "/boot/kernel_update" ]; then -print_msg "unpacking kernel" + print_msg "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot + UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) + UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) + cp /boot/syslinux.cfg /boot/syslinux.cfg.old + cp /boot/syslinux.tmpl /boot/syslinux.cfg + sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg + sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg + cp /boot/grub/grub.cfg cp /boot/grub/grub.cfg.old + cp /boot/grub/grub.tmpl /boot/grub/grub.cfg + sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/grub/grub.cfg + sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/grub/grub.cfg rm /boot/kernel_update sync umount /boot @@ -312,7 +327,7 @@ print_msg "unpacking kernel" fi # -# Step 5: Re-size the data partition (if sentinel file present) +# Step 6: Re-size the data partition (if sentinel file present) # ============================================================= # print_msg "Checking for data partition re-size" @@ -332,7 +347,7 @@ umount /boot rm -r /boot # -# Step 6: mount the squashfs (RO) on /mnt/static +# Step 7: mount the squashfs (RO) on /mnt/static # ============================================== # loop_free=$(losetup -f | sed s#p/#p#) @@ -347,7 +362,7 @@ mount -t squashfs $loop_free /mnt/static VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" # -# Step 7: mount the dynamic (RW) datapart on /mnt/ext +# Step 8: mount the dynamic (RW) datapart on /mnt/ext # =================================================== # [ -d /mnt/ext ] || mkdir /mnt/ext @@ -356,7 +371,7 @@ mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext [ -d /mnt/ext/union ] || mkdir /mnt/ext/union [ -d /mnt/ext/work ] || mkdir /mnt/ext/work -# Step 8: Create the overlay from RO and RW partitions +# Step 9: Create the overlay from RO and RW partitions # ==================================================== mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union @@ -369,9 +384,9 @@ mount --move /mnt/imgpart /mnt/ext/union/imgpart chmod -R 777 /mnt/ext/union/imgpart -# Step 9: The UUID of the bootpartition could possibly not match the one used in fstab. -# This is the case when an new version of the squash file has been created. -# This step fixes that +# Step 10: The UUID of the bootpartition could possibly not match the one used in fstab. +# This is the case when an new version of the squash file has been created. +# This step fixes that # ============================================================================================ UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) print_msg "Editing fstab to use UUID=" diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 2d3012006..230dfa88b 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -32,15 +32,20 @@ syslinux "${BOOT_PART}" echo " Getting the current kernel filename" KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` -echo " Creating syslinux.cfg template for Syslinux Legacy BIOS" +echo " Creating run-time template for syslinux config" echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd -" > /boot/syslinux.cfg +" > /boot/syslinux.tmpl + +echo "Creating syslinux.cfg from template" +cp /boot/syslinux.tmpl /boot/syslinux.cfg +sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg +sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg echo "Installing Grub UEFI" echo " Editing the grub config template" @@ -65,9 +70,11 @@ mkdir -p /boot/grub echo " Applying Grub Configuration" grub-mkconfig -o /boot/grub/grub.cfg chmod +w boot/grub/grub.cfg +echo "Use current grub.cfg as run-time template" +cp /boot/grub/grub.cfg /boot/grub/grub.tmpl echo " Inserting root and boot partition label (building the boot cmdline used in initramfs)" -# Opting for finding partitions by-LABEL +# Opting for finding partitions by-UUID sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/grub/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/grub/grub.cfg From 2b2d3a3e9c2e5c64bb2b367f8dad7572be33311a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 24 Jul 2017 22:10:07 +0200 Subject: [PATCH 256/673] init-x86: no need to keep the templates --- scripts/initramfs/init-x86 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index a4db0bac3..b7329e94d 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -306,17 +306,18 @@ fi # if the kernel has been updated, and no error has occurred before completition # Retrieve current UUID of boot and image partition # These need to be edited into the new boot configs to make the new update bootable +# This is an update on an existing installation, remove the resize-volumio-datapart sentinel if [ -e "/boot/kernel_update" ]; then print_msg "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) - cp /boot/syslinux.cfg /boot/syslinux.cfg.old - cp /boot/syslinux.tmpl /boot/syslinux.cfg + mv /boot/syslinux.cfg /boot/syslinux.cfg.old + mv /boot/syslinux.tmpl /boot/syslinux.cfg sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg - cp /boot/grub/grub.cfg cp /boot/grub/grub.cfg.old - cp /boot/grub/grub.tmpl /boot/grub/grub.cfg + mv /boot/grub/grub.cfg /boot/grub/grub.cfg.old + mv /boot/grub/grub.tmpl /boot/grub/grub.cfg sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/grub/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/grub/grub.cfg rm /boot/kernel_update From b5502f52673ffce32b921725221b86afdac1d925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 25 Jul 2017 10:55:53 +0200 Subject: [PATCH 257/673] Preparing for the kernel updater --- scripts/armbianimage.sh | 11 ++++++++--- scripts/bbbimage.sh | 8 ++++++++ scripts/bpim2uimage.sh | 8 ++++++++ scripts/bpiproimage.sh | 8 ++++++++ scripts/cuboxiimage.sh | 8 ++++++++ scripts/odroidc1image.sh | 7 +++++++ scripts/odroidc2image.sh | 8 ++++++++ scripts/odroidx2image.sh | 8 ++++++++ scripts/odroidxu4image.sh | 8 ++++++++ scripts/rock64image.sh | 11 ++++++++--- scripts/sopine64image.sh | 11 ++++++++--- scripts/sparkyimage.sh | 8 ++++++++ scripts/tinkerimage.sh | 11 ++++++++--- scripts/udooneoimage.sh | 8 ++++++++ scripts/udooqdlimage.sh | 8 ++++++++ scripts/vszeroimage.sh | 13 ++++++++++--- 16 files changed, 129 insertions(+), 15 deletions(-) diff --git a/scripts/armbianimage.sh b/scripts/armbianimage.sh index 0ade346b6..657dc8032 100755 --- a/scripts/armbianimage.sh +++ b/scripts/armbianimage.sh @@ -153,6 +153,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* @@ -171,9 +179,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync diff --git a/scripts/bbbimage.sh b/scripts/bbbimage.sh index 7ac1c5ca3..3932189f5 100755 --- a/scripts/bbbimage.sh +++ b/scripts/bbbimage.sh @@ -154,6 +154,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/bpim2uimage.sh b/scripts/bpim2uimage.sh index 52c06f3ff..e0a6a8bd6 100755 --- a/scripts/bpim2uimage.sh +++ b/scripts/bpim2uimage.sh @@ -178,6 +178,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/bpiproimage.sh b/scripts/bpiproimage.sh index 21add5f17..ca618499e 100755 --- a/scripts/bpiproimage.sh +++ b/scripts/bpiproimage.sh @@ -174,6 +174,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index 9328f4334..bff725013 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -166,6 +166,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index f18d08859..794de12d8 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -181,6 +181,13 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index cf1df878d..0c0505585 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -177,6 +177,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidx2image.sh b/scripts/odroidx2image.sh index d647a0e4b..9499162b6 100755 --- a/scripts/odroidx2image.sh +++ b/scripts/odroidx2image.sh @@ -179,6 +179,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index fe86cadc9..8d1330937 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -169,6 +169,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index da3f5ddfb..8d37c254f 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -171,6 +171,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* @@ -189,9 +197,6 @@ echo "Unmounting Temp Devices" sudo umount -l /mnt/volumio/images sudo umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index ca8259d1d..76c3c95a3 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -172,6 +172,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* @@ -190,9 +198,6 @@ echo "Unmounting Temp Devices" sudo umount -l /mnt/volumio/images sudo umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index 6e37b2226..c180204e7 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -160,6 +160,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 0c991a56d..67a3882d7 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -152,6 +152,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* @@ -170,9 +178,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 9e3c246f4..445567c06 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -163,6 +163,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index c76550158..b5a1d0341 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -156,6 +156,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index f6487ed74..085d3e6a2 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -105,6 +105,8 @@ cp -pdR platform-pv/vszero/lib/modules /mnt/volumio/rootfs/lib/ cp -pdR platform-pv/vszero/lib/firmware /mnt/volumio/rootfs/lib/ echo "Copying Voltastream0 inittab" cp platform-pv/vszero/etc/inittab /mnt/volumio/rootfs/etc/ +echo "Copying Voltastream0 asound.conf (setup ASRC resampling)" +cp platform-pv/vszero/etc/asound.conf /mnt/volumio/rootfs/etc/ sync echo "Preparing to run chroot for more Voltastream0 configuration" @@ -149,6 +151,14 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* @@ -167,9 +177,6 @@ echo "Unmounting Temp Devices" umount -l /mnt/volumio/images umount -l /mnt/volumio/rootfs/boot -echo "Cleaning build environment" -rm -rf /mnt/volumio /mnt/boot - dmsetup remove_all losetup -d ${LOOP_DEV} sync From 4255f4b7544403265e8e6a2e6173ffabab814a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 25 Jul 2017 14:48:09 +0200 Subject: [PATCH 258/673] vszero/x86: changing to volumio platform repo --- scripts/vszeroimage.sh | 2 +- scripts/x86image.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 085d3e6a2..7955acd7b 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -61,7 +61,7 @@ then # that will refresh all the pv platforms, see below else echo "Clone Polyvection files from repo" - git clone https://github.com/gkkpch/platform-pv.git platform-pv + git clone https://github.com/volumio/platform-pv.git platform-pv echo "Unpack the Voltastream Zero platform files" cd platform-pv tar xfJ vszero.tar.xz diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 9afc7621e..859f583f0 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -82,7 +82,7 @@ sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot cp scripts/x86config.sh /mnt/volumio/rootfs if [ ! -d platform-x86 ]; then echo "Platform files (packages) not available yet, getting them from the repo" - git clone http://github.com/gkkpch/platform-x86 + git clone http://github.com/volumio/platform-x86 fi if [ -f platform-x86/packages/.next ]; then cp platform-x86/packages/experimental/linux-image-*.deb /mnt/volumio/rootfs From 6f82d924e1cb24bb4c8cd1c8b0d1fc00a45d2e6a Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 25 Jul 2017 18:23:36 +0200 Subject: [PATCH 259/673] Improve Raspberry Audio Jack Audio setting audio_pwm_mode=2 --- scripts/raspberryconfig.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index fbc62bb1d..b243777ef 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -129,6 +129,7 @@ echo "initramfs volumio.initrd gpu_mem=16 max_usb_current=1 dtparam=audio=on +audio_pwm_mode=2 dtparam=i2c_arm=on disable_splash=1" >> /boot/config.txt From 5ba421bc7e1445d27bb1bb595bef82b8e60cdc10 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 26 Jul 2017 12:42:20 +0200 Subject: [PATCH 260/673] pi kernel to 4.9.36 --- scripts/raspberryconfig.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b243777ef..c2e7a7099 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -56,10 +56,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -# Kernel 4.4.9 for Pi3 Support -# see https://github.com/raspberrypi/firmware/commit/cc6d7bf8b4c03a2a660ff9fdf4083fc165620866 -# and https://github.com/Hexxeh/rpi-firmware/issues/118 -KERNEL_VERSION="4.9.31" +KERNEL_VERSION="4.9.36" case $KERNEL_VERSION in "4.4.9") @@ -67,9 +64,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.31") - KERNEL_REV="1005" - KERNEL_COMMIT="9e6a1a545ef33ac6cc3805845cb3ecac26514a41" + "4.9.36") + KERNEL_REV="1015" + KERNEL_COMMIT="400f6d196503e50b87025b888169f30214bc0f19" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 96470ac9d355bc45a4452979014a58fcc228beef Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 28 Jul 2017 12:34:10 +0200 Subject: [PATCH 261/673] Fix folders for USB Update --- scripts/initramfs/init | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 2c2e671d9..d8c354b72 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -178,9 +178,16 @@ if [ -e /dev/sda1 ]; then mount -t auto /dev/sda1 /mnt/usb #If there is a firmware file inside the usb if [ -e /mnt/usb/*.fir ]; then - print_msg "Firmware found, updating will take a few minutes, please wait..." + print_msg "Firmware found, updating will take a few minutes, please wait..." + mkdir /mnt/boot + mount -t auto /dev/${BOOTDEV}p1 /mnt/boot #when the partitions are mounted we can launch the update script volumio-init-updater + print_msg "USB Update applied" + umount /mnt/boot + rm -r /mnt/boot + print_msg "Restarting" + echo b > /proc/sysrq-trigger fi if [ -e /mnt/usb/factory_reset ]; then print_msg "Factory Reset on USB" From fb65c16a57a73890406cc5e25c914b1991eb33bc Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 28 Jul 2017 16:17:38 +0200 Subject: [PATCH 262/673] sync after usb update --- scripts/initramfs/init | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index d8c354b72..301fddcc2 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -183,6 +183,7 @@ if [ -e /dev/sda1 ]; then mount -t auto /dev/${BOOTDEV}p1 /mnt/boot #when the partitions are mounted we can launch the update script volumio-init-updater + sync print_msg "USB Update applied" umount /mnt/boot rm -r /mnt/boot From 299063685297751eeedd064e24e4eed6e7e63f32 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 28 Jul 2017 16:25:42 +0200 Subject: [PATCH 263/673] x86 usb updater --- scripts/initramfs/init-x86 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index b7329e94d..3411a6cb8 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -222,14 +222,19 @@ for devlink in /dev/sd* # only checking the first partition of an additional device! usb_dev=$(echo ${devlink} | sed 's/[0-9]*//g') if [ ${usb_done} != ${usb_dev} ] && [ ${BOOT_DEVICE} != ${usb_dev} ]; then - mount -t auto $(echo ${usb_dev}1) /mnt/usb > /dev/null 2>&1 - print_msg "Checking " $usb_dev"1 for a volumio rootfs update" - if [ -e /mnt/usb/volumio.fir ]; then - print_msg "New rootfs firmware found" - print_msg "Updating will take several minutes, please wait...." - volumio-init-updater - umount /mnt/usb > /dev/null 2>&1 - break + mount -t auto $(echo ${usb_dev}1) /mnt/usb > /dev/null 2>&1 + print_msg "Checking " $usb_dev"1 for a volumio rootfs update" + if [ -e /mnt/usb/*.fir ]; then + print_msg "New rootfs firmware found" + print_msg "Updating will take several minutes, please wait...." + volumio-init-updater + sync + print_msg "USB Update applied" + umount /mnt/usb > /dev/null 2>&1 + rm -r /mnt/boot + print_msg "Restarting" + echo b > /proc/sysrq-trigger + break fi umount /mnt/usb> /dev/null 2>&1 fi From 32cc35447288c307beb130dc78a4ac32ac869254 Mon Sep 17 00:00:00 2001 From: Ghembs Date: Fri, 28 Jul 2017 19:54:32 +0200 Subject: [PATCH 264/673] added a couple todo --- scripts/initramfs/init-x86 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 3411a6cb8..9f01f6205 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -268,7 +268,7 @@ rmdir /mnt/usb # Step 4: If there is factory reset or a user-data reset on the boot partition # then re-format data partition. # ============================================================================ -# +# TODO: restore kernel_factory too # print_msg "Checking for factory or user-data reset on boot device" mkdir /mnt/factory @@ -294,6 +294,7 @@ rm -r /mnt/factory # # Step 5: Handling of kernel updates # =========================================================== +# TODO: verify procedure, ("file vmlinuz-3.18.25 not found") and grub crashes # # if the update failed before completion mkdir boot From 4b0811003cbee9eded5855dec033e688f26b61b2 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sun, 30 Jul 2017 23:16:04 +0200 Subject: [PATCH 265/673] Enable ffmpeg by default --- volumio/etc/mpd.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/volumio/etc/mpd.conf b/volumio/etc/mpd.conf index 56efa3601..ae4f36867 100755 --- a/volumio/etc/mpd.conf +++ b/volumio/etc/mpd.conf @@ -36,6 +36,17 @@ input { } ############################################################################### +# Decoder ################################################################ + +decoder { +plugin "ffmpeg" +enabled "yes" +analyzeduration "1000000000" +probesize "1000000000" +} + +############################################################################### + # Audio Output ################################################################ audio_output { type "alsa" From 906535f3a2f8292408b604b7036f7eaaef0e2dbf Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 31 Jul 2017 11:52:56 +0200 Subject: [PATCH 266/673] Add $* and System Volume Information to mpdignore --- scripts/volumioconfig.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 7fddef75b..441a074b9 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -413,6 +413,8 @@ chmod 777 /var/lib/mpd/playlists echo "Setting mpdignore file" echo "@Recycle #recycle +$* +System Volume Information " > /var/lib/mpd/music/.mpdignore echo "Setting mpc to bind to unix socket" From e33a1f1e30f55204a00cbb3ad939715653cf5d59 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 31 Jul 2017 16:57:56 +0200 Subject: [PATCH 267/673] Revert ffmpeg on by default --- volumio/etc/mpd.conf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/volumio/etc/mpd.conf b/volumio/etc/mpd.conf index ae4f36867..2f210e431 100755 --- a/volumio/etc/mpd.conf +++ b/volumio/etc/mpd.conf @@ -38,12 +38,6 @@ input { # Decoder ################################################################ -decoder { -plugin "ffmpeg" -enabled "yes" -analyzeduration "1000000000" -probesize "1000000000" -} ############################################################################### From 3c9da12be97ddf20af735b1fa567ebadd637ddfb Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 31 Jul 2017 17:08:27 +0200 Subject: [PATCH 268/673] Mpd DSD with aif fix --- scripts/volumioconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 441a074b9..cbb7b6c7b 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -323,9 +323,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm libasound2-dev_1.1.3-5_i386.deb echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_i386-DSD.deb - dpkg -i mpd_0.20.6-1_i386-DSD.deb - rm mpd_0.20.6-1_i386-DSD.deb + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_i386-DSD-2.deb + dpkg -i mpd_0.20.6-1_i386-DSD-2.deb + rm mpd_0.20.6-1_i386-DSD-2.deb echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb From 76af707cc3f4163b9234fe0aec65b7783a9f05ce Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 1 Aug 2017 21:04:24 +0200 Subject: [PATCH 269/673] MPD Updated with library fix --- scripts/volumioconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index cbb7b6c7b..fb0427155 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -170,9 +170,9 @@ if [ $(uname -m) = armv7l ]; then rm libasound2-dev_1.1.3-5_armhf.deb echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv6-DSD.deb - dpkg -i mpd_0.20.6-1_armv6-DSD.deb - rm mpd_0.20.6-1_armv6-DSD.deb + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv6-DSD-2.deb + dpkg -i mpd_0.20.6-1_armv6-DSD-2.deb + rm mpd_0.20.6-1_armv6-DSD-2.deb echo "Installing Upmpdcli for armv6" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnpp3_0.15.1-1_armhf.deb From c872c6b140b7a19ba60621127f086e807623df70 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 2 Aug 2017 02:56:57 +0200 Subject: [PATCH 270/673] added exiftool --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/armv8.conf | 2 +- recipes/x86.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index ef3295131..6d23f69fc 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -36,7 +36,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount exiftool source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index a4c512c4c..cfc5c5da0 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount exiftool source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index 3eea0978c..6ed879b18 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount exiftool source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index c46f4d045..6110dbcd0 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -43,7 +43,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount exiftool source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From a1c04bca7ba884072898669ea685272fb14edebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 2 Aug 2017 14:20:25 +0200 Subject: [PATCH 271/673] rock64 wip --- scripts/rock64config.sh | 12 ++++++++++++ scripts/rock64image.sh | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/scripts/rock64config.sh b/scripts/rock64config.sh index b769eaa10..d9eb3cff0 100755 --- a/scripts/rock64config.sh +++ b/scripts/rock64config.sh @@ -19,6 +19,18 @@ tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 echo "#!/bin/sh sysctl abi.cp15_barrier=2 " > /usr/local/bin/rock64-init.sh +#TODO,. add the following to the init scriüp after verification +#for i in 1 2 3 ; do +# echo 4 >/proc/irq/$(awk -F":" "/xhci/ {print \$1}" /proc/irq/$(awk -F":" "/eth0/ {print \$1}" /sys/class/net/eth0/queues/rx-0/rps_cpus +#echo 32768 >/proc/sys/net/core/rps_sock_flow_entries +#echo 32768 >/sys/class/net/eth0/queues/rx-0/rps_flow_cnt +#exit 0 +# +# + chmod +x /usr/local/bin/rock64-init.sh echo "#!/bin/sh -e diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index 8d37c254f..b81dd4a68 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -119,6 +119,13 @@ echo "Copying rock64 modules and firmware" sudo cp -pdR platform-rock64/rock64/lib/modules /mnt/volumio/rootfs/lib/ sudo cp -pdR platform-rock64/rock64/lib/firmware /mnt/volumio/rootfs/lib/ +#TODO: remove this block +echo "Adding missing alsa dependencies" +sudo cp -pdR platform-rock64/rock64/usr /mnt/volumio/rootfs/ + +#TODO: remove this block +echo "Adding temporary fixes to Rock64 board" +sudo cp -pdR platform-rock64/rock64/etc /mnt/volumio/rootfs/ sync echo "Preparing to run chroot for more rock64 configuration" From 930b935f9225eac656d31e0828e92b42880b3a56 Mon Sep 17 00:00:00 2001 From: Volumio Date: Wed, 2 Aug 2017 14:44:55 +0200 Subject: [PATCH 272/673] Remove mounting partition one time too much --- scripts/initramfs/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 301fddcc2..ed2e0d6de 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -285,7 +285,7 @@ print_msg "unpacking kernel" fi # if data partition needs to be resized -mount -t auto /dev/${BOOTDEV}p1 /boot +#mount -t auto /dev/${BOOTDEV}p1 /boot if [ -e "/boot/resize-volumio-datapart" ]; then print_msg "Re-sizing Volumio data partition" END="$(parted -s /dev/${BOOTDEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" From b720cbf277dbc36a64a8dbb582403644acacebe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 2 Aug 2017 14:50:24 +0200 Subject: [PATCH 273/673] x86 updater: fixing an issue in init-x86 --- scripts/initramfs/init-x86 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 9f01f6205..a2eae4c0a 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -276,10 +276,11 @@ mount -t vfat ${BOOT_DEVICE}1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset..." mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data - - print_msg "Factory reset executed: part I" + print_msg "Factory reset executed: part I - User Data Part" + tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory + print_msg "Factory reset executed: part II - Kernel" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset - print_msg "Factory reset executed: part II - end" + print_msg "Factory reset executed: part III - Squash" fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data..." @@ -294,7 +295,6 @@ rm -r /mnt/factory # # Step 5: Handling of kernel updates # =========================================================== -# TODO: verify procedure, ("file vmlinuz-3.18.25 not found") and grub crashes # # if the update failed before completion mkdir boot From 07e9947d7de18e974698dd149cdf13cdda50eca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 2 Aug 2017 20:11:13 +0200 Subject: [PATCH 274/673] X86 updater: reboot after factory reset --- scripts/initramfs/init-x86 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index a2eae4c0a..a822c6a52 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -281,6 +281,8 @@ if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Factory reset executed: part II - Kernel" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset print_msg "Factory reset executed: part III - Squash" + print_msg "Restarting" + echo b > /proc/sysrq-trigger fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data..." @@ -312,7 +314,8 @@ fi # if the kernel has been updated, and no error has occurred before completition # Retrieve current UUID of boot and image partition # These need to be edited into the new boot configs to make the new update bootable -# This is an update on an existing installation, remove the resize-volumio-datapart sentinel +# This is an update on an existing installation, do not resize the data partition +# Just remove the sentinel if [ -e "/boot/kernel_update" ]; then print_msg "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot @@ -326,6 +329,7 @@ if [ -e "/boot/kernel_update" ]; then mv /boot/grub/grub.tmpl /boot/grub/grub.cfg sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/grub/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/grub/grub.cfg + rm /boot/resize-volumio-datapart rm /boot/kernel_update sync umount /boot From 5f4e9aab5420b947a0eee1a026a8d3e159df9bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 2 Aug 2017 20:19:50 +0200 Subject: [PATCH 275/673] X86 updater: missing sync --- scripts/initramfs/init-x86 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index a822c6a52..408ed70e3 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -282,6 +282,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset print_msg "Factory reset executed: part III - Squash" print_msg "Restarting" + sync echo b > /proc/sysrq-trigger fi if [ -e "/mnt/factory/user_data" ]; then From dbce6fd746fb4d82b474120aa769fde4eaf5c678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 4 Aug 2017 17:42:33 +0200 Subject: [PATCH 276/673] x86 updater: fix a problem with grub.cfg template --- scripts/x86config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 230dfa88b..f6a8ffa41 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -72,6 +72,7 @@ grub-mkconfig -o /boot/grub/grub.cfg chmod +w boot/grub/grub.cfg echo "Use current grub.cfg as run-time template" cp /boot/grub/grub.cfg /boot/grub/grub.tmpl +sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/grub/grub.tmpl echo " Inserting root and boot partition label (building the boot cmdline used in initramfs)" # Opting for finding partitions by-UUID From 6ccf802b9ccfdef501578b8612be80a2d69db803 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Sat, 5 Aug 2017 17:38:23 +1000 Subject: [PATCH 277/673] Avoid SMB1 protocol. SMB1 is dangerous (e.g. WannaCry malware) and best avoided. smb2_02 is supported by Windows Vista and later, which should be a resonable choice. smb2_10 (Win7 and later) might be better. --- volumio/etc/samba/smb.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/volumio/etc/samba/smb.conf b/volumio/etc/samba/smb.conf index 48aee51b9..4298dcea0 100644 --- a/volumio/etc/samba/smb.conf +++ b/volumio/etc/samba/smb.conf @@ -9,6 +9,7 @@ wins support = yes local master = no preferred master = no os level = 30 +client min protocol = smb2_02 [Internal Storage] comment = Volumio Internal Music Folder From 8a0a97cfd119254fecbd88bba4220f5aa783c8c2 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Sat, 5 Aug 2017 17:52:21 +1000 Subject: [PATCH 278/673] Revert "Avoid SMB1 protocol." This reverts commit 6ccf802b9ccfdef501578b8612be80a2d69db803 so it can go into a separate branch for a PR --- volumio/etc/samba/smb.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/volumio/etc/samba/smb.conf b/volumio/etc/samba/smb.conf index 4298dcea0..48aee51b9 100644 --- a/volumio/etc/samba/smb.conf +++ b/volumio/etc/samba/smb.conf @@ -9,7 +9,6 @@ wins support = yes local master = no preferred master = no os level = 30 -client min protocol = smb2_02 [Internal Storage] comment = Volumio Internal Music Folder From a285f10e775830d340337f4c39cc3a91b7421e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 6 Aug 2017 16:10:04 +0200 Subject: [PATCH 279/673] X86 Updater: separate the embedded grub config from the EFI bootloader --- scripts/initramfs/init-x86 | 9 +++-- scripts/x86config.sh | 75 +++++++++++++++++++++----------------- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 408ed70e3..6c3e7c656 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -326,10 +326,11 @@ if [ -e "/boot/kernel_update" ]; then mv /boot/syslinux.tmpl /boot/syslinux.cfg sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg - mv /boot/grub/grub.cfg /boot/grub/grub.cfg.old - mv /boot/grub/grub.tmpl /boot/grub/grub.cfg - sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/grub/grub.cfg - sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/grub/grub.cfg + mv /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.cfg.old + mv /boot/efi/BOOT/grub.tmpl /boot/efi/BOOT/grub.cfg + sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg + sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg + sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg rm /boot/resize-volumio-datapart rm /boot/kernel_update sync diff --git a/scripts/x86config.sh b/scripts/x86config.sh index f6a8ffa41..68d52203f 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -29,10 +29,10 @@ echo "Installing Syslinux Legacy BIOS" syslinux -v syslinux "${BOOT_PART}" -echo " Getting the current kernel filename" +echo "Getting the current kernel filename" KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` -echo " Creating run-time template for syslinux config" +echo "Creating run-time template for syslinux config" echo "DEFAULT volumio LABEL volumio @@ -47,8 +47,7 @@ cp /boot/syslinux.tmpl /boot/syslinux.cfg sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg -echo "Installing Grub UEFI" -echo " Editing the grub config template" +echo "Editing the Grub UEFI config template" # Make grub boot menu transparent sed -i "s/menu_color_normal=cyan\/blue/menu_color_normal=white\/black/g" /etc/grub.d/05_debian_theme sed -i "s/menu_color_highlight=white\/blue/menu_color_highlight=green\/dark-gray/g" /etc/grub.d/05_debian_theme @@ -61,34 +60,40 @@ sed -i "s/initrd=\"\$i\"/initrd=\"volumio.initrd\"/g" /etc/grub.d/10_linux sed -i "s/LINUX_ROOT_DEVICE=\${GRUB_DEVICE}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux sed -i "s/LINUX_ROOT_DEVICE=UUID=\${GRUB_DEVICE_UUID}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux -echo "Setting grub image" +echo "Setting plymouth image" cp /usr/share/plymouth/themes/volumio/volumio-logo16.png /boot/volumio.png -echo " Creating grub config folder" -mkdir -p /boot/grub +echo "Creating Grub config folder" +mkdir /boot/grub -echo " Applying Grub Configuration" +echo "Applying Grub configuration" grub-mkconfig -o /boot/grub/grub.cfg -chmod +w boot/grub/grub.cfg -echo "Use current grub.cfg as run-time template" -cp /boot/grub/grub.cfg /boot/grub/grub.tmpl -sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/grub/grub.tmpl +chmod +w /boot/grub/grub.cfg -echo " Inserting root and boot partition label (building the boot cmdline used in initramfs)" +echo "Coyping the new Grub config to the EFI bootloader folder" +cp /boot/grub/grub.cfg /boot/efi/BOOT/grub.cfg + +echo "Telling the bootloader to read an external config" +echo 'configfile ${cmdpath}/grub.cfg' > /grub-redir.cfg + +echo "Using current grub.cfg as run-time template for kernel updates" +cp /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.tmpl +sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/efi/BOOT/grub.tmpl + +echo "Inserting root and boot partition UUIDs (building the boot cmdline used in initramfs)" # Opting for finding partitions by-UUID -sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/grub/grub.cfg -sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/grub/grub.cfg +sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg +sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg -echo " Prevent cgmanager starting during install (causing problems)" cat > /usr/sbin/policy-rc.d << EOF exit 101 EOF chmod +x /usr/sbin/policy-rc.d -echo " Installing grub-efi-amd64 to make the 64bit UEFI bootloader" +echo "Installing grub-efi-amd64 to make the 64bit UEFI bootloader" apt-get update apt-get -y install grub-efi-amd64-bin -grub-mkstandalone --compress=gz -O x86_64-efi -o /boot/efi/BOOT/BOOTX64.EFI -d /usr/lib/grub/x86_64-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" /boot/grub/grub.cfg +grub-mkstandalone --compress=gz -O x86_64-efi -o /boot/efi/BOOT/BOOTX64.EFI "boot/grub/grub.cfg=grub-redir.cfg" -d /usr/lib/grub/x86_64-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" if [ ! -e /boot/efi/BOOT/BOOTX64.EFI ]; then echo "Fatal error, no 64bit bootmanager created, aborting..." exit 1 @@ -96,20 +101,22 @@ fi #we cannot install grub-efi-amd64 and grub-efi-ia32 on the same machine. #on the off-chance that we need a 32bit bootloader, we remove amd64 and install ia32 to generate one -echo " Uninstalling grub-efi-amd64" +echo "Uninstalling grub-efi-amd64" apt-get -y --purge remove grub-efi-amd64-bin -echo " Installing grub-efi-ia32 to make the 32bit UEFI bootloader" +echo "Installing grub-efi-ia32 to make the 32bit UEFI bootloader" apt-get -y install grub-efi-ia32-bin -grub-mkstandalone --compress=gz -O i386-efi -o /boot/efi/BOOT/BOOTIA32.EFI -d /usr/lib/grub/i386-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" /boot/grub/grub.cfg +grub-mkstandalone --compress=gz -O i386-efi -o /boot/efi/BOOT/BOOTIA32.EFI "boot/grub/grub.cfg=grub-redir.cfg" -d /usr/lib/grub/i386-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" if [ ! -e /boot/efi/BOOT/BOOTIA32.EFI ]; then echo "Fatal error, no 32bit bootmanager created, aborting..." exit 1 fi #and remove it again -echo " Uninstalling grub-efi-ia32-bin" +echo "Uninstalling grub-efi-ia32-bin and cleaning up grub install" apt-get -y --purge remove grub-efi-ia32-bin apt-get -y --purge remove efibootmgr libefivar0 +rm /grub-redir.cfg +rm -r /boot/grub echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* @@ -130,7 +137,7 @@ apt-get -y install plymouth plymouth-themes plymouth-x11 plymouth-set-default-theme volumio echo "Setting up in kiosk-mode" -echo " Creating chromium kiosk start script" +echo "Creating chromium kiosk start script" echo "#!/bin/bash xset -dpms @@ -161,11 +168,11 @@ WantedBy=multi-user.target " > /lib/systemd/system/volumio-kiosk.service ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service -echo " Allowing volumio to start an xsession" +echo "Allowing volumio to start an xsession" sed -i "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config echo "Creating initramfs" -echo " Adding custom modules" +echo "Adding custom modules" echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "usbcore" >> /etc/initramfs-tools/modules @@ -187,27 +194,27 @@ echo "hid" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules echo "nls_utf8" >> /etc/initramfs-tools/modules echo "vfat" >> /etc/initramfs-tools/modules -echo " Adding ata modules for various chipsets" +echo "Adding ata modules for various chipsets" cat /ata-modules.x86 >> /etc/initramfs-tools/modules -echo " Adding modules for Plymouth" +echo "Adding modules for Plymouth" echo "intel_agp" >> /etc/initramfs-tools/modules echo "drm" >> /etc/initramfs-tools/modules echo "i915 modeset=1" >> /etc/initramfs-tools/modules -echo " Copying volumio initramfs updater" +echo "Copying volumio initramfs updater" cd /root/ mv volumio-init-updater /usr/local/sbin -echo " Creating initramfs 'volumio.initrd'" +echo "Creating initramfs 'volumio.initrd'" mkinitramfs-custom.sh -o /tmp/initramfs-tmp -echo " No need to keep the original initrd" +echo "No need to keep the original initrd" DELFILE=`ls -l /boot |grep initrd.img | awk '{print $9}'` -echo " Found "$DELFILE", deleting" +echo "Found "$DELFILE", deleting" rm /boot/${DELFILE} -echo " No need for the system map either" +echo "No need for the system map either" DELFILE=`ls -l /boot |grep System.map | awk '{print $9}'` -echo " Found "$DELFILE", deleting" +echo "Found "$DELFILE", deleting" rm /boot/${DELFILE} #On The Fly Patch @@ -229,7 +236,7 @@ rm -rf ${PATCH} fi rm /patch -echo " Signalling the init script to re-size the volumio data partition" +echo "Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart echo "Bootloader configuration and initrd.img complete" From 3090da133dba56e053748e6ed830362c6d3fd3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 9 Aug 2017 09:35:50 +0200 Subject: [PATCH 280/673] Added Sparky-specific hotspot.sh --- scripts/sparkyimage.sh | 57 ++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index c180204e7..ad93393bb 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -32,14 +32,14 @@ dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` -sudo parted -s "${LOOP_DEV}" mklabel msdos -sudo parted -s "${LOOP_DEV}" mkpart primary fat32 8 71 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 71 2500 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% -sudo parted -s "${LOOP_DEV}" set 1 boot on -sudo parted -s "${LOOP_DEV}" print -sudo partprobe "${LOOP_DEV}" -sudo kpartx -s -a "${LOOP_DEV}" +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 8 71 +parted -s "${LOOP_DEV}" mkpart primary ext3 71 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` @@ -54,9 +54,9 @@ then fi echo "Creating boot and rootfs filesystems" -sudo mkfs -t vfat -n BOOT "${BOOT_PART}" -sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" -sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync echo "Preparing for the sparky kernel/ platform files" @@ -74,8 +74,8 @@ else fi echo "Burning the bootloader and u-boot" -sudo dd if=platform-sparky/sparky/u-boot/bootloader.bin of=${LOOP_DEV} bs=512 seek=4097 -sudo dd if=platform-sparky/sparky/u-boot/u-boot-dtb.img of=${LOOP_DEV} bs=512 seek=6144 +dd if=platform-sparky/sparky/u-boot/bootloader.bin of=${LOOP_DEV} bs=512 seek=4097 +dd if=platform-sparky/sparky/u-boot/u-boot-dtb.img of=${LOOP_DEV} bs=512 seek=6144 sync echo "Preparing for Volumio rootfs" @@ -96,24 +96,27 @@ fi echo "Creating mount point for the images partition" mkdir /mnt/volumio/images -sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images -sudo mkdir /mnt/volumio/rootfs -sudo mkdir /mnt/volumio/rootfs/boot -sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" -sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying sparky boot files, kernel, modules and firmware" -sudo cp platform-sparky/sparky/boot/* /mnt/volumio/rootfs/boot -sudo cp -pdR platform-sparky/sparky/lib/modules /mnt/volumio/rootfs/lib -sudo cp -pdR platform-sparky/sparky/lib/firmware /mnt/volumio/rootfs/lib +cp platform-sparky/sparky/boot/* /mnt/volumio/rootfs/boot +cp -pdR platform-sparky/sparky/lib/modules /mnt/volumio/rootfs/lib +cp -pdR platform-sparky/sparky/lib/firmware /mnt/volumio/rootfs/lib + +echo "Copying special hotspot.sh version for Sparky" +cp platform-sparky/sparky/bin/hotspot.sh /mnt/volumio/rootfs/bin echo "Copying DSP firmware and license from allocom dsp git" # doing this here and not in config because cloning under chroot caused issues before" git clone http://github.com/allocom/piano-firmware allo cp -pdR allo/lib /mnt/volumio/rootfs -sudo rm -r allo +rm -r allo sync echo "Preparing to run chroot for more sparky configuration" @@ -154,7 +157,7 @@ if [ -d /mnt/squash ]; then rm -rf /mnt/squash/* else echo "Creating Volumio SquashFS Temp Dir" - sudo mkdir /mnt/squash + mkdir /mnt/squash fi echo "Copying Volumio rootfs to Temp Dir" @@ -183,9 +186,9 @@ rm -rf /mnt/squash cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh sync echo "Unmounting Temp Devices" -sudo umount -l /mnt/volumio/images -sudo umount -l /mnt/volumio/rootfs/boot +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot -sudo dmsetup remove_all -sudo losetup -d ${LOOP_DEV} +dmsetup remove_all +losetup -d ${LOOP_DEV} sync From 9962f1765493e8e6d09997e2febf98f0cbdf21fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 10 Aug 2017 13:54:39 +0200 Subject: [PATCH 281/673] Voltastream0: build improvements (wip) --- scripts/vszeroconfig.sh | 5 ++++- scripts/vszeroimage.sh | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/vszeroconfig.sh b/scripts/vszeroconfig.sh index 82254fe6f..9f01aa0f4 100755 --- a/scripts/vszeroconfig.sh +++ b/scripts/vszeroconfig.sh @@ -22,7 +22,7 @@ echo "Adding default sound modules" #" >> /etc/modules #echo "#!/bin/sh -#echo 2 > /proc/irq/45/smp_affinity +# #" > /usr/local/bin/vszero-init.sh #chmod +x /usr/local/bin/vszero-init.sh @@ -30,6 +30,9 @@ echo "Adding default sound modules" #/usr/local/bin/vszero-init.sh #exit 0" > /etc/rc.local +echo "Enable getty on ttyGS0" +systemctl enable serial-getty@ttyGS0.service + echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 7955acd7b..49cce04f3 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -103,10 +103,14 @@ cp -R platform-pv/vszero/boot/* /mnt/volumio/rootfs/boot/ echo "Copying Voltastream0 modules and firmware" cp -pdR platform-pv/vszero/lib/modules /mnt/volumio/rootfs/lib/ cp -pdR platform-pv/vszero/lib/firmware /mnt/volumio/rootfs/lib/ -echo "Copying Voltastream0 inittab" -cp platform-pv/vszero/etc/inittab /mnt/volumio/rootfs/etc/ -echo "Copying Voltastream0 asound.conf (setup ASRC resampling)" -cp platform-pv/vszero/etc/asound.conf /mnt/volumio/rootfs/etc/ + +echo "Copying Voltastream0 extra alsa files" + +wget https://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/udev/rules.d/99-mxc_asrc.rules /mnt/volumio/rootfs/etc/udev/rules.d +wget https://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/asound.conf /mnt/volumio/rootfs/etc +mkdir -p /usr/lib/arm-linux-gnueabihf/alsa-lib +wget https://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate.so /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/ +ln -s libasound_module_rate_asrcrate.so libasound_module_rate_asrcrate_fast.so sync echo "Preparing to run chroot for more Voltastream0 configuration" From 4877d553d8de28f51a2513abe91d95856029b972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 10 Aug 2017 17:09:21 +0200 Subject: [PATCH 282/673] Voltastream: build script improvements (wip) --- scripts/vszeroconfig.sh | 2 +- scripts/vszeroimage.sh | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/vszeroconfig.sh b/scripts/vszeroconfig.sh index 9f01aa0f4..803faf090 100755 --- a/scripts/vszeroconfig.sh +++ b/scripts/vszeroconfig.sh @@ -22,7 +22,7 @@ echo "Adding default sound modules" #" >> /etc/modules #echo "#!/bin/sh -# +#echo 2 > /proc/irq/45/smp_affinity #" > /usr/local/bin/vszero-init.sh #chmod +x /usr/local/bin/vszero-init.sh diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 49cce04f3..4ae7fc9b0 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -105,18 +105,23 @@ cp -pdR platform-pv/vszero/lib/modules /mnt/volumio/rootfs/lib/ cp -pdR platform-pv/vszero/lib/firmware /mnt/volumio/rootfs/lib/ echo "Copying Voltastream0 extra alsa files" +mkdir -p /usr/lib/arm-linux-gnueabihf/alsa-lib/ +wget -P /mnt/volumio/rootfs/etc/udev/rules.d/ http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/udev/rules.d/99-mxc_asrc.rules +wget -P /mnt/volumio/rootfs/etc/ http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/asound.conf +wget -P /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/ http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate.so +ln -s /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate.so /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate_fast.so +ls -l /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/ + +echo "Copying Voltastream0 hotspot.sh script" +wget -P /mnt/volumio/rootfs/bin http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/bin/hotspot.sh -wget https://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/udev/rules.d/99-mxc_asrc.rules /mnt/volumio/rootfs/etc/udev/rules.d -wget https://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/asound.conf /mnt/volumio/rootfs/etc -mkdir -p /usr/lib/arm-linux-gnueabihf/alsa-lib -wget https://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate.so /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/ -ln -s libasound_module_rate_asrcrate.so libasound_module_rate_asrcrate_fast.so sync echo "Preparing to run chroot for more Voltastream0 configuration" cp scripts/vszeroconfig.sh /mnt/volumio/rootfs cp scripts/initramfs/init /mnt/volumio/rootfs/root cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin + #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater From 014784dd19c2fa2bfd31cd0c41f322b06152ab00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 11 Aug 2017 21:42:49 +0200 Subject: [PATCH 283/673] Voltastream0: build improvements (wip) --- scripts/vszeroimage.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 4ae7fc9b0..364029649 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -104,17 +104,8 @@ echo "Copying Voltastream0 modules and firmware" cp -pdR platform-pv/vszero/lib/modules /mnt/volumio/rootfs/lib/ cp -pdR platform-pv/vszero/lib/firmware /mnt/volumio/rootfs/lib/ -echo "Copying Voltastream0 extra alsa files" -mkdir -p /usr/lib/arm-linux-gnueabihf/alsa-lib/ -wget -P /mnt/volumio/rootfs/etc/udev/rules.d/ http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/udev/rules.d/99-mxc_asrc.rules -wget -P /mnt/volumio/rootfs/etc/ http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/etc/asound.conf -wget -P /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/ http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate.so -ln -s /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate.so /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_rate_asrcrate_fast.so -ls -l /mnt/volumio/rootfs/usr/lib/arm-linux-gnueabihf/alsa-lib/ - -echo "Copying Voltastream0 hotspot.sh script" -wget -P /mnt/volumio/rootfs/bin http://raw.githubusercontent.com/PolyVection/voltastream0-porting/debian-generic/bin/hotspot.sh - +echo "Copy the Voltastream0 hotspot.sh version" +cp platform-pv/vszero/bin/hotspot.sh /mnt/volumio/rootfs/bin/ sync echo "Preparing to run chroot for more Voltastream0 configuration" From cb137aec3a8a96947e5d80648c89862150476ea8 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 12 Aug 2017 14:48:43 +0200 Subject: [PATCH 284/673] Pi: move to Kernel 4.9.41 several improvements, including better support for several i2s DACs (allo, etc). Has been also pushed as new "stable" reference branch --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index c2e7a7099..82175328b 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -56,7 +56,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.9.36" +KERNEL_VERSION="4.9.41" case $KERNEL_VERSION in "4.4.9") @@ -64,9 +64,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.36") - KERNEL_REV="1015" - KERNEL_COMMIT="400f6d196503e50b87025b888169f30214bc0f19" + "4.9.41") + KERNEL_REV="1023" + KERNEL_COMMIT="b9becbbf3f48e39f719ca6785d23c53ee0cdbe49" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 29cbde1f8559d645dd9d3ec0b21db682dfc52f75 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 21 Aug 2017 19:38:52 +0200 Subject: [PATCH 285/673] remote updater 1.2 and differential for armv7 --- scripts/volumioconfig.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index fb0427155..2bd325ead 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -185,6 +185,12 @@ if [ $(uname -m) = armv7l ]; then rm libupnp6_1.6.20.jfd5-1_armhf.deb rm upmpdcli_1.2.12-1_armhf.deb + echo "Adding volumio-remote-updater for armv6" + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.2-armhf.deb + dpkg -i volumio-remote-updater_1.2-armhf.deb + rm volumio-remote-updater_1.2-armhf.deb + + elif [ $ARCH = armv7 ]; then echo "Installing MPD for armv7" # First we manually install a newer alsa-lib to achieve Direct DSD support @@ -212,6 +218,12 @@ if [ $(uname -m) = armv7l ]; then rm libupnpp3_0.15.1-1_armhf.deb rm libupnp6_1.6.20.jfd5-1_armhf.deb rm upmpdcli_1.2.12-1_armhf.deb + + echo "Adding volumio-remote-updater for armv7" + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.2-armv7.deb + dpkg -i volumio-remote-updater_1.2-armv7.deb + rm volumio-remote-updater_1.2-armv7.deb + fi #Remove autostart of upmpdcli update-rc.d upmpdcli remove @@ -242,11 +254,6 @@ if [ $(uname -m) = armv7l ]; then wget http://repo.volumio.org/Volumio2/Binaries/arm/zsync -P /usr/bin/ chmod a+x /usr/bin/zsync - echo "Adding volumio-remote-updater" - wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.1-armhf.deb - dpkg -i volumio-remote-updater_1.1-armhf.deb - rm volumio-remote-updater_1.1-armhf.deb - echo "Adding special version for edimax dongle" wget http://repo.volumio.org/Volumio2/Binaries/arm/hostapd-edimax -P /usr/sbin/ chmod a+x /usr/sbin/hostapd-edimax @@ -363,10 +370,10 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] wget http://repo.volumio.org/Volumio2/Binaries/x86/zsync -P /usr/bin/ chmod a+x /usr/bin/zsync - echo "Adding volumio-remote-updater" - wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.1-i386.deb - dpkg -i volumio-remote-updater_1.1-i386.deb - rm /volumio-remote-updater_1.1-i386.deb + echo "Adding volumio-remote-updater for i386" + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.2-i386.deb + dpkg -i volumio-remote-updater_1.2-i386.deb + rm /volumio-remote-updater_1.2-i386.deb fi From d658133761702008d6ccde293f13969d9c621a04 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 22 Aug 2017 19:50:58 +0200 Subject: [PATCH 286/673] exclude resize datapart from kernel --- scripts/bbbimage.sh | 2 +- scripts/bpim2uimage.sh | 2 +- scripts/bpiproimage.sh | 2 +- scripts/cuboxiimage.sh | 2 +- scripts/odroidc1image.sh | 3 ++- scripts/odroidc2image.sh | 2 +- scripts/odroidx2image.sh | 2 +- scripts/odroidxu4image.sh | 2 +- scripts/pine64image.sh | 2 +- scripts/raspberryimage.sh | 2 +- scripts/rock64image.sh | 2 +- scripts/sopine64image.sh | 2 +- scripts/sparkyimage.sh | 2 +- scripts/tinkerimage.sh | 2 +- scripts/udooneoimage.sh | 2 +- scripts/udooqdlimage.sh | 2 +- scripts/vszeroimage.sh | 2 +- scripts/x86image.sh | 2 +- 18 files changed, 19 insertions(+), 18 deletions(-) diff --git a/scripts/bbbimage.sh b/scripts/bbbimage.sh index 3932189f5..002976e2f 100755 --- a/scripts/bbbimage.sh +++ b/scripts/bbbimage.sh @@ -160,7 +160,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/bpim2uimage.sh b/scripts/bpim2uimage.sh index e0a6a8bd6..a17766f8d 100755 --- a/scripts/bpim2uimage.sh +++ b/scripts/bpim2uimage.sh @@ -184,7 +184,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/bpiproimage.sh b/scripts/bpiproimage.sh index ca618499e..563834b14 100755 --- a/scripts/bpiproimage.sh +++ b/scripts/bpiproimage.sh @@ -180,7 +180,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index bff725013..f08460e1b 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -172,7 +172,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index 794de12d8..76d00c3d9 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -187,7 +187,8 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index 0c0505585..86c32b86f 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -183,7 +183,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidx2image.sh b/scripts/odroidx2image.sh index 9499162b6..e0969649b 100755 --- a/scripts/odroidx2image.sh +++ b/scripts/odroidx2image.sh @@ -185,7 +185,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index 8d1330937..7140e91c3 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -175,7 +175,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 38c9262be..8c0696be4 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -178,7 +178,7 @@ if [ -e /mnt/kernel_current.tar.gz ]; then fi echo "Creating Kernel Partition Archive" -tar zcf /mnt/kernel_current.tar.gz -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar.gz --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 9e210ab2a..746b24b25 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -127,7 +127,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index b81dd4a68..54f42867c 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -184,7 +184,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index 76c3c95a3..92cca3087 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -178,7 +178,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index ad93393bb..4d47dd062 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -169,7 +169,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 67a3882d7..c25b819ab 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -158,7 +158,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 445567c06..09ba974a5 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -169,7 +169,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index b5a1d0341..9341f842a 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -162,7 +162,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 364029649..4ac8c314d 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -157,7 +157,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 859f583f0..6ecaeec1e 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -159,7 +159,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* From 2c40922016e886033d54ef644bd18aba5a67394c Mon Sep 17 00:00:00 2001 From: Volumio Date: Wed, 23 Aug 2017 18:06:07 +0200 Subject: [PATCH 287/673] Adding more recycle names to mpdignore --- scripts/volumioconfig.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 2bd325ead..fc8059841 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -422,6 +422,8 @@ echo "@Recycle #recycle $* System Volume Information +$RECYCLE.BIN +RECYCLER " > /var/lib/mpd/music/.mpdignore echo "Setting mpc to bind to unix socket" From bb0ec142bda8a61d095d6999c4b6fd8c20d980f0 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 25 Aug 2017 10:31:47 +0200 Subject: [PATCH 288/673] Hide Mouse cursor on kiosk --- recipes/x86.conf | 2 +- scripts/x86config.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index 6110dbcd0..1e1d57cc2 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -12,7 +12,7 @@ addimportant=false omitrequired=false [Base] -packages=acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl adduser base-files base-passwd bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo5 libudev1 libustr-1.0-1 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common sudo dbus syslinux syslinux-common xorg openbox chromium grub-common os-prober +packages=acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl adduser base-files base-passwd bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo5 libudev1 libustr-1.0-1 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common sudo dbus syslinux syslinux-common xorg openbox chromium grub-common os-prober unclutter source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 68d52203f..11349a774 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -168,6 +168,28 @@ WantedBy=multi-user.target " > /lib/systemd/system/volumio-kiosk.service ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service +echo "Hide Mouse cursor" + +echo "#!/bin/sh + +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +xrdb -merge ~/.Xresources # aggiorna x resources db + +#xscreensaver -no-splash & # avvia il demone di xscreensaver +xsetroot -cursor_name left_ptr & # setta il cursore di X +#sh ~/.fehbg & # setta lo sfondo con feh + +exec openbox-session # avvia il window manager + +exec unclutter &" > /root/.xinitrc + + echo "Allowing volumio to start an xsession" sed -i "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config From 4e30c5b4308bf34822896ed7b9ad522b06788f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 1 Sep 2017 23:07:44 +0200 Subject: [PATCH 289/673] Fixing usb3.0 boot issue and plymouth support --- scripts/initramfs/init-x86 | 24 +++++++++++++++++++----- scripts/x86config.sh | 13 ++++++++----- scripts/x86image.sh | 2 -- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 6c3e7c656..63094838f 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -56,13 +56,14 @@ modprobe nls_cp437 modprobe nls_utf8 modprobe usb_common modprobe usbcore -# The EHCI driver should be loaded before the ones for low speed cpntrollers -# or some devices may be confused when they are disconencted and reconnected. +# The EHCI driver should be loaded before the ones for low speed controllers +# or some devices may be confused when they are disconnected and reconnected. modprobe ehci_hcd modprobe ehci_pci modprobe uhci_hcd modprobe ohci_hcd modprobe ohci_pci +modprobe xhci_hcd modprobe xhci_pci modprobe mmc_core modprobe sdhci @@ -103,6 +104,14 @@ print_msg "Waiting for storage devices to become ready" sleep 5 mdev -s +print_msg "Show plymouth with volumio theme" +echo "[Daemon] +Theme=volumio +ShowDelay=0 +" > /usr/share/plymouth/plymouthd.defaults +# No need to start plymouth daemon (started already), just show splash +/bin/plymouth --show-splash + # Parse the kernel command line from grub CMDLINE="$(cat /proc/cmdline)" @@ -154,6 +163,9 @@ if [ -z "${IMGFILE}" ]; then exit 0 fi +# set a default for kmsg +USE_KMSG=yes + print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg BOOTPART=${BOOTPART} @@ -349,11 +361,11 @@ print_msg "Checking for data partition re-size" if [ -e "/boot/resize-volumio-datapart" ]; then print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" - parted -s ${BOOT_DEVICE} resizepart 3 ${END} + parted -s ${BOOT_DEVICE} resizepart 3 ${END} > /boot/resize-datapart.log e2fsck -f ${BOOT_DEVICE}3 - resize2fs ${BOOT_DEVICE}3 + resize2fs ${BOOT_DEVICE}3 > /boot/resize-datapart.log print_msg "Volumio data partition succesfully resized" - parted -s ${BOOT_DEVICE} unit MB print + parted -s ${BOOT_DEVICE} unit MB print > /boot/resize-datapart.log rm /boot/resize-volumio-datapart fi umount /boot @@ -415,6 +427,8 @@ print_msg "Finishing initramfs, switching rootfs and starting the boot process.. umount /proc umount /sys +/bin/plymouth --newroot=/mnt/ext/union + exec switch_root /mnt/ext/union /sbin/init print_msg "Failed to switch_root, dropping to a shell" diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 68d52203f..d9c52f1c7 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -11,10 +11,6 @@ echo "Installing the kernel and creating initramfs" dpkg -i linux-image-*_i386.deb dpkg -i linux-firmware-*_i386.deb -KRNL=`ls -l /boot |grep vmlinuz | awk -F'vmlinuz-' '{print $2}'` -cp e1000e.ko /lib/modules/$KRNL/kernel/drivers/net/ethernet/intel/e1000e/ -depmod $KRNL - echo "Creating node/ nodejs symlinks to stay compatible with the armv6/v7 platforms" ln -s /usr/bin/nodejs /usr/local/bin/nodejs @@ -33,12 +29,13 @@ echo "Getting the current kernel filename" KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` echo "Creating run-time template for syslinux config" +DEBUG="USE_KMSG=no" echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro vga=792 imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd " > /boot/syslinux.tmpl @@ -135,6 +132,10 @@ apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core echo "Configuring boot splash" apt-get -y install plymouth plymouth-themes plymouth-x11 plymouth-set-default-theme volumio +echo "[Daemon] +Theme=volumio +ShowDelay=0 +" > /usr/share/plymouth/plymouthd.defaults echo "Setting up in kiosk-mode" echo "Creating chromium kiosk start script" @@ -200,6 +201,8 @@ echo "Adding modules for Plymouth" echo "intel_agp" >> /etc/initramfs-tools/modules echo "drm" >> /etc/initramfs-tools/modules echo "i915 modeset=1" >> /etc/initramfs-tools/modules +echo "nouveau modeset=1" >> /etc/initramfs-tools/modules +echo "radeon modeset=1" >> /etc/initramfs-tools/modules echo "Copying volumio initramfs updater" cd /root/ diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 859f583f0..2dd3244d3 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -91,7 +91,6 @@ else cp platform-x86/packages/linux-image-*.deb /mnt/volumio/rootfs cp platform-x86/packages/linux-firmware-*.deb /mnt/volumio/rootfs fi -#cp platform-x86/Intel-e1000e-3.3.4/e1000e.ko /mnt/volumio/rootfs cp volumio/splash/volumio.png /mnt/volumio/rootfs/boot @@ -128,7 +127,6 @@ chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' EOF rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-image-*.deb -rm /mnt/volumio/rootfs/linux-firmware-*.deb /mnt/volumio/rootfs/e1000e.ko rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86config.sh rm /mnt/volumio/rootfs/ata-modules.x86 sync From e50569eff9b3d4a7f0f6fd492ca1486c4681c7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 8 Sep 2017 00:06:22 +0200 Subject: [PATCH 290/673] Add Intel 3168NGW wifi support only for 4.9 kernel --- scripts/x86image.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 2dd3244d3..72062a873 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -84,9 +84,13 @@ if [ ! -d platform-x86 ]; then echo "Platform files (packages) not available yet, getting them from the repo" git clone http://github.com/volumio/platform-x86 fi + if [ -f platform-x86/packages/.next ]; then cp platform-x86/packages/experimental/linux-image-*.deb /mnt/volumio/rootfs cp platform-x86/packages/experimental/linux-firmware-*.deb /mnt/volumio/rootfs + echo "Adding Intel 3168NGW wifi support" +#TODO: remove when switching to stretch + cp -R platform-x86/packages/iwlwifi-3168-ucode-22.361476.0 /mnt/volumio/rootfs/lib/firmware else cp platform-x86/packages/linux-image-*.deb /mnt/volumio/rootfs cp platform-x86/packages/linux-firmware-*.deb /mnt/volumio/rootfs From 5b3aa4944264c8bd611cbedd52fe05a54776cd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 8 Sep 2017 00:16:20 +0200 Subject: [PATCH 291/673] Fixed incorrect platform tarball name --- scripts/rock64image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index 54f42867c..f89803851 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -71,7 +71,7 @@ else git clone https://github.com/volumio/platform-rock64.git platform-rock64 echo "Unpack the platform files" cd platform-rock64 - tar xfJ rock.tar.xz + tar xfJ rock64.tar.xz cd .. fi From 6d5d22ca07f3f944aec9a44f69feecd978692369 Mon Sep 17 00:00:00 2001 From: Sergej Sawazki Date: Sat, 16 Sep 2017 14:14:38 +0200 Subject: [PATCH 292/673] Pi: Add TauDAC-DM101 Firmware --- scripts/raspberryconfig.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index ca051f9e6..0aba5c64d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -268,6 +268,13 @@ rm /README.md rm master.tar.gz echo "Allo firmware installed" +echo "Getting TauDAC Firmware" +wget https://github.com/taudac/modules/archive/rpi-volumio-4.9.41-taudac-modules.tar.gz +echo "Extracting TauDAC Firmwares" +tar --strip-components 1 --exclude *.hash -xf rpi-volumio-4.9.41-taudac-modules.tar.gz +rm rpi-volumio-4.9.41-taudac-modules.tar.gz +echo "TauDAC Firmware installed" + if [ "$KERNEL_VERSION" = "4.4.9" ]; then From 5f4ddeab2f37bed6b6ca46bc17de9ddd7cebb663 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 23 Sep 2017 12:45:16 +0000 Subject: [PATCH 293/673] Slight rework of wireless configuration --- volumio/bin/wireless.js | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 5f85d911d..215b62d05 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -17,6 +17,13 @@ var ifconfigHotspot = "ifconfig " + wlan + " 192.168.211.1 up"; var ifconfigWlan = "ifconfig " + wlan + " up"; var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan + " down"; var execSync = require('child_process').execSync; +try { + var conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); + console.log('WIRELESS: Loaded configuration'); +} catch (e) { + console.log('WIRELESS: First boot'); + var conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); +} function kill(process, callback) { var all = process.split(" "); @@ -71,26 +78,12 @@ function launch(fullprocess, name, sync, callback) { function startHotspot() { stopHotspot(function(err) { - var hotspotenabled = true; - try { - var hotspotjson = fs.readJsonSync('/data/configuration/system_controller/network/config.json', {throws: false}); - } catch(e) { - console.log('First boot, starting Hotspot'); - launch(ifconfigHotspot, "confighotspot", true, function(err) { - console.log("ifconfig " + err); - launch(starthostapd,"hotspot" , false, function() { - wstatus("hotspot"); - }); - }); - } - - if (hotspotjson != undefined && hotspotjson.enable_hotspot != undefined && hotspotjson.enable_hotspot.value != undefined && !hotspotjson.enable_hotspot.value) { + if (conf != undefined && conf.enable_hotspot != undefined && conf.enable_hotspot.value != undefined && !conf.enable_hotspot.value) { console.log('Hotspot is disabled, not starting it'); launch(ifconfigWlan, "configwlanup", true, function(err) { console.log("ifconfig " + err); }); } else { - launch(ifconfigHotspot, "confighotspot", true, function(err) { console.log("ifconfig " + err); launch(starthostapd,"hotspot" , false, function() { @@ -141,16 +134,12 @@ var apstopped = 0 function startFlow() { try { - var wirelessjson = fs.statSync('/data/configuration/netconfigured'); + var conf = fs.statSync('/data/configuration/netconfigured'); } catch (e) { var directhotspot = true; } - try { - var wirelessjson = fs.readJsonSync('/data/configuration/system_controller/network/config.json', {throws: false}); - } catch (e) { - console.log(''); - } - if (wirelessjson != undefined && wirelessjson.wireless_enabled != undefined && wirelessjson.wireless_enabled.value != undefined && !wirelessjson.wireless_enabled.value) { + + if (conf != undefined && conf.wireless_enabled != undefined && conf.wireless_enabled.value != undefined && !conf.wireless_enabled.value) { console.log('Wireless Networking DISABLED, not starting wireless flow'); } else if (directhotspot){ startHotspot(function () { From 6b9b99c60e31c714c33c5356b070f25ef4ebd635 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 23 Sep 2017 16:44:07 +0200 Subject: [PATCH 294/673] Fix netconfigured flow --- volumio/bin/wireless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 215b62d05..ea17495d1 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -134,7 +134,7 @@ var apstopped = 0 function startFlow() { try { - var conf = fs.statSync('/data/configuration/netconfigured'); + var netconfigured = fs.statSync('/data/configuration/netconfigured'); } catch (e) { var directhotspot = true; } From 10024ed667d96a01246fcc0f9ee7e2aa46c9a761 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Fri, 29 Sep 2017 23:04:32 +1000 Subject: [PATCH 295/673] Clean up mkinitramfs working area on exit --- scripts/initramfs/mkinitramfs-custom-single.sh | 6 ++++++ scripts/initramfs/mkinitramfs-custom.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/scripts/initramfs/mkinitramfs-custom-single.sh b/scripts/initramfs/mkinitramfs-custom-single.sh index 2b452a56f..63ca418bb 100755 --- a/scripts/initramfs/mkinitramfs-custom-single.sh +++ b/scripts/initramfs/mkinitramfs-custom-single.sh @@ -3,6 +3,12 @@ umask 0022 export PATH='/usr/bin:/sbin:/bin' +CleanUp() { + [ -d /var/tmp ] && rm -rf /var/tmp/mkinitramfs* + [ -n "${TMPDIR}" ] && [ -d "${TMPDIR}" ] && rm -rf "${TMPDIR}"/mkinitramfs* +} # CleanUp +trap 'CleanUp' 0 + # Defaults keep="n" CONFDIR="/etc/initramfs-tools" diff --git a/scripts/initramfs/mkinitramfs-custom.sh b/scripts/initramfs/mkinitramfs-custom.sh index 5bc13bb34..e004e1f4c 100755 --- a/scripts/initramfs/mkinitramfs-custom.sh +++ b/scripts/initramfs/mkinitramfs-custom.sh @@ -3,6 +3,12 @@ umask 0022 export PATH='/usr/bin:/sbin:/bin' +CleanUp() { + [ -d /var/tmp ] && rm -rf /var/tmp/mkinitramfs* + [ -n "${TMPDIR}" ] && [ -d "${TMPDIR}" ] && rm -rf "${TMPDIR}"/mkinitramfs* +} # CleanUp +trap 'CleanUp' 0 + # Defaults keep="n" CONFDIR="/etc/initramfs-tools" From a007b27b2b5a7e0e25d70e1a389257eb7b55c591 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Fri, 29 Sep 2017 23:46:30 +1000 Subject: [PATCH 296/673] Trailing whitespace --- scripts/initramfs/mkinitramfs-custom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/mkinitramfs-custom.sh b/scripts/initramfs/mkinitramfs-custom.sh index e004e1f4c..098009c8c 100755 --- a/scripts/initramfs/mkinitramfs-custom.sh +++ b/scripts/initramfs/mkinitramfs-custom.sh @@ -5,7 +5,7 @@ export PATH='/usr/bin:/sbin:/bin' CleanUp() { [ -d /var/tmp ] && rm -rf /var/tmp/mkinitramfs* - [ -n "${TMPDIR}" ] && [ -d "${TMPDIR}" ] && rm -rf "${TMPDIR}"/mkinitramfs* + [ -n "${TMPDIR}" ] && [ -d "${TMPDIR}" ] && rm -rf "${TMPDIR}"/mkinitramfs* } # CleanUp trap 'CleanUp' 0 From 01c4259f86b59e79d55071735028c31f8c855f77 Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 3 Oct 2017 18:21:26 +0200 Subject: [PATCH 297/673] Clean linux firmware in x86 image --- scripts/x86image.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 07a0077e7..9c8c3e1de 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -131,6 +131,7 @@ chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' EOF rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-image-*.deb +rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-firmware-*.deb rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86config.sh rm /mnt/volumio/rootfs/ata-modules.x86 sync From a44b417f379f6ab4734682c0c389c4c37523554e Mon Sep 17 00:00:00 2001 From: sparkysbc Date: Wed, 4 Oct 2017 16:14:55 +0530 Subject: [PATCH 298/673] Allo RA support for Sparky --- scripts/sparkyconfig.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/sparkyconfig.sh b/scripts/sparkyconfig.sh index fc6b7525f..d7f15f6c5 100755 --- a/scripts/sparkyconfig.sh +++ b/scripts/sparkyconfig.sh @@ -24,6 +24,10 @@ echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools +wget https://raw.githubusercontent.com/sparkysbc/downloads/master/wiringSparky.tgz +tar -xzvf wiringSparky.tgz -C / +rm wiringSparky.tgz + echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules From fe67f4bb5f2c999bd474dadc9483f889f1a5d0cc Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 5 Oct 2017 11:16:16 +0200 Subject: [PATCH 299/673] Pi: move kernel to 4.9.51 Has been flagged as "stable" about 2 weeks ago: many fixes since .41 including few related to sound issues. Was holding submitting it, hoping longstanding Pi3/PiZW wireless fix would emerge soon, but we should probably not hold too much on other benefits. Note to @taudac : please make your driver available for that new version. Can you routinely build your driver at each Hexxeh/rpi-firmware kernel release so that we can build without fearing this hard-linked dependency? --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 0aba5c64d..f67d56c41 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.9.41" +KERNEL_VERSION="4.9.51" case $KERNEL_VERSION in "4.4.9") @@ -63,9 +63,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.41") - KERNEL_REV="1023" - KERNEL_COMMIT="b9becbbf3f48e39f719ca6785d23c53ee0cdbe49" + "4.9.51") + KERNEL_REV="1036" + KERNEL_COMMIT="913eddd6d23f14ce34ae473a4c080c5c840ed583" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 6297bf9dc5daa54b2560da189f4aa7a7177d8ab1 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 5 Oct 2017 11:57:19 +0200 Subject: [PATCH 300/673] Typo generated in /boot/config.txt Incidentally noticed in [this forum message](https://volumio.org/forum/flac-files-play-too-fast-after-latest-update-t7596.html#p38274) seemingly after a kernel update. linefeed is generated by simple echo "" (at least on busybox echo) --- scripts/initramfs/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index ed2e0d6de..54dce6a42 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -273,7 +273,7 @@ print_msg "unpacking kernel" if [ -e "/mnt/imgpart/config.txt.bak" ]; then print_msg "Restoring custom config.txt content" I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` - echo "\n" >> /boot/config.txt + echo "" >> /boot/config.txt echo "$I2S" >> /boot/config.txt rm /mnt/imgpart/config.txt.bak fi From 7b0ca77df45f3f76c0a4cffd437c168bbde2ca71 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 8 Oct 2017 21:48:43 +0200 Subject: [PATCH 301/673] fix legacy boot on x86 by removing video mode set --- scripts/x86config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 49606de16..b6c643358 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -35,7 +35,7 @@ echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro vga=792 imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd " > /boot/syslinux.tmpl From f358be5fd0f87308874454ddb7fed2827f1b4010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 8 Oct 2017 23:21:47 +0200 Subject: [PATCH 302/673] X86 kernel updates --- scripts/initramfs/init-x86 | 57 +++++++++++++++++++++----------------- scripts/x86config.sh | 23 ++++----------- scripts/x86image.sh | 5 ++-- volumio/etc/default/grub | 2 +- volumio/etc/fstab.x86 | 2 +- 5 files changed, 41 insertions(+), 48 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 63094838f..bc1d19a49 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -163,9 +163,6 @@ if [ -z "${IMGFILE}" ]; then exit 0 fi -# set a default for kmsg -USE_KMSG=yes - print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg BOOTPART=${BOOTPART} @@ -193,7 +190,7 @@ print_msg "Initrd initialisation finished" # BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') -if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then +if [ -e "/mnt/imgpart/move-gpt" ]; then print_msg "First time boot, moving the backup GPT table to the end of the disk..." gdisk ${BOOT_DEVICE} > /dev/null 2>&1 < /proc/sysrq-trigger fi @@ -398,7 +399,6 @@ mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext # Step 9: Create the overlay from RO and RW partitions # ==================================================== - mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union # Clean up. @@ -409,18 +409,23 @@ mount --move /mnt/imgpart /mnt/ext/union/imgpart chmod -R 777 /mnt/ext/union/imgpart -# Step 10: The UUID of the bootpartition could possibly not match the one used in fstab. -# This is the case when an new version of the squash file has been created. -# This step fixes that +# Step 10: Mount the boot partiton read-write for runtime # ============================================================================================ -UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) -print_msg "Editing fstab to use UUID=" -if [ -e "/mnt/ext/union/etc/fstab.prev" ]; then - rm /mnt/ext/union/etc/fstab.prev +print_msg "Mounting boot partition ${BOOTPART}" +mount -t vfat -o defaults,utf8,user,rw,umask=111,dmask=000 ${BOOTPART} /mnt/ext/union/boot + + +# Step 11: Run one-off custom script, passing boot device and root +# Using a copy of the custom script to avoid permissions problems +# chmod +x to ensure executability +# ================================================================ +if [ -f "/mnt/ext/union/boot/custom.sh" ]; then + cp /mnt/ext/union/boot/custom.sh . + chmod 777 ./custom.sh + ./custom.sh $BOOTDEV /mnt/ext/union + rm -rf ./custom .sh + rm -rf /mnt/ext/union/boot/custom.sh fi -mv /mnt/ext/union/etc/fstab /mnt/ext/union/etc/fstab.prev -cp /mnt/ext/union/etc/fstab.tmpl /mnt/ext/union/etc/fstab -sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /mnt/ext/union/etc/fstab print_msg ${VOLUMIO_VERSION} print_msg "Finishing initramfs, switching rootfs and starting the boot process..." diff --git a/scripts/x86config.sh b/scripts/x86config.sh index b6c643358..21171b320 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -29,20 +29,15 @@ echo "Getting the current kernel filename" KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` echo "Creating run-time template for syslinux config" -DEBUG="USE_KMSG=no" +DEBUG="use_kmsg=yes" echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro vga=792 imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd -" > /boot/syslinux.tmpl - -echo "Creating syslinux.cfg from template" -cp /boot/syslinux.tmpl /boot/syslinux.cfg -sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg -sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg +" > /boot/syslinux.cfg echo "Editing the Grub UEFI config template" # Make grub boot menu transparent @@ -73,14 +68,12 @@ cp /boot/grub/grub.cfg /boot/efi/BOOT/grub.cfg echo "Telling the bootloader to read an external config" echo 'configfile ${cmdpath}/grub.cfg' > /grub-redir.cfg -echo "Using current grub.cfg as run-time template for kernel updates" -cp /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.tmpl -sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/efi/BOOT/grub.tmpl - echo "Inserting root and boot partition UUIDs (building the boot cmdline used in initramfs)" # Opting for finding partitions by-UUID sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg +sed -i "/Loading Linux/d" /boot/efi/BOOT/grub.cfg +sed -i "/Loading initial ramdisk/d" /boot/efi/BOOT/grub.cfg cat > /usr/sbin/policy-rc.d << EOF exit 101 @@ -120,12 +113,6 @@ rm -f /var/lib/apt/lists/*archive* apt-get clean rm /usr/sbin/policy-rc.d -echo "Copying fstab as a template to be used in initrd" -cp /etc/fstab /etc/fstab.tmpl - -echo "Editing fstab to use UUID=" -sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /etc/fstab - echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 9c8c3e1de..23010924f 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -123,7 +123,7 @@ LOOP_DEV=${LOOP_DEV} BOOT_PART=${BOOT_PART} " >> /mnt/volumio/rootfs/init.sh chmod +x /mnt/volumio/rootfs/init.sh - +cat /mnt/volumio/rootfs/init.sh echo $PATCH > /mnt/volumio/rootfs/patch chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' @@ -131,7 +131,6 @@ chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' EOF rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-image-*.deb -rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-firmware-*.deb rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86config.sh rm /mnt/volumio/rootfs/ata-modules.x86 sync @@ -177,6 +176,8 @@ rm -rf /mnt/squash #copy the squash image inside the boot partition cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +echo "Signalling the init script to move the backup GPT table to the end of the disk " +touch /mnt/volumio/images/move-gpt sync echo "Unmounting Temp Devices" sudo umount -l /mnt/volumio/images diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index 6ad6aea03..1ecdab595 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -6,7 +6,7 @@ GRUB_DEFAULT='' GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Volumio Audiophile Music player" -GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 USE_KMSG=no" +GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 use_kmsg=yes" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs diff --git a/volumio/etc/fstab.x86 b/volumio/etc/fstab.x86 index 3f10bb06f..b6852e19a 100644 --- a/volumio/etc/fstab.x86 +++ b/volumio/etc/fstab.x86 @@ -1,6 +1,6 @@ proc /proc proc defaults 0 0 #/dev/sda1 / ext4 defaults,noatime,nodiratime 0 1 -%%BOOTPART%% /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +#%%BOOTPART%% /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 From 4c013665368c572efbc2d515007b2c5e75ee4150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 9 Oct 2017 14:28:36 +0200 Subject: [PATCH 303/673] X86: removing obsolete shell from init script --- scripts/initramfs/init-x86 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index bc1d19a49..dee311c90 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -343,12 +343,11 @@ if [ -e "/boot/kernel_update" ]; then sed -i "s/=root [a-fA-F0-9]\{4\}-[a-fA-F0-9]\{4\}/=root ${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg sed -i "s/=root [a-fA-F0-9]\{4\}-[a-fA-F0-9]\{4\}/=root ${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg - rm /boot/resize-volumio-datapart + rm -f /boot/resize-volumio-datapart rm /boot/kernel_update sync umount /boot rm -rf /boot - /bin/sh echo b > /proc/sysrq-trigger fi From 884ee3503626c7a82d9b6584e93257558f09ed00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 9 Oct 2017 14:47:06 +0200 Subject: [PATCH 304/673] X86: remove vga settings from syslinux.cfg --- scripts/x86config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 21171b320..7d6796142 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -35,7 +35,7 @@ echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro vga=792 imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd " > /boot/syslinux.cfg From 7d53638ad5426a3c01e5ad7e94f208ca90617ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 9 Oct 2017 22:05:48 +0200 Subject: [PATCH 305/673] X86: force fstab overlay update after kernel_update --- scripts/initramfs/init-x86 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index dee311c90..2cd0ce8ff 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -345,6 +345,8 @@ if [ -e "/boot/kernel_update" ]; then rm -f /boot/resize-volumio-datapart rm /boot/kernel_update +# mark it for the first boot after the kernel_update + touch /boot/update_fstab sync umount /boot rm -rf /boot @@ -398,6 +400,7 @@ mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext # Step 9: Create the overlay from RO and RW partitions # ==================================================== +# mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union # Clean up. @@ -409,15 +412,25 @@ mount --move /mnt/imgpart /mnt/ext/union/imgpart chmod -R 777 /mnt/ext/union/imgpart # Step 10: Mount the boot partiton read-write for runtime -# ============================================================================================ +# ======================================================= +# print_msg "Mounting boot partition ${BOOTPART}" +[ -d /mnt/ext/union/boot ] || mkdir -m 777 /mnt/ext/union/boot mount -t vfat -o defaults,utf8,user,rw,umask=111,dmask=000 ${BOOTPART} /mnt/ext/union/boot +# Special step to force overlay to write a new fstab in upperdir after kernel_update +# ================================================================================== +# +if [ -e /mnt/ext/union/boot/update_fstab ]; then + cp /mnt/ext/union/static/etc/fstab /mnt/ext/union/etc/fstab + rm /mnt/ext/union/boot/update_fstab +fi # Step 11: Run one-off custom script, passing boot device and root # Using a copy of the custom script to avoid permissions problems # chmod +x to ensure executability # ================================================================ +# if [ -f "/mnt/ext/union/boot/custom.sh" ]; then cp /mnt/ext/union/boot/custom.sh . chmod 777 ./custom.sh From 74eae2bd320b43440f3a98507f0aca11bcda3f4e Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 10 Oct 2017 07:15:58 +0200 Subject: [PATCH 306/673] Pi: TauDAC modules: use $KERNEL_VERSION Make TauDAC modules install files linked to $KERNEL_VERSION rather than hard-coded, which imposed to edit install files at each kernel change. --- scripts/raspberryconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 0aba5c64d..d446b789b 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -268,12 +268,12 @@ rm /README.md rm master.tar.gz echo "Allo firmware installed" -echo "Getting TauDAC Firmware" -wget https://github.com/taudac/modules/archive/rpi-volumio-4.9.41-taudac-modules.tar.gz -echo "Extracting TauDAC Firmwares" -tar --strip-components 1 --exclude *.hash -xf rpi-volumio-4.9.41-taudac-modules.tar.gz -rm rpi-volumio-4.9.41-taudac-modules.tar.gz -echo "TauDAC Firmware installed" +echo "Getting TauDAC Modules and overlay" +wget https://github.com/taudac/modules/archive/rpi-volumio-"$KERNEL_VERSION"-taudac-modules.tar.gz +echo "Extracting TauDAC Modules and overlay" +tar --strip-components 1 --exclude *.hash -xf rpi-volumio-"$KERNEL_VERSION"-taudac-modules.tar.gz +rm rpi-volumio-"$KERNEL_VERSION"-taudac-modules.tar.gz +echo "TauDAC Modules and overlay installed" if [ "$KERNEL_VERSION" = "4.4.9" ]; then From 8fc901a656b18d263d810702e26ac413bc98df90 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 16 Oct 2017 22:52:58 +0200 Subject: [PATCH 307/673] Revert "X86: force fstab overlay update after kernel_update" This reverts commit 7d53638ad5426a3c01e5ad7e94f208ca90617ea0. --- scripts/initramfs/init-x86 | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 2cd0ce8ff..dee311c90 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -345,8 +345,6 @@ if [ -e "/boot/kernel_update" ]; then rm -f /boot/resize-volumio-datapart rm /boot/kernel_update -# mark it for the first boot after the kernel_update - touch /boot/update_fstab sync umount /boot rm -rf /boot @@ -400,7 +398,6 @@ mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext # Step 9: Create the overlay from RO and RW partitions # ==================================================== -# mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union # Clean up. @@ -412,25 +409,15 @@ mount --move /mnt/imgpart /mnt/ext/union/imgpart chmod -R 777 /mnt/ext/union/imgpart # Step 10: Mount the boot partiton read-write for runtime -# ======================================================= -# +# ============================================================================================ print_msg "Mounting boot partition ${BOOTPART}" -[ -d /mnt/ext/union/boot ] || mkdir -m 777 /mnt/ext/union/boot mount -t vfat -o defaults,utf8,user,rw,umask=111,dmask=000 ${BOOTPART} /mnt/ext/union/boot -# Special step to force overlay to write a new fstab in upperdir after kernel_update -# ================================================================================== -# -if [ -e /mnt/ext/union/boot/update_fstab ]; then - cp /mnt/ext/union/static/etc/fstab /mnt/ext/union/etc/fstab - rm /mnt/ext/union/boot/update_fstab -fi # Step 11: Run one-off custom script, passing boot device and root # Using a copy of the custom script to avoid permissions problems # chmod +x to ensure executability # ================================================================ -# if [ -f "/mnt/ext/union/boot/custom.sh" ]; then cp /mnt/ext/union/boot/custom.sh . chmod 777 ./custom.sh From 6efbf0834802f234c2cc00fb23e6f893ea5ab9cf Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 16 Oct 2017 22:53:12 +0200 Subject: [PATCH 308/673] Revert "X86: remove vga settings from syslinux.cfg" This reverts commit 884ee3503626c7a82d9b6584e93257558f09ed00. --- scripts/x86config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 7d6796142..21171b320 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -35,7 +35,7 @@ echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro vga=792 imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd " > /boot/syslinux.cfg From 1ea1137f6fb23b223e8ef84d0ed5277a2888f373 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 16 Oct 2017 22:53:22 +0200 Subject: [PATCH 309/673] Revert "X86: removing obsolete shell from init script" This reverts commit 4c013665368c572efbc2d515007b2c5e75ee4150. --- scripts/initramfs/init-x86 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index dee311c90..bc1d19a49 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -343,11 +343,12 @@ if [ -e "/boot/kernel_update" ]; then sed -i "s/=root [a-fA-F0-9]\{4\}-[a-fA-F0-9]\{4\}/=root ${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg sed -i "s/=root [a-fA-F0-9]\{4\}-[a-fA-F0-9]\{4\}/=root ${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg - rm -f /boot/resize-volumio-datapart + rm /boot/resize-volumio-datapart rm /boot/kernel_update sync umount /boot rm -rf /boot + /bin/sh echo b > /proc/sysrq-trigger fi From 9562cf12f7a8c7c4febb4fc1d222add4b81075a3 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 16 Oct 2017 22:53:44 +0200 Subject: [PATCH 310/673] Revert "X86 kernel updates" This reverts commit f358be5fd0f87308874454ddb7fed2827f1b4010. --- scripts/initramfs/init-x86 | 57 +++++++++++++++++--------------------- scripts/x86config.sh | 23 +++++++++++---- scripts/x86image.sh | 5 ++-- volumio/etc/default/grub | 2 +- volumio/etc/fstab.x86 | 2 +- 5 files changed, 48 insertions(+), 41 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index bc1d19a49..63094838f 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -163,6 +163,9 @@ if [ -z "${IMGFILE}" ]; then exit 0 fi +# set a default for kmsg +USE_KMSG=yes + print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg BOOTPART=${BOOTPART} @@ -190,7 +193,7 @@ print_msg "Initrd initialisation finished" # BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') -if [ -e "/mnt/imgpart/move-gpt" ]; then +if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "First time boot, moving the backup GPT table to the end of the disk..." gdisk ${BOOT_DEVICE} > /dev/null 2>&1 < /proc/sysrq-trigger fi @@ -399,6 +398,7 @@ mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext # Step 9: Create the overlay from RO and RW partitions # ==================================================== + mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union # Clean up. @@ -409,23 +409,18 @@ mount --move /mnt/imgpart /mnt/ext/union/imgpart chmod -R 777 /mnt/ext/union/imgpart -# Step 10: Mount the boot partiton read-write for runtime +# Step 10: The UUID of the bootpartition could possibly not match the one used in fstab. +# This is the case when an new version of the squash file has been created. +# This step fixes that # ============================================================================================ -print_msg "Mounting boot partition ${BOOTPART}" -mount -t vfat -o defaults,utf8,user,rw,umask=111,dmask=000 ${BOOTPART} /mnt/ext/union/boot - - -# Step 11: Run one-off custom script, passing boot device and root -# Using a copy of the custom script to avoid permissions problems -# chmod +x to ensure executability -# ================================================================ -if [ -f "/mnt/ext/union/boot/custom.sh" ]; then - cp /mnt/ext/union/boot/custom.sh . - chmod 777 ./custom.sh - ./custom.sh $BOOTDEV /mnt/ext/union - rm -rf ./custom .sh - rm -rf /mnt/ext/union/boot/custom.sh +UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) +print_msg "Editing fstab to use UUID=" +if [ -e "/mnt/ext/union/etc/fstab.prev" ]; then + rm /mnt/ext/union/etc/fstab.prev fi +mv /mnt/ext/union/etc/fstab /mnt/ext/union/etc/fstab.prev +cp /mnt/ext/union/etc/fstab.tmpl /mnt/ext/union/etc/fstab +sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /mnt/ext/union/etc/fstab print_msg ${VOLUMIO_VERSION} print_msg "Finishing initramfs, switching rootfs and starting the boot process..." diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 21171b320..b6c643358 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -29,15 +29,20 @@ echo "Getting the current kernel filename" KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` echo "Creating run-time template for syslinux config" -DEBUG="use_kmsg=yes" +DEBUG="USE_KMSG=no" echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro vga=792 imgpart=UUID=${UUID_IMG} bootpart=UUID=${UUID_BOOT} imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd -" > /boot/syslinux.cfg +" > /boot/syslinux.tmpl + +echo "Creating syslinux.cfg from template" +cp /boot/syslinux.tmpl /boot/syslinux.cfg +sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg +sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg echo "Editing the Grub UEFI config template" # Make grub boot menu transparent @@ -68,12 +73,14 @@ cp /boot/grub/grub.cfg /boot/efi/BOOT/grub.cfg echo "Telling the bootloader to read an external config" echo 'configfile ${cmdpath}/grub.cfg' > /grub-redir.cfg +echo "Using current grub.cfg as run-time template for kernel updates" +cp /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.tmpl +sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/efi/BOOT/grub.tmpl + echo "Inserting root and boot partition UUIDs (building the boot cmdline used in initramfs)" # Opting for finding partitions by-UUID sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg -sed -i "/Loading Linux/d" /boot/efi/BOOT/grub.cfg -sed -i "/Loading initial ramdisk/d" /boot/efi/BOOT/grub.cfg cat > /usr/sbin/policy-rc.d << EOF exit 101 @@ -113,6 +120,12 @@ rm -f /var/lib/apt/lists/*archive* apt-get clean rm /usr/sbin/policy-rc.d +echo "Copying fstab as a template to be used in initrd" +cp /etc/fstab /etc/fstab.tmpl + +echo "Editing fstab to use UUID=" +sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /etc/fstab + echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 23010924f..9c8c3e1de 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -123,7 +123,7 @@ LOOP_DEV=${LOOP_DEV} BOOT_PART=${BOOT_PART} " >> /mnt/volumio/rootfs/init.sh chmod +x /mnt/volumio/rootfs/init.sh -cat /mnt/volumio/rootfs/init.sh + echo $PATCH > /mnt/volumio/rootfs/patch chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' @@ -131,6 +131,7 @@ chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' EOF rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-image-*.deb +rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-firmware-*.deb rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86config.sh rm /mnt/volumio/rootfs/ata-modules.x86 sync @@ -176,8 +177,6 @@ rm -rf /mnt/squash #copy the squash image inside the boot partition cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh -echo "Signalling the init script to move the backup GPT table to the end of the disk " -touch /mnt/volumio/images/move-gpt sync echo "Unmounting Temp Devices" sudo umount -l /mnt/volumio/images diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index 1ecdab595..6ad6aea03 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -6,7 +6,7 @@ GRUB_DEFAULT='' GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Volumio Audiophile Music player" -GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 use_kmsg=yes" +GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 USE_KMSG=no" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs diff --git a/volumio/etc/fstab.x86 b/volumio/etc/fstab.x86 index b6852e19a..3f10bb06f 100644 --- a/volumio/etc/fstab.x86 +++ b/volumio/etc/fstab.x86 @@ -1,6 +1,6 @@ proc /proc proc defaults 0 0 #/dev/sda1 / ext4 defaults,noatime,nodiratime 0 1 -#%%BOOTPART%% /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +%%BOOTPART%% /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 From 511228d6b4c4daa0b4c8f497d1dbd924bca11b02 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 19 Oct 2017 22:57:44 +0200 Subject: [PATCH 311/673] Revert "Pi: move kernel to 4.9.51" This reverts commit fe67f4bb5f2c999bd474dadc9483f889f1a5d0cc. --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index f67d56c41..0aba5c64d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.9.51" +KERNEL_VERSION="4.9.41" case $KERNEL_VERSION in "4.4.9") @@ -63,9 +63,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.51") - KERNEL_REV="1036" - KERNEL_COMMIT="913eddd6d23f14ce34ae473a4c080c5c840ed583" + "4.9.41") + KERNEL_REV="1023" + KERNEL_COMMIT="b9becbbf3f48e39f719ca6785d23c53ee0cdbe49" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 02ceb56fa757b30cc2ba5135d1c08765664dc113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 20 Oct 2017 20:04:02 +0200 Subject: [PATCH 312/673] X86: fix factory reset issue --- scripts/initramfs/init-x86 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 63094838f..7fbdf4e66 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -295,6 +295,8 @@ if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Factory reset executed: part III - Squash" print_msg "Restarting" sync + umount /mnt/factory + rm -r /mnt/factory echo b > /proc/sysrq-trigger fi if [ -e "/mnt/factory/user_data" ]; then From 1ba4b87e9b0e044e4fc06d146b7951afc8fb59ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 22 Oct 2017 18:08:35 +0200 Subject: [PATCH 313/673] Fix potential fatal relocation of ldlinux.sys --- scripts/initramfs/init-x86 | 8 +++++++- scripts/x86image.sh | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 7fbdf4e66..14864bf0a 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -215,8 +215,14 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "Creating archive for factory kernel..." mkdir /mnt/factory mount -t vfat ${BOOT_DEVICE}1 /mnt/factory - tar cf /mnt/imgpart/kernel_current.tar -C /mnt/factory . +# exclude ldlinux.sys from kernel tar's to avoid a relocation during kernel-update or factory-reset +# (little workaround, as this tar version does not support the --exclude= option) + mkdir /mnt/imgpart/boot + cp -pR /mnt/factory/* /mnt/imgpart/boot + rm /mnt/imgpart/boot/ldlinux.sys + tar cf /mnt/imgpart/kernel_current.tar -C /mnt/imgpart/boot . cp /mnt/imgpart/kernel_current.tar /mnt/imgpart/kernel_factory.tar + rm -r /mnt/imgpart/boot umount /mnt/factory rm -r /mnt/factory fi diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 9c8c3e1de..ee71bd69d 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -130,7 +130,7 @@ chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' /x86config.sh -p EOF -rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-image-*.deb +rm /mnt/volumio/rootfs/linux-image-*.deb rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-firmware-*.deb rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86config.sh rm /mnt/volumio/rootfs/ata-modules.x86 @@ -162,7 +162,7 @@ if [ -e /mnt/kernel_current.tar ]; then fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' --exclude='ldlinux.sys' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* From ad5818c55801ca3f1f8c9d9cda2a08eb98427205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 27 Oct 2017 18:07:05 +0200 Subject: [PATCH 314/673] X86: make move backup GPT more flexible (not only at first boot) --- scripts/initramfs/init-x86 | 3 ++- scripts/x86image.sh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 14864bf0a..5ff1b6b06 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -193,7 +193,7 @@ print_msg "Initrd initialisation finished" # BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') -if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then +if [ -e "/mnt/imgpart/move-gpt" ]; then print_msg "First time boot, moving the backup GPT table to the end of the disk..." gdisk ${BOOT_DEVICE} > /dev/null 2>&1 < Date: Sat, 28 Oct 2017 23:55:48 +0200 Subject: [PATCH 315/673] Improve dynamicswap service definition Have unit consistent with swap requirements as per this: https://www.freedesktop.org/software/systemd/man/systemd.swap.html#Default%20Dependencies Is cleaner for proper reboot & shutdown. (also similar to what LibreELEC does https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/sysutils/util-linux/system.d/swap.service) Tested ok on PiZero --- volumio/lib/systemd/system/dynamicswap.service | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/volumio/lib/systemd/system/dynamicswap.service b/volumio/lib/systemd/system/dynamicswap.service index 59f6938a2..331f5ae2e 100644 --- a/volumio/lib/systemd/system/dynamicswap.service +++ b/volumio/lib/systemd/system/dynamicswap.service @@ -1,3 +1,11 @@ +[Unit] +Description = dynamicswap service +DefaultDependencies=false + +Before=swap.target umount.target +Conflicts=umount.target +Wants=swap.target + [Service] ExecStart=/bin/dynswap.sh StandardOutput=syslog From b90a06fb3699c44b1ca1e1845c4dce07bd877602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 29 Oct 2017 12:34:36 +0100 Subject: [PATCH 316/673] Rock64: Inital version --- scripts/initramfs/init.nextarm | 380 +++++++++++++++++++++++++++++++++ scripts/rock64config.sh | 14 +- scripts/rock64image.sh | 12 +- 3 files changed, 401 insertions(+), 5 deletions(-) create mode 100755 scripts/initramfs/init.nextarm diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm new file mode 100755 index 000000000..37b4ee8c4 --- /dev/null +++ b/scripts/initramfs/init.nextarm @@ -0,0 +1,380 @@ +#!/bin/busybox sh + +# Default PATH differs between shells, and is not automatically exported +# by klibc dash. Make it consistent. +export PATH=/sbin:/usr/sbin:/bin:/usr/bin + +[ -d /proc ] || mkdir /proc +mount -t proc none /proc +[ -d /sys ] || mkdir /sys +mount -t sysfs none /sys + +mknod /dev/null c 1 3 +mknod /dev/tty c 5 0 +[ -e /dev/console ] || mknod /dev/console c 5 1 + +mdev -s + +#Defaults which may be overridden by cmdline parameters +USE_KMSG="yes" +HWDEVICE="empty" +BOOTDEV="mmcblk0" +#Device/Partition Separator i.e. the character between parentdev and partition index +DPS="p" +#default values: +IMGPART="/dev/${BOOTDEV}${DPS}2" +DATAPART="/dev/${BOOTDEV}${DPS}3" +BOOTPART="/dev/${BOOTDEV}${DPS}1" + +# Display a message or print directly to /dev/kmsg +print_msg() { +if [ $USE_KMSG == yes ]; then + echo "initramfs:" $1 >> /dev/kmsg +else + echo "initramfs:" $1 +fi +} + +# Parse the kernel command line + +CMDLINE="$(cat /proc/cmdline)" + +parse_disk() { + if [ "$(echo $1|cut -c -5)" = "UUID=" ]; then + # $1 is a UUID + echo $(findfs $1) + elif [ "$(echo $1|cut -c -6)" = "LABEL=" ]; then + # $1 is a LABEL + echo $(findfs $1) + elif [ "$(echo $1|cut -c -5)" = "/dev/" ]; then + # $1 is a device name + echo $1 + else + # $1 is unrecognized. + echo "unknown-disk" + fi +} + +DO_GEN=no + +for p in ${CMDLINE}; +do + key=${p%%=*} + value=${p#*=} + case $key in + imgpart) + IMGPART=`parse_disk $value` + ;; + imgfile) + IMGFILE=$value + ;; + bootdelay) + BOOTDELAY=$value + ;; + use_kmsg) + USE_KMSG=$value + ;; + bootdev) + BOOTDEV=$value + ;; + dps) + DPS=$value + ;; + genpnames) + DO_GEN=yes + ;; + bootpart) + BOOTPART=`parse_disk $value` + ;; + datapart) + DATAPART=`parse_disk $value` + ;; + hwdevice) + HWDEVICE=$value + ;; + esac +done + +if [ $DO_GEN == yes ]; then + print_msg "re-generating partition names..." + IMGPART="/dev/${BOOTDEV}${DPS}2" + DATAPART="/dev/${BOOTDEV}${DPS}3" + BOOTPART="/dev/${BOOTDEV}${DPS}1" +fi +#Hardware specific adaptions + +#When we did not already get the device name from the cmdline, try getting it from cpuinfo +if [ $HWDEVICE == empty ]; then + HWDEVICE="$(cat /proc/cpuinfo | grep Hardware | awk '{print $3}' )" +fi + +if [ $HWDEVICE == ODROID-C2 ]; then + exec >/dev/kmsg 2>&1 /dev/kmsg 2>&1 /proc/sysrq-trigger + fi + if [ -e /mnt/usb/factory_reset ]; then + print_msg "Factory Reset on USB" + mkdir /mnt/factory + mount -t auto ${BOOTPART} /mnt/factory + echo " " > /mnt/factory/factory_reset + umount /mnt/factory + rm -r /mnt/factory + rm /mnt/usb/factory_reset + fi + umount /dev/sda1 + rm -r /mnt/usb +else + if [ "/dev/sda1" == "${BOOTPART}" ]; then + print_msg "Not checking for firmware if you boot from USB. Sorry!" + else + print_msg "No USB device detected (when incorrect, try adding 'bootdelay=5' to your boot cmdline)" + fi +fi + + +# 2) init a loop pointing to the image file +loop_free=$(losetup -f | sed s#p/#p#) +if [ ! -e ${loop_free} ]; then + print_msg "Device node does not exist, creating it..." + # use last char from loop_device as minor device number + minor=$(echo ${loop_free} | sed 's/.*\(.\)/\1/') + mknod $loop_free b 7 $minor +fi +losetup $loop_free /mnt/imgpart/${IMGFILE} + +# 3) mount the squashfs to /mnt/static +[ -d /mnt/static ] || mkdir /mnt/static +mount -t squashfs $loop_free /mnt/static + +VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" + +#if there is factory file then format data partition +# +mkdir /mnt/factory +mount -t auto ${BOOTPART} /mnt/factory +if [ -e "/mnt/factory/factory_reset" ]; then + print_msg "Executing factory reset" + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + print_msg "Factory reset executed: part I - User DATA Part" + tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory + print_msg "Factory reset executed: part II - Kernel" + cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh + print_msg "Factory reset executed: part III - Squash" + print_msg "Factory reset successfully executed" + sync + rm /mnt/factory/factory_reset + + umount /mnt/factory + rm -r /mnt/factory + print_msg "Restarting" + echo b > /proc/sysrq-trigger +fi +if [ -e "/mnt/factory/user_data" ]; then + print_msg "Deleting User Data" + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + rm /mnt/factory/user_data + print_msg "User Data successfully deleted " +fi +umount /mnt/factory +rm -r /mnt/factory + + +# if the update failed before completion +mkdir boot +mount -t vfat ${BOOTPART} /boot +if [ -e "/boot/update_process" ]; then +print_msg "Previous update attempt failed, restoring fallbacks" + cp /mnt/imgpart/kernel_fallback.tar /mnt/imgpart/kernel_current.tar + cp /mnt/imgpart/volumio_fallback.tar /mnt/imgpart/volumio_current.tar + if [-e "/boot/kernel_update" ]; then + rm /boot/kernel_update + fi + rm /boot/update_process +fi + +# if the kernel has been updated, and no error has occurred before completition +if [ -e "/boot/kernel_update" ]; then +print_msg "unpacking kernel" + tar xf /mnt/imgpart/kernel_current.tar -C /boot + if [ -e "/mnt/imgpart/config.txt.bak" ]; then + print_msg "Restoring custom config.txt content" + I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` + echo "\n" >> /boot/config.txt + echo "$I2S" >> /boot/config.txt + rm /mnt/imgpart/config.txt.bak + fi + rm /boot/kernel_update + sync + umount /boot + rm -rf /boot + echo b > /proc/sysrq-trigger +fi + +# if data partition needs to be resized +#mount -t auto /dev/${BOOTDEV}p1 /boot +if [ -e "/boot/resize-volumio-datapart" ]; then +print_msg "Re-sizing Volumio data partition" + END="$(parted -s /dev/${BOOTDEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" + parted -s /dev/${BOOTDEV} resizepart 3 ${END} + e2fsck -fy ${DATAPART} + #force resize as we did just run e2fsck. Resize2fs seems ro not detect this occasionally + resize2fs -f ${DATAPART} + print_msg "Volumio data partition succesfully resized" + parted -s /dev/${BOOTDEV} unit MB print + rm /boot/resize-volumio-datapart +fi + +# clear the mountpoint +umount /boot +rm -rf /boot + +# 4) mount a filesystem for write access to the static image +# unclear: memory size? -o size=1024M +[ -d /mnt/ext ] || mkdir -m 777 /mnt/ext +mount -t ext4 -o noatime ${DATAPART} /mnt/ext + +[ -d /mnt/ext/dyn ] || mkdir -m 777 /mnt/ext/dyn +[ -d /mnt/ext/union ] || mkdir -m 777 /mnt/ext/union + +# 5) mount the writable overlay to the static image +if [ $OVERLAY == WITHWRKDIR ]; then + [ -d /mnt/ext/work ] || mkdir -m 777 /mnt/ext/work + print_msg "With Option:" $OVERLAY + mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union +else + print_msg "Without Option:" $OVERLAY + mount -t overlayfs overlayfs /mnt/ext/union -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn +fi + +[ -d /mnt/ext/union/static ] || mkdir -m 777 /mnt/ext/union/static +[ -d /mnt/ext/union/imgpart ] || mkdir -m 777 /mnt/ext/union/imgpart +mount --move /mnt/static /mnt/ext/union/static +mount --move /mnt/imgpart /mnt/ext/union/imgpart + +chmod -R 777 /mnt/ext/union/imgpart + +#idea: Mount /boot already here to that systemd does not have to mount it an we +# can be flexible. However this should be confirmed by somebody who is more familiar +# with systemd and who can tell what fstab is used for in the system + +[ -d /mnt/ext/union/boot ] || mkdir -m 777 /mnt/ext/union/boot +mount -t vfat -o defaults,utf8,user,rw,umask=111,dmask=000 ${BOOTPART} /mnt/ext/union/boot + + +umount /proc +umount /sys + +print_msg ${VOLUMIO_VERSION} +print_msg "Finish initramfs, continue booting Volumio" +exec switch_root /mnt/ext/union /sbin/init + +print_msg "Failed to switch_root, dropping to a shell" +exec sh + diff --git a/scripts/rock64config.sh b/scripts/rock64config.sh index d9eb3cff0..33935dce1 100755 --- a/scripts/rock64config.sh +++ b/scripts/rock64config.sh @@ -3,12 +3,14 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh echo "Creating \"fstab\"" echo "# ROCK64 fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -/dev/mmcblk1p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -16,10 +18,18 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab +echo "Creating boot config" +echo "label kernel-4.4 + kernel /Image + fdt /rk3328-rock64.dtb + initrd /uInitrd + append earlycon=uart8250,mmio32,0xff130000 imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh hwdevice=Rock64 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} +" > /boot/extlinux/extlinux.conf + echo "#!/bin/sh sysctl abi.cp15_barrier=2 " > /usr/local/bin/rock64-init.sh -#TODO,. add the following to the init scriüp after verification +#TODO,. add the following to the init script after verification #for i in 1 2 3 ; do # echo 4 >/proc/irq/$(awk -F":" "/xhci/ {print \$1}" /proc/irq/$(awk -F":" "/eth0/ {print \$1}" /mnt/volumio/rootfs/patch +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /rock64config.sh EOF #cleanup -rm /mnt/volumio/rootfs/rock64config.sh /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/rock64config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev From a7099cc1102c3952334f5cc73879380c48dc2e0c Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 31 Oct 2017 16:26:05 +0100 Subject: [PATCH 317/673] Blacklist noisy module for sparky --- scripts/sparkyconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/sparkyconfig.sh b/scripts/sparkyconfig.sh index d7f15f6c5..3eab76087 100755 --- a/scripts/sparkyconfig.sh +++ b/scripts/sparkyconfig.sh @@ -20,6 +20,9 @@ tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 #echo "snd-soc-allo-piano-dac-plus #snd-soc-allo-piano-dac" >> /etc/modules +echo "Blacklisting noisy module" +echo "blacklist ctp_gsl3680" > /etc/modprobe.d/blacklist.conf + echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools From db1fe7e346026af599b415bca3f2ffe1e7500244 Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 31 Oct 2017 18:38:51 +0100 Subject: [PATCH 318/673] Adding dd to nopasswd --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index fc8059841..38564f7e0 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -92,7 +92,7 @@ alias ifconfig="sudo /sbin/ifconfig" #Sudoers Nopasswd echo 'Adding Safe Sudoers NoPassw permissions' -echo "volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink" >> /etc/sudoers +echo "volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd" >> /etc/sudoers echo volumio > /etc/hostname chmod 777 /etc/hostname From 02c80965fa791f02ea772b8cbc9648095faac572 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 2 Nov 2017 18:52:58 +0100 Subject: [PATCH 319/673] e2fsck fix automatically --- scripts/initramfs/init-x86 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 5ff1b6b06..bafa665b7 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -371,7 +371,7 @@ if [ -e "/boot/resize-volumio-datapart" ]; then print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" parted -s ${BOOT_DEVICE} resizepart 3 ${END} > /boot/resize-datapart.log - e2fsck -f ${BOOT_DEVICE}3 + e2fsck -f ${BOOT_DEVICE}3 -y resize2fs ${BOOT_DEVICE}3 > /boot/resize-datapart.log print_msg "Volumio data partition succesfully resized" parted -s ${BOOT_DEVICE} unit MB print > /boot/resize-datapart.log From be934b5d0494a4cd2309a0cfe3f15fb98301296c Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 2 Nov 2017 18:59:37 +0100 Subject: [PATCH 320/673] adding dcfldd --- recipes/x86.conf | 2 +- scripts/volumioconfig.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index 1e1d57cc2..e8915304b 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -37,7 +37,7 @@ keyring=debian-archive-keyring suite=jessie [FS] -packages=samba cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient winbind libnss-winbind +packages=samba cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient winbind libnss-winbind dcfldd source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 38564f7e0..602a7eef0 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -92,7 +92,7 @@ alias ifconfig="sudo /sbin/ifconfig" #Sudoers Nopasswd echo 'Adding Safe Sudoers NoPassw permissions' -echo "volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd" >> /etc/sudoers +echo "volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd" >> /etc/sudoers echo volumio > /etc/hostname chmod 777 /etc/hostname From 6d28782c5c189fc98d942c3fcd15e7ad249dd2b4 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 4 Nov 2017 17:10:29 +0100 Subject: [PATCH 321/673] Revert "Revert "Pi: move kernel to 4.9.51"" This reverts commit 511228d6b4c4daa0b4c8f497d1dbd924bca11b02. --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d446b789b..53ed718a6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.9.41" +KERNEL_VERSION="4.9.51" case $KERNEL_VERSION in "4.4.9") @@ -63,9 +63,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.41") - KERNEL_REV="1023" - KERNEL_COMMIT="b9becbbf3f48e39f719ca6785d23c53ee0cdbe49" + "4.9.51") + KERNEL_REV="1036" + KERNEL_COMMIT="913eddd6d23f14ce34ae473a4c080c5c840ed583" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 6b2d17b49831f788d10609e5ad0a9d12da2773b8 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 6 Nov 2017 22:29:05 +0100 Subject: [PATCH 322/673] Nanopi64 tentative --- build.sh | 6 +- scripts/nanopi64config.sh | 82 ++++++++++++++++ scripts/nanopi64image.sh | 200 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 287 insertions(+), 1 deletion(-) create mode 100755 scripts/nanopi64config.sh create mode 100755 scripts/nanopi64image.sh diff --git a/build.sh b/build.sh index 025764291..386febf59 100755 --- a/build.sh +++ b/build.sh @@ -27,7 +27,7 @@ Switches: -d Create Image for Specific Devices. Supported device names: pi, udooneo, udooqdl, cuboxi, cubietruck, compulab, odroidc1, odroidc2, odroidxu4, sparky, bbb, pine64, - bpim2u, bpipro, tinkerboard, sopine64, rock64, voltastream0 + bpim2u, bpipro, tinkerboard, sopine64, rock64, voltastream0, nanopi64 -v Version must be a dot separated number. Example 1.102 . -l Create docker layer. Give a Docker Repository name as the argument. @@ -258,6 +258,10 @@ case "$DEVICE" in # this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 sh scripts/pine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + nanopi64) echo 'Writing NanoPI A64 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/nanopi64limage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; bpim2u) echo 'Writing BPI-M2U Image File' check_os_release "arm" "$VERSION" "$DEVICE" sh scripts/bpim2uimage.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/scripts/nanopi64config.sh b/scripts/nanopi64config.sh new file mode 100755 index 000000000..4891e66fe --- /dev/null +++ b/scripts/nanopi64config.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# Odroid C2 fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Adding default sound modules and wifi" +echo "sunxi_codec +sunxi_i2s +sunxi_sndcodec +8723bs +" >> /etc/modules + +echo "Blacklisting 8723bs_vq0" +echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-nanopi64.conf + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep'" +echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp diff --git a/scripts/nanopi64image.sh b/scripts/nanopi64image.sh new file mode 100755 index 000000000..c44cccb09 --- /dev/null +++ b/scripts/nanopi64image.sh @@ -0,0 +1,200 @@ +#!/bin/sh + +# Build Architecture Debian 32bit (to be changed to armv8) +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-nanopi64.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +sudo parted -s "${LOOP_DEV}" mklabel msdos +sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +sudo parted -s "${LOOP_DEV}" set 1 boot on +sudo parted -s "${LOOP_DEV}" print +sudo partprobe "${LOOP_DEV}" +sudo kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +sudo mkfs -t vfat -n BOOT "${BOOT_PART}" +sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" +sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the Nanopi kernel/ platform files" +if [ -d platform-nanopi ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-nanopi folder + # that will refresh all the odroid platforms, see below +else + echo "Clone Nanopi64 files from repo" + git clone https://github.com/gkkpch/platform-nanopi platform-nanopi + echo "Unpack the platform files" + cd platform-nanopi + tar xfJ nanopi-a64.tar.xz + cd .. +fi + +echo "Copying the bootloader" +sudo dd if=platform-nanopi/nanopi-a64/u-boot/boot0.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 +sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot-with-dtb.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + sudo mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images +sudo mkdir /mnt/volumio/rootfs +sudo mkdir /mnt/volumio/rootfs/boot +sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying Nanopi64 boot files" +mkdir /mnt/volumio/rootfs/boot/nanopi-a64 +sudo cp platform-nanopi/nanopi-a64/boot/nanopi-a64/Image /mnt/volumio/rootfs/boot/nanopi-a64 +sudo cp platform-nanopi/nanopi-a64/boot/nanopi-a64/*.dtb /mnt/volumio/rootfs/boot/nanopi-a64 +sudo cp platform-nanopi/nanopi-a64/boot/uEnv.txt /mnt/volumio/rootfs/boot +sudo cp platform-nanopi/nanopi-a64/boot/Image.version /mnt/volumio/rootfs/boot +sudo cp platform-nanopi/nanopi-a64/boot/config* /mnt/volumio/rootfs/boot + +echo "Copying Nanopi64 modules and firmware" +sudo cp -pdR platform-nanopi/nanopi-a64/lib/modules /mnt/volumio/rootfs/lib/ +sudo cp -pdR platform-nanopi/nanopi-a64/lib/firmware /mnt/volumio/rootfs/lib/ + +sync + +echo "Preparing to run chroot for more Nanopi a64 configuration" +cp scripts/nanopi64config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/nanopi64config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/nanopi64config.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> NanoPI64 device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#sudo rm -r platform-nanopi +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + sudo mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar.gz ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar.gz +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar.gz --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +if [ -e Volumio.sqsh ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -r Volumio.sqsh +fi + +echo "Creating SquashFS" +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +sudo umount -l /mnt/volumio/images +sudo umount -l /mnt/volumio/rootfs/boot + +sudo dmsetup remove_all +sudo losetup -d ${LOOP_DEV} +sync From 6d06d5c44499c385b4260e79b88d90a307bdfa83 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 6 Nov 2017 23:16:18 +0100 Subject: [PATCH 323/673] fix image script invocation for nanopi --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 386febf59..103947ee8 100755 --- a/build.sh +++ b/build.sh @@ -260,7 +260,7 @@ case "$DEVICE" in ;; nanopi64) echo 'Writing NanoPI A64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" - sh scripts/nanopi64limage.sh -v "$VERSION" -p "$PATCH" -a armv7 + sh scripts/nanopi64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; bpim2u) echo 'Writing BPI-M2U Image File' check_os_release "arm" "$VERSION" "$DEVICE" From b1261c111fb119e700cc14c2745a0bcfe7b5e3d6 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 7 Nov 2017 00:54:44 +0100 Subject: [PATCH 324/673] fix uboot write --- scripts/nanopi64image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nanopi64image.sh b/scripts/nanopi64image.sh index c44cccb09..d3d630659 100755 --- a/scripts/nanopi64image.sh +++ b/scripts/nanopi64image.sh @@ -76,8 +76,8 @@ else fi echo "Copying the bootloader" -sudo dd if=platform-nanopi/nanopi-a64/u-boot/boot0.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 -sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot-with-dtb.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +sudo dd if=platform-nanopi/nanopi-a64/u-boot/boot0_sdcard.fex of=${LOOP_DEV} conv=notrunc bs=1k seek=8 +sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot.fex of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 sync echo "Preparing for Volumio rootfs" From 04f5669cce8a33d7093b9a4af2826be26dd90054 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 7 Nov 2017 22:48:29 +0100 Subject: [PATCH 325/673] changes to nanopiimage --- scripts/nanopi64image.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/nanopi64image.sh b/scripts/nanopi64image.sh index d3d630659..dc73d56e8 100755 --- a/scripts/nanopi64image.sh +++ b/scripts/nanopi64image.sh @@ -76,8 +76,8 @@ else fi echo "Copying the bootloader" -sudo dd if=platform-nanopi/nanopi-a64/u-boot/boot0_sdcard.fex of=${LOOP_DEV} conv=notrunc bs=1k seek=8 -sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot.fex of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot-sunxi-with-spl.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 +#sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot.fex of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 sync echo "Preparing for Volumio rootfs" @@ -109,7 +109,7 @@ echo "Copying Nanopi64 boot files" mkdir /mnt/volumio/rootfs/boot/nanopi-a64 sudo cp platform-nanopi/nanopi-a64/boot/nanopi-a64/Image /mnt/volumio/rootfs/boot/nanopi-a64 sudo cp platform-nanopi/nanopi-a64/boot/nanopi-a64/*.dtb /mnt/volumio/rootfs/boot/nanopi-a64 -sudo cp platform-nanopi/nanopi-a64/boot/uEnv.txt /mnt/volumio/rootfs/boot +sudo cp platform-nanopi/nanopi-a64/boot/uEnv.txt /mnt/volumio/rootfs/boot/uEnv.rename.txt sudo cp platform-nanopi/nanopi-a64/boot/Image.version /mnt/volumio/rootfs/boot sudo cp platform-nanopi/nanopi-a64/boot/config* /mnt/volumio/rootfs/boot From 6c471d8161d1e18796652f1807586f01e0fbf3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 11 Nov 2017 19:10:58 +0100 Subject: [PATCH 326/673] Enabled support for sopine64 and pine64 LTS --- scripts/pine64image.sh | 32 ++++++++++++++++---------------- scripts/sopine64image.sh | 38 +++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 8c0696be4..f1697f17c 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -60,24 +60,24 @@ sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync -echo "Preparing for the pine64 kernel/ platform files" +echo "Preparing for the (so)Pine64(LTS) kernel/ platform files" if [ -d platform-pine64 ] then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-pine64 folder # that will refresh all the odroid platforms, see below else - echo "Clone pine64 files from repo" + echo "Clone (so)Pine64(LTS) files from repo" git clone https://github.com/volumio/platform-pine64.git platform-pine64 echo "Unpack the platform files" cd platform-pine64 - tar xfJ pine64.tar.xz + tar xfJ sopine64lts.tar.xz cd .. fi -echo "Copying the bootloader" -sudo dd if=platform-pine64/pine64/u-boot/boot0.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 -sudo dd if=platform-pine64/pine64/u-boot/u-boot-with-dtb.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +echo "Copying the Pine64 bootloader" +sudo dd if=platform-pine64/sopine64/u-boot/boot0.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 +sudo dd if=platform-pine64/sopine64/u-boot/u-boot-with-dtb.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 sync echo "Preparing for Volumio rootfs" @@ -105,20 +105,20 @@ sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying pine64 boot files" +echo "Copying (so)Pine64(LTS) boot files" mkdir /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/pine64/boot/pine64/Image /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/pine64/boot/pine64/*.dtb /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/pine64/boot/uEnv.txt /mnt/volumio/rootfs/boot -sudo cp platform-pine64/pine64/boot/Image.version /mnt/volumio/rootfs/boot -sudo cp platform-pine64/pine64/boot/config* /mnt/volumio/rootfs/boot +sudo cp platform-pine64/sopine64/boot/pine64/Image /mnt/volumio/rootfs/boot/pine64 +sudo cp platform-pine64/sopine64/boot/pine64/*.dtb /mnt/volumio/rootfs/boot/pine64 +sudo cp platform-pine64/sopine64/boot/uEnv.txt /mnt/volumio/rootfs/boot +sudo cp platform-pine64/sopine64/boot/Image.version /mnt/volumio/rootfs/boot +sudo cp platform-pine64/sopine64/boot/config* /mnt/volumio/rootfs/boot -echo "Copying pine64 modules and firmware" -sudo cp -pdR platform-pine64/pine64/lib/modules /mnt/volumio/rootfs/lib/ -sudo cp -pdR platform-pine64/pine64/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying (so)Pine64(LTS) modules and firmware" +sudo cp -pdR platform-pine64/sopine64/lib/modules /mnt/volumio/rootfs/lib/ +sudo cp -pdR platform-pine64/sopine64/lib/firmware /mnt/volumio/rootfs/lib/ echo "Confguring ALSA with sane defaults" -sudo cp platform-pine64/pine64/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +sudo cp platform-pine64/sopine64/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa sync diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index 92cca3087..5a06a855e 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-sopine64.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-sopine64LTS.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" @@ -60,24 +60,24 @@ sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync -echo "Preparing for the pine64 kernel/ platform files" +echo "Preparing for the (so)Pine64(LTS) kernel/ platform files" if [ -d platform-pine64 ] then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-pine64 folder # that will refresh all the odroid platforms, see below else - echo "Clone pine64 files from repo" + echo "Clone (so)Pine64(LTS) files from repo" git clone https://github.com/volumio/platform-pine64.git platform-pine64 - echo "Unpack the platform files" + echo "Unpack the (so)Pine64(LTS) platform files" cd platform-pine64 - tar xfJ pine64.tar.xz + tar xfJ sopine64.tar.xz cd .. fi -echo "Copying the bootloader" -sudo dd if=platform-pine64/pine64/u-boot/boot0so.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 -sudo dd if=platform-pine64/pine64/u-boot/u-boot-with-dtb-so.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +echo "Copying the soPine64 (and Pine64LTS) bootloader" +sudo dd if=platform-pine64/sopine64/u-boot/boot0-pine64-sopine.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 +sudo dd if=platform-pine64/sopine64/u-boot/u-boot-pine64-sopine.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 sync echo "Preparing for Volumio rootfs" @@ -105,20 +105,20 @@ sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying SOPINE A64 boot files" +echo "Copying (so)Pine64(LTS) boot files" mkdir /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/pine64/boot/pine64/Image /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/pine64/boot/pine64/*.dtb /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/pine64/boot/uEnv.txt /mnt/volumio/rootfs/boot -sudo cp platform-pine64/pine64/boot/Image.version /mnt/volumio/rootfs/boot -sudo cp platform-pine64/pine64/boot/config* /mnt/volumio/rootfs/boot +sudo cp platform-pine64/sopine64/boot/pine64/Image /mnt/volumio/rootfs/boot/pine64 +sudo cp platform-pine64/sopine64/boot/pine64/*.dtb /mnt/volumio/rootfs/boot/pine64 +sudo cp platform-pine64/sopine64/boot/uEnv.txt /mnt/volumio/rootfs/boot +sudo cp platform-pine64/sopine64/boot/Image.version /mnt/volumio/rootfs/boot +sudo cp platform-pine64/sopine64/boot/config* /mnt/volumio/rootfs/boot -echo "Copying SOPINE A64 modules and firmware" -sudo cp -pdR platform-pine64/pine64/lib/modules /mnt/volumio/rootfs/lib/ -sudo cp -pdR platform-pine64/pine64/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying (so)Pine64(LTS) modules and firmware" +sudo cp -pdR platform-pine64/sopine64/lib/modules /mnt/volumio/rootfs/lib/ +sudo cp -pdR platform-pine64/sopine64/lib/firmware /mnt/volumio/rootfs/lib/ echo "Confguring ALSA with sane defaults" -sudo cp platform-pine64/pine64/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +sudo cp platform-pine64/sopine64/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa sync @@ -152,7 +152,7 @@ umount -l /mnt/volumio/rootfs/sys #sudo cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc #sudo cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -echo "==> SOPINE A64 device installed" +echo "==> soPine64/ Pine64 LTS device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" From 6c3427a60ee02f04319e478883cf258b0ec1eac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 11 Nov 2017 19:21:51 +0100 Subject: [PATCH 327/673] Pine64: temporary switch to gkkpch repo --- scripts/pine64image.sh | 2 +- scripts/sopine64image.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index f1697f17c..123026437 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -68,7 +68,7 @@ then # that will refresh all the odroid platforms, see below else echo "Clone (so)Pine64(LTS) files from repo" - git clone https://github.com/volumio/platform-pine64.git platform-pine64 + git clone https://github.com/gkkpch/platform-pine64.git platform-pine64 echo "Unpack the platform files" cd platform-pine64 tar xfJ sopine64lts.tar.xz diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index 5a06a855e..b239adc23 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -68,10 +68,10 @@ then # that will refresh all the odroid platforms, see below else echo "Clone (so)Pine64(LTS) files from repo" - git clone https://github.com/volumio/platform-pine64.git platform-pine64 + git clone https://github.com/gkkpch/platform-pine64.git platform-pine64 echo "Unpack the (so)Pine64(LTS) platform files" cd platform-pine64 - tar xfJ sopine64.tar.xz + tar xfJ sopine64lts.tar.xz cd .. fi From e340a291b1db37175a73fa1272a240bbb77447d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 11 Nov 2017 20:49:04 +0100 Subject: [PATCH 328/673] soPine64: Image name must match device name --- scripts/pine64image.sh | 2 +- scripts/sopine64image.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 123026437..f1697f17c 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -68,7 +68,7 @@ then # that will refresh all the odroid platforms, see below else echo "Clone (so)Pine64(LTS) files from repo" - git clone https://github.com/gkkpch/platform-pine64.git platform-pine64 + git clone https://github.com/volumio/platform-pine64.git platform-pine64 echo "Unpack the platform files" cd platform-pine64 tar xfJ sopine64lts.tar.xz diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index b239adc23..bad5c2819 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-sopine64LTS.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-sopine64.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" @@ -68,7 +68,7 @@ then # that will refresh all the odroid platforms, see below else echo "Clone (so)Pine64(LTS) files from repo" - git clone https://github.com/gkkpch/platform-pine64.git platform-pine64 + git clone https://github.com/volumio/platform-pine64.git platform-pine64 echo "Unpack the (so)Pine64(LTS) platform files" cd platform-pine64 tar xfJ sopine64lts.tar.xz From 39b5da742032263ab55e8ba6afccf17338f5b67a Mon Sep 17 00:00:00 2001 From: "Simon A. Eugster" Date: Mon, 13 Nov 2017 01:11:12 +0100 Subject: [PATCH 329/673] Run CMD in bash and not in user's standard shell --- volumio/opt/vc/bin/dtoverlay-pre | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/opt/vc/bin/dtoverlay-pre b/volumio/opt/vc/bin/dtoverlay-pre index cd449db0a..79068c504 100755 --- a/volumio/opt/vc/bin/dtoverlay-pre +++ b/volumio/opt/vc/bin/dtoverlay-pre @@ -4,7 +4,7 @@ if [ "$DISPLAY" == "" ]; then fi CMD="lxpanelctl alsastop >/dev/null" if [ $EUID -eq 0 ]; then - exec su volumio -c "$CMD" + exec su volumio --preserve-environment -c "$CMD" else exec "$CMD" fi From 62900a516cd6fd0fa6ac4859601f83feaaa5df16 Mon Sep 17 00:00:00 2001 From: "Simon A. Eugster" Date: Mon, 13 Nov 2017 01:14:10 +0100 Subject: [PATCH 330/673] Run CMD in bash and not in user's standard shell (dtoverlay-post) --- volumio/opt/vc/bin/dtoverlay-post | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/opt/vc/bin/dtoverlay-post b/volumio/opt/vc/bin/dtoverlay-post index 0153dea1c..a6f2e9d06 100755 --- a/volumio/opt/vc/bin/dtoverlay-post +++ b/volumio/opt/vc/bin/dtoverlay-post @@ -4,7 +4,7 @@ if [ "$DISPLAY" == "" ]; then fi CMD="lxpanelctl alsastart >/dev/null" if [ $EUID -eq 0 ]; then - exec su volumio -c "$CMD" + exec su volumio --preserve-environment -c "$CMD" else exec "$CMD" fi From 8b69aa838f03a55f61c5011f69cd8d90438118ea Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 13 Nov 2017 02:25:34 +0100 Subject: [PATCH 331/673] uImage creation --- scripts/nanopi64config.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/nanopi64config.sh b/scripts/nanopi64config.sh index 4891e66fe..498638853 100755 --- a/scripts/nanopi64config.sh +++ b/scripts/nanopi64config.sh @@ -80,3 +80,6 @@ touch /boot/resize-volumio-datapart echo "Creating initramfs 'volumio.initrd'" mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uImage from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd From 3c433b68752d5aa89bd812db4138e0f36330b2f7 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 14 Nov 2017 01:45:14 +0100 Subject: [PATCH 332/673] overlay instead of overlayfs --- scripts/nanopi64config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nanopi64config.sh b/scripts/nanopi64config.sh index 498638853..684af8a09 100755 --- a/scripts/nanopi64config.sh +++ b/scripts/nanopi64config.sh @@ -34,8 +34,8 @@ echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean -echo "Adding custom modules overlayfs, squashfs and nls_cp437" -echo "overlayfs" >> /etc/initramfs-tools/modules +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules From 162573aeb3b17907e6949d344b6137dbe8e96ae9 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 15 Nov 2017 08:11:08 +0100 Subject: [PATCH 333/673] clone all branchs --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 025764291..9353ef5cf 100755 --- a/build.sh +++ b/build.sh @@ -157,7 +157,7 @@ if [ -n "$BUILD" ]; then mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then echo "Cloning Volumio with all its history" - git clone -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio else git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi From 590de3327dd3c2910447c8164cef141ecd6f8aea Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 16 Nov 2017 17:24:48 +0000 Subject: [PATCH 334/673] CPU Tweaks --- scripts/configure.sh | 3 +++ scripts/volumioconfig.sh | 6 ++++++ volumio/bin/volumio_cpu_tweak | 21 +++++++++++++++++++ .../systemd/system/volumio_cpu_tweak.service | 15 +++++++++++++ 4 files changed, 45 insertions(+) create mode 100755 volumio/bin/volumio_cpu_tweak create mode 100644 volumio/lib/systemd/system/volumio_cpu_tweak.service diff --git a/scripts/configure.sh b/scripts/configure.sh index 01c51984f..5c3cac0a1 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -93,6 +93,9 @@ cp -rp volumio/usr/* build/$BUILD/root/usr/ #SSH cp volumio/bin/volumiossh.sh build/$BUILD/root/bin/volumiossh.sh chmod a+x build/$BUILD/root/bin/volumiossh.sh +#CPU TWEAK +cp volumio/bin/volumio_cpu_tweak build/$BUILD/root/bin/volumio_cpu_tweak +chmod a+x build/$BUILD/root/bin/volumio_cpu_tweak echo 'Done Copying Custom Volumio System Files' diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 602a7eef0..849e99277 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -542,5 +542,11 @@ touch /var/lib/dhcpcd5/dhcpcd-wlan0.lease touch /var/lib/dhcpcd5/dhcpcd-eth0.lease chmod -R 777 /var/lib/dhcpcd5 +##################### +#CPU Optimizations#----------------------------------------- +##################### + echo "Setting CPU governor to ondemand" echo 'GOVERNOR="ondemand"' > /etc/default/cpufrequtils + +ln -s /lib/systemd/system/volumio_cpu_tweak.service /etc/systemd/system/multi-user.target.wants/volumio_cpu_tweak.service diff --git a/volumio/bin/volumio_cpu_tweak b/volumio/bin/volumio_cpu_tweak new file mode 100755 index 000000000..2d77ea174 --- /dev/null +++ b/volumio/bin/volumio_cpu_tweak @@ -0,0 +1,21 @@ +#!/bin/sh + +CORES=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | tail -1` +MPD_PID=`/bin/pidof mpd` + +echo "Setting custom ondemand scheduling policies" +echo 10000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate +echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load +echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor +echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold +echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy + +echo "Renicing MPD" +/usr/bin/renice -n -19 $MPD_PID + +if [ "$CORES" -gt 2 ]; then + echo "Setting MPD Affinity" + /usr/bin/taskset -p 3 $MPD_PID +else + echo "Not enough cores to set MPD affinity" +fi diff --git a/volumio/lib/systemd/system/volumio_cpu_tweak.service b/volumio/lib/systemd/system/volumio_cpu_tweak.service new file mode 100644 index 000000000..35fd7eb4e --- /dev/null +++ b/volumio/lib/systemd/system/volumio_cpu_tweak.service @@ -0,0 +1,15 @@ +[Unit] +Description = Volumio Cpu Tweaker +After=volumio.service + +[Service] +ExecStart=/bin/volumio_cpu_tweak +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=volumio-cpu-tweak +User=root +Group=root + +[Install] +WantedBy=multi-user.target + From 73227912acaa477ba976505494db9779cce50493 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 16 Nov 2017 17:31:37 +0000 Subject: [PATCH 335/673] disable 0 turbo and keep only fiq fix --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 53ed718a6..d820c5a79 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -126,7 +126,7 @@ dtparam=i2c_arm=on disable_splash=1" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait smsc95xx.turbo_mode=N bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_split_enable=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt echo "adding gpio & spi group and permissions" groupadd -f --system gpio From 8c1dcbe2952334e91b117418d817da818fa2fb40 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 17 Nov 2017 17:11:04 +0100 Subject: [PATCH 336/673] use dns resolution as second priority --- volumio/etc/nsswitch.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/etc/nsswitch.conf b/volumio/etc/nsswitch.conf index 681adeb69..ba0845734 100644 --- a/volumio/etc/nsswitch.conf +++ b/volumio/etc/nsswitch.conf @@ -8,7 +8,7 @@ passwd: compat group: compat shadow: compat -hosts: files mdns4_minimal [NOTFOUND=return] wins dns +hosts: files dns mdns4_minimal [NOTFOUND=return] wins networks: files protocols: db files From 6875f16c709a40d78d951f247ac62c2e6b34d70b Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 22 Nov 2017 03:01:29 +0100 Subject: [PATCH 337/673] Removed DJMOUNT --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/x86.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 6d23f69fc..567b08641 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -36,7 +36,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount exiftool +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index cfc5c5da0..5a75caf48 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount exiftool +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index e8915304b..fcbaeefe5 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -43,7 +43,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests djmount exiftool +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 41db2879518af613504004317996e082b90d9c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 25 Nov 2017 14:56:28 +0100 Subject: [PATCH 338/673] Modified u-boot and boot script --- scripts/nanopi64config.sh | 2 +- scripts/nanopi64image.sh | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/nanopi64config.sh b/scripts/nanopi64config.sh index 684af8a09..9527e5716 100755 --- a/scripts/nanopi64config.sh +++ b/scripts/nanopi64config.sh @@ -35,7 +35,7 @@ rm -f /var/lib/apt/lists/*archive* apt-get clean echo "Adding custom modules overlay, squashfs and nls_cp437" -echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules diff --git a/scripts/nanopi64image.sh b/scripts/nanopi64image.sh index dc73d56e8..95a369b63 100755 --- a/scripts/nanopi64image.sh +++ b/scripts/nanopi64image.sh @@ -70,14 +70,13 @@ else echo "Clone Nanopi64 files from repo" git clone https://github.com/gkkpch/platform-nanopi platform-nanopi echo "Unpack the platform files" - cd platform-nanopi + cd platform-nanopi tar xfJ nanopi-a64.tar.xz cd .. fi echo "Copying the bootloader" -sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot-sunxi-with-spl.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 -#sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot.fex of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +sudo dd if=platform-nanopi/nanopi-a64/u-boot/u-boot-nanopi64.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 sync echo "Preparing for Volumio rootfs" @@ -106,12 +105,14 @@ sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying Nanopi64 boot files" -mkdir /mnt/volumio/rootfs/boot/nanopi-a64 -sudo cp platform-nanopi/nanopi-a64/boot/nanopi-a64/Image /mnt/volumio/rootfs/boot/nanopi-a64 -sudo cp platform-nanopi/nanopi-a64/boot/nanopi-a64/*.dtb /mnt/volumio/rootfs/boot/nanopi-a64 -sudo cp platform-nanopi/nanopi-a64/boot/uEnv.txt /mnt/volumio/rootfs/boot/uEnv.rename.txt -sudo cp platform-nanopi/nanopi-a64/boot/Image.version /mnt/volumio/rootfs/boot -sudo cp platform-nanopi/nanopi-a64/boot/config* /mnt/volumio/rootfs/boot +#mkdir /mnt/volumio/rootfs/boot/extlinux +sudo cp platform-nanopi/nanopi-a64/boot/Image /mnt/volumio/rootfs/boot/ +sudo cp platform-nanopi/nanopi-a64/boot/*.dtb /mnt/volumio/rootfs/boot/ +sudo cp platform-nanopi/nanopi-a64/boot/*.txt /mnt/volumio/rootfs/boot/ +# Overrides 2 u-boot environment defaults, allowing a boot script to be started. +sudo cp platform-nanopi/nanopi-a64/boot/uboot.env /mnt/volumio/rootfs/boot/ +# Add boot script +mkimage -C none -A arm -T script -d platform-nanopi/nanopi-a64/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr echo "Copying Nanopi64 modules and firmware" sudo cp -pdR platform-nanopi/nanopi-a64/lib/modules /mnt/volumio/rootfs/lib/ From d28c9f20e144315402c831b69ea3472d90d2b4c3 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 28 Nov 2017 02:03:22 +0100 Subject: [PATCH 339/673] mpd 0.20.12 armv6 --- scripts/volumioconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 849e99277..8073c8ab9 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -170,9 +170,9 @@ if [ $(uname -m) = armv7l ]; then rm libasound2-dev_1.1.3-5_armhf.deb echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv6-DSD-2.deb - dpkg -i mpd_0.20.6-1_armv6-DSD-2.deb - rm mpd_0.20.6-1_armv6-DSD-2.deb + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12_armv6.deb + dpkg -i mpd_0.20.12_armv6.deb + rm mpd_0.20.12_armv6.deb echo "Installing Upmpdcli for armv6" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnpp3_0.15.1-1_armhf.deb From 0e190d21945148098a76c55d55bf347661dcec4c Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 28 Nov 2017 06:20:43 +0100 Subject: [PATCH 340/673] kernel 4.9.65 pi --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d820c5a79..c56e17fa1 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.9.51" +KERNEL_VERSION="4.9.65" case $KERNEL_VERSION in "4.4.9") @@ -63,9 +63,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="15ffab5493d74b12194e6bfc5bbb1c0f71140155" FIRMWARE_COMMIT="9108b7f712f78cbefe45891bfa852d9347989529" ;; - "4.9.51") - KERNEL_REV="1036" - KERNEL_COMMIT="913eddd6d23f14ce34ae473a4c080c5c840ed583" + "4.9.65") + KERNEL_REV="1056" + KERNEL_COMMIT="e4b56bb7efe47319e9478cfc577647e51c48e909" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 7ea99cd37a7ca039e940664598bbdb5491f94d51 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 29 Nov 2017 01:22:05 +0100 Subject: [PATCH 341/673] new packages --- scripts/volumioconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 8073c8ab9..ec6a6e5c6 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -170,9 +170,9 @@ if [ $(uname -m) = armv7l ]; then rm libasound2-dev_1.1.3-5_armhf.deb echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12_armv6.deb - dpkg -i mpd_0.20.12_armv6.deb - rm mpd_0.20.12_armv6.deb + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_armv6.deb + dpkg -i mpd_0.20.12-1_armv6.deb + rm mpd_0.20.12-1_armv6.deb echo "Installing Upmpdcli for armv6" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnpp3_0.15.1-1_armhf.deb @@ -330,9 +330,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm libasound2-dev_1.1.3-5_i386.deb echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_i386-DSD-2.deb - dpkg -i mpd_0.20.6-1_i386-DSD-2.deb - rm mpd_0.20.6-1_i386-DSD-2.deb + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_i386.deb + dpkg -i mpd_0.20.12-1_i386.deb + rm mpd_0.20.12-1_i386.deb echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb From c8ba3fd8a1b7fa758ae32489640222d01eab1805 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 29 Nov 2017 03:41:57 +0100 Subject: [PATCH 342/673] remove fix from cmdline --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index c56e17fa1..5dea22a0a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -126,7 +126,7 @@ dtparam=i2c_arm=on disable_splash=1" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_split_enable=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt echo "adding gpio & spi group and permissions" groupadd -f --system gpio From a060bbe18f14e8a4b1f962345783c4d6cc0d011e Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 30 Nov 2017 15:01:45 +0100 Subject: [PATCH 343/673] Add libasound2-dev to armv7 --- scripts/volumioconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 849e99277..17891c2c1 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -198,10 +198,13 @@ if [ $(uname -m) = armv7l ]; then echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2_1.1.3-5_armhf.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2-data_1.1.3-5_all.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2-dev_1.1.3-5_armhf.deb dpkg --force-all -i libasound2-data_1.1.3-5_all.deb dpkg --force-all -i libasound2_1.1.3-5_armhf.deb + dpkg --force-all -i libasound2-dev_1.1.3-5_armhf.deb rm libasound2-data_1.1.3-5_all.deb rm libasound2_1.1.3-5_armhf.deb + rm libasound2-dev_1.1.3-5_armhf.deb echo "Installing MPD 20.6 with Direct DSD Support" wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv7-DSD.deb From 97ecacd822260f598d2caeddef9673464cb19983 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 30 Nov 2017 15:43:14 +0100 Subject: [PATCH 344/673] MPD 20.12 for armv7 --- scripts/volumioconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index ec6a6e5c6..dee3f3943 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -169,7 +169,7 @@ if [ $(uname -m) = armv7l ]; then rm libasound2_1.1.3-5_armhf.deb rm libasound2-dev_1.1.3-5_armhf.deb - echo "Installing MPD 20.6 with Direct DSD Support" + echo "Installing MPD 20.12 with Direct DSD Support" wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_armv6.deb dpkg -i mpd_0.20.12-1_armv6.deb rm mpd_0.20.12-1_armv6.deb @@ -203,10 +203,10 @@ if [ $(uname -m) = armv7l ]; then rm libasound2-data_1.1.3-5_all.deb rm libasound2_1.1.3-5_armhf.deb - echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv7-DSD.deb - dpkg -i mpd_0.20.6-1_armv7-DSD.deb - rm mpd_0.20.6-1_armv7-DSD.deb + echo "Installing MPD 20.12with Direct DSD Support" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_armv7.deb + dpkg -i mpd_0.20.12-1_armv7.deb + rm mpd_0.20.12-1_armv7.deb echo "Installing Upmpdcli for armv7" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb @@ -329,7 +329,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm libasound2_1.1.3-5_i386.deb rm libasound2-dev_1.1.3-5_i386.deb - echo "Installing MPD 20.6 with Direct DSD Support" + echo "Installing MPD 20.12 with Direct DSD Support" wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_i386.deb dpkg -i mpd_0.20.12-1_i386.deb rm mpd_0.20.12-1_i386.deb From 9da7b5880738d251e87892585c721e20a1e99e24 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 4 Dec 2017 16:30:25 +0100 Subject: [PATCH 345/673] force hdmi hotplug --- scripts/raspberryconfig.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 5dea22a0a..681b9c205 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -123,7 +123,8 @@ max_usb_current=1 dtparam=audio=on audio_pwm_mode=2 dtparam=i2c_arm=on -disable_splash=1" >> /boot/config.txt +disable_splash=1 +hdmi_force_hotplug=1" >> /boot/config.txt echo "Writing cmdline.txt file" echo "splash quiet plymouth.ignore-serial-consoles console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt From 846eaa502e46d2d3194ff8a45fded5862da42c32 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 4 Dec 2017 16:31:44 +0100 Subject: [PATCH 346/673] remove console-kit-daemon --- scripts/volumioconfig.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index f7450c965..ad2b5698d 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -100,9 +100,6 @@ chmod 777 /etc/hosts echo "nameserver 8.8.8.8" > /etc/resolv.conf -ln -s '/usr/lib/systemd/system/console-kit-daemon.service' '/etc/systemd/system/getty.target.wants/console-kit-daemon.service' - - ################ #Volumio System#--------------------------------------------------- ################ From c963dabf127fb980fabcfa128ca532eb16578ec6 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 5 Dec 2017 18:50:15 +0100 Subject: [PATCH 347/673] do not renice mpd and perf governor --- scripts/volumioconfig.sh | 4 ++-- volumio/bin/volumio_cpu_tweak | 24 ++++++++++-------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index ad2b5698d..09872c79b 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -546,7 +546,7 @@ chmod -R 777 /var/lib/dhcpcd5 #CPU Optimizations#----------------------------------------- ##################### -echo "Setting CPU governor to ondemand" -echo 'GOVERNOR="ondemand"' > /etc/default/cpufrequtils +echo "Setting CPU governor to performance" +echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils ln -s /lib/systemd/system/volumio_cpu_tweak.service /etc/systemd/system/multi-user.target.wants/volumio_cpu_tweak.service diff --git a/volumio/bin/volumio_cpu_tweak b/volumio/bin/volumio_cpu_tweak index 2d77ea174..99142ecf9 100755 --- a/volumio/bin/volumio_cpu_tweak +++ b/volumio/bin/volumio_cpu_tweak @@ -3,19 +3,15 @@ CORES=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | tail -1` MPD_PID=`/bin/pidof mpd` -echo "Setting custom ondemand scheduling policies" -echo 10000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate -echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load -echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor -echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold -echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - -echo "Renicing MPD" -/usr/bin/renice -n -19 $MPD_PID - -if [ "$CORES" -gt 2 ]; then - echo "Setting MPD Affinity" - /usr/bin/taskset -p 3 $MPD_PID +if [ -f "/boot/rt" ]; then + echo "Real-time Kernel Environment" + echo "Setting RT Priority for mpd" + /usr/bin/chrt -f -p -a 35 $MPD_PID else - echo "Not enough cores to set MPD affinity" + if [ "$CORES" -gt 2 ]; then + echo "Setting MPD Affinity" + #/usr/bin/taskset -p 3 $MPD_PID + else + echo "Not enough cores to set MPD affinity" + fi fi From 1c6d00786f71f19582566e55189573f1c4b9028b Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 6 Dec 2017 17:59:06 +0100 Subject: [PATCH 348/673] return to mpd 20.6 stable --- scripts/volumioconfig.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 09872c79b..bcf837c5a 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -166,10 +166,10 @@ if [ $(uname -m) = armv7l ]; then rm libasound2_1.1.3-5_armhf.deb rm libasound2-dev_1.1.3-5_armhf.deb - echo "Installing MPD 20.12 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_armv6.deb - dpkg -i mpd_0.20.12-1_armv6.deb - rm mpd_0.20.12-1_armv6.deb + echo "Installing MPD 20.6 with Direct DSD Support" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv6-DSD-2.deb + dpkg -i mpd_0.20.6-1_armv6-DSD-2.deb + rm mpd_0.20.6-1_armv6-DSD-2.deb echo "Installing Upmpdcli for armv6" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnpp3_0.15.1-1_armhf.deb @@ -203,10 +203,10 @@ if [ $(uname -m) = armv7l ]; then rm libasound2_1.1.3-5_armhf.deb rm libasound2-dev_1.1.3-5_armhf.deb - echo "Installing MPD 20.12with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_armv7.deb - dpkg -i mpd_0.20.12-1_armv7.deb - rm mpd_0.20.12-1_armv7.deb + echo "Installing MPD 20.6 with Direct DSD Support" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv7-DSD.deb + dpkg -i mpd_0.20.6-1_armv7-DSD.deb + rm mpd_0.20.6-1_armv7-DSD.deb echo "Installing Upmpdcli for armv7" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb @@ -329,10 +329,10 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm libasound2_1.1.3-5_i386.deb rm libasound2-dev_1.1.3-5_i386.deb - echo "Installing MPD 20.12 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.12-1_i386.deb - dpkg -i mpd_0.20.12-1_i386.deb - rm mpd_0.20.12-1_i386.deb + echo "Installing MPD 20.6 with Direct DSD Support" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_i386-DSD-2.deb + dpkg -i mpd_0.20.6-1_i386-DSD-2.deb + rm mpd_0.20.6-1_i386-DSD-2.deb echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb From e6dca12c551ae75dd8a07e94481a8fcd1185cfa9 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 6 Dec 2017 19:04:51 +0100 Subject: [PATCH 349/673] Bind cpu tweak to mpd --- scripts/volumioconfig.sh | 1 - volumio/bin/volumio_cpu_tweak | 21 ++++++++++----------- volumio/lib/systemd/system/mpd.service | 2 ++ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index bcf837c5a..2d8473506 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -549,4 +549,3 @@ chmod -R 777 /var/lib/dhcpcd5 echo "Setting CPU governor to performance" echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils -ln -s /lib/systemd/system/volumio_cpu_tweak.service /etc/systemd/system/multi-user.target.wants/volumio_cpu_tweak.service diff --git a/volumio/bin/volumio_cpu_tweak b/volumio/bin/volumio_cpu_tweak index 99142ecf9..b3094445f 100755 --- a/volumio/bin/volumio_cpu_tweak +++ b/volumio/bin/volumio_cpu_tweak @@ -3,15 +3,14 @@ CORES=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | tail -1` MPD_PID=`/bin/pidof mpd` -if [ -f "/boot/rt" ]; then - echo "Real-time Kernel Environment" - echo "Setting RT Priority for mpd" - /usr/bin/chrt -f -p -a 35 $MPD_PID -else - if [ "$CORES" -gt 2 ]; then - echo "Setting MPD Affinity" - #/usr/bin/taskset -p 3 $MPD_PID - else - echo "Not enough cores to set MPD affinity" - fi +echo "Real-time Kernel Environment" +echo "Setting RT Priority for mpd" +/usr/bin/chrt -f -p -a 35 $MPD_PID + +if [ "$CORES" -gt 2 ]; then + echo "Setting MPD Affinity" + /usr/bin/taskset -p 3 $MPD_PID + else + echo "Not enough cores to set MPD affinity" fi + diff --git a/volumio/lib/systemd/system/mpd.service b/volumio/lib/systemd/system/mpd.service index 60273dd34..2fcd94a81 100644 --- a/volumio/lib/systemd/system/mpd.service +++ b/volumio/lib/systemd/system/mpd.service @@ -1,6 +1,8 @@ [Unit] Description=Music Player Daemon After=network.target sound.target +Wants=volumio_cpu_tweak.service +Before=volumio_cpu_tweak.service [Service] EnvironmentFile=/etc/default/mpd From 9c8c521e8817c822656304c8d35ed31bd42ec231 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 6 Dec 2017 19:10:19 +0100 Subject: [PATCH 350/673] exit process --- volumio/bin/volumio_cpu_tweak | 1 + 1 file changed, 1 insertion(+) diff --git a/volumio/bin/volumio_cpu_tweak b/volumio/bin/volumio_cpu_tweak index b3094445f..be17a9354 100755 --- a/volumio/bin/volumio_cpu_tweak +++ b/volumio/bin/volumio_cpu_tweak @@ -14,3 +14,4 @@ if [ "$CORES" -gt 2 ]; then echo "Not enough cores to set MPD affinity" fi +exit 0 From 932d5f17ca6112c3a528fab0e39878cd88677add Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 8 Dec 2017 20:35:51 +0100 Subject: [PATCH 351/673] disable cpu tweak --- volumio/lib/systemd/system/mpd.service | 2 -- 1 file changed, 2 deletions(-) diff --git a/volumio/lib/systemd/system/mpd.service b/volumio/lib/systemd/system/mpd.service index 2fcd94a81..60273dd34 100644 --- a/volumio/lib/systemd/system/mpd.service +++ b/volumio/lib/systemd/system/mpd.service @@ -1,8 +1,6 @@ [Unit] Description=Music Player Daemon After=network.target sound.target -Wants=volumio_cpu_tweak.service -Before=volumio_cpu_tweak.service [Service] EnvironmentFile=/etc/default/mpd From a2b62de41070d649d7dc684f3ed9b5c83571c97d Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 8 Dec 2017 20:52:55 +0100 Subject: [PATCH 352/673] add audio niceness --- scripts/volumioconfig.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 2d8473506..a8e312a41 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -476,7 +476,8 @@ usermod -a -G audio mpd echo "Setting RT Priority to Audio Group" echo '@audio - rtprio 99 -@audio - memlock unlimited' >> /etc/security/limits.conf +@audio - memlock unlimited +@audio - nice -10' >> /etc/security/limits.conf echo "Alsa tuning" From 299c026cb389059dc9ceb7484070e06b896cd8d3 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 9 Dec 2017 13:23:54 +0100 Subject: [PATCH 353/673] cmdline tweaks --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 681b9c205..2bca046f8 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -127,7 +127,7 @@ disable_splash=1 hdmi_force_hotplug=1" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt echo "adding gpio & spi group and permissions" groupadd -f --system gpio From 3cc48e97d378c97fdfd8d7027bef8d715dc45830 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 10 Dec 2017 02:57:59 +0100 Subject: [PATCH 354/673] add additional js config --- scripts/raspberryconfig.sh | 3 +++ scripts/raspberryimage.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 2bca046f8..057ee47bf 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -249,6 +249,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 746b24b25..64ce900d0 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -90,6 +90,12 @@ mkdir -p /mnt/volumio/rootfs/opt/vc/bin/ cp -rp volumio/opt/vc/bin/* /mnt/volumio/rootfs/opt/vc/bin/ echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + echo "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + node config.js $PATCH +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /raspberryconfig.sh -p From 82a2377c290ba48a90b8ec6cefa3c3c3bd8eb01c Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 11 Dec 2017 11:25:43 +0100 Subject: [PATCH 355/673] configjs --- scripts/raspberryimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 64ce900d0..459870c58 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -92,7 +92,7 @@ cp -rp volumio/opt/vc/bin/* /mnt/volumio/rootfs/opt/vc/bin/ echo $PATCH > /mnt/volumio/rootfs/patch if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - echo "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + echo "Starting config.js" node config.js $PATCH fi From 026dba362b844b31ece539cdc3811041f052c8d2 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 11 Dec 2017 13:43:25 +0100 Subject: [PATCH 356/673] Revert "add audio niceness" This reverts commit a2b62de41070d649d7dc684f3ed9b5c83571c97d. --- scripts/volumioconfig.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index a8e312a41..2d8473506 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -476,8 +476,7 @@ usermod -a -G audio mpd echo "Setting RT Priority to Audio Group" echo '@audio - rtprio 99 -@audio - memlock unlimited -@audio - nice -10' >> /etc/security/limits.conf +@audio - memlock unlimited' >> /etc/security/limits.conf echo "Alsa tuning" From 67964fd9022c8053aac5452d14779c5c198e5757 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 11 Dec 2017 23:49:13 +0100 Subject: [PATCH 357/673] mpd systemd service --- volumio/lib/systemd/system/mpd.service | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/volumio/lib/systemd/system/mpd.service b/volumio/lib/systemd/system/mpd.service index 60273dd34..88964182c 100644 --- a/volumio/lib/systemd/system/mpd.service +++ b/volumio/lib/systemd/system/mpd.service @@ -1,17 +1,28 @@ [Unit] Description=Music Player Daemon +Documentation=man:mpd(1) man:mpd.conf(5) After=network.target sound.target [Service] -EnvironmentFile=/etc/default/mpd -ExecStart=/usr/bin/mpd --no-daemon $MPDCONF +Type=notify +ExecStart=/usr/bin/mpd --no-daemon +# allow MPD to use real-time priority 50 LimitRTPRIO=50 -LimitRTTIME=-1 -Restart=always -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=mpd +LimitRTTIME=infinity + +# disallow writing to /usr, /bin, /sbin, ... +ProtectSystem=yes + +# more paranoid security settings +NoNewPrivileges=yes +ProtectKernelTunables=yes +ProtectControlGroups=yes +ProtectKernelModules=yes +# AF_NETLINK is required by libsmbclient, or it will exit() .. *sigh* +RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK +RestrictNamespaces=yes [Install] WantedBy=multi-user.target +Also=mpd.socket From 6eb3f907028ab52ce9dd4a5f26cb8ee6f9382b7c Mon Sep 17 00:00:00 2001 From: Rachid Groeneveld Date: Wed, 20 Dec 2017 14:40:46 +0100 Subject: [PATCH 358/673] Add tv-service alias I hope this helps for the Kodi plugin --- scripts/volumioconfig.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 2d8473506..58596b925 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -88,6 +88,8 @@ alias systemctl="sudo /bin/systemctl" alias killall="sudo /usr/bin/killall" alias service="sudo /usr/sbin/service" alias ifconfig="sudo /sbin/ifconfig" +# tv-service +alias tvservice="/opt/vc/bin/tvservice" ' >> /etc/bash.bashrc #Sudoers Nopasswd From 9c1f2d4f980dec58e1473ddc2894e6a3b6acd2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 25 Jan 2018 17:43:04 +0100 Subject: [PATCH 359/673] Tinker S: single image for eMMC and SD --- scripts/initramfs/init.nextarm | 70 ++++++++++++++++++++++++++++------ scripts/tinkerconfig.sh | 12 +++++- scripts/tinkerimage.sh | 10 ++++- 3 files changed, 77 insertions(+), 15 deletions(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 37b4ee8c4..e41561bfa 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -19,6 +19,7 @@ mdev -s USE_KMSG="yes" HWDEVICE="empty" BOOTDEV="mmcblk0" +BOOTCONFIG="empty" #Device/Partition Separator i.e. the character between parentdev and partition index DPS="p" #default values: @@ -89,6 +90,10 @@ do datapart) DATAPART=`parse_disk $value` ;; + bootconfig) + #prepend with "/boot/" (add an ending slash to avoid mistakes) + BOOTCONFIG=/boot/$value + ;; hwdevice) HWDEVICE=$value ;; @@ -109,7 +114,7 @@ if [ $HWDEVICE == empty ]; then fi if [ $HWDEVICE == ODROID-C2 ]; then - exec >/dev/kmsg 2>&1 /dev/kmsg 2>&1 > /boot/config.txt rm /mnt/imgpart/config.txt.bak fi + +# When a new volumio version is loaded, partition UUIDs will have changed. +# So if the boot cmdline uses "UUID=" format for disk parsing, there will be a mismatch. + if [ ! -z "${UUIDFMT}" ]; then + print_msg "The boot configuration holds new UUIDs, replace them with ones from the current device partitions." + UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) + UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) + UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) + cp $BOOTCONFIG $BOOTCONFIG.old + sed -i "s/imgpart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/imgpart=UUID=${UUID_IMG}/g" ${BOOTCONFIG} + sed -i "s/datapart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/datapart=UUID=${UUID_DATA}/g" ${BOOTCONFIG} + sed -i "s/bootpart=UUID=[a-fA-F0-9]\{4\}-[a-fA-F0-9]\{4\}/bootpart=UUID=${UUID_BOOT}/g" ${BOOTCONFIG} + fi + rm /boot/kernel_update sync umount /boot @@ -320,7 +347,7 @@ fi # if data partition needs to be resized #mount -t auto /dev/${BOOTDEV}p1 /boot if [ -e "/boot/resize-volumio-datapart" ]; then -print_msg "Re-sizing Volumio data partition" + print_msg "Re-sizing Volumio data partition" END="$(parted -s /dev/${BOOTDEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" parted -s /dev/${BOOTDEV} resizepart 3 ${END} e2fsck -fy ${DATAPART} @@ -360,13 +387,32 @@ mount --move /mnt/imgpart /mnt/ext/union/imgpart chmod -R 777 /mnt/ext/union/imgpart -#idea: Mount /boot already here to that systemd does not have to mount it an we -# can be flexible. However this should be confirmed by somebody who is more familiar -# with systemd and who can tell what fstab is used for in the system - -[ -d /mnt/ext/union/boot ] || mkdir -m 777 /mnt/ext/union/boot -mount -t vfat -o defaults,utf8,user,rw,umask=111,dmask=000 ${BOOTPART} /mnt/ext/union/boot - +# 6) We know the current boot partition parsed from /proc/cmdline +# Ensure the /boot entry in fstab matches the UUID (or the device) from the cmdline +# The value in fstab could differ after updating to a new image version in case someone +# manually edited the bootdevice in cmdline before OR when a UUID is used to find the boot partition. +UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) +DEVFSTAB=`cat /mnt/ext/union/etc/fstab | grep -E "[0-9A-F]{4}-[0-9A-F]{4}" -o` +if [ ! -z "${DEVFSTAB}" ]; then + print_msg "found fstab entry with UUID=${DEVFSTAB} for /boot" + if [ ! $UUID_BOOT == $DEVFSTAB ]; then + sed -i "s/${DEVFSTAB}/${UUID_BOOT}/g" /mnt/ext/union/etc/fstab + print_msg "fstab entry updated to UUID=${DEVFSTAB}" + fi +else + DEVFSTAB=`cat /mnt/ext/union/etc/fstab | grep -E "^/dev/[a-z]{3,6}[0-9]{1,2}[a-z]{0,1}[0-9]{0,2}" -o` + if [ -z "${DEVFSTAB}" ]; then +# normally never gets here ;) + print_msg "Incompatible fstab, no entry found for /boot" + exec sh + exit 0 + fi + print_msg "found fstab entry with device ${DEVFSTAB} for /boot" + if [ ! $BOOTPART == $DEVFSTAB ]; then + sed -i "s/${DEVFSTAB}/${BOOTPART}/g" /mnt/ext/union/etc/fstab + print_msg "fstab entry updated to ${DEVFSTAB}" + fi +fi umount /proc umount /sys diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 585744a73..1dd0857f5 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -3,12 +3,14 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh echo "Creating \"fstab\"" echo "# Tinkerboard fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -16,6 +18,14 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab +echo "(Re-)Creating boot config" +echo "label kernel-4.4 + kernel /zImage + fdt /dtb/rk3288-miniarm.dtb + initrd /uInitrd + append earlyprintk splash plymouth.ignore-serial-consoles console=tty1 console=ttyS1,115200n8 rw init=/sbin/init imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf +" > /boot/extlinux/extlinux.conf + echo "Adding default sound modules" #echo " # diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index c25b819ab..8ff02db90 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -109,7 +109,7 @@ sync echo "Preparing to run chroot for more Tinkerboard configuration" cp scripts/tinkerconfig.sh /mnt/volumio/rootfs -cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater @@ -119,13 +119,19 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /tinkerconfig.sh EOF #cleanup -rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/tinkerconfig.sh +rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/tinkerconfig.sh echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev From 3bfd02c64f26562ef36e00f331155c354c05b46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 25 Jan 2018 18:07:01 +0100 Subject: [PATCH 360/673] Rock64: finialize kernel updater support --- scripts/rock64config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rock64config.sh b/scripts/rock64config.sh index 33935dce1..13202a02f 100755 --- a/scripts/rock64config.sh +++ b/scripts/rock64config.sh @@ -23,8 +23,8 @@ echo "label kernel-4.4 kernel /Image fdt /rk3328-rock64.dtb initrd /uInitrd - append earlycon=uart8250,mmio32,0xff130000 imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh hwdevice=Rock64 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} -" > /boot/extlinux/extlinux.conf + append earlycon=uart8250,mmio32,0xff130000 imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh hwdevice=Rock64 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf +"> /boot/extlinux/extlinux.conf echo "#!/bin/sh sysctl abi.cp15_barrier=2 From b671a625ef4d43c23880792e4a02fdb732e762e1 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 3 Feb 2018 14:50:58 +0100 Subject: [PATCH 361/673] remove git history from ui folder --- build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sh b/build.sh index df9901b19..17324c1ce 100755 --- a/build.sh +++ b/build.sh @@ -163,8 +163,7 @@ if [ -n "$BUILD" ]; then fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" - - + rm -rf build/$BUILD/root/volumio/http/www/.git echo "Adding os-release infos" { echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" From c87ab3d93935fca13142f32c7bfcf2a974f08180 Mon Sep 17 00:00:00 2001 From: nikkov Date: Mon, 5 Feb 2018 20:30:15 +0600 Subject: [PATCH 362/673] Added NanoPI-Neo, Neo Air, Neo2 devices --- build.sh | 11 +- scripts/nanopineo2config.sh | 97 +++++++++++++++++ scripts/nanopineo2image.sh | 207 ++++++++++++++++++++++++++++++++++++ scripts/nanopineoconfig.sh | 82 ++++++++++++++ scripts/nanopineoimage.sh | 206 +++++++++++++++++++++++++++++++++++ 5 files changed, 602 insertions(+), 1 deletion(-) create mode 100755 scripts/nanopineo2config.sh create mode 100755 scripts/nanopineo2image.sh create mode 100755 scripts/nanopineoconfig.sh create mode 100755 scripts/nanopineoimage.sh diff --git a/build.sh b/build.sh index 17324c1ce..6e77fa4fe 100755 --- a/build.sh +++ b/build.sh @@ -27,7 +27,8 @@ Switches: -d Create Image for Specific Devices. Supported device names: pi, udooneo, udooqdl, cuboxi, cubietruck, compulab, odroidc1, odroidc2, odroidxu4, sparky, bbb, pine64, - bpim2u, bpipro, tinkerboard, sopine64, rock64, voltastream0, nanopi64 + bpim2u, bpipro, tinkerboard, sopine64, rock64, voltastream0, nanopi64, + nanopineo2, nanopineo, nanopineo -v Version must be a dot separated number. Example 1.102 . -l Create docker layer. Give a Docker Repository name as the argument. @@ -294,6 +295,14 @@ case "$DEVICE" in check_os_release "x86" "$VERSION" "$DEVICE" sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; ;; + nanopineo2) echo 'Writing NanoPi-NEO2 armv7 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/nanopineo2image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; + nanopineo) echo 'Writing NanoPi-NEO (Air) Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/nanopineoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; esac #When the tar is created we can build the docker layer diff --git a/scripts/nanopineo2config.sh b/scripts/nanopineo2config.sh new file mode 100755 index 000000000..d89573748 --- /dev/null +++ b/scripts/nanopineo2config.sh @@ -0,0 +1,97 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# NanoPi-NEO 2 fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +ARCH=$(cat /etc/os-release | grep ^VOLUMIO_ARCH | tr -d 'VOLUMIO_ARCH="') +echo $ARCH + +if [ $ARCH = armv7 ]; then + echo "Armv7 Environment detected" + echo "#!/bin/sh +sysctl abi.cp15_barrier=2 +" > /usr/local/bin/nanopineo2-init.sh + chmod +x /usr/local/bin/nanopineo2-init.sh + + echo "#!/bin/sh -e + /usr/local/bin/nanopineo2-init.sh + exit 0" > /etc/rc.local +fi + +#echo "Adding default sound modules and wifi" +#echo "sunxi_codec +#sunxi_i2s +#sunxi_sndcodec +#8723bs +#" >> /etc/modules + +#echo "Blacklisting 8723bs_vq0" +#echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-nanopineo2.conf + +echo "Installing additonal packages" +#apt-get update +#apt-get -y install u-boot-tools liblircclient0 lirc + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +#echo "Changing to 'modules=dep'" +#echo "(otherwise NanoPi-NEO2 won't boot due to uInitrd 4MB limit)" +#sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh new file mode 100755 index 000000000..f572ba7bb --- /dev/null +++ b/scripts/nanopineo2image.sh @@ -0,0 +1,207 @@ +#!/bin/sh + +# Build Architecture Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${ARCH}-nanopineo2.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +sudo parted -s "${LOOP_DEV}" mklabel msdos +sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +sudo parted -s "${LOOP_DEV}" set 1 boot on +sudo parted -s "${LOOP_DEV}" print +sudo partprobe "${LOOP_DEV}" +sudo kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +sudo mkfs -t vfat -n BOOT "${BOOT_PART}" +sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" +sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the nanopineo2 kernel/ platform files" +if [ -d platform-nanopineo2 ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-nanopineo2 folder + # that will refresh all the odroid platforms, see below +else + echo "Clone nanopineo2 files from repo" + sudo mkdir platform-nanopineo2 + cd platform-nanopineo2 + wget https://github.com/nikkov/nanopineo2-platform/raw/master/nanopineo2.tar.xz + echo "Unpack the platform files" + tar xfJ nanopineo2.tar.xz + rm nanopineo2.tar.xz + cd .. +fi + +echo "Copying the bootloader" +sudo dd if=platform-nanopineo2/nanopineo2/u-boot/sunxi-spl.bin of=${LOOP_DEV} bs=1024 seek=8 +sudo dd if=platform-nanopineo2/nanopineo2/u-boot/u-boot.itb of=${LOOP_DEV} bs=1024 seek=40 +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + sudo mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images +sudo mkdir /mnt/volumio/rootfs +sudo mkdir /mnt/volumio/rootfs/boot +sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying nanopineo2 boot files" +sudo cp platform-nanopineo2/nanopineo2/boot/Image /mnt/volumio/rootfs/boot +sudo cp platform-nanopineo2/nanopineo2/boot/*.dtb /mnt/volumio/rootfs/boot + +sudo cp platform-nanopineo2/nanopineo2/boot/boot.cmd /mnt/volumio/rootfs/boot +sudo cp platform-nanopineo2/nanopineo2/boot/boot.scr /mnt/volumio/rootfs/boot + +sudo cp platform-nanopineo2/nanopineo2/boot/Image.version /mnt/volumio/rootfs/boot +sudo cp platform-nanopineo2/nanopineo2/boot/config* /mnt/volumio/rootfs/boot + +echo "Copying nanopineo2 modules and firmware" +sudo cp -pdR platform-nanopineo2/nanopineo2/lib/modules /mnt/volumio/rootfs/lib/ +sudo cp -pdR platform-nanopineo2/nanopineo2/lib/firmware /mnt/volumio/rootfs/lib/ + +echo "Confguring ALSA with sane defaults" +#sudo cp platform-nanopineo2/nanopineo2/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa + +sync + +echo "Preparing to run chroot for more nanopineo2 configuration" +cp scripts/nanopineo2config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/nanopineo2config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/nanopineo2config.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> nanopineo2 device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#sudo rm -r platform-nanopineo2 +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + sudo mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar.gz ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar.gz +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar.gz --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +if [ -e Volumio.sqsh ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -r Volumio.sqsh +fi + +echo "Creating SquashFS" +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +sudo umount -l /mnt/volumio/images +sudo umount -l /mnt/volumio/rootfs/boot + +sudo dmsetup remove_all +sudo losetup -d ${LOOP_DEV} +sync diff --git a/scripts/nanopineoconfig.sh b/scripts/nanopineoconfig.sh new file mode 100755 index 000000000..4637a3f2c --- /dev/null +++ b/scripts/nanopineoconfig.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# NanoPi-NEO fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +#echo "Adding default sound modules and wifi" +#echo "sunxi_codec +#sunxi_i2s +#sunxi_sndcodec +#8723bs +#" >> /etc/modules + +#echo "Blacklisting 8723bs_vq0" +#echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-nanopineo2.conf + +echo "Installing additonal packages" +apt-get update +apt-get -y install network-manager u-boot-tools liblircclient0 lirc + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +#echo "Changing to 'modules=dep'" +#echo "(otherwise NanoPi-NEO won't boot due to uInitrd 4MB limit)" +#sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp diff --git a/scripts/nanopineoimage.sh b/scripts/nanopineoimage.sh new file mode 100755 index 000000000..c58316992 --- /dev/null +++ b/scripts/nanopineoimage.sh @@ -0,0 +1,206 @@ +#!/bin/sh + +# Build Architecture Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${ARCH}-nanopineo.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +sudo parted -s "${LOOP_DEV}" mklabel msdos +sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +sudo parted -s "${LOOP_DEV}" set 1 boot on +sudo parted -s "${LOOP_DEV}" print +sudo partprobe "${LOOP_DEV}" +sudo kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +sudo mkfs -t vfat -n BOOT "${BOOT_PART}" +sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" +sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the nanopineo kernel/ platform files" +if [ -d platform-nanopineo ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-nanopineo folder + # that will refresh all the odroid platforms, see below +else + echo "Clone nanopineo files from repo" + sudo mkdir platform-nanopineo + cd platform-nanopineo + wget https://github.com/nikkov/nanopineo2-platform/raw/master/nanopineo.tar.xz + echo "Unpack the platform files" + tar xfJ nanopineo.tar.xz + rm nanopineo.tar.xz + cd .. +fi + +echo "Copying the bootloader" +sudo dd if=platform-nanopineo/nanopineo/u-boot/u-boot-sunxi-with-spl.bin of=${LOOP_DEV} bs=1024 seek=8 +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + sudo mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images +sudo mkdir /mnt/volumio/rootfs +sudo mkdir /mnt/volumio/rootfs/boot +sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying nanopineo boot files" +sudo cp platform-nanopineo/nanopineo/boot/zImage /mnt/volumio/rootfs/boot +sudo cp platform-nanopineo/nanopineo/boot/*.dtb /mnt/volumio/rootfs/boot + +sudo cp platform-nanopineo/nanopineo/boot/boot.cmd /mnt/volumio/rootfs/boot +sudo cp platform-nanopineo/nanopineo/boot/boot.scr /mnt/volumio/rootfs/boot + +sudo cp platform-nanopineo/nanopineo/boot/zImage.version /mnt/volumio/rootfs/boot +sudo cp platform-nanopineo/nanopineo/boot/config* /mnt/volumio/rootfs/boot + +echo "Copying nanopineo modules and firmware" +sudo cp -pdR platform-nanopineo/nanopineo/lib/modules /mnt/volumio/rootfs/lib/ +sudo cp -pdR platform-nanopineo/nanopineo/lib/firmware /mnt/volumio/rootfs/lib/ + +echo "Confguring ALSA with sane defaults" +#sudo cp platform-nanopineo2/nanopineo/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa + +sync + +echo "Preparing to run chroot for more nanopineo configuration" +cp scripts/nanopineoconfig.sh /mnt/volumio/rootfs +cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/nanopineoconfig.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/nanopineoconfig.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> nanopineo device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#sudo rm -r platform-nanopineo +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + sudo mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar.gz ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar.gz +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar.gz --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +if [ -e Volumio.sqsh ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -r Volumio.sqsh +fi + +echo "Creating SquashFS" +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +sudo umount -l /mnt/volumio/images +sudo umount -l /mnt/volumio/rootfs/boot + +sudo dmsetup remove_all +sudo losetup -d ${LOOP_DEV} +sync From b5f554fb75cc16971aed244772b82934dfeb36b1 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Thu, 8 Feb 2018 21:26:01 +1100 Subject: [PATCH 363/673] Systemd should not be starting hotspot.service at boot time. wireless.js will do it, when it is time. --- volumio/lib/systemd/system/hotspot.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/lib/systemd/system/hotspot.service b/volumio/lib/systemd/system/hotspot.service index bc1c8fb52..c44ce0e84 100644 --- a/volumio/lib/systemd/system/hotspot.service +++ b/volumio/lib/systemd/system/hotspot.service @@ -1,6 +1,7 @@ [Unit] Wants=dhcpd.service Wants=dnsmasq.service + [Service] Type=idle ExecStart=/bin/hotspot.sh start @@ -10,5 +11,4 @@ Restart=no StandardOutput=syslog StandardError=syslog SyslogIdentifier=hotspot -[Install] -WantedBy=multi-user.target + From 57622237de8ec8d8ccef2038ac5a6941c6f77ed1 Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Fri, 9 Feb 2018 14:46:10 +1300 Subject: [PATCH 364/673] Fix init.nextarm when not using UUIDS --- scripts/initramfs/init.nextarm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index e41561bfa..a8e1d2e88 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -152,7 +152,7 @@ if [ -z "${IMGFILE}" ]; then fi UUIDFMT=`cat /proc/cmdline | grep "UUID=" -o` -if [ ! -z "{$UUIDFMT}" ]; then +if [ ! -z "${UUIDFMT}" ]; then if [ $BOOTCONFIG == empty ]; then print_msg "Error: when using UUIDs for disk parsing, you MUST also add the bootconfig parameter (eg. bootconfig=/extlinux/extlinux.conf)" exec sh From 7d5a9cd6b87f112f0c41bba21a466a2c5ec80610 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 9 Feb 2018 15:32:34 +0100 Subject: [PATCH 365/673] added bc --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/x86.conf | 2 +- scripts/tinkerimage.sh | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 567b08641..a94913c74 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip bc source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 5a75caf48..390f0c024 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip bc source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index fcbaeefe5..5c02ff668 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -31,7 +31,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip bc source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 8ff02db90..8182de424 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -119,6 +119,11 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + echo "Starting config.js" + node config.js $PATCH +fi + echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) From d63e2c94ac5cb1072f09b63defc6d561eb8f615c Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 9 Feb 2018 19:22:41 +0000 Subject: [PATCH 366/673] Hotspot selectable fallback --- volumio/bin/wireless.js | 59 +++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index ea17495d1..82be089d8 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -17,19 +17,14 @@ var ifconfigHotspot = "ifconfig " + wlan + " 192.168.211.1 up"; var ifconfigWlan = "ifconfig " + wlan + " up"; var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan + " down"; var execSync = require('child_process').execSync; -try { - var conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); - console.log('WIRELESS: Loaded configuration'); -} catch (e) { - console.log('WIRELESS: First boot'); - var conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); -} +var conf = {}; +var debug = false; function kill(process, callback) { var all = process.split(" "); var process = all[0]; var command = 'kill `pgrep -f "^' + process + '"` || true'; - console.log("killing: " + command); + logger("killing: " + command); return thus.exec(command, callback); } @@ -39,15 +34,15 @@ function launch(fullprocess, name, sync, callback) { if (sync) { var child = thus.exec(fullprocess, {}, callback); child.stdout.on('data', function(data) { - console.log(name + 'stdout: ' + data); + logger(name + 'stdout: ' + data); }); child.stderr.on('data', function(data) { - console.log(name + 'stderr: ' + data); + logger(name + 'stderr: ' + data); }); child.on('close', function(code) { - console.log(name + 'child process exited with code ' + code); + logger(name + 'child process exited with code ' + code); }); } else { var all = fullprocess.split(" "); @@ -55,19 +50,19 @@ function launch(fullprocess, name, sync, callback) { if (all.length > 0) { all.splice(0, 1); } - console.log("launching " + process + " args: "); - console.log(all); + logger("launching " + process + " args: "); + logger(all); var child = thus.spawn(process, all, {}); child.stdout.on('data', function(data) { - console.log(name + 'stdout: ' + data); + logger(name + 'stdout: ' + data); }); child.stderr.on('data', function(data) { - console.log(name + 'stderr: ' + data); + logger(name + 'stderr: ' + data); }); child.on('close', function(code) { - console.log(name + 'child process exited with code ' + code); + logger(name + 'child process exited with code ' + code); }); callback(); } @@ -81,11 +76,11 @@ function startHotspot() { if (conf != undefined && conf.enable_hotspot != undefined && conf.enable_hotspot.value != undefined && !conf.enable_hotspot.value) { console.log('Hotspot is disabled, not starting it'); launch(ifconfigWlan, "configwlanup", true, function(err) { - console.log("ifconfig " + err); + logger("ifconfig " + err); }); } else { launch(ifconfigHotspot, "confighotspot", true, function(err) { - console.log("ifconfig " + err); + logger("ifconfig " + err); launch(starthostapd,"hotspot" , false, function() { wstatus("hotspot"); }); @@ -103,9 +98,9 @@ function stopHotspot(callback) { function startAP(callback) { console.log("Stopped hotspot (if there).."); launch(ifdeconfig, "ifdeconfig", true, function(err) { - console.log("Conf " + ifdeconfig); + logger("Conf " + ifdeconfig); launch(wpasupp, "wpa supplicant", false, function(err) { - console.log("wpasupp " + err); + logger("wpasupp " + err); wpaerr = err; try { dhclient = fs.readFileSync('/data/configuration/wlanstatic', 'utf8'); @@ -151,9 +146,14 @@ function startFlow() { console.log("Start ap"); lesstimer = setInterval(function () { actualTime += pollingTime; - if (wpaerr > 0) actualTime = totalSecondsForConnection + 1; - - if (actualTime > totalSecondsForConnection) { + console.log('EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE') + console.log(wpaerr) + if (wpaerr > 0) { + actualTime = totalSecondsForConnection + 1; + } + console.log('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA') + console.log(conf.hotspot_fallback.value) + if (actualTime > totalSecondsForConnection && conf != undefined && conf.hotspot_fallback != undefined && conf.hotspot_fallback.value != undefined && conf.hotspot_fallback.value) { console.log("Overtime, starting plan B"); apstopped = 1; clearTimeout(lesstimer); @@ -213,6 +213,13 @@ if (process.argv.length < 2) { } else { var args = process.argv[2]; console.log(args); + try { + var conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); + console.log('WIRELESS: Loaded configuration'); + } catch (e) { + console.log('WIRELESS: First boot'); + var conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); + } switch (args) { case "start": @@ -239,3 +246,9 @@ function wstatus(nstatus) { function restartAvahi() { //thus.exec("/bin/systemctl restart avahi-daemon"); } + +function logger(msg) { + if (debug) { + console.log(msg) + } +} \ No newline at end of file From 27612edcda5f7f3fcafe8ca105281657dcfe71fc Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 9 Feb 2018 19:58:52 +0000 Subject: [PATCH 367/673] complete hotspot fallback --- volumio/bin/wireless.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 82be089d8..edc6bd33d 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -146,13 +146,9 @@ function startFlow() { console.log("Start ap"); lesstimer = setInterval(function () { actualTime += pollingTime; - console.log('EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE') - console.log(wpaerr) if (wpaerr > 0) { actualTime = totalSecondsForConnection + 1; } - console.log('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA') - console.log(conf.hotspot_fallback.value) if (actualTime > totalSecondsForConnection && conf != undefined && conf.hotspot_fallback != undefined && conf.hotspot_fallback.value != undefined && conf.hotspot_fallback.value) { console.log("Overtime, starting plan B"); apstopped = 1; @@ -214,11 +210,12 @@ if (process.argv.length < 2) { var args = process.argv[2]; console.log(args); try { - var conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); + conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); console.log('WIRELESS: Loaded configuration'); + console.log(JSON.stringify(conf)) } catch (e) { console.log('WIRELESS: First boot'); - var conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); + conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); } switch (args) { From 54a6f577b1022a60174257e215f5ed54a644a28f Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 10 Feb 2018 16:05:47 +0100 Subject: [PATCH 368/673] do not show conf if not on wireless debug --- volumio/bin/wireless.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index edc6bd33d..948c85bce 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -208,11 +208,13 @@ if (process.argv.length < 2) { console.log("Use: start|stop"); } else { var args = process.argv[2]; - console.log(args); + console.log('WIRELESS DAEMON: ' + args); try { conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); console.log('WIRELESS: Loaded configuration'); - console.log(JSON.stringify(conf)) + if (debug) { + console.log('WIRELESS CONF: ' + JSON.stringify(conf)) + } } catch (e) { console.log('WIRELESS: First boot'); conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); @@ -248,4 +250,4 @@ function logger(msg) { if (debug) { console.log(msg) } -} \ No newline at end of file +} From 66c9293abbb3b69263a5dd2a843c34749ca6170d Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 11 Feb 2018 21:45:11 +0100 Subject: [PATCH 369/673] Pi: update MrEngman drivers location --- scripts/raspberryconfig.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 057ee47bf..331d5b263 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -173,61 +173,61 @@ ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so sed -i 's/KERNEL==\"eth/DRIVERS!=\"smsc95xx\", &/' /etc/udev/rules.d/99-Volumio-net.rules echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" -MRENGMAN_REPO="http://www.fars-robotics.net" +MRENGMAN_REPO="http://downloads.fars-robotics.net/wifi-drivers" mkdir wifi cd wifi echo "WIFI: 8192EU for armv7" -wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8192eu-drivers/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: 8192EU for armv6" -wget $MRENGMAN_REPO/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8192eu-drivers/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh rm -rf * echo "WIFI: 8812AU for armv7" -wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8812au-drivers/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: 8812AU for armv6" -wget $MRENGMAN_REPO/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8812au-drivers/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh rm -rf * echo "WIFI: 8188EU for armv7" -wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8188eu-drivers/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: 8188EU for armv6" -wget $MRENGMAN_REPO/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/8188eu-drivers/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf 8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh rm -rf * echo "WIFI: MT7610 for armv7" -wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/mt7610-drivers/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh sh install.sh rm -rf * echo "WIFI: MT7610 for armv6" -wget $MRENGMAN_REPO/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz +wget $MRENGMAN_REPO/mt7610-drivers/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz tar xf mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh sh install.sh From 496365c38d432cf5a60430f1bc6d0bff912d2961 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Wed, 14 Feb 2018 19:41:57 +1100 Subject: [PATCH 370/673] Do the right thing when there is no wlan device. Just exit with a log message explaining why. Return an error status so systemd knows the startup attempt failed. --- volumio/bin/wireless.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index edc6bd33d..87be3acb0 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -204,6 +204,11 @@ function stop(callback) { } +if ( ! fs.existsSync("/sys/class/net/" + wlan + "/operstate") ) { + console.log("WIRELESS: No wireless interface, exiting"); + process.exit(1); +} + if (process.argv.length < 2) { console.log("Use: start|stop"); } else { @@ -248,4 +253,4 @@ function logger(msg) { if (debug) { console.log(msg) } -} \ No newline at end of file +} From 1a7bc9b7c240a2a32b2f3ec8f87d271bb277fbad Mon Sep 17 00:00:00 2001 From: macmpi Date: Wed, 14 Feb 2018 11:56:44 +0100 Subject: [PATCH 371/673] Pi: improve MrEngman wifi drivers install Now with all MrEngman drivers (i.e. add mt7612), and reducing code duplication with a loop on drivers. --- scripts/raspberryconfig.sh | 73 +++++++++----------------------------- 1 file changed, 17 insertions(+), 56 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 331d5b263..07e886445 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -172,66 +172,27 @@ ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so # changing external ethX priority rule for Pi as built-in eth _is_ on USB (smsc95xx driver) sed -i 's/KERNEL==\"eth/DRIVERS!=\"smsc95xx\", &/' /etc/udev/rules.d/99-Volumio-net.rules -echo "Installing Wireless drivers for 8192eu, 8812au, 8188eu and mt7610. Many thanks mrengman" +echo "Installing Wireless drivers for 8188eu, 8192eu, 8812au, mt7610, and mt7612. Many thanks MrEngman" MRENGMAN_REPO="http://downloads.fars-robotics.net/wifi-drivers" mkdir wifi cd wifi -echo "WIFI: 8192EU for armv7" -wget $MRENGMAN_REPO/8192eu-drivers/8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -tar xf 8192eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh -sh install.sh -rm -rf * - -echo "WIFI: 8192EU for armv6" -wget $MRENGMAN_REPO/8192eu-drivers/8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz -tar xf 8192eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh -sh install.sh -rm -rf * - -echo "WIFI: 8812AU for armv7" -wget $MRENGMAN_REPO/8812au-drivers/8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -tar xf 8812au-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh -sh install.sh -rm -rf * - -echo "WIFI: 8812AU for armv6" -wget $MRENGMAN_REPO/8812au-drivers/8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz -tar xf 8812au-$KERNEL_VERSION-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh -sh install.sh -rm -rf * - -echo "WIFI: 8188EU for armv7" -wget $MRENGMAN_REPO/8188eu-drivers/8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -tar xf 8188eu-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh -sh install.sh -rm -rf * - -echo "WIFI: 8188EU for armv6" -wget $MRENGMAN_REPO/8188eu-drivers/8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz -tar xf 8188eu-$KERNEL_VERSION-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh -sh install.sh -rm -rf * - -echo "WIFI: MT7610 for armv7" -wget $MRENGMAN_REPO/mt7610-drivers/mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -tar xf mt7610-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh -sh install.sh -rm -rf * - -echo "WIFI: MT7610 for armv6" -wget $MRENGMAN_REPO/mt7610-drivers/mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz -tar xf mt7610-$KERNEL_VERSION-$KERNEL_REV.tar.gz -sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh -sh install.sh -rm -rf * +for DRIVER in 8188eu 8192eu 8812au mt7610 mt7612 +do + echo "WIFI: $DRIVER for armv7" + wget $MRENGMAN_REPO/$DRIVER-drivers/$DRIVER-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz + tar xf $DRIVER-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz + sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7+/' install.sh + sh install.sh + rm -rf * + + echo "WIFI: $DRIVER for armv6" + wget $MRENGMAN_REPO/$DRIVER-drivers/$DRIVER-$KERNEL_VERSION-$KERNEL_REV.tar.gz + tar xf $DRIVER-$KERNEL_VERSION-$KERNEL_REV.tar.gz + sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'+/' install.sh + sh install.sh + rm -rf * +done cd .. rm -rf wifi From d8568aa1f0912a81a7e0b21ea184e5c45d2afb8b Mon Sep 17 00:00:00 2001 From: Sergio Visinoni Date: Wed, 14 Feb 2018 15:54:25 +0100 Subject: [PATCH 372/673] Use sudoers.d directory for custom permissions It is a good practice to leave /etc/sudoers to the official distro packages, and then create specific files under /etc/sudoers.d for adding custom configurations. This ensures that in case of major update of the sudoers file provided by the official package we don't lose our custom rules while still benefitting from any major changes happening upstream. For Volumio, this means creating a /etc/sudoers.d/volumio-user file with all the relevant configuration. --- scripts/volumioconfig.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 58596b925..6fe475297 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -42,7 +42,6 @@ echo "" echo "Adding Volumio User" groupadd volumio useradd -c volumio -d /home/volumio -m -g volumio -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev -s /bin/bash -p '$6$tRtTtICB$Ki6z.DGyFRopSDJmLUcf3o2P2K8vr5QxRx5yk3lorDrWUhH64GKotIeYSNKefcniSVNcGHlFxZOqLM6xiDa.M.' volumio -echo "volumio ALL=(ALL) ALL" >> /etc/sudoers #Setting Root Password echo 'root:$1$JVNbxLRo$pNn5AmZxwRtWZ.xF.8xUq/' | chpasswd -e @@ -93,8 +92,14 @@ alias tvservice="/opt/vc/bin/tvservice" ' >> /etc/bash.bashrc #Sudoers Nopasswd +SUDOERS_FILE="/etc/sudoers.d/volumio-user" echo 'Adding Safe Sudoers NoPassw permissions' -echo "volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd" >> /etc/sudoers +cat > ${SUDOERS_FILE} << EOF +# Add permissions for volumio user +volumio ALL=(ALL) ALL +volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd +EOF +chmod 0440 ${SUDOERS_FILE} echo volumio > /etc/hostname chmod 777 /etc/hostname From 6dd517f4af711475788b52b0a8439c1e63b211c3 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 14 Feb 2018 20:39:10 +0100 Subject: [PATCH 373/673] patch --- scripts/tinkerconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 1dd0857f5..e613c71fa 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -71,6 +71,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi From 70aa606033e80f390a82b997bdb42e2dd35147e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 17 Feb 2018 22:24:47 +0100 Subject: [PATCH 374/673] Support for experimental X86/ Intel CherryTrail Audio --- scripts/x86image.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 501746d0b..92ec2f946 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -89,8 +89,10 @@ if [ -f platform-x86/packages/.next ]; then cp platform-x86/packages/experimental/linux-image-*.deb /mnt/volumio/rootfs cp platform-x86/packages/experimental/linux-firmware-*.deb /mnt/volumio/rootfs echo "Adding Intel 3168NGW wifi support" -#TODO: remove when switching to stretch - cp -R platform-x86/packages/iwlwifi-3168-ucode-22.361476.0 /mnt/volumio/rootfs/lib/firmware + echo "Adding Intel CherryTrail/BayTrail SST Audio firmware" +#TODO: evaluate when switching to stretch, especially with kernel version > 4.12.9 + cp -R platform-x86/packages/iwlwifi-3168-ucode-22.361476.0/* /mnt/volumio/rootfs/lib/firmware + cp -R platform-x86/packages/firmware-intel-sound/* /mnt/volumio/rootfs/lib/firmware else cp platform-x86/packages/linux-image-*.deb /mnt/volumio/rootfs cp platform-x86/packages/linux-firmware-*.deb /mnt/volumio/rootfs From 19374e16636c4b0c20f7467428a3cc69b8122e8c Mon Sep 17 00:00:00 2001 From: Xipmix Date: Tue, 20 Feb 2018 21:04:00 +1100 Subject: [PATCH 375/673] Allow kernelsource.sh to be run with sudo NOPASSWD: This helps with removal of sudo -S calls, see volumio/Volumio2#1192. --- scripts/volumioconfig.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 6fe475297..31b89fc26 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -98,6 +98,7 @@ cat > ${SUDOERS_FILE} << EOF # Add permissions for volumio user volumio ALL=(ALL) ALL volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd +volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh EOF chmod 0440 ${SUDOERS_FILE} From 7ebc4a31712bff546e9752a4ed92f6c3bacfb656 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Tue, 20 Feb 2018 21:14:23 +1100 Subject: [PATCH 376/673] Allow pull.sh to be run with sudo NOPASSWD: This helps with removal of sudo -S calls, see volumio/Volumio2#1192 --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 31b89fc26..bfba193e1 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -98,7 +98,7 @@ cat > ${SUDOERS_FILE} << EOF # Add permissions for volumio user volumio ALL=(ALL) ALL volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd -volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh +volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh, /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/pull.sh EOF chmod 0440 ${SUDOERS_FILE} From d0dfaad24170c9308cacb2e4d451c9f30860c566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 22 Feb 2018 19:32:41 +0100 Subject: [PATCH 377/673] X86: add eMMC support to build and init scripts --- scripts/initramfs/init-x86 | 60 ++++++++++++++++--------- scripts/initramfs/mkinitramfs-custom.sh | 4 +- scripts/x86config.sh | 6 ++- scripts/x86image.sh | 2 + volumio/etc/default/grub | 2 +- 5 files changed, 50 insertions(+), 24 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index bafa665b7..3cb809011 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -66,6 +66,7 @@ modprobe ohci_pci modprobe xhci_hcd modprobe xhci_pci modprobe mmc_core +modprobe mmc_block modprobe sdhci modprobe sdhci_pci modprobe sdhci_acpi @@ -127,6 +128,9 @@ do bootpart) BOOTPART=`parse_disk $value` ;; + datapart) + DATAPART=`parse_disk $value` + ;; imgfile) IMGFILE=$value ;; @@ -137,28 +141,37 @@ do done if [ -z "${BOOTPART}" ]; then - print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGPART}" ]; then - print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + exec sh + exit 0 +fi + +if [ -z "${DATAPART}" ]; then + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGFILE}" ]; then - print_msg "Specify the squash image file after the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi @@ -169,6 +182,7 @@ USE_KMSG=yes print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg BOOTPART=${BOOTPART} +print_msg DATAPART=${DATAPART} if [ ! -b "${IMGPART}" ]; then print_msg "No partition with ${IMGPART} has been found" @@ -192,7 +206,8 @@ print_msg "Initrd initialisation finished" # ============================================================== # -BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') +BOOT_DEVICE=$(echo /dev/`lsblk -no PKNAME ${BOOTPART}`) + if [ -e "/mnt/imgpart/move-gpt" ]; then print_msg "First time boot, moving the backup GPT table to the end of the disk..." gdisk ${BOOT_DEVICE} > /dev/null 2>&1 < /mnt/factory/factory_reset print_msg "Factory reset initiated" umount /mnt/factory @@ -291,10 +306,10 @@ rmdir /mnt/usb # print_msg "Checking for factory or user-data reset on boot device" mkdir /mnt/factory -mount -t vfat ${BOOT_DEVICE}1 /mnt/factory +mount -t vfat ${BOOTPART} /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data print_msg "Factory reset executed: part I - User Data Part" tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory print_msg "Factory reset executed: part II - Kernel" @@ -308,7 +323,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data rm /mnt/factory/user_data print_msg "User Data successfully deleted " @@ -343,15 +358,18 @@ if [ -e "/boot/kernel_update" ]; then tar xf /mnt/imgpart/kernel_current.tar -C /boot UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) + UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) mv /boot/syslinux.cfg /boot/syslinux.cfg.old mv /boot/syslinux.tmpl /boot/syslinux.cfg sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg + sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/syslinux.cfg mv /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.cfg.old mv /boot/efi/BOOT/grub.tmpl /boot/efi/BOOT/grub.cfg sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg + sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/efi/BOOT/grub.cfg rm /boot/resize-volumio-datapart rm /boot/kernel_update sync @@ -371,8 +389,8 @@ if [ -e "/boot/resize-volumio-datapart" ]; then print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" parted -s ${BOOT_DEVICE} resizepart 3 ${END} > /boot/resize-datapart.log - e2fsck -f ${BOOT_DEVICE}3 -y - resize2fs ${BOOT_DEVICE}3 > /boot/resize-datapart.log + e2fsck -f ${DATAPART} -y + resize2fs ${DATAPART} > /boot/resize-datapart.log print_msg "Volumio data partition succesfully resized" parted -s ${BOOT_DEVICE} unit MB print > /boot/resize-datapart.log rm /boot/resize-volumio-datapart @@ -400,7 +418,7 @@ VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" # =================================================== # [ -d /mnt/ext ] || mkdir /mnt/ext -mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext +mount -t ext4 ${DATAPART} /mnt/ext [ -d /mnt/ext/dyn ] || mkdir /mnt/ext/dyn [ -d /mnt/ext/union ] || mkdir /mnt/ext/union [ -d /mnt/ext/work ] || mkdir /mnt/ext/work diff --git a/scripts/initramfs/mkinitramfs-custom.sh b/scripts/initramfs/mkinitramfs-custom.sh index 098009c8c..effe2e96c 100755 --- a/scripts/initramfs/mkinitramfs-custom.sh +++ b/scripts/initramfs/mkinitramfs-custom.sh @@ -396,8 +396,10 @@ cp /sbin/resize2fs "${DESTDIR}/sbin" cp /sbin/findfs "${DESTDIR}/sbin" if [ ${DPKG_ARCH} = "i386" ]; then cp /sbin/gdisk "${DESTDIR}/sbin" -# these libs are only for gdisk + cp /bin/lsblk "${DESTDIR}/sbin" +# these libs are only for gdisk and lsblk cp "/usr/${LIB_GNUE}/libstdc++.so.6" "${DESTDIR}${LIB_GNUE}" + cp "${LIB_GNUE}/libsmartcols.so.1" "${DESTDIR}${LIB_GNUE}" fi echo "Adding all common dependencies" diff --git a/scripts/x86config.sh b/scripts/x86config.sh index b6c643358..8b5b2aaf8 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -35,7 +35,7 @@ echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% datapart=UUID=%%DATAPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd " > /boot/syslinux.tmpl @@ -43,6 +43,7 @@ echo "Creating syslinux.cfg from template" cp /boot/syslinux.tmpl /boot/syslinux.cfg sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg +sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/syslinux.cfg echo "Editing the Grub UEFI config template" # Make grub boot menu transparent @@ -76,11 +77,13 @@ echo 'configfile ${cmdpath}/grub.cfg' > /grub-redir.cfg echo "Using current grub.cfg as run-time template for kernel updates" cp /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.tmpl sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/efi/BOOT/grub.tmpl +sed -i "s/${UUID_DATA}/%%DATAPART%%/g" /boot/efi/BOOT/grub.tmpl echo "Inserting root and boot partition UUIDs (building the boot cmdline used in initramfs)" # Opting for finding partitions by-UUID sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg +sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/efi/BOOT/grub.cfg cat > /usr/sbin/policy-rc.d << EOF exit 101 @@ -201,6 +204,7 @@ echo "squashfs" >> /etc/initramfs-tools/modules echo "usbcore" >> /etc/initramfs-tools/modules echo "usb_common" >> /etc/initramfs-tools/modules echo "mmc_core" >> /etc/initramfs-tools/modules +echo "mmc_block" >> /etc/initramfs-tools/modules echo "sdhci" >> /etc/initramfs-tools/modules echo "sdhci_pci" >> /etc/initramfs-tools/modules echo "sdhci_acpi" >> /etc/initramfs-tools/modules diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 92ec2f946..6f55bacb5 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -119,8 +119,10 @@ modprobe efivarfs UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) UUID_IMG=$(blkid -s UUID -o value ${IMG_PART}) +UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) echo "UUID_BOOT=${UUID_BOOT} UUID_IMG=${UUID_IMG} +UUID_DATA=${UUID_DATA} LOOP_DEV=${LOOP_DEV} BOOT_PART=${BOOT_PART} " >> /mnt/volumio/rootfs/init.sh diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index 6ad6aea03..3af6dc7e2 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -6,7 +6,7 @@ GRUB_DEFAULT='' GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Volumio Audiophile Music player" -GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 USE_KMSG=no" +GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% datapart=%%DATAPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 USE_KMSG=no" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs From 0405cfcd44e9d7a10e694b37d5c7f17541ba52a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 22 Feb 2018 20:21:46 +0100 Subject: [PATCH 378/673] x86: comment/ text changes --- README.md | 1 + scripts/initramfs/init-x86 | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e08b751e5..c4416b5b5 100644 --- a/README.md +++ b/README.md @@ -119,3 +119,4 @@ using symbolic links others may work at once or with minor adaptions * + diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 3cb809011..96f8e3797 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -141,37 +141,37 @@ do done if [ -z "${BOOTPART}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGPART}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${DATAPART}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGFILE}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi From 33a7dc49fc2355bfffa1926fdf216d9b01a2e165 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 24 Feb 2018 17:21:19 +0100 Subject: [PATCH 379/673] Revert "x86: comment/ text changes" This reverts commit 0405cfcd44e9d7a10e694b37d5c7f17541ba52a5. --- README.md | 1 - scripts/initramfs/init-x86 | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c4416b5b5..e08b751e5 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,3 @@ using symbolic links others may work at once or with minor adaptions * - diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 96f8e3797..3cb809011 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -141,37 +141,37 @@ do done if [ -z "${BOOTPART}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGPART}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${DATAPART}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGFILE}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi From 070b4234efa3d058a211fdb07d58e1d5b9e8e203 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 24 Feb 2018 17:21:30 +0100 Subject: [PATCH 380/673] Revert "X86: add eMMC support to build and init scripts" This reverts commit d0dfaad24170c9308cacb2e4d451c9f30860c566. --- scripts/initramfs/init-x86 | 60 +++++++++---------------- scripts/initramfs/mkinitramfs-custom.sh | 4 +- scripts/x86config.sh | 6 +-- scripts/x86image.sh | 2 - volumio/etc/default/grub | 2 +- 5 files changed, 24 insertions(+), 50 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 3cb809011..bafa665b7 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -66,7 +66,6 @@ modprobe ohci_pci modprobe xhci_hcd modprobe xhci_pci modprobe mmc_core -modprobe mmc_block modprobe sdhci modprobe sdhci_pci modprobe sdhci_acpi @@ -128,9 +127,6 @@ do bootpart) BOOTPART=`parse_disk $value` ;; - datapart) - DATAPART=`parse_disk $value` - ;; imgfile) IMGFILE=$value ;; @@ -141,37 +137,28 @@ do done if [ -z "${BOOTPART}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGPART}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" - exec sh - exit 0 -fi - -if [ -z "${DATAPART}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGFILE}" ]; then - print_msg "Specify the boot, data and squash image partition, on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 bootpart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=volumiodata imgfile=/volumio_current.sqs" + print_msg "Specify the squash image file after the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" exec sh exit 0 fi @@ -182,7 +169,6 @@ USE_KMSG=yes print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg BOOTPART=${BOOTPART} -print_msg DATAPART=${DATAPART} if [ ! -b "${IMGPART}" ]; then print_msg "No partition with ${IMGPART} has been found" @@ -206,8 +192,7 @@ print_msg "Initrd initialisation finished" # ============================================================== # -BOOT_DEVICE=$(echo /dev/`lsblk -no PKNAME ${BOOTPART}`) - +BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') if [ -e "/mnt/imgpart/move-gpt" ]; then print_msg "First time boot, moving the backup GPT table to the end of the disk..." gdisk ${BOOT_DEVICE} > /dev/null 2>&1 < /mnt/factory/factory_reset print_msg "Factory reset initiated" umount /mnt/factory @@ -306,10 +291,10 @@ rmdir /mnt/usb # print_msg "Checking for factory or user-data reset on boot device" mkdir /mnt/factory -mount -t vfat ${BOOTPART} /mnt/factory +mount -t vfat ${BOOT_DEVICE}1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data print_msg "Factory reset executed: part I - User Data Part" tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory print_msg "Factory reset executed: part II - Kernel" @@ -323,7 +308,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data rm /mnt/factory/user_data print_msg "User Data successfully deleted " @@ -358,18 +343,15 @@ if [ -e "/boot/kernel_update" ]; then tar xf /mnt/imgpart/kernel_current.tar -C /boot UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) - UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) mv /boot/syslinux.cfg /boot/syslinux.cfg.old mv /boot/syslinux.tmpl /boot/syslinux.cfg sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg - sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/syslinux.cfg mv /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.cfg.old mv /boot/efi/BOOT/grub.tmpl /boot/efi/BOOT/grub.cfg sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg - sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/efi/BOOT/grub.cfg rm /boot/resize-volumio-datapart rm /boot/kernel_update sync @@ -389,8 +371,8 @@ if [ -e "/boot/resize-volumio-datapart" ]; then print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" parted -s ${BOOT_DEVICE} resizepart 3 ${END} > /boot/resize-datapart.log - e2fsck -f ${DATAPART} -y - resize2fs ${DATAPART} > /boot/resize-datapart.log + e2fsck -f ${BOOT_DEVICE}3 -y + resize2fs ${BOOT_DEVICE}3 > /boot/resize-datapart.log print_msg "Volumio data partition succesfully resized" parted -s ${BOOT_DEVICE} unit MB print > /boot/resize-datapart.log rm /boot/resize-volumio-datapart @@ -418,7 +400,7 @@ VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" # =================================================== # [ -d /mnt/ext ] || mkdir /mnt/ext -mount -t ext4 ${DATAPART} /mnt/ext +mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext [ -d /mnt/ext/dyn ] || mkdir /mnt/ext/dyn [ -d /mnt/ext/union ] || mkdir /mnt/ext/union [ -d /mnt/ext/work ] || mkdir /mnt/ext/work diff --git a/scripts/initramfs/mkinitramfs-custom.sh b/scripts/initramfs/mkinitramfs-custom.sh index effe2e96c..098009c8c 100755 --- a/scripts/initramfs/mkinitramfs-custom.sh +++ b/scripts/initramfs/mkinitramfs-custom.sh @@ -396,10 +396,8 @@ cp /sbin/resize2fs "${DESTDIR}/sbin" cp /sbin/findfs "${DESTDIR}/sbin" if [ ${DPKG_ARCH} = "i386" ]; then cp /sbin/gdisk "${DESTDIR}/sbin" - cp /bin/lsblk "${DESTDIR}/sbin" -# these libs are only for gdisk and lsblk +# these libs are only for gdisk cp "/usr/${LIB_GNUE}/libstdc++.so.6" "${DESTDIR}${LIB_GNUE}" - cp "${LIB_GNUE}/libsmartcols.so.1" "${DESTDIR}${LIB_GNUE}" fi echo "Adding all common dependencies" diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 8b5b2aaf8..b6c643358 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -35,7 +35,7 @@ echo "DEFAULT volumio LABEL volumio SAY Legacy Boot Volumio Audiophile Music Player (default) LINUX ${KRNL} - APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% datapart=UUID=%%DATAPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} + APPEND ro imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% imgfile=volumio_current.sqsh quiet splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 ${DEBUG} INITRD volumio.initrd " > /boot/syslinux.tmpl @@ -43,7 +43,6 @@ echo "Creating syslinux.cfg from template" cp /boot/syslinux.tmpl /boot/syslinux.cfg sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg -sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/syslinux.cfg echo "Editing the Grub UEFI config template" # Make grub boot menu transparent @@ -77,13 +76,11 @@ echo 'configfile ${cmdpath}/grub.cfg' > /grub-redir.cfg echo "Using current grub.cfg as run-time template for kernel updates" cp /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.tmpl sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/efi/BOOT/grub.tmpl -sed -i "s/${UUID_DATA}/%%DATAPART%%/g" /boot/efi/BOOT/grub.tmpl echo "Inserting root and boot partition UUIDs (building the boot cmdline used in initramfs)" # Opting for finding partitions by-UUID sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg -sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/efi/BOOT/grub.cfg cat > /usr/sbin/policy-rc.d << EOF exit 101 @@ -204,7 +201,6 @@ echo "squashfs" >> /etc/initramfs-tools/modules echo "usbcore" >> /etc/initramfs-tools/modules echo "usb_common" >> /etc/initramfs-tools/modules echo "mmc_core" >> /etc/initramfs-tools/modules -echo "mmc_block" >> /etc/initramfs-tools/modules echo "sdhci" >> /etc/initramfs-tools/modules echo "sdhci_pci" >> /etc/initramfs-tools/modules echo "sdhci_acpi" >> /etc/initramfs-tools/modules diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 6f55bacb5..92ec2f946 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -119,10 +119,8 @@ modprobe efivarfs UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) UUID_IMG=$(blkid -s UUID -o value ${IMG_PART}) -UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) echo "UUID_BOOT=${UUID_BOOT} UUID_IMG=${UUID_IMG} -UUID_DATA=${UUID_DATA} LOOP_DEV=${LOOP_DEV} BOOT_PART=${BOOT_PART} " >> /mnt/volumio/rootfs/init.sh diff --git a/volumio/etc/default/grub b/volumio/etc/default/grub index 3af6dc7e2..6ad6aea03 100644 --- a/volumio/etc/default/grub +++ b/volumio/etc/default/grub @@ -6,7 +6,7 @@ GRUB_DEFAULT='' GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Volumio Audiophile Music player" -GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% datapart=%%DATAPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 USE_KMSG=no" +GRUB_CMDLINE_LINUX_DEFAULT=" bootpart=%%BOOTPART%% imgfile=volumio_current.sqsh splash quiet plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=0 USE_KMSG=no" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs From 7c1d42d866cae39aff40080bf3d636c976044665 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 25 Feb 2018 17:44:36 +0100 Subject: [PATCH 381/673] kernel 4.9.80 --- scripts/raspberryconfig.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 07e886445..e650c7a08 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.9.65" +KERNEL_VERSION="4.9.80" case $KERNEL_VERSION in "4.4.9") @@ -68,6 +68,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="e4b56bb7efe47319e9478cfc577647e51c48e909" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.9.80") + KERNEL_REV="1092" + KERNEL_COMMIT="5c80565c5c0c7f820258c792a98b56f22db2dd03" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From 014dc033780e53747cd0d8feb264e60e259330f3 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 1 Mar 2018 14:59:59 +0100 Subject: [PATCH 382/673] proper filename for nanopineo2 --- scripts/nanopineo2image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index f572ba7bb..5b0fbff04 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${ARCH}-nanopineo2.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-nanopineo2.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" From e07513992a192b4997eaa81887dffa06582f7466 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 1 Mar 2018 15:19:08 +0100 Subject: [PATCH 383/673] changed git repo for nanopineo2 build script --- scripts/nanopineo2image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 5b0fbff04..5b78284fd 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -70,7 +70,7 @@ else echo "Clone nanopineo2 files from repo" sudo mkdir platform-nanopineo2 cd platform-nanopineo2 - wget https://github.com/nikkov/nanopineo2-platform/raw/master/nanopineo2.tar.xz + wget https://github.com/volumio/nanopineo2-platform/raw/master/nanopineo2.tar.xz echo "Unpack the platform files" tar xfJ nanopineo2.tar.xz rm nanopineo2.tar.xz From 8e31dfc4ab1ed3fc5005d4356b6cd9e6b251f440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 2 Mar 2018 10:57:45 +0100 Subject: [PATCH 384/673] Tinkerboard: change uart console from ttyS1 to ttyS3 --- scripts/tinkerconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index e613c71fa..515af7fcb 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -23,7 +23,7 @@ echo "label kernel-4.4 kernel /zImage fdt /dtb/rk3288-miniarm.dtb initrd /uInitrd - append earlyprintk splash plymouth.ignore-serial-consoles console=tty1 console=ttyS1,115200n8 rw init=/sbin/init imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf + append earlyprintk splash plymouth.ignore-serial-consoles console=tty1 console=ttyS3,115200n8 rw init=/sbin/init imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf " > /boot/extlinux/extlinux.conf echo "Adding default sound modules" From 2a6f9e420afe5ded843462064177853ae6c559c0 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 9 Mar 2018 13:32:05 +0100 Subject: [PATCH 385/673] udev rule for USB automount --- volumio/etc/udev/rules.d/50-usb-audio.rules | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 volumio/etc/udev/rules.d/50-usb-audio.rules diff --git a/volumio/etc/udev/rules.d/50-usb-audio.rules b/volumio/etc/udev/rules.d/50-usb-audio.rules new file mode 100644 index 000000000..bcb26e0cb --- /dev/null +++ b/volumio/etc/udev/rules.d/50-usb-audio.rules @@ -0,0 +1,2 @@ +KERNEL=="pcmC5D0p", DRIVERS=="usb", ACTION=="add", RUN+="/bin/bash -c '/usr/local/bin/volumio usbattach'" +KERNEL=="pcmC5D0p", DRIVERS=="usb", ACTION=="remove", RUN+="/bin/bash -c '/usr/local/bin/volumio usbdetach'" From cbfd1e4d9671bd10e8de6b6f5ae9fcbcbc645e8c Mon Sep 17 00:00:00 2001 From: Xipmix Date: Fri, 9 Feb 2018 08:06:16 +1100 Subject: [PATCH 386/673] Prevent hostspot and related services starting at boot See also "Disable hotspot.service and the services that it 'Wants:'." --- scripts/volumioconfig.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 58596b925..27749690c 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -460,6 +460,10 @@ echo "Setting Mpd to SystemD instead of Init" update-rc.d mpd remove systemctl enable mpd.service +echo "Preventing hotspot services from starting at boot" +systemctl disable hotspot.service +systemctl disable dnsmasq.service + echo "Preventing un-needed dhcp servers to start automatically" systemctl disable isc-dhcp-server.service systemctl disable dhcpd.service From 81a964334fe5781390903123bd0394ca968a5af9 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 10 Mar 2018 14:25:12 +0100 Subject: [PATCH 387/673] Wireless debug --- volumio/bin/wireless.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 948c85bce..15d141672 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -3,6 +3,8 @@ //Volumio Network Manager - Copyright Michelangelo Guarise - Volumio.org // Time needed to settle some commands sent to the system like ifconfig +var debug = false; + var settleTime = 3000; var fs = require('fs-extra') var thus = require('child_process'); @@ -10,7 +12,6 @@ var wlan = "wlan0"; var dhcpd = "dhcpd"; var dhclient = "/usr/bin/sudo /sbin/dhcpcd"; var justdhclient = "/usr/bin/sudo /sbin/dhcpcd"; -var wpasupp = "wpa_supplicant -d -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; var starthostapd = "systemctl start hotspot.service"; var stophostapd = "systemctl stop hotspot.service"; var ifconfigHotspot = "ifconfig " + wlan + " 192.168.211.1 up"; @@ -18,7 +19,11 @@ var ifconfigWlan = "ifconfig " + wlan + " up"; var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan + " down"; var execSync = require('child_process').execSync; var conf = {}; -var debug = false; +if (debug) { + var wpasupp = "wpa_supplicant -d -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; +} else { + var wpasupp = "wpa_supplicant -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; +} function kill(process, callback) { var all = process.split(" "); From 74b03e58741a8720f3ce6dca9934ce69868ea558 Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 13 Mar 2018 23:39:36 +0100 Subject: [PATCH 388/673] Updater 1.3 --- scripts/volumioconfig.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index ebe3400c4..376c6ba71 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -190,9 +190,9 @@ if [ $(uname -m) = armv7l ]; then rm upmpdcli_1.2.12-1_armhf.deb echo "Adding volumio-remote-updater for armv6" - wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.2-armhf.deb - dpkg -i volumio-remote-updater_1.2-armhf.deb - rm volumio-remote-updater_1.2-armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armhf.deb + dpkg -i volumio-remote-updater_1.3-armhf.deb + rm volumio-remote-updater_1.3-armhf.deb elif [ $ARCH = armv7 ]; then @@ -227,9 +227,9 @@ if [ $(uname -m) = armv7l ]; then rm upmpdcli_1.2.12-1_armhf.deb echo "Adding volumio-remote-updater for armv7" - wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.2-armv7.deb - dpkg -i volumio-remote-updater_1.2-armv7.deb - rm volumio-remote-updater_1.2-armv7.deb + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armv7.deb + dpkg -i volumio-remote-updater_1.3-armv7.deb + rm volumio-remote-updater_1.3-armv7.deb fi #Remove autostart of upmpdcli @@ -378,9 +378,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] chmod a+x /usr/bin/zsync echo "Adding volumio-remote-updater for i386" - wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.2-i386.deb - dpkg -i volumio-remote-updater_1.2-i386.deb - rm /volumio-remote-updater_1.2-i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.3-i386.deb + dpkg -i volumio-remote-updater_1.3-i386.deb + rm /volumio-remote-updater_1.3-i386.deb fi From c1fb6caf6b5d58a685bc00d11400797821df2e2b Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 14 Mar 2018 23:27:09 +0100 Subject: [PATCH 389/673] kernel bump to 4.14.26 --- scripts/raspberryconfig.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index e650c7a08..a94445aa1 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.9.80" +KERNEL_VERSION="4.14.26" case $KERNEL_VERSION in "4.4.9") @@ -73,6 +73,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="5c80565c5c0c7f820258c792a98b56f22db2dd03" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.14.26") + KERNEL_REV="1099" + KERNEL_COMMIT="f1791cacb3e711a523d46de37faa4bbfcca8ab6a" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From d795756fd0cfa2907c0e244157af7b0bb22f2fc0 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 15 Mar 2018 14:50:17 +0100 Subject: [PATCH 390/673] PI3B+ Wireless Firmware --- scripts/raspberryconfig.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index a94445aa1..afce11bf3 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -111,6 +111,12 @@ echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/overlays/pi3-disable-wifi.dtbo fi +# Temporary solution for PI3B+ Wireless firmware +echo "Getting Raspberry PI B3+ Wireless firmware" +wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.bin -P /lib/firmware/brcm/ +wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.clm_blob -P /lib/firmware/brcm/ +wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.txt -P /lib/firmware/brcm/ + #echo "Adding raspi-config" #wget -P /raspi http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20151019_all.deb #dpkg -i /raspi/raspi-config_20151019_all.deb From ae4291c6f4eb348ecd67cfc61e43019ad8d23543 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 16 Mar 2018 11:45:19 +0100 Subject: [PATCH 391/673] include all latest brcm firmware latest support for Pi3/Pi0W and Pi3+ --- scripts/raspberryconfig.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index afce11bf3..f0976ce0d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -104,6 +104,11 @@ apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depen echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & few others firmware upgraging to Pi Foundations packages" apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 +# Temporary brcm firmware fix solution until we use Stretch +wget http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20161130-3+rpt3_all.deb +dpkg -i firmware-brcm80211_20161130-3+rpt3_all.deb +rm firmware-brcm80211_20161130-3+rpt3_all.deb + if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/bcm2708-rpi-0-w.dtb @@ -111,12 +116,6 @@ echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/overlays/pi3-disable-wifi.dtbo fi -# Temporary solution for PI3B+ Wireless firmware -echo "Getting Raspberry PI B3+ Wireless firmware" -wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.bin -P /lib/firmware/brcm/ -wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.clm_blob -P /lib/firmware/brcm/ -wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.txt -P /lib/firmware/brcm/ - #echo "Adding raspi-config" #wget -P /raspi http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20151019_all.deb #dpkg -i /raspi/raspi-config_20151019_all.deb From 75dc7672778fc87f905601bc4e3697f88d86e3eb Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 16 Mar 2018 11:54:14 +0100 Subject: [PATCH 392/673] volumio repo mirror --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index f0976ce0d..8ea623ede 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -105,7 +105,7 @@ echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 # Temporary brcm firmware fix solution until we use Stretch -wget http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20161130-3+rpt3_all.deb +wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20161130-3%2Brpt3_all.deb dpkg -i firmware-brcm80211_20161130-3+rpt3_all.deb rm firmware-brcm80211_20161130-3+rpt3_all.deb From ff3104f6466411ea5878d9ef3134872535e0390c Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 16 Mar 2018 13:41:13 +0100 Subject: [PATCH 393/673] udev filter for Pi3+ lan78xx gives precedence to connected USB-ethernet interface over built-in ethernet. Now support all Pis with built-in smsc95xx or lan78xx (not tested) --- scripts/raspberryconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 8ea623ede..e4382b625 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -184,8 +184,8 @@ ln -s /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so ln -s /opt/vc/bin/vcgencmd /usr/bin/vcgencmd ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so -# changing external ethX priority rule for Pi as built-in eth _is_ on USB (smsc95xx driver) -sed -i 's/KERNEL==\"eth/DRIVERS!=\"smsc95xx\", &/' /etc/udev/rules.d/99-Volumio-net.rules +# changing external ethX priority rule for Pi as built-in eth _is_ on USB (smsc95xx or lan78xx drivers) +sed -i 's/KERNEL==\"eth/DRIVERS!=\"smsc95xx\", DRIVERS!=\"lan78xx\", &/' /etc/udev/rules.d/99-Volumio-net.rules echo "Installing Wireless drivers for 8188eu, 8192eu, 8812au, mt7610, and mt7612. Many thanks MrEngman" MRENGMAN_REPO="http://downloads.fars-robotics.net/wifi-drivers" From 436d020fb7435e575436dc55a51f6f53abf4c809 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 20 Mar 2018 12:52:48 +0100 Subject: [PATCH 394/673] new dd for vszero --- scripts/vszeroimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 4ac8c314d..816948cd7 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -69,7 +69,7 @@ else fi echo "Copying the bootloader" -dd if=platform-pv/vszero/u-boot/u-boot-dtb.imx of=${LOOP_DEV} seek=1 bs=1k conv=notrunc +dd if=platform-pv/vszero/u-boot/u-boot-dtb.imx-512Mb of=${LOOP_DEV} seek=1 bs=1k conv=notrunc sync if [ -d /mnt ] From 5d4423f651f923861861345162641990e06c1d07 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 22 Mar 2018 11:37:16 +0100 Subject: [PATCH 395/673] new firmware for 4.9.80 --- scripts/raspberryconfig.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 8ea623ede..0020189ea 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.26" +KERNEL_VERSION="4.9.80" case $KERNEL_VERSION in "4.4.9") @@ -71,7 +71,7 @@ case $KERNEL_VERSION in "4.9.80") KERNEL_REV="1092" KERNEL_COMMIT="5c80565c5c0c7f820258c792a98b56f22db2dd03" - FIRMWARE_COMMIT=$KERNEL_COMMIT + FIRMWARE_COMMIT="3347884c7df574bbabeff6dca63caf686e629699" ;; "4.14.26") KERNEL_REV="1099" From d3232ba0a8bb47cff2b440c3efe030518567ac59 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 22 Mar 2018 17:21:12 +0100 Subject: [PATCH 396/673] get firmware & kernel from latest stable Hopefully working. Note: MrEngman drivers may not be available yet, Taudac may need to be updated too.. --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 0020189ea..094e77227 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -69,9 +69,9 @@ case $KERNEL_VERSION in FIRMWARE_COMMIT=$KERNEL_COMMIT ;; "4.9.80") - KERNEL_REV="1092" - KERNEL_COMMIT="5c80565c5c0c7f820258c792a98b56f22db2dd03" - FIRMWARE_COMMIT="3347884c7df574bbabeff6dca63caf686e629699" + KERNEL_REV="1098" + KERNEL_COMMIT="936a8dc3a605c20058fbb23672d6b47bca77b0d5" + FIRMWARE_COMMIT=$KERNEL_COMMIT ;; "4.14.26") KERNEL_REV="1099" From 53522a631404cc92ed49f54b2c2a4bc5be6ae1e0 Mon Sep 17 00:00:00 2001 From: macmpi Date: Thu, 22 Mar 2018 23:34:27 +0100 Subject: [PATCH 397/673] Pi3b+: try 4.14.29 might fix eth0 issues... --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index e4382b625..150096494 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -55,7 +55,7 @@ sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexx touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.26" +KERNEL_VERSION="4.14.29" case $KERNEL_VERSION in "4.4.9") @@ -73,9 +73,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="5c80565c5c0c7f820258c792a98b56f22db2dd03" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - "4.14.26") - KERNEL_REV="1099" - KERNEL_COMMIT="f1791cacb3e711a523d46de37faa4bbfcca8ab6a" + "4.14.29") + KERNEL_REV="1101" + KERNEL_COMMIT="955fa1d6e8cd8c94ad8a6680a09269d9bd2945c5" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From f94ec8ad5b97bcab35cbdde0689c94a1b6a1e095 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 26 Mar 2018 17:48:58 +0000 Subject: [PATCH 398/673] Fix long time when starting up --- volumio/bin/wireless.js | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 15d141672..b37d1d2fd 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -154,18 +154,28 @@ function startFlow() { if (wpaerr > 0) { actualTime = totalSecondsForConnection + 1; } - if (actualTime > totalSecondsForConnection && conf != undefined && conf.hotspot_fallback != undefined && conf.hotspot_fallback.value != undefined && conf.hotspot_fallback.value) { + + if (actualTime > totalSecondsForConnection) { console.log("Overtime, starting plan B"); - apstopped = 1; - clearTimeout(lesstimer); - stopAP(function () { - setTimeout(function () { - startHotspot(function () { + if (conf != undefined && conf.hotspot_fallback != undefined && conf.hotspot_fallback.value != undefined && conf.hotspot_fallback.value) { + console.log('STARTING HOTSPOT'); + apstopped = 1; + clearTimeout(lesstimer); + stopAP(function () { + setTimeout(function () { + startHotspot(function () { - }); - }, settleTime); - }); + }); + }, settleTime); + }); + } else { + apstopped = 0; + wstatus("ap"); + clearTimeout(lesstimer); + + } + } else { var SSID = undefined; var ifconfig = require('wireless-tools/ifconfig'); From 9a536fc89edaf5af9bee388f7edbfbaaf5b614ba Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 29 Mar 2018 13:31:44 +0200 Subject: [PATCH 399/673] Proper kernel archive for nanopineo --- scripts/nanopineo2image.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 5b78284fd..2ae354f28 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -171,13 +171,13 @@ fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ -if [ -e /mnt/kernel_current.tar.gz ]; then +if [ -e /mnt/kernel_current.tar ]; then echo "Volumio Kernel Partition Archive exists - Cleaning it" - rm -rf /mnt/kernel_current.tar.gz + rm -rf /mnt/kernel_current.tar fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar.gz --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* From f18f7715e52f3ab177cc4aae8272628c0c98ac3a Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 29 Mar 2018 13:32:59 +0200 Subject: [PATCH 400/673] proper kernel creation for nano pi and usb on 5 --- scripts/nanopineoconfig.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/nanopineoconfig.sh b/scripts/nanopineoconfig.sh index 4637a3f2c..0e3bce1e7 100755 --- a/scripts/nanopineoconfig.sh +++ b/scripts/nanopineoconfig.sh @@ -26,6 +26,11 @@ tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 #echo "Blacklisting 8723bs_vq0" #echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-nanopineo2.conf +echo "USB Card Ordering" +echo "# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + + echo "Installing additonal packages" apt-get update apt-get -y install network-manager u-boot-tools liblircclient0 lirc From 7d1b2dca73be15f6d448ae55989e4b89d8f32644 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Fri, 30 Mar 2018 12:31:35 +0300 Subject: [PATCH 401/673] add Amlogic S805 S802\S812 S905\S905X\S905D\S912 --- build.sh | 20 +++- scripts/aml805armv7config.sh | 87 ++++++++++++++ scripts/aml805armv7image.sh | 201 +++++++++++++++++++++++++++++++++ scripts/aml812armv7config.sh | 88 +++++++++++++++ scripts/aml812armv7image.sh | 200 +++++++++++++++++++++++++++++++++ scripts/aml9xxxarmv7config.sh | 87 ++++++++++++++ scripts/aml9xxxarmv7image.sh | 206 ++++++++++++++++++++++++++++++++++ scripts/initramfs/init | 2 +- scripts/volumioconfig.sh | 2 +- 9 files changed, 887 insertions(+), 6 deletions(-) create mode 100755 scripts/aml805armv7config.sh create mode 100755 scripts/aml805armv7image.sh create mode 100755 scripts/aml812armv7config.sh create mode 100755 scripts/aml812armv7image.sh create mode 100755 scripts/aml9xxxarmv7config.sh create mode 100755 scripts/aml9xxxarmv7image.sh diff --git a/build.sh b/build.sh index 6e77fa4fe..b552efc59 100755 --- a/build.sh +++ b/build.sh @@ -157,10 +157,10 @@ if [ -n "$BUILD" ]; then echo 'Cloning Volumio Node Backend' mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then - echo "Cloning Volumio with all its history" - git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio - else - git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + echo "Cloning Volumio with all its history" + git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + else + git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" @@ -291,6 +291,18 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/vszeroimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + aml805armv7) echo 'Writing Amlogic S805 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/aml805armv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; + aml812armv7) echo 'Writing Amlogic S812 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/aml812armv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; + aml9xxxarmv7) echo 'Writing AmlogicS9xxx Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/aml9xxxarmv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; x86) echo 'Writing x86 Image File' check_os_release "x86" "$VERSION" "$DEVICE" sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; diff --git a/scripts/aml805armv7config.sh b/scripts/aml805armv7config.sh new file mode 100755 index 000000000..72df6d350 --- /dev/null +++ b/scripts/aml805armv7config.sh @@ -0,0 +1,87 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# Amlogic fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "#!/bin/sh -e +/etc/hdmi.sh & +dhclient eth0 & +exit 0" > /etc/rc.local + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc mc abootimg fbset + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +#echo "Changing to 'modules=dep'" +#echo "(otherwise won't boot due to uInitrd 4MB limit)" +#sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Creating s805_autoscript" +mkimage -A arm -O linux -T script -C none -d /boot/s805_autoscript.txt /boot/s805_autoscript + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh new file mode 100755 index 000000000..0643a6e9f --- /dev/null +++ b/scripts/aml805armv7image.sh @@ -0,0 +1,201 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml805-armv7.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the AML kernel and platform files" +if [ -d platform-aml ] +then + echo "Pull from repo" + cd platform-aml + git pull + cd .. +else + echo "Clone all AML files from repo" + git clone https://github.com/150balbes/platform-aml.git platform-aml +# cd .. +fi + + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying boot files" +cp -pdR platform-aml/s805/boot/* /mnt/volumio/rootfs/boot +echo "Copying modules" +cp -pdR platform-aml/s805/lib/modules /mnt/volumio/rootfs/lib/ +echo "Copying firmware" +cp -pdR platform-aml/s805/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying etc files" +cp -pdR platform-aml/s805/etc/* /mnt/volumio/rootfs/etc +echo "Copying usr/bin files" +cp -pdR platform-aml/s805/usr/* /mnt/volumio/rootfs/usr +sync + +echo "Preparing to run chroot for more AML configuration" +cp scripts/aml805armv7config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + echo "Starting config.js" + node config.js $PATCH +fi + +echo "Creating s805_autoscript.txt" +UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +echo "setenv boot_part imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA}" > /mnt/volumio/rootfs/boot/s805_autoscript.txt +cat /mnt/volumio/rootfs/boot/txt/s805_autoscript.cmd >> /mnt/volumio/rootfs/boot/s805_autoscript.txt + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/aml805armv7config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/aml805armv7config.sh +rm /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> AML device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-aml +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync diff --git a/scripts/aml812armv7config.sh b/scripts/aml812armv7config.sh new file mode 100755 index 000000000..99d296a57 --- /dev/null +++ b/scripts/aml812armv7config.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# Amlogic fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +#UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "#!/bin/sh -e +/etc/hdmi.sh & +dhclient eth0 & +exit 0" > /etc/rc.local + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc mc abootimg fbset + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +#rm /usr/sbin/policy-rc.d + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +#echo "Changing to 'modules=dep'" +#echo "(otherwise won't boot due to uInitrd 4MB limit)" +#sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Creating s805_autoscript" +mkimage -A arm -O linux -T script -C none -d /boot/s805_autoscript.txt /boot/s805_autoscript + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh new file mode 100755 index 000000000..142cbf857 --- /dev/null +++ b/scripts/aml812armv7image.sh @@ -0,0 +1,200 @@ +#!/bin/sh + +# Default build for Debian 32bit (to be changed to armv8) +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml812-armv7.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the AML kernel and platform files" +if [ -d platform-aml ] +then + echo "Pull from repo" + cd platform-aml + git pull + cd .. +else + echo "Clone all AML files from repo" + git clone https://github.com/150balbes/platform-aml.git platform-aml +# cd .. +fi + +#echo "Copying the bootloader" +#dd if=platform-khadas/vim/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=1 count=442 +#dd if=platform-khadas/vim/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=512 skip=1 seek=1 +#sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying boot files" +cp -pdR platform-aml/s812/boot/* /mnt/volumio/rootfs/boot +echo "Copying modules" +cp -pdR platform-aml/s812/lib/modules /mnt/volumio/rootfs/lib/ +echo "Copying firmware" +cp -pdR platform-aml/s812/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying etc files" +cp -pdR platform-aml/s812/etc/* /mnt/volumio/rootfs/etc +#echo "Copying usr/bin files" +#cp -pdR platform-aml/s812/usr/* /mnt/volumio/rootfs/usr +#sync + +echo "Preparing to run chroot for more AML configuration" +cp scripts/aml812armv7config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +echo "Creating s805_autoscript.txt" +UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +echo "setenv boot_part imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA}" > /mnt/volumio/rootfs/boot/s805_autoscript.txt +cat /mnt/volumio/rootfs/boot/txt/s805_autoscript.cmd >> /mnt/volumio/rootfs/boot/s805_autoscript.txt + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/aml812armv7config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/aml812armv7config.sh +rm /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> AML device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#sudo rm -r platform-aml +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync diff --git a/scripts/aml9xxxarmv7config.sh b/scripts/aml9xxxarmv7config.sh new file mode 100755 index 000000000..8a625a7ee --- /dev/null +++ b/scripts/aml9xxxarmv7config.sh @@ -0,0 +1,87 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# Amlogic S9xxx fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "#!/bin/sh -e +/etc/hdmi.sh & +/etc/fan.sh & +exit 0" > /etc/rc.local + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc mc abootimg fbset + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +#echo "Changing to 'modules=dep'" +#echo "(otherwise won't boot due to uInitrd 4MB limit)" +#sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Creating s905_autoscript" +mkimage -A arm -O linux -T script -C none -d /boot/s905_autoscript.txt /boot/s905_autoscript + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh new file mode 100755 index 000000000..1dd6be755 --- /dev/null +++ b/scripts/aml9xxxarmv7image.sh @@ -0,0 +1,206 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml9xxx-armv7.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the AML kernel and platform files" +if [ -d platform-aml ] +then + echo "Pull from repo" + cd platform-aml + git pull + cd .. +else + echo "Clone all Khadas files from repo" + git clone https://github.com/150balbes/platform-aml.git platform-aml +# cd .. +fi + +#echo "Copying the bootloader" +#dd if=platform-aml/s9xxx/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=1 count=442 +#dd if=platform-aml/s9xxx/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=512 skip=1 seek=1 +#sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying Khadas boot files" +cp -pdR platform-aml/s9xxx/boot/* /mnt/volumio/rootfs/boot +echo "Copying Khadas modules" +cp -pdR platform-aml/s9xxx/lib/modules /mnt/volumio/rootfs/lib/ +echo "Copying Khadas firmware" +cp -pdR platform-aml/s9xxx/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying Khadas etc files" +cp -pdR platform-aml/s9xxx/etc/* /mnt/volumio/rootfs/etc +echo "Copying Khadas usr/bin files" +cp -pdR platform-aml/s9xxx/usr/* /mnt/volumio/rootfs/usr +sync + +echo "Preparing to run chroot for more VIM configuration" +cp scripts/aml9xxxarmv7config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +#cp scripts/initramfs/init.next_nofs /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + echo "Starting config.js" + node config.js $PATCH +fi + +echo "Creating s905_autoscript.txt" +UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +echo "setenv boot_part imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA}" > /mnt/volumio/rootfs/boot/s905_autoscript.txt +cat /mnt/volumio/rootfs/boot/txt/s905_autoscript.cmd >> /mnt/volumio/rootfs/boot/s905_autoscript.txt + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/aml9xxxarmv7config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/aml9xxxarmv7config.sh +rm /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> Amlogic s9xxx device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-aml +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 54dce6a42..4fa8434cd 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -94,7 +94,7 @@ else OVERLAY=WITHWRKDIR fi -print_msg "Booting Volumio for for ${HWDEVICE}" +print_msg "Booting Volumio for ${HWDEVICE}" print_msg " This script mounts rootfs RO with an overlay RW layer." if [ $OVERLAY == WITHWRKDIR ]; then # For overlayfs version V22 or higher (modulename 'overlay') diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index ebe3400c4..2e47d5c8a 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -110,7 +110,7 @@ echo "nameserver 8.8.8.8" > /etc/resolv.conf ################ #Volumio System#--------------------------------------------------- ################ -if [ $(uname -m) = armv7l ]; then +if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then echo "Arm Environment detected" echo ' Adding Raspbian Repo Key' wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add - From b691fa2586b4706ac35cf679ce35197cbebac968 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Fri, 30 Mar 2018 17:04:49 +0300 Subject: [PATCH 402/673] fix s812 --- scripts/aml812armv7config.sh | 3 +-- scripts/aml812armv7image.sh | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/aml812armv7config.sh b/scripts/aml812armv7config.sh index 99d296a57..72df6d350 100755 --- a/scripts/aml812armv7config.sh +++ b/scripts/aml812armv7config.sh @@ -8,7 +8,7 @@ echo "Creating \"fstab\"" echo "# Amlogic fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -#UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -28,7 +28,6 @@ apt-get -y install u-boot-tools liblircclient0 lirc mc abootimg fbset echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean -#rm /usr/sbin/policy-rc.d echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index 142cbf857..d9bd38fe1 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Default build for Debian 32bit (to be changed to armv8) +# Default build for Debian 32bit ARCH="armv7" while getopts ":v:p:a:" opt; do @@ -73,10 +73,6 @@ else # cd .. fi -#echo "Copying the bootloader" -#dd if=platform-khadas/vim/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=1 count=442 -#dd if=platform-khadas/vim/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=512 skip=1 seek=1 -#sync echo "Preparing for Volumio rootfs" if [ -d /mnt ] @@ -98,6 +94,7 @@ echo "Creating mount point for the images partition" mkdir /mnt/volumio/images mount -t ext4 "${SYS_PART}" /mnt/volumio/images mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" mkdir /mnt/volumio/rootfs/boot mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot @@ -111,9 +108,9 @@ echo "Copying firmware" cp -pdR platform-aml/s812/lib/firmware /mnt/volumio/rootfs/lib/ echo "Copying etc files" cp -pdR platform-aml/s812/etc/* /mnt/volumio/rootfs/etc -#echo "Copying usr/bin files" -#cp -pdR platform-aml/s812/usr/* /mnt/volumio/rootfs/usr -#sync +echo "Copying usr/bin files" +cp -pdR platform-aml/s812/usr/* /mnt/volumio/rootfs/usr +sync echo "Preparing to run chroot for more AML configuration" cp scripts/aml812armv7config.sh /mnt/volumio/rootfs @@ -127,6 +124,11 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + echo "Starting config.js" + node config.js $PATCH +fi + echo "Creating s805_autoscript.txt" UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) @@ -142,7 +144,6 @@ EOF #cleanup rm /mnt/volumio/rootfs/aml812armv7config.sh rm /mnt/volumio/rootfs/root/init -rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev @@ -153,7 +154,7 @@ echo "==> AML device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" -#sudo rm -r platform-aml +#rm -r platform-aml sync echo "Preparing rootfs base for SquashFS" From a07397ff7e33492a5a5019a0d7fc7f978a12b526 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Sat, 31 Mar 2018 14:08:30 +0300 Subject: [PATCH 403/673] fix start image for Amlogic TV box --- scripts/aml805armv7image.sh | 2 +- scripts/aml812armv7image.sh | 2 +- scripts/aml9xxxarmv7image.sh | 3 +- scripts/initramfs/init.nextarm_tvbox | 429 +++++++++++++++++++++++++++ 4 files changed, 432 insertions(+), 4 deletions(-) create mode 100755 scripts/initramfs/init.nextarm_tvbox diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh index 0643a6e9f..082486d61 100755 --- a/scripts/aml805armv7image.sh +++ b/scripts/aml805armv7image.sh @@ -114,7 +114,7 @@ sync echo "Preparing to run chroot for more AML configuration" cp scripts/aml805armv7config.sh /mnt/volumio/rootfs -cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/init.nextarm_tvbox /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index d9bd38fe1..7a241e0d4 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -114,7 +114,7 @@ sync echo "Preparing to run chroot for more AML configuration" cp scripts/aml812armv7config.sh /mnt/volumio/rootfs -cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/init.nextarm_tvbox /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index 1dd6be755..26a016145 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -118,8 +118,7 @@ sync echo "Preparing to run chroot for more VIM configuration" cp scripts/aml9xxxarmv7config.sh /mnt/volumio/rootfs -cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init -#cp scripts/initramfs/init.next_nofs /mnt/volumio/rootfs/root/init +cp scripts/initramfs/init.nextarm_tvbox /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater diff --git a/scripts/initramfs/init.nextarm_tvbox b/scripts/initramfs/init.nextarm_tvbox new file mode 100755 index 000000000..aab0df3cf --- /dev/null +++ b/scripts/initramfs/init.nextarm_tvbox @@ -0,0 +1,429 @@ +#!/bin/busybox sh + +# Default PATH differs between shells, and is not automatically exported +# by klibc dash. Make it consistent. +export PATH=/sbin:/usr/sbin:/bin:/usr/bin + +[ -d /proc ] || mkdir /proc +mount -t proc none /proc +[ -d /sys ] || mkdir /sys +mount -t sysfs none /sys + +mknod /dev/null c 1 3 +mknod /dev/tty c 5 0 +[ -e /dev/console ] || mknod /dev/console c 5 1 + +mdev -s + +#Defaults which may be overridden by cmdline parameters +USE_KMSG="yes" +HWDEVICE="empty" +BOOTDEV="mmcblk0" +BOOTCONFIG="empty" +#Device/Partition Separator i.e. the character between parentdev and partition index +DPS="p" +#default values: +IMGPART="/dev/${BOOTDEV}${DPS}2" +DATAPART="/dev/${BOOTDEV}${DPS}3" +BOOTPART="/dev/${BOOTDEV}${DPS}1" + +# Display a message or print directly to /dev/kmsg +print_msg() { +if [ $USE_KMSG == yes ]; then + echo "initramfs:" $1 >> /dev/kmsg +else + echo "initramfs:" $1 +fi +} + +# Parse the kernel command line + +CMDLINE="$(cat /proc/cmdline)" + +parse_disk() { + if [ "$(echo $1|cut -c -5)" = "UUID=" ]; then + # $1 is a UUID + echo $(findfs $1) + elif [ "$(echo $1|cut -c -6)" = "LABEL=" ]; then + # $1 is a LABEL + echo $(findfs $1) + elif [ "$(echo $1|cut -c -5)" = "/dev/" ]; then + # $1 is a device name + echo $1 + else + # $1 is unrecognized. + echo "unknown-disk" + fi +} + +DO_GEN=no + +for p in ${CMDLINE}; +do + key=${p%%=*} + value=${p#*=} + case $key in + imgpart) + IMGPART=`parse_disk $value` + ;; + imgfile) + IMGFILE=$value + ;; + bootdelay) + BOOTDELAY=$value + ;; + use_kmsg) + USE_KMSG=$value + ;; + bootdev) + BOOTDEV=$value + ;; + dps) + DPS=$value + ;; + genpnames) + DO_GEN=yes + ;; + bootpart) + BOOTPART=`parse_disk $value` + ;; + datapart) + DATAPART=`parse_disk $value` + ;; + bootconfig) + #prepend with "/boot/" (add an ending slash to avoid mistakes) + BOOTCONFIG=/boot/$value + ;; + hwdevice) + HWDEVICE=$value + ;; + esac +done + +if [ $DO_GEN == yes ]; then + print_msg "re-generating partition names..." + IMGPART="/dev/${BOOTDEV}${DPS}2" + DATAPART="/dev/${BOOTDEV}${DPS}3" + BOOTPART="/dev/${BOOTDEV}${DPS}1" +fi +#Hardware specific adaptions + +#When we did not already get the device name from the cmdline, try getting it from cpuinfo +if [ $HWDEVICE == empty ]; then + HWDEVICE="$(cat /proc/cpuinfo | grep Hardware | awk '{print $3}' )" +fi + +if [ $HWDEVICE == ODROID-C2 ]; then + exec >/dev/kmsg 2>&1 /dev/kmsg 2>&1 /proc/sysrq-trigger + fi + if [ -e /mnt/usb/factory_reset ]; then + print_msg "Factory Reset on USB" + mkdir /mnt/factory + mount -t auto ${BOOTPART} /mnt/factory + echo " " > /mnt/factory/factory_reset + umount /mnt/factory + rm -r /mnt/factory + rm /mnt/usb/factory_reset + fi + umount /dev/sda1 + rm -r /mnt/usb +else + if [ "/dev/sda1" == "${BOOTPART}" ]; then + print_msg "Not checking for firmware if you boot from USB. Sorry!" + else + print_msg "No USB device detected (when incorrect, try adding 'bootdelay=5' to your boot cmdline)" + fi +fi + + +# 2) init a loop pointing to the image file +loop_free=$(losetup -f | sed s#p/#p#) +if [ ! -e ${loop_free} ]; then + print_msg "Device node does not exist, creating it..." + # use last char from loop_device as minor device number + minor=$(echo ${loop_free} | sed 's/.*\(.\)/\1/') + mknod $loop_free b 7 $minor +fi +losetup $loop_free /mnt/imgpart/${IMGFILE} + +# 3) mount the squashfs to /mnt/static +[ -d /mnt/static ] || mkdir /mnt/static +mount -t squashfs $loop_free /mnt/static + +VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" + +#if there is factory file then format data partition +# +mkdir /mnt/factory +mount -t auto ${BOOTPART} /mnt/factory +if [ -e "/mnt/factory/factory_reset" ]; then + print_msg "Executing factory reset" + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + print_msg "Factory reset executed: part I - User DATA Part" + tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory + print_msg "Factory reset executed: part II - Kernel" + cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh + print_msg "Factory reset executed: part III - Squash" + print_msg "Factory reset successfully executed" + sync + rm /mnt/factory/factory_reset + + umount /mnt/factory + rm -r /mnt/factory + print_msg "Restarting" + echo b > /proc/sysrq-trigger +fi +if [ -e "/mnt/factory/user_data" ]; then + print_msg "Deleting User Data" + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + rm /mnt/factory/user_data + print_msg "User Data successfully deleted " +fi +umount /mnt/factory +rm -r /mnt/factory + + +# if the update failed before completion +mkdir boot +mount -t vfat ${BOOTPART} /boot +if [ -e "/boot/update_process" ]; then + print_msg "Previous update attempt failed, restoring fallbacks" + cp /mnt/imgpart/kernel_fallback.tar /mnt/imgpart/kernel_current.tar + cp /mnt/imgpart/volumio_fallback.tar /mnt/imgpart/volumio_current.tar + if [-e "/boot/kernel_update" ]; then + rm /boot/kernel_update + fi + rm /boot/update_process +fi + +# if the kernel has been updated, and no error has occurred before completition +if [ -e "/boot/kernel_update" ]; then + print_msg "unpacking kernel" + tar xf /mnt/imgpart/kernel_current.tar -C /boot + if [ -e "/mnt/imgpart/config.txt.bak" ]; then + print_msg "Restoring custom config.txt content" + I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` + echo "\n" >> /boot/config.txt + echo "$I2S" >> /boot/config.txt + rm /mnt/imgpart/config.txt.bak + fi + +# When a new volumio version is loaded, partition UUIDs will have changed. +# So if the boot cmdline uses "UUID=" format for disk parsing, there will be a mismatch. + if [ ! -z "${UUIDFMT}" ]; then + print_msg "The boot configuration holds new UUIDs, replace them with ones from the current device partitions." + UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) + UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) + UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) + cp $BOOTCONFIG $BOOTCONFIG.old + sed -i "s/imgpart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/imgpart=UUID=${UUID_IMG}/g" ${BOOTCONFIG} + sed -i "s/datapart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/datapart=UUID=${UUID_DATA}/g" ${BOOTCONFIG} + sed -i "s/bootpart=UUID=[a-fA-F0-9]\{4\}-[a-fA-F0-9]\{4\}/bootpart=UUID=${UUID_BOOT}/g" ${BOOTCONFIG} + fi + + rm /boot/kernel_update + sync + umount /boot + rm -rf /boot + echo b > /proc/sysrq-trigger +fi + +# if data partition needs to be resized +#mount -t auto /dev/${BOOTDEV}p1 /boot +if [ -e "/boot/resize-volumio-datapart" ]; then + print_msg "Re-sizing Volumio data partition" + END="$(parted -s /dev/${BOOTDEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" + parted -s /dev/${BOOTDEV} resizepart 3 ${END} + e2fsck -fy ${DATAPART} + #force resize as we did just run e2fsck. Resize2fs seems ro not detect this occasionally + resize2fs -f ${DATAPART} + print_msg "Volumio data partition succesfully resized" + parted -s /dev/${BOOTDEV} unit MB print + rm /boot/resize-volumio-datapart +fi + +# clear the mountpoint +umount /boot +rm -rf /boot + +# 4) mount a filesystem for write access to the static image +# unclear: memory size? -o size=1024M +[ -d /mnt/ext ] || mkdir -m 777 /mnt/ext +mount -t ext4 -o noatime ${DATAPART} /mnt/ext + +[ -d /mnt/ext/dyn ] || mkdir -m 777 /mnt/ext/dyn +[ -d /mnt/ext/union ] || mkdir -m 777 /mnt/ext/union + +# 5) mount the writable overlay to the static image +if [ $OVERLAY == WITHWRKDIR ]; then + [ -d /mnt/ext/work ] || mkdir -m 777 /mnt/ext/work + print_msg "With Option:" $OVERLAY + mount -t overlay -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn,workdir=/mnt/ext/work overlay /mnt/ext/union +else + print_msg "Without Option:" $OVERLAY + mount -t overlayfs overlayfs /mnt/ext/union -olowerdir=/mnt/static,upperdir=/mnt/ext/dyn +fi + +[ -d /mnt/ext/union/static ] || mkdir -m 777 /mnt/ext/union/static +[ -d /mnt/ext/union/imgpart ] || mkdir -m 777 /mnt/ext/union/imgpart +mount --move /mnt/static /mnt/ext/union/static +mount --move /mnt/imgpart /mnt/ext/union/imgpart + +chmod -R 777 /mnt/ext/union/imgpart + +# 6) We know the current boot partition parsed from /proc/cmdline +# Ensure the /boot entry in fstab matches the UUID (or the device) from the cmdline +# The value in fstab could differ after updating to a new image version in case someone +# manually edited the bootdevice in cmdline before OR when a UUID is used to find the boot partition. +UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) +DEVFSTAB=`cat /mnt/ext/union/etc/fstab | grep -E "[0-9A-F]{4}-[0-9A-F]{4}" -o` +if [ ! -z "${DEVFSTAB}" ]; then + print_msg "found fstab entry with UUID=${DEVFSTAB} for /boot" + if [ ! $UUID_BOOT == $DEVFSTAB ]; then + sed -i "s/${DEVFSTAB}/${UUID_BOOT}/g" /mnt/ext/union/etc/fstab + print_msg "fstab entry updated to UUID=${DEVFSTAB}" + fi +else + DEVFSTAB=`cat /mnt/ext/union/etc/fstab | grep -E "^/dev/[a-z]{3,6}[0-9]{1,2}[a-z]{0,1}[0-9]{0,2}" -o` + if [ -z "${DEVFSTAB}" ]; then +# normally never gets here ;) + print_msg "Incompatible fstab, no entry found for /boot" +# exec sh +# exit 0 + fi + print_msg "found fstab entry with device ${DEVFSTAB} for /boot" + if [ ! $BOOTPART == $DEVFSTAB ]; then + sed -i "s/${DEVFSTAB}/${BOOTPART}/g" /mnt/ext/union/etc/fstab + print_msg "fstab entry updated to ${DEVFSTAB}" + else + [ -d /mnt/ext/union/boot ] || mkdir -m 777 /mnt/ext/union/boot + mount -t vfat -o defaults,utf8,user,rw,umask=111,dmask=000 ${BOOTPART} /mnt/ext/union/boot + fi +fi + +umount /proc +umount /sys + +print_msg ${VOLUMIO_VERSION} +print_msg "Finish initramfs, continue booting Volumio" +exec switch_root /mnt/ext/union /sbin/init + +print_msg "Failed to switch_root, dropping to a shell" +exec sh + From 70e683ea93b4500dcb6a6ef483ad2f8f99b11a53 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Sun, 1 Apr 2018 10:55:19 +0300 Subject: [PATCH 404/673] fix name image --- scripts/aml805armv7image.sh | 2 +- scripts/aml812armv7image.sh | 2 +- scripts/aml9xxxarmv7image.sh | 2 +- scripts/initramfs/init.nextarm_tvbox | 11 ++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh index 082486d61..106acedf8 100755 --- a/scripts/aml805armv7image.sh +++ b/scripts/aml805armv7image.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml805-armv7.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml805armv7.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index 7a241e0d4..b665c545d 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml812-armv7.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml812armv7.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index 26a016145..7187eb635 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml9xxx-armv7.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-aml9xxxarmv7.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" diff --git a/scripts/initramfs/init.nextarm_tvbox b/scripts/initramfs/init.nextarm_tvbox index aab0df3cf..1bc9062c2 100755 --- a/scripts/initramfs/init.nextarm_tvbox +++ b/scripts/initramfs/init.nextarm_tvbox @@ -137,6 +137,12 @@ fi modprobe squashfs modprobe nls_cp437 +print_msg IMGPART=${IMGPART} +print_msg IMGFILE=${IMGFILE} +print_msg DATAPART=${DATAPART} +print_msg BOOTPART=${BOOTPART} +print_msg BOOTCONFIG=${BOOTCONFIG} + if [ -z "${IMGPART}" ]; then print_msg "Specify the squash image partition after the kernel command ${CMDLINE}" print_msg "example: kernel... imgpart=/dev/sda2 imgfile=/gentoo.sqs" @@ -159,11 +165,6 @@ if [ ! -z "${UUIDFMT}" ]; then # exit 0 fi fi -print_msg IMGPART=${IMGPART} -print_msg IMGFILE=${IMGFILE} -print_msg DATAPART=${DATAPART} -print_msg BOOTPART=${BOOTPART} -print_msg BOOTCONFIG=${BOOTCONFIG} if [ ! -z "${BOOTDELAY}" ]; then print_msg "Boot delay (except first time) will be ${BOOTDELAY} seconds" From 1f4ca588b6abae79b9d7c9abe5b5d9e9bb1bb403 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Sun, 1 Apr 2018 19:21:54 +0300 Subject: [PATCH 405/673] v20180401 --- scripts/aml805armv7config.sh | 6 +++-- scripts/aml805armv7image.sh | 16 ++----------- scripts/aml812armv7config.sh | 6 +++-- scripts/aml812armv7image.sh | 16 ++----------- scripts/aml9xxxarmv7config.sh | 8 ++++--- scripts/aml9xxxarmv7image.sh | 36 ++++++++-------------------- scripts/initramfs/init.nextarm_tvbox | 28 +++++++++++++--------- 7 files changed, 44 insertions(+), 72 deletions(-) diff --git a/scripts/aml805armv7config.sh b/scripts/aml805armv7config.sh index 72df6d350..0b8218cd4 100755 --- a/scripts/aml805armv7config.sh +++ b/scripts/aml805armv7config.sh @@ -3,12 +3,14 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh echo "Creating \"fstab\"" echo "# Amlogic fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +LABEL=BOOT /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -81,7 +83,7 @@ echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd echo "Creating s805_autoscript" -mkimage -A arm -O linux -T script -C none -d /boot/s805_autoscript.txt /boot/s805_autoscript +mkimage -A arm -O linux -T script -C none -d /boot/s805_autoscript.cmd /boot/s805_autoscript echo "Removing unnecessary /boot files" rm /boot/volumio.initrd diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh index 106acedf8..2871a9cda 100755 --- a/scripts/aml805armv7image.sh +++ b/scripts/aml805armv7image.sh @@ -73,7 +73,6 @@ else # cd .. fi - echo "Preparing for Volumio rootfs" if [ -d /mnt ] then @@ -124,18 +123,6 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch -if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - echo "Starting config.js" - node config.js $PATCH -fi - -echo "Creating s805_autoscript.txt" -UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) -UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) -UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) -echo "setenv boot_part imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA}" > /mnt/volumio/rootfs/boot/s805_autoscript.txt -cat /mnt/volumio/rootfs/boot/txt/s805_autoscript.cmd >> /mnt/volumio/rootfs/boot/s805_autoscript.txt - chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /aml805armv7config.sh @@ -143,7 +130,8 @@ EOF #cleanup rm /mnt/volumio/rootfs/aml805armv7config.sh -rm /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/root/init.sh +rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev diff --git a/scripts/aml812armv7config.sh b/scripts/aml812armv7config.sh index 72df6d350..0b8218cd4 100755 --- a/scripts/aml812armv7config.sh +++ b/scripts/aml812armv7config.sh @@ -3,12 +3,14 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh echo "Creating \"fstab\"" echo "# Amlogic fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +LABEL=BOOT /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -81,7 +83,7 @@ echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd echo "Creating s805_autoscript" -mkimage -A arm -O linux -T script -C none -d /boot/s805_autoscript.txt /boot/s805_autoscript +mkimage -A arm -O linux -T script -C none -d /boot/s805_autoscript.cmd /boot/s805_autoscript echo "Removing unnecessary /boot files" rm /boot/volumio.initrd diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index b665c545d..4bffb0b0c 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -73,7 +73,6 @@ else # cd .. fi - echo "Preparing for Volumio rootfs" if [ -d /mnt ] then @@ -124,18 +123,6 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch -if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - echo "Starting config.js" - node config.js $PATCH -fi - -echo "Creating s805_autoscript.txt" -UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) -UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) -UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) -echo "setenv boot_part imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA}" > /mnt/volumio/rootfs/boot/s805_autoscript.txt -cat /mnt/volumio/rootfs/boot/txt/s805_autoscript.cmd >> /mnt/volumio/rootfs/boot/s805_autoscript.txt - chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /aml812armv7config.sh @@ -143,7 +130,8 @@ EOF #cleanup rm /mnt/volumio/rootfs/aml812armv7config.sh -rm /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/root/init.sh +rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev diff --git a/scripts/aml9xxxarmv7config.sh b/scripts/aml9xxxarmv7config.sh index 8a625a7ee..bcea4482a 100755 --- a/scripts/aml9xxxarmv7config.sh +++ b/scripts/aml9xxxarmv7config.sh @@ -3,12 +3,14 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh echo "Creating \"fstab\"" -echo "# Amlogic S9xxx fstab" > /etc/fstab +echo "# Amlogic fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +LABEL=BOOT /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -81,7 +83,7 @@ echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd echo "Creating s905_autoscript" -mkimage -A arm -O linux -T script -C none -d /boot/s905_autoscript.txt /boot/s905_autoscript +mkimage -A arm -O linux -T script -C none -d /boot/s905_autoscript.cmd /boot/s905_autoscript echo "Removing unnecessary /boot files" rm /boot/volumio.initrd diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index 7187eb635..abc5e0945 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -68,16 +68,11 @@ then git pull cd .. else - echo "Clone all Khadas files from repo" + echo "Clone all AML files from repo" git clone https://github.com/150balbes/platform-aml.git platform-aml # cd .. fi -#echo "Copying the bootloader" -#dd if=platform-aml/s9xxx/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=1 count=442 -#dd if=platform-aml/s9xxx/uboot/u-boot.bin.sd.bin of=${LOOP_DEV} conv=fsync bs=512 skip=1 seek=1 -#sync - echo "Preparing for Volumio rootfs" if [ -d /mnt ] then @@ -104,19 +99,19 @@ mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying Khadas boot files" +echo "Copying boot files" cp -pdR platform-aml/s9xxx/boot/* /mnt/volumio/rootfs/boot -echo "Copying Khadas modules" +echo "Copying modules" cp -pdR platform-aml/s9xxx/lib/modules /mnt/volumio/rootfs/lib/ -echo "Copying Khadas firmware" +echo "Copying firmware" cp -pdR platform-aml/s9xxx/lib/firmware /mnt/volumio/rootfs/lib/ -echo "Copying Khadas etc files" +echo "Copying etc files" cp -pdR platform-aml/s9xxx/etc/* /mnt/volumio/rootfs/etc -echo "Copying Khadas usr/bin files" +echo "Copying usr/bin files" cp -pdR platform-aml/s9xxx/usr/* /mnt/volumio/rootfs/usr sync -echo "Preparing to run chroot for more VIM configuration" +echo "Preparing to run chroot for more AML configuration" cp scripts/aml9xxxarmv7config.sh /mnt/volumio/rootfs cp scripts/initramfs/init.nextarm_tvbox /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin @@ -128,18 +123,6 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch -if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - echo "Starting config.js" - node config.js $PATCH -fi - -echo "Creating s905_autoscript.txt" -UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) -UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) -UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) -echo "setenv boot_part imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA}" > /mnt/volumio/rootfs/boot/s905_autoscript.txt -cat /mnt/volumio/rootfs/boot/txt/s905_autoscript.cmd >> /mnt/volumio/rootfs/boot/s905_autoscript.txt - chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /aml9xxxarmv7config.sh @@ -147,14 +130,15 @@ EOF #cleanup rm /mnt/volumio/rootfs/aml9xxxarmv7config.sh -rm /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/root/init.sh +rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys -echo "==> Amlogic s9xxx device installed" +echo "==> AML device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" diff --git a/scripts/initramfs/init.nextarm_tvbox b/scripts/initramfs/init.nextarm_tvbox index 1bc9062c2..7b91f23ef 100755 --- a/scripts/initramfs/init.nextarm_tvbox +++ b/scripts/initramfs/init.nextarm_tvbox @@ -58,6 +58,22 @@ parse_disk() { DO_GEN=no +for p in ${CMDLINE}; +do + key=${p%%=*} + value=${p#*=} + case $key in + bootdelay) + BOOTDELAY=$value + ;; + esac +done + +if [ ! -z "${BOOTDELAY}" ]; then + print_msg "Boot delay will be ${BOOTDELAY} seconds to give kernel load a headstart" + sleep ${BOOTDELAY} +fi + for p in ${CMDLINE}; do key=${p%%=*} @@ -69,9 +85,6 @@ do imgfile) IMGFILE=$value ;; - bootdelay) - BOOTDELAY=$value - ;; use_kmsg) USE_KMSG=$value ;; @@ -99,7 +112,7 @@ do ;; esac done - +echo if [ $DO_GEN == yes ]; then print_msg "re-generating partition names..." IMGPART="/dev/${BOOTDEV}${DPS}2" @@ -166,10 +179,6 @@ if [ ! -z "${UUIDFMT}" ]; then fi fi -if [ ! -z "${BOOTDELAY}" ]; then - print_msg "Boot delay (except first time) will be ${BOOTDELAY} seconds" -fi - # Retry mdev -s 3 times before throwing the towel for i in 1 2 3 4 5 6 do @@ -209,9 +218,6 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then cp /mnt/imgpart/kernel_current.tar /mnt/imgpart/kernel_factory.tar umount /mnt/factory rm -r /mnt/factory -elif [ ! -z "${BOOTDELAY}" ]; then - print_msg "Doing a ${BOOTDELAY} second delay here to give kernel load a headstart" - sleep ${BOOTDELAY} fi print_msg "Checking for USB updates if you did not boot from USB..." From d758dea1c31974bbce88c3079696e6f028105c18 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 7 Apr 2018 09:07:38 +0200 Subject: [PATCH 406/673] typo same as https://github.com/volumio/Build/commit/6297bf9dc5daa54b2560da189f4aa7a7177d8ab1#diff-78a10fca84d852f7c4a5132e81993137 --- scripts/initramfs/init.nextarm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index a8e1d2e88..11ecacbd9 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -319,7 +319,7 @@ if [ -e "/boot/kernel_update" ]; then if [ -e "/mnt/imgpart/config.txt.bak" ]; then print_msg "Restoring custom config.txt content" I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` - echo "\n" >> /boot/config.txt + echo "" >> /boot/config.txt echo "$I2S" >> /boot/config.txt rm /mnt/imgpart/config.txt.bak fi From 730655a7d303179ef253a55658d5dfe765fa4b70 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 7 Apr 2018 09:10:05 +0200 Subject: [PATCH 407/673] typo https://github.com/volumio/Build/commit/6297bf9dc5daa54b2560da189f4aa7a7177d8ab1#diff-78a10fca84d852f7c4a5132e81993137 --- scripts/initramfs/init.nextarm_tvbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init.nextarm_tvbox b/scripts/initramfs/init.nextarm_tvbox index 7b91f23ef..071883901 100755 --- a/scripts/initramfs/init.nextarm_tvbox +++ b/scripts/initramfs/init.nextarm_tvbox @@ -326,7 +326,7 @@ if [ -e "/boot/kernel_update" ]; then if [ -e "/mnt/imgpart/config.txt.bak" ]; then print_msg "Restoring custom config.txt content" I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` - echo "\n" >> /boot/config.txt + echo "" >> /boot/config.txt echo "$I2S" >> /boot/config.txt rm /mnt/imgpart/config.txt.bak fi From 033ad67aca3216a69b1d81b80fbe784123a9d8e0 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Sat, 7 Apr 2018 15:02:46 +0300 Subject: [PATCH 408/673] v20180407 amls9xxx on default dhd --- scripts/aml9xxxarmv7config.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/aml9xxxarmv7config.sh b/scripts/aml9xxxarmv7config.sh index bcea4482a..8ab0b6b11 100755 --- a/scripts/aml9xxxarmv7config.sh +++ b/scripts/aml9xxxarmv7config.sh @@ -23,6 +23,10 @@ echo "#!/bin/sh -e /etc/fan.sh & exit 0" > /etc/rc.local +echo "Adding default sound modules and wifi" +echo "dhd +" >> /etc/modules + echo "Installing additonal packages" apt-get update apt-get -y install u-boot-tools liblircclient0 lirc mc abootimg fbset From 2c26631fe6afa9e01d8447208eb23d25e4e5b8ea Mon Sep 17 00:00:00 2001 From: ashthespy Date: Sun, 8 Apr 2018 23:45:11 +0200 Subject: [PATCH 409/673] Fix `VOLUMIO_FE_VERSION` --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index b552efc59..6187be137 100755 --- a/build.sh +++ b/build.sh @@ -164,7 +164,6 @@ if [ -n "$BUILD" ]; then fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" - rm -rf build/$BUILD/root/volumio/http/www/.git echo "Adding os-release infos" { echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" @@ -172,6 +171,7 @@ if [ -n "$BUILD" ]; then echo "VOLUMIO_BE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/.git" rev-parse HEAD)\"" echo "VOLUMIO_ARCH=\"${BUILD}\"" } >> "build/$BUILD/root/etc/os-release" + rm -rf build/$BUILD/root/volumio/http/www/.git if [ ! "$BUILD" = x86 ]; then chroot "build/$BUILD/root" /bin/bash -x <<'EOF' su - From 23d2469e13b375301fa7a25593d2df671c21fdd2 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Tue, 10 Apr 2018 12:52:09 +0300 Subject: [PATCH 410/673] v20180410 amls9xxx add module --- scripts/aml9xxxarmv7config.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/aml9xxxarmv7config.sh b/scripts/aml9xxxarmv7config.sh index 8ab0b6b11..3a3f0e9ad 100755 --- a/scripts/aml9xxxarmv7config.sh +++ b/scripts/aml9xxxarmv7config.sh @@ -25,6 +25,8 @@ exit 0" > /etc/rc.local echo "Adding default sound modules and wifi" echo "dhd +snd_soc_pcm5102 +snd_soc_odroid_dac " >> /etc/modules echo "Installing additonal packages" From a14d1d77decff479529adef53786fa6f69f1298f Mon Sep 17 00:00:00 2001 From: cdu13a Date: Wed, 11 Apr 2018 15:31:11 -0400 Subject: [PATCH 411/673] depth 1 for cloning platform files --- scripts/aml805armv7image.sh | 2 +- scripts/aml812armv7image.sh | 2 +- scripts/aml9xxxarmv7image.sh | 2 +- scripts/bbbimage.sh | 2 +- scripts/bpim2uimage.sh | 2 +- scripts/bpiproimage.sh | 2 +- scripts/cuboxiimage.sh | 2 +- scripts/nanopi64image.sh | 2 +- scripts/odroidc1image.sh | 2 +- scripts/odroidc2image.sh | 2 +- scripts/odroidx2image.sh | 2 +- scripts/odroidxu4image.sh | 2 +- scripts/pine64image.sh | 2 +- scripts/rock64image.sh | 2 +- scripts/sopine64image.sh | 2 +- scripts/sparkyimage.sh | 2 +- scripts/tinkerimage.sh | 2 +- scripts/udooneoimage.sh | 2 +- scripts/udooqdlimage.sh | 2 +- scripts/vszeroimage.sh | 2 +- scripts/x86image.sh | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh index 2871a9cda..b4395bf46 100755 --- a/scripts/aml805armv7image.sh +++ b/scripts/aml805armv7image.sh @@ -69,7 +69,7 @@ then cd .. else echo "Clone all AML files from repo" - git clone https://github.com/150balbes/platform-aml.git platform-aml + git clone --depth 1 https://github.com/150balbes/platform-aml.git platform-aml # cd .. fi diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index 4bffb0b0c..10355b7ca 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -69,7 +69,7 @@ then cd .. else echo "Clone all AML files from repo" - git clone https://github.com/150balbes/platform-aml.git platform-aml + git clone --depth 1 https://github.com/150balbes/platform-aml.git platform-aml # cd .. fi diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index abc5e0945..533623299 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -69,7 +69,7 @@ then cd .. else echo "Clone all AML files from repo" - git clone https://github.com/150balbes/platform-aml.git platform-aml + git clone --depth 1 https://github.com/150balbes/platform-aml.git platform-aml # cd .. fi diff --git a/scripts/bbbimage.sh b/scripts/bbbimage.sh index 002976e2f..808b34471 100755 --- a/scripts/bbbimage.sh +++ b/scripts/bbbimage.sh @@ -21,7 +21,7 @@ then echo "Platform folder already exists - keeping it" else echo "Clone all BBB files from repo" - git clone https://github.com/volumio/platform-bbb.git platform-bbb + git clone --depth 1 https://github.com/volumio/platform-bbb.git platform-bbb fi BUILDDATE=$(date -I) diff --git a/scripts/bpim2uimage.sh b/scripts/bpim2uimage.sh index a17766f8d..2fdd8d404 100755 --- a/scripts/bpim2uimage.sh +++ b/scripts/bpim2uimage.sh @@ -67,7 +67,7 @@ then # that will refresh all the bananapi platforms, see below else echo "Clone bananapi m2u files from repo" - git clone https://github.com/gkkpch/platform-banana.git platform-banana + git clone --depth 1 https://github.com/gkkpch/platform-banana.git platform-banana echo "Unpack the platform files" cd platform-banana tar xfJ bpi-m2u.tar.xz diff --git a/scripts/bpiproimage.sh b/scripts/bpiproimage.sh index 563834b14..73677eee1 100755 --- a/scripts/bpiproimage.sh +++ b/scripts/bpiproimage.sh @@ -73,7 +73,7 @@ else # cd platform-banana # tar xfJ bpi-pro.tar.xz ### Option 2 - Kernel 3.4.113 chrismade - git clone https://github.com/chrismade/platform-banana-pi.git platform-banana + git clone --depth 1 https://github.com/chrismade/platform-banana-pi.git platform-banana echo "Unpack the platform files chrismade" cd platform-banana tar xvzf kernel_3_4_113_w_olfs.tgz diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index f08460e1b..798b31574 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -65,7 +65,7 @@ then # if you really want to re-clone from the repo, then delete the platforms-cuboxi folder else echo "Clone all cubox files from repo" - git clone https://github.com/volumio/platform-cuboxi.git platform-cuboxi + git clone --depth 1 https://github.com/volumio/platform-cuboxi.git platform-cuboxi echo "Unpack the cubox platform files" cd platform-cuboxi tar xfJ cuboxi.tar.xz diff --git a/scripts/nanopi64image.sh b/scripts/nanopi64image.sh index 95a369b63..304faf62f 100755 --- a/scripts/nanopi64image.sh +++ b/scripts/nanopi64image.sh @@ -68,7 +68,7 @@ then # that will refresh all the odroid platforms, see below else echo "Clone Nanopi64 files from repo" - git clone https://github.com/gkkpch/platform-nanopi platform-nanopi + git clone --depth 1 https://github.com/gkkpch/platform-nanopi platform-nanopi echo "Unpack the platform files" cd platform-nanopi tar xfJ nanopi-a64.tar.xz diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index 76d00c3d9..3dc9346f2 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -72,7 +72,7 @@ then cd .. else echo "Clone all Odroid files from repo" - git clone https://github.com/gkkpch/Platform-Odroid.git platform-odroid + git clone --depth 1 https://github.com/gkkpch/Platform-Odroid.git platform-odroid echo "Unpack the C1/C1+ platform files" cd platform-odroid tar xfJ odroidc1.tar.xz diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index 86c32b86f..fabd35254 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -72,7 +72,7 @@ then cd .. else echo "Clone all Odroid files from repo" - git clone https://github.com/volumio/Platform-Odroid.git platform-odroid + git clone --depth 1 https://github.com/volumio/Platform-Odroid.git platform-odroid echo "Unpack the C2 platform files" cd platform-odroid tar xfJ odroidc2.tar.xz diff --git a/scripts/odroidx2image.sh b/scripts/odroidx2image.sh index e0969649b..fee48cc1a 100755 --- a/scripts/odroidx2image.sh +++ b/scripts/odroidx2image.sh @@ -72,7 +72,7 @@ then cd .. else echo "Clone all Odroid files from repo" - git clone https://github.com/gkkpch/Platform-Odroid.git platform-odroid + git clone --depth 1 https://github.com/gkkpch/Platform-Odroid.git platform-odroid echo "Unpack the X2 platform files" cd platform-odroid tar xfJ odroidx2.tar.xz diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index 7140e91c3..87bf6fde9 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -72,7 +72,7 @@ then cd .. else echo "Clone all Odroid files from repo" - git clone https://github.com/gkkpch/Platform-Odroid.git platform-odroid + git clone --depth 1 https://github.com/gkkpch/Platform-Odroid.git platform-odroid echo "Unpack the XU4 platform files" cd platform-odroid tar xfJ odroidxu4.tar.xz diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index f1697f17c..a00a8b156 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -68,7 +68,7 @@ then # that will refresh all the odroid platforms, see below else echo "Clone (so)Pine64(LTS) files from repo" - git clone https://github.com/volumio/platform-pine64.git platform-pine64 + git clone --depth 1 https://github.com/volumio/platform-pine64.git platform-pine64 echo "Unpack the platform files" cd platform-pine64 tar xfJ sopine64lts.tar.xz diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index ade8c1ab0..af9d45867 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -68,7 +68,7 @@ then # that will refresh the platform files, see below else echo "Get rock64 files from repo" - git clone https://github.com/volumio/platform-rock64.git platform-rock64 + git clone --depth 1 https://github.com/volumio/platform-rock64.git platform-rock64 echo "Unpack the platform files" cd platform-rock64 tar xfJ rock64.tar.xz diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index bad5c2819..e237baf88 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -68,7 +68,7 @@ then # that will refresh all the odroid platforms, see below else echo "Clone (so)Pine64(LTS) files from repo" - git clone https://github.com/volumio/platform-pine64.git platform-pine64 + git clone --depth 1 https://github.com/volumio/platform-pine64.git platform-pine64 echo "Unpack the (so)Pine64(LTS) platform files" cd platform-pine64 tar xfJ sopine64lts.tar.xz diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index 4d47dd062..5fa4b35e5 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -66,7 +66,7 @@ then # if you really want to re-clone from the repo, then delete the platforms-sparky folder else echo "Clone all sparky files from repo" - git clone https://github.com/volumio/platform-sparky.git platform-sparky + git clone --depth 1 https://github.com/volumio/platform-sparky.git platform-sparky echo "Unpack the sparky platform files" cd platform-sparky tar xfJ sparky.tar.xz diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 8182de424..573fb7027 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -63,7 +63,7 @@ then # that will refresh all the asus platforms, see below else echo "Clone asus files from repo" - git clone https://github.com/volumio/platform-asus.git platform-asus + git clone --depth 1 https://github.com/volumio/platform-asus.git platform-asus echo "Unpack the Tinkerboard platform files" cd platform-asus tar xfJ tinkerboard.tar.xz diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 09ba974a5..bf334f40a 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -71,7 +71,7 @@ then else echo "Clone all UDOO files from repo" - git clone https://github.com/volumio/platform-udoo.git platform-udoo + git clone --depth 1 https://github.com/volumio/platform-udoo.git platform-udoo echo "Unpack the UDOO platform files" cd platform-udoo tar xfJ udoo-neo.tar.xz diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index 9341f842a..d81af97cf 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -66,7 +66,7 @@ then # if you really want to re-clone from the repo, then delete the platforms-udoo folder else echo "Clone all cubox files from repo" - git clone https://github.com/volumio/platform-udoo.git platform-udoo + git clone --depth 1 https://github.com/volumio/platform-udoo.git platform-udoo echo "Unpack the cubox platform files" cd platform-udoo tar xfJ udoo-qdl.tar.xz diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 816948cd7..6bec07fd2 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -61,7 +61,7 @@ then # that will refresh all the pv platforms, see below else echo "Clone Polyvection files from repo" - git clone https://github.com/volumio/platform-pv.git platform-pv + git clone --depth 1 https://github.com/volumio/platform-pv.git platform-pv echo "Unpack the Voltastream Zero platform files" cd platform-pv tar xfJ vszero.tar.xz diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 92ec2f946..1740837e9 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -82,7 +82,7 @@ sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot cp scripts/x86config.sh /mnt/volumio/rootfs if [ ! -d platform-x86 ]; then echo "Platform files (packages) not available yet, getting them from the repo" - git clone http://github.com/volumio/platform-x86 + git clone --depth 1 http://github.com/volumio/platform-x86 fi if [ -f platform-x86/packages/.next ]; then From 6569882e98b250d7def5f8736775789c3bf0b970 Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Sat, 3 Feb 2018 09:41:11 +1300 Subject: [PATCH 412/673] Add OrangePi devices as a supported platform --- build.sh | 3 + scripts/orangepiconfig.sh | 84 +++++++++++++++++ scripts/orangepiimage.sh | 192 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 279 insertions(+) create mode 100755 scripts/orangepiconfig.sh create mode 100755 scripts/orangepiimage.sh diff --git a/build.sh b/build.sh index 6187be137..5874dfbb8 100755 --- a/build.sh +++ b/build.sh @@ -302,6 +302,9 @@ case "$DEVICE" in aml9xxxarmv7) echo 'Writing AmlogicS9xxx Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/aml9xxxarmv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 + orangepione|orangepilite) echo 'Writing OrangePi One Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/orangepiimage.sh -v "$VERSION" -p "$PATCH" -d "$DEVICE" ;; x86) echo 'Writing x86 Image File' check_os_release "x86" "$VERSION" "$DEVICE" diff --git a/scripts/orangepiconfig.sh b/scripts/orangepiconfig.sh new file mode 100755 index 000000000..f7df3c8b8 --- /dev/null +++ b/scripts/orangepiconfig.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Creating \"fstab\"" +echo "# OrangePi fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +# /dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +/dev/mmcblk0p1 /boot ext4 defaults +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +#echo "Adding default sound modules and wifi" +#echo "sunxi_codec +#sunxi_i2s +#sunxi_sndcodec +#8723bs +#" >> /etc/modules + +#echo "Blacklisting 8723bs_vq0" +#echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-pine64.conf + +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc aptitude bc + +echo "Installing additonal packages" +apt-get install -qq -y dialog debconf-utils lsb-release aptitude + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd +mkimage -A arm -T script -C none -d /boot/boot.cmd /boot/boot.scr +echo "Cleaning up" +# rm /boot/volumio.initrd diff --git a/scripts/orangepiimage.sh b/scripts/orangepiimage.sh new file mode 100755 index 000000000..2886d9184 --- /dev/null +++ b/scripts/orangepiimage.sh @@ -0,0 +1,192 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":d:v:p:" opt; do + case $opt in + d) + DEVICE=$OPTARG + ;; + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${DEVICE}.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +# parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +# mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the OrangePi kernel/platform files" +if [ -d platform-orangepi ] +then + echo "Platform folder already exists - keeping it" +else + echo "Clone all OrangePi files from repo" + git clone https://github.com/pkendall64/platform-orangepi.git platform-orangepi + echo "Unpack the OrangePi platform files" + cd platform-orangepi + tar xfJ "${DEVICE}.tar.xz" + cd .. +fi + +echo "Burning the bootloader and u-boot" +dd if=platform-orangepi/${DEVICE}/u-boot/u-boot-sunxi-with-spl.bin of=${LOOP_DEV} bs=1024 seek=8 conv=notrunc +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t ext4 "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/armv7/root/* /mnt/volumio/rootfs + +echo "Copying OrangePi boot files, kernel, modules and firmware" +cp -pdR platform-orangepi/${DEVICE}/boot /mnt/volumio/rootfs +cp -pdR platform-orangepi/${DEVICE}/lib/modules /mnt/volumio/rootfs/lib +cp -pdR platform-orangepi/${DEVICE}/lib/firmware /mnt/volumio/rootfs/lib + +echo "Preparing to run chroot for more OrangePi configuration" +cp scripts/orangepiconfig.sh /mnt/volumio/rootfs +cp scripts/initramfs/init_armbian /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/orangepiconfig.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/orangepiconfig.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +#echo "Copying LIRC configuration files" + + +echo "==> OrangePi device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-orangepi +sync + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" From 93df99e7542310517262579f08e130017d57a087 Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Sun, 4 Feb 2018 11:48:35 +1300 Subject: [PATCH 413/673] Make the orangepi boot partition vfat --- scripts/orangepiconfig.sh | 3 +-- scripts/orangepiimage.sh | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/orangepiconfig.sh b/scripts/orangepiconfig.sh index f7df3c8b8..989081d0d 100755 --- a/scripts/orangepiconfig.sh +++ b/scripts/orangepiconfig.sh @@ -8,8 +8,7 @@ echo "Creating \"fstab\"" echo "# OrangePi fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -# /dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 -/dev/mmcblk0p1 /boot ext4 defaults +/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 diff --git a/scripts/orangepiimage.sh b/scripts/orangepiimage.sh index 2886d9184..30b2e57fd 100755 --- a/scripts/orangepiimage.sh +++ b/scripts/orangepiimage.sh @@ -34,8 +34,7 @@ echo "Creating Image Bed" LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` # Note: leave the first 20Mb free for the firmware parted -s "${LOOP_DEV}" mklabel msdos -# parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 -parted -s "${LOOP_DEV}" mkpart primary ext3 1 64 +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% parted -s "${LOOP_DEV}" set 1 boot on @@ -56,8 +55,7 @@ then fi echo "Creating boot and rootfs filesystems" -# mkfs -t vfat -n BOOT "${BOOT_PART}" -mkfs -F -t ext4 -L BOOT "${BOOT_PART}" +mkfs -t vfat -n BOOT "${BOOT_PART}" mkfs -F -t ext4 -L volumio "${SYS_PART}" mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync @@ -101,13 +99,13 @@ mount -t ext4 "${SYS_PART}" /mnt/volumio/images mkdir /mnt/volumio/rootfs echo "Creating mount point for the boot partition" mkdir /mnt/volumio/rootfs/boot -mount -t ext4 "${BOOT_PART}" /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/armv7/root/* /mnt/volumio/rootfs echo "Copying OrangePi boot files, kernel, modules and firmware" -cp -pdR platform-orangepi/${DEVICE}/boot /mnt/volumio/rootfs +cp -dR platform-orangepi/${DEVICE}/boot /mnt/volumio/rootfs cp -pdR platform-orangepi/${DEVICE}/lib/modules /mnt/volumio/rootfs/lib cp -pdR platform-orangepi/${DEVICE}/lib/firmware /mnt/volumio/rootfs/lib From 5c3549be48a0d3b7e4412b45c609501abe5894fe Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Mon, 5 Feb 2018 13:49:35 +1300 Subject: [PATCH 414/673] Use init.nextarm for orangepi and not unsupported armbian version --- scripts/orangepiimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/orangepiimage.sh b/scripts/orangepiimage.sh index 30b2e57fd..303494dbc 100755 --- a/scripts/orangepiimage.sh +++ b/scripts/orangepiimage.sh @@ -111,7 +111,7 @@ cp -pdR platform-orangepi/${DEVICE}/lib/firmware /mnt/volumio/rootfs/lib echo "Preparing to run chroot for more OrangePi configuration" cp scripts/orangepiconfig.sh /mnt/volumio/rootfs -cp scripts/initramfs/init_armbian /mnt/volumio/rootfs/root/init +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater From 1b3ee56f61717cc33dd430723ae4a5e7fc605bd3 Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Wed, 14 Feb 2018 17:50:28 +1300 Subject: [PATCH 415/673] Get OrangePi platform files from volumio github account --- scripts/orangepiimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/orangepiimage.sh b/scripts/orangepiimage.sh index 303494dbc..c1f97be3f 100755 --- a/scripts/orangepiimage.sh +++ b/scripts/orangepiimage.sh @@ -66,7 +66,7 @@ then echo "Platform folder already exists - keeping it" else echo "Clone all OrangePi files from repo" - git clone https://github.com/pkendall64/platform-orangepi.git platform-orangepi + git clone https://github.com/volumio/platform-orangepi.git platform-orangepi echo "Unpack the OrangePi platform files" cd platform-orangepi tar xfJ "${DEVICE}.tar.xz" From 35eff0ccedbe27b24831e99af252f90df3af8e1c Mon Sep 17 00:00:00 2001 From: ashthespy Date: Sat, 14 Apr 2018 21:46:11 +0200 Subject: [PATCH 416/673] Add non root gpio access to volumio user --- scripts/orangepiconfig.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/orangepiconfig.sh b/scripts/orangepiconfig.sh index 989081d0d..bbad18bc9 100755 --- a/scripts/orangepiconfig.sh +++ b/scripts/orangepiconfig.sh @@ -64,6 +64,15 @@ echo "Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind +echo "adding gpio group and udev rules" +groupadd -f --system gpio +usermod -aG gpio volumio +touch /etc/udev/rules.d/99-gpio.rules +echo "SUBSYSTEM==\"gpio\", ACTION==\"add\", RUN=\"/bin/sh -c ' + chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ + chown -R root:gpio /sys$DEVPATH && chmod -R 770 /sys$DEVPATH\ +'\"" > /etc/udev/rules.d/99-gpio.rules + echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean From c7d32b0da608c353b5858a81cf1130828172d36d Mon Sep 17 00:00:00 2001 From: Paul Kendall Date: Sun, 15 Apr 2018 12:09:54 +1200 Subject: [PATCH 417/673] Add OrangePi PC to the list of supported boards --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 5874dfbb8..66b67ca68 100755 --- a/build.sh +++ b/build.sh @@ -302,7 +302,7 @@ case "$DEVICE" in aml9xxxarmv7) echo 'Writing AmlogicS9xxx Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/aml9xxxarmv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 - orangepione|orangepilite) echo 'Writing OrangePi One Image File' + orangepione|orangepilite|orangepipc) echo 'Writing OrangePi Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/orangepiimage.sh -v "$VERSION" -p "$PATCH" -d "$DEVICE" ;; From a1fbe0cb8b66c733720518797dc825cdc242a34d Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 17 Apr 2018 13:21:03 +0200 Subject: [PATCH 418/673] Delete fallback when factory resetting --- scripts/initramfs/init | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index 4fa8434cd..ede78fa7a 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -157,6 +157,8 @@ mount -t ext4 ${IMGPART} /mnt/imgpart # if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "Creating factory image, this will take a minute, please wait..." + # TODO, ALLOW FOR INTERRUPTION IN FACTORY IMAGE CREATION + # USE THE FILE APPROACH TO SIGNAL WHEN CREATION HAS BEEN EXECUTED CORRECTLY cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh print_msg "Factory image created" print_msg "Creating archive for factory kernel..." @@ -166,6 +168,7 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then cp /mnt/imgpart/kernel_current.tar /mnt/imgpart/kernel_factory.tar umount /mnt/factory rm -r /mnt/factory + sync elif [ ! -z "${BOOTDELAY}" ]; then print_msg "Doing a ${BOOTDELAY} second delay here to give kernel load a headstart" sleep ${BOOTDELAY} @@ -230,8 +233,14 @@ if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/${BOOTDEV}p3 -L volumio_data print_msg "Factory reset executed: part I - User DATA Part" + if [ -e "/mnt/imgpart/kernel_fallback.tar" ]; then + rm /mnt/imgpart/kernel_fallback.tar + fi tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory print_msg "Factory reset executed: part II - Kernel" + if [ -e "/mnt/imgpart/volumio_fallback.sqsh" ]; then + rm /mnt/imgpart/volumio_fallback.sqsh + fi cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh print_msg "Factory reset executed: part III - Squash" print_msg "Factory reset successfully executed" From a669396ec3f85690ebe19d4664fc600fc935b402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 27 Apr 2018 17:33:54 +0200 Subject: [PATCH 419/673] build.sh: fixed a missing ';;' --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 66b67ca68..9d4271c40 100755 --- a/build.sh +++ b/build.sh @@ -302,6 +302,7 @@ case "$DEVICE" in aml9xxxarmv7) echo 'Writing AmlogicS9xxx Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/aml9xxxarmv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; orangepione|orangepilite|orangepipc) echo 'Writing OrangePi Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/orangepiimage.sh -v "$VERSION" -p "$PATCH" -d "$DEVICE" From 8f422eda1dc1ab44ca34c303d4155f86441441c6 Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 28 Apr 2018 18:31:27 +0200 Subject: [PATCH 420/673] Pi: Kernel bump to 4.14.37 Fixes a lot of stability issues, particularly on Pi3B+ (ethernet, USB, i2c, SDRAM timing, etc). Also adds Allo Katana DAC support --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index faa84911f..486523fd8 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -74,9 +74,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="936a8dc3a605c20058fbb23672d6b47bca77b0d5" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - "4.14.29") - KERNEL_REV="1101" - KERNEL_COMMIT="955fa1d6e8cd8c94ad8a6680a09269d9bd2945c5" + "4.14.37") + KERNEL_REV="1111" + KERNEL_COMMIT="461ee53cef85d14b8511e9f6d5dce8c0ac1d595a" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From df7e8acafddf6d6c49f058ebc0d1ae9052583dfc Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 29 Apr 2018 14:29:58 +0200 Subject: [PATCH 421/673] Pi: fix for 4.14.37 case switch Sorry missed it in #334 --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 486523fd8..f87cf40a0 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -56,7 +56,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.29" +KERNEL_VERSION="4.14.37" case $KERNEL_VERSION in "4.4.9") From 1028dce149c4010e6cc9550d7c17334812e4aff6 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 7 May 2018 13:05:16 +0200 Subject: [PATCH 422/673] Remove isc-dhcp-client --- recipes/armv7.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 390f0c024..f69204358 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Net] -packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd isc-dhcp-client +packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie From 72ff2637ba29cf0eeb4dc06c03668cfa58e35498 Mon Sep 17 00:00:00 2001 From: Xipmix Date: Thu, 10 May 2018 20:38:31 +1000 Subject: [PATCH 423/673] Remove systemd service file, not that isc-dhcp-client is not installed --- volumio/lib/systemd/system/dhclient.service | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 volumio/lib/systemd/system/dhclient.service diff --git a/volumio/lib/systemd/system/dhclient.service b/volumio/lib/systemd/system/dhclient.service deleted file mode 100644 index 27fea57da..000000000 --- a/volumio/lib/systemd/system/dhclient.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Wireless Services DHCP -BindsTo=wireless.service - -[Service] -Type=forking -ExecStart=/sbin/dhclient -v -nw -w wlan0 -KillMode=mixed From b9695799c401628b20a6b391dadd773e29c5166a Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 14 May 2018 18:45:52 +0200 Subject: [PATCH 424/673] Node version 8.11.1 --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 42a31bb10..40141bcb0 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -1,6 +1,6 @@ #!/bin/bash -NODE_VERSION=6.11.0 +NODE_VERSION=8.11.1 # This script will be run in chroot under qemu. From b0a7cc076b0dc7a9455d02cface5aa809a693e8a Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 14 May 2018 19:06:34 +0200 Subject: [PATCH 425/673] remove 30 seconds timeout --- volumio/lib/systemd/system/dhcpcd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/lib/systemd/system/dhcpcd.conf b/volumio/lib/systemd/system/dhcpcd.conf index 3d5ed079a..212581982 100644 --- a/volumio/lib/systemd/system/dhcpcd.conf +++ b/volumio/lib/systemd/system/dhcpcd.conf @@ -3,7 +3,7 @@ [Service] Type=forking ExecStartPre=-/usr/bin/sudo /usr/bin/killall dhcpcd -ExecStart=/sbin/dhcpcd -t 30 -d +ExecStart=/sbin/dhcpcd -d KillMode=mixed Restart=always StandardOutput=syslog From d6c23e8496eb48fffa9d20f66e57dd3e02ec1e1d Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 17 May 2018 14:01:43 +0200 Subject: [PATCH 426/673] Removed netplug in favour of ifplugd --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/x86.conf | 2 +- scripts/configure.sh | 7 +++++-- volumio/etc/default/ifplugd | 4 ++++ .../systemd/system/netplug.service.d/volumio-network.conf | 3 --- 6 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 volumio/etc/default/ifplugd delete mode 100644 volumio/lib/systemd/system/netplug.service.d/volumio-network.conf diff --git a/recipes/arm.conf b/recipes/arm.conf index a94913c74..278828634 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -18,7 +18,7 @@ keyring=debian-archive-keyring suite=jessie [Net] -packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd +packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index f69204358..359a4e624 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Net] -packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd +packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 5c02ff668..04fe586eb 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -25,7 +25,7 @@ suite=jessie [Net] -packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd +packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/configure.sh b/scripts/configure.sh index 5c3cac0a1..ab41ad675 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -60,8 +60,9 @@ cp volumio/etc/systemd/journald.conf build/$BUILD/root/etc/systemd/journald.conf #Volumio SystemD Services cp -r volumio/lib build/$BUILD/root/ # Netplug -cp -rp volumio/etc/netplug build/$BUILD/root/etc/ -chmod +x build/$BUILD/root/etc/netplug/netplug +# removed , we are using ifplugd +#cp -rp volumio/etc/netplug build/$BUILD/root/etc/ +#chmod +x build/$BUILD/root/etc/netplug/netplug # Network cp -r volumio/etc/network/* build/$BUILD/root/etc/network # Wpa Supplicant @@ -96,6 +97,8 @@ chmod a+x build/$BUILD/root/bin/volumiossh.sh #CPU TWEAK cp volumio/bin/volumio_cpu_tweak build/$BUILD/root/bin/volumio_cpu_tweak chmod a+x build/$BUILD/root/bin/volumio_cpu_tweak +#LAN HOTPLUG +cp volumio/etc/default/ifplugd build/$BUILD/root/etc/default/ifplugd echo 'Done Copying Custom Volumio System Files' diff --git a/volumio/etc/default/ifplugd b/volumio/etc/default/ifplugd new file mode 100644 index 000000000..6443ef7a8 --- /dev/null +++ b/volumio/etc/default/ifplugd @@ -0,0 +1,4 @@ +INTERFACES="eth0" +HOTPLUG_INTERFACES="" +ARGS="-q -f -u0 -d10 -w -I" +SUSPEND_ACTION="stop" diff --git a/volumio/lib/systemd/system/netplug.service.d/volumio-network.conf b/volumio/lib/systemd/system/netplug.service.d/volumio-network.conf deleted file mode 100644 index d018eb9a1..000000000 --- a/volumio/lib/systemd/system/netplug.service.d/volumio-network.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -BindsTo=volumio-network.service - From a8f3dd19af885023d202b81bd3903019098c4527 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 17 May 2018 14:02:50 +0200 Subject: [PATCH 427/673] do not create dhcpcd folder structure --- scripts/volumioconfig.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 40141bcb0..6b7970b6c 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -548,12 +548,6 @@ ln -s /etc/resolv.conf.tail.tmpl /etc/resolv.conf.tail echo "Removing Avahi Service for UDISK-SSH" rm /etc/avahi/services/udisks.service -echo "Creating DHCPCD folder structure" -mkdir /var/lib/dhcpcd5 -touch /var/lib/dhcpcd5/dhcpcd-wlan0.lease -touch /var/lib/dhcpcd5/dhcpcd-eth0.lease -chmod -R 777 /var/lib/dhcpcd5 - ##################### #CPU Optimizations#----------------------------------------- ##################### From e9f9f8a3db5777d6fd0c3a774be9b1b94af105ea Mon Sep 17 00:00:00 2001 From: balbes150 Date: Sun, 20 May 2018 13:10:02 +0300 Subject: [PATCH 428/673] fix --- volumio/etc/mpd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/etc/mpd.conf b/volumio/etc/mpd.conf index 2f210e431..dc4777c9a 100755 --- a/volumio/etc/mpd.conf +++ b/volumio/etc/mpd.conf @@ -45,7 +45,7 @@ input { audio_output { type "alsa" name "alsa" - device "hw:0,0" + device "hw:0,0" } audio_output { From 496444e39e8b8ba4c1e5320a36b2d6a1a8880979 Mon Sep 17 00:00:00 2001 From: balbes150 Date: Sun, 20 May 2018 16:08:36 +0300 Subject: [PATCH 429/673] v20180520 fix config mpd --- scripts/aml9xxxarmv7image.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index 533623299..989f4b731 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -109,6 +109,8 @@ echo "Copying etc files" cp -pdR platform-aml/s9xxx/etc/* /mnt/volumio/rootfs/etc echo "Copying usr/bin files" cp -pdR platform-aml/s9xxx/usr/* /mnt/volumio/rootfs/usr +echo "Copying volumio fix" +cp -pdR platform-aml/s9xxx/volumio/* /mnt/volumio/rootfs/volumio sync echo "Preparing to run chroot for more AML configuration" From 92314c747795f7d4b44a70ce897418ebd891917c Mon Sep 17 00:00:00 2001 From: balbes150 Date: Mon, 21 May 2018 15:14:53 +0300 Subject: [PATCH 430/673] v20180521 fix mpd s805 s812 --- scripts/aml805armv7image.sh | 2 ++ scripts/aml812armv7image.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh index b4395bf46..df10a5fb9 100755 --- a/scripts/aml805armv7image.sh +++ b/scripts/aml805armv7image.sh @@ -109,6 +109,8 @@ echo "Copying etc files" cp -pdR platform-aml/s805/etc/* /mnt/volumio/rootfs/etc echo "Copying usr/bin files" cp -pdR platform-aml/s805/usr/* /mnt/volumio/rootfs/usr +echo "Copying volumio fix" +cp -pdR platform-aml/s805/volumio/* /mnt/volumio/rootfs/volumio sync echo "Preparing to run chroot for more AML configuration" diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index 10355b7ca..0506ff37e 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -109,6 +109,8 @@ echo "Copying etc files" cp -pdR platform-aml/s812/etc/* /mnt/volumio/rootfs/etc echo "Copying usr/bin files" cp -pdR platform-aml/s812/usr/* /mnt/volumio/rootfs/usr +echo "Copying volumio fix" +cp -pdR platform-aml/s812/volumio/* /mnt/volumio/rootfs/volumio sync echo "Preparing to run chroot for more AML configuration" From 16a9669f417430fec5adddc8479d7ce8831053ca Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 25 May 2018 11:11:34 +0200 Subject: [PATCH 431/673] PI: kernel up to 4.14.42 more fixes and few specific for Pi3b+ (ethernet, firmware,...) --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index f87cf40a0..17505f8d0 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -56,7 +56,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.37" +KERNEL_VERSION="4.14.42" case $KERNEL_VERSION in "4.4.9") @@ -74,9 +74,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="936a8dc3a605c20058fbb23672d6b47bca77b0d5" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - "4.14.37") - KERNEL_REV="1111" - KERNEL_COMMIT="461ee53cef85d14b8511e9f6d5dce8c0ac1d595a" + "4.14.42") + KERNEL_REV="1114" + KERNEL_COMMIT="d68045945570b418ac48830374366613de3278f3" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 7a56fbb96cf1b46f9d3239b63a65ba2379a71965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 27 May 2018 14:19:52 +0200 Subject: [PATCH 432/673] Delete fallback when factory resetting --- scripts/initramfs/init.nextarm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 11ecacbd9..6a746685e 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -199,6 +199,8 @@ mount -t ext4 ${IMGPART} /mnt/imgpart # if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "Creating factory image, this will take a minute, please wait..." +# TODO, ALLOW FOR INTERRUPTION IN FACTORY IMAGE CREATION +# USE THE FILE APPROACH TO SIGNAL WHEN CREATION HAS BEEN EXECUTED CORRECTLY cp /mnt/imgpart/volumio_current.sqsh /mnt/imgpart/volumio_factory.sqsh print_msg "Factory image created" print_msg "Creating archive for factory kernel..." @@ -208,6 +210,7 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then cp /mnt/imgpart/kernel_current.tar /mnt/imgpart/kernel_factory.tar umount /mnt/factory rm -r /mnt/factory + sync elif [ ! -z "${BOOTDELAY}" ]; then print_msg "Doing a ${BOOTDELAY} second delay here to give kernel load a headstart" sleep ${BOOTDELAY} @@ -276,8 +279,14 @@ if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data print_msg "Factory reset executed: part I - User DATA Part" + if [ -e "/mnt/imgpart/kernel_fallback.tar" ]; then + rm /mnt/imgpart/kernel_fallback.tar + fi tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory print_msg "Factory reset executed: part II - Kernel" + if [ -e "/mnt/imgpart/volumio_fallback.sqsh" ]; then + rm /mnt/imgpart/volumio_fallback.sqsh + fi cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh print_msg "Factory reset executed: part III - Squash" print_msg "Factory reset successfully executed" From 574bc71e9a507184c95992f1952e3e291e5b75f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 27 May 2018 17:58:04 +0200 Subject: [PATCH 433/673] init.nextarm: fix factory reset issue --- scripts/initramfs/init.nextarm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 6a746685e..9216c38f0 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -295,6 +295,17 @@ if [ -e "/mnt/factory/factory_reset" ]; then umount /mnt/factory rm -r /mnt/factory + +# In case UUIDs are used: New data partition also means UUID has changed, fix it + if [ ! -z "${UUIDFMT}" ]; then + mkdir boot + mount -t vfat ${BOOTPART} /boot + UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) + cp $BOOTCONFIG $BOOTCONFIG.old + sed -i "s/datapart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/datapart=UUID=${UUID_DATA}/g" ${BOOTCONFIG} + umount /boot + rm -r /boot + fi print_msg "Restarting" echo b > /proc/sysrq-trigger fi From 3286cd4769bc06b9f951e5dbdd75824ee5640e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 31 May 2018 16:47:13 +0200 Subject: [PATCH 434/673] initramfs: fixed an issue with resizing data partitons on eMMC --- scripts/initramfs/init.nextarm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 9216c38f0..42b2e1ac4 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -365,16 +365,27 @@ if [ -e "/boot/kernel_update" ]; then fi # if data partition needs to be resized -#mount -t auto /dev/${BOOTDEV}p1 /boot if [ -e "/boot/resize-volumio-datapart" ]; then + DATADEV=$(echo $DATAPART | grep -o mmcblk) + if [ ! -z "${DATADEV}" ]; then + DATADEV=$(echo ${DATAPART} | awk -F'/' '{print substr($3,0,7)}') + else + DATADEV=$(echo $DATAPART | grep -o sd) + if [ ! -z "${DATADEV}" ]; then + DATADEV=$(echo ${DATAPART} | awk -F'/' '{print substr($3,0,3)}') + else + print_msg "Unexpected boot device, aborting" + exec sh + fi + fi print_msg "Re-sizing Volumio data partition" - END="$(parted -s /dev/${BOOTDEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" - parted -s /dev/${BOOTDEV} resizepart 3 ${END} + END="$(parted -s /dev/${DATADEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" + parted -s /dev/${DATADEV} resizepart 3 ${END} e2fsck -fy ${DATAPART} #force resize as we did just run e2fsck. Resize2fs seems ro not detect this occasionally resize2fs -f ${DATAPART} print_msg "Volumio data partition succesfully resized" - parted -s /dev/${BOOTDEV} unit MB print + parted -s /dev/${DATADEV} unit MB print rm /boot/resize-volumio-datapart fi From 1cc228726bb166065986a873e5962bcc82864b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 31 May 2018 21:53:04 +0200 Subject: [PATCH 435/673] initramfs: trying auto restart after hanging reboot --- scripts/initramfs/init.nextarm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 42b2e1ac4..fddfee564 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -15,6 +15,9 @@ mknod /dev/tty c 5 0 mdev -s +#######TODO: replace or delete the following when the restart issue for Tinkerboard has been solved +echo 5 > /proc/sys/kernel/panic + #Defaults which may be overridden by cmdline parameters USE_KMSG="yes" HWDEVICE="empty" @@ -303,6 +306,8 @@ if [ -e "/mnt/factory/factory_reset" ]; then UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) cp $BOOTCONFIG $BOOTCONFIG.old sed -i "s/datapart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/datapart=UUID=${UUID_DATA}/g" ${BOOTCONFIG} + rm /boot/resize-volumio-datapart + sync umount /boot rm -r /boot fi @@ -445,6 +450,9 @@ else fi fi +#######TODO: replace or delete the following when the restart issue for Tinkerboard has been solved +echo 0 > /proc/sys/kernel/panic + umount /proc umount /sys From 03fbb7cc65eaa3f07096d6c29d23bd3b9d3bd930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 1 Jun 2018 21:34:02 +0200 Subject: [PATCH 436/673] init.nextarm: fix an issue with 'delete userdata' --- scripts/initramfs/init.nextarm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index fddfee564..fa0a3aaf3 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -319,6 +319,18 @@ if [ -e "/mnt/factory/user_data" ]; then mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data rm /mnt/factory/user_data print_msg "User Data successfully deleted " +# In case UUIDs are used: New data partition also means UUID has changed, fix it + if [ ! -z "${UUIDFMT}" ]; then + mkdir boot + mount -t vfat ${BOOTPART} /boot + UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) + cp $BOOTCONFIG $BOOTCONFIG.old + sed -i "s/datapart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/datapart=UUID=${UUID_DATA}/g" ${BOOTCONFIG} + rm /boot/resize-volumio-datapart + sync + umount /boot + rm -r /boot + fi fi umount /mnt/factory rm -r /mnt/factory @@ -379,7 +391,7 @@ if [ -e "/boot/resize-volumio-datapart" ]; then if [ ! -z "${DATADEV}" ]; then DATADEV=$(echo ${DATAPART} | awk -F'/' '{print substr($3,0,3)}') else - print_msg "Unexpected boot device, aborting" + print_msg "Unexpected data device, DATAPART=${DATAPART}, aborting" exec sh fi fi From 581bc97d1fd1a4ef77a1f29dfc3e633fa41cbfcc Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 11 Jun 2018 16:06:37 +0200 Subject: [PATCH 437/673] vcgencmd for pi temp --- scripts/volumioconfig.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 6b7970b6c..d06d5131e 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -89,6 +89,8 @@ alias service="sudo /usr/sbin/service" alias ifconfig="sudo /sbin/ifconfig" # tv-service alias tvservice="/opt/vc/bin/tvservice" +# vcgencmd +alias vcgencmd="/opt/vc/bin/vcgencmd" ' >> /etc/bash.bashrc #Sudoers Nopasswd @@ -97,7 +99,7 @@ echo 'Adding Safe Sudoers NoPassw permissions' cat > ${SUDOERS_FILE} << EOF # Add permissions for volumio user volumio ALL=(ALL) ALL -volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd +volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh, /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/pull.sh EOF chmod 0440 ${SUDOERS_FILE} From f4bafc35b2cfa5585e8dec3cd0c1d2e3b8a9958d Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 12 Jun 2018 01:26:33 +0200 Subject: [PATCH 438/673] Wifi drivers caching on Volumio repo --- scripts/raspberryconfig.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 17505f8d0..44d60e614 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -189,7 +189,9 @@ ln -s /opt/vc/lib/libvcos.so /usr/lib/libvcos.so sed -i 's/KERNEL==\"eth/DRIVERS!=\"smsc95xx\", DRIVERS!=\"lan78xx\", &/' /etc/udev/rules.d/99-Volumio-net.rules echo "Installing Wireless drivers for 8188eu, 8192eu, 8812au, mt7610, and mt7612. Many thanks MrEngman" -MRENGMAN_REPO="http://downloads.fars-robotics.net/wifi-drivers" +### We cache the drivers archives upon first request on Volumio server, to relieve stress on mr engmans +MRENGMAN_REPO="http://wifi-drivers.volumio.org/wifi-drivers" +#MRENGMAN_REPO="http://downloads.fars-robotics.net/wifi-drivers" mkdir wifi cd wifi From d0d14b37ffe8e45861e4e0b9816241fbafb4eb91 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 19 Jun 2018 23:48:10 +0200 Subject: [PATCH 439/673] variants wip --- scripts/raspberryconfig.sh | 4 ++-- scripts/raspberryimage.sh | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 44d60e614..fbab9156e 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -232,9 +232,9 @@ if [ -f "install.sh" ]; then sh install.sh fi cd / -rm -rf ${PATCH} +#rm -rf ${PATCH} fi -rm /patch +#rm /patch if [ "$PATCH" = "volumio" ]; then diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 459870c58..28683c03a 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -92,8 +92,16 @@ cp -rp volumio/opt/vc/bin/* /mnt/volumio/rootfs/opt/vc/bin/ echo $PATCH > /mnt/volumio/rootfs/patch if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - echo "Starting config.js" - node config.js $PATCH + if [ -f "VARIANT" ]; then + VARIANT=$(cat "VARIANT") + echo "Configuring variant $VARIANT" + rm VARIANT + echo "Starting config.js for variant $VARIANT" + node config.js $PATCH $VARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi fi chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' @@ -101,6 +109,18 @@ su - /raspberryconfig.sh -p EOF +if [ "$PATCH" != "volumio" ]; then + PATCHPATH=/mnt/volumio/rootfs/${PATCH} + if [ -f "${PATCHPATH}/variant.js" ]; then + node ${PATCHPATH}/variant.js $PATCH ${PATCHPATH} + fi + rm -rf ${PATCHPATH} +fi +rm /mnt/volumio/rootfs/patch + + + + echo "Base System Installed" rm /mnt/volumio/rootfs/raspberryconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" From 1cf31750804155afa1b472f37ad8b8c613574bce Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 26 Jun 2018 20:24:34 +0200 Subject: [PATCH 440/673] variants wip --- scripts/raspberryconfig.sh | 4 ++-- scripts/raspberryimage.sh | 28 ++++++++++++---------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index fbab9156e..44d60e614 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -232,9 +232,9 @@ if [ -f "install.sh" ]; then sh install.sh fi cd / -#rm -rf ${PATCH} +rm -rf ${PATCH} fi -#rm /patch +rm /patch if [ "$PATCH" = "volumio" ]; then diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index 28683c03a..bbae85ba7 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -92,12 +92,12 @@ cp -rp volumio/opt/vc/bin/* /mnt/volumio/rootfs/opt/vc/bin/ echo $PATCH > /mnt/volumio/rootfs/patch if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - if [ -f "VARIANT" ]; then - VARIANT=$(cat "VARIANT") - echo "Configuring variant $VARIANT" - rm VARIANT - echo "Starting config.js for variant $VARIANT" - node config.js $PATCH $VARIANT + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT else echo "Starting config.js" node config.js $PATCH @@ -109,17 +109,13 @@ su - /raspberryconfig.sh -p EOF -if [ "$PATCH" != "volumio" ]; then - PATCHPATH=/mnt/volumio/rootfs/${PATCH} - if [ -f "${PATCHPATH}/variant.js" ]; then - node ${PATCHPATH}/variant.js $PATCH ${PATCHPATH} - fi - rm -rf ${PATCHPATH} -fi -rm /mnt/volumio/rootfs/patch - - +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi echo "Base System Installed" rm /mnt/volumio/rootfs/raspberryconfig.sh /mnt/volumio/rootfs/root/init From 6ba44ec3526af4694ac55f071a7272f86dee32a8 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 3 Jul 2018 23:59:20 +0200 Subject: [PATCH 441/673] Variant WIP2 --- scripts/raspberryconfig.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 44d60e614..755c25938 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -258,6 +258,11 @@ tar --strip-components 1 --exclude *.hash -xf rpi-volumio-"$KERNEL_VERSION"-taud rm rpi-volumio-"$KERNEL_VERSION"-taudac-modules.tar.gz echo "TauDAC Modules and overlay installed" +echo "Getting Volumio driver" +wget http://repo.volumio.org/Volumio2/Firmwares/ess-volumio/ess-volumio-$KERNEL_VERSION-v7+.tar.gz +tar xf ess-volumio-$KERNEL_VERSION-v7+.tar.gz --no-same-owner +rm ess-volumio-$KERNEL_VERSION-v7+.tar.gz + if [ "$KERNEL_VERSION" = "4.4.9" ]; then From ccfbf7056a2724f9f6b96813d7a1bbf0a48850f3 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 4 Jul 2018 00:16:25 +0200 Subject: [PATCH 442/673] Create volumio hash in etc os release --- scripts/finalize.sh | 6 ++++++ scripts/raspberryimage.sh | 3 +++ 2 files changed, 9 insertions(+) create mode 100755 scripts/finalize.sh diff --git a/scripts/finalize.sh b/scripts/finalize.sh new file mode 100755 index 000000000..09852c4dc --- /dev/null +++ b/scripts/finalize.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "Computing Volumio folder Hash Checksum" +HASH=`/usr/bin/find /volumio -type f | sort -u | xargs cat | md5sum | tr -d "-" | tr -d " \t\n\r"` +echo "VOLUMIO_HASH=${HASH}" >> /mnt/volumio/rootfs/etc/os-release + diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index bbae85ba7..de088b804 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -130,6 +130,9 @@ echo "Copying Firmwares" sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Creating RootFS Base for SquashFS" if [ -d /mnt/squash ]; then From 128b9e62041c0d6d9b1bc5a2a2f33b9b29e00db5 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 5 Jul 2018 00:06:51 +0200 Subject: [PATCH 443/673] Proper hash creation --- recipes/arm.conf | 2 +- scripts/finalize.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 278828634..a02d19154 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip bc +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip bc md5deep source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/finalize.sh b/scripts/finalize.sh index 09852c4dc..213bda119 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -1,6 +1,6 @@ #!/bin/sh echo "Computing Volumio folder Hash Checksum" -HASH=`/usr/bin/find /volumio -type f | sort -u | xargs cat | md5sum | tr -d "-" | tr -d " \t\n\r"` -echo "VOLUMIO_HASH=${HASH}" >> /mnt/volumio/rootfs/etc/os-release +HASH=`/usr/bin/md5deep -r -l -s -q /mnt/volumio/rootfs/volumio | sort | md5sum | tr -d "-" | tr -d " \t\n\r"` +echo "VOLUMIO_HASH=\"${HASH}\"" >> /mnt/volumio/rootfs/etc/os-release From 591fd43f8808d177e90cc5a992ef37e04c6027e3 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 5 Jul 2018 00:16:03 +0200 Subject: [PATCH 444/673] hash for all devices --- recipes/armv7.conf | 2 +- recipes/armv8.conf | 2 +- recipes/x86.conf | 2 +- scripts/aml805armv7image.sh | 3 +++ scripts/aml812armv7image.sh | 3 +++ scripts/aml9xxxarmv7image.sh | 3 +++ scripts/armbianimage.sh | 3 +++ scripts/bbbimage.sh | 3 +++ scripts/bpim2uimage.sh | 3 +++ scripts/bpiproimage.sh | 3 +++ scripts/cuboxiimage.sh | 3 +++ scripts/nanopi64image.sh | 3 +++ scripts/nanopineo2image.sh | 3 +++ scripts/nanopineoimage.sh | 3 +++ scripts/odroidc1image.sh | 3 +++ scripts/odroidc2image.sh | 3 +++ scripts/odroidx2image.sh | 3 +++ scripts/odroidxu4image.sh | 3 +++ scripts/orangepiimage.sh | 3 +++ scripts/pine64image.sh | 3 +++ scripts/rock64image.sh | 3 +++ scripts/sopine64image.sh | 3 +++ scripts/sparkyimage.sh | 3 +++ scripts/tinkerimage.sh | 3 +++ scripts/udooneoimage.sh | 3 +++ scripts/udooqdlimage.sh | 3 +++ scripts/vszeroimage.sh | 3 +++ scripts/x86image.sh | 3 +++ 28 files changed, 78 insertions(+), 3 deletions(-) diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 359a4e624..94b6b2449 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip bc +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip bc md5deep source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv8.conf b/recipes/armv8.conf index 6ed879b18..c1925fd69 100644 --- a/recipes/armv8.conf +++ b/recipes/armv8.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge rsync haveged cpufrequtils jq minizip +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge rsync haveged cpufrequtils jq minizip md5deep source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 04fe586eb..d2b7fc64e 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -31,7 +31,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip bc +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl busybox parted udisks udisks-glue policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip bc md5deep source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh index df10a5fb9..42f466a2a 100755 --- a/scripts/aml805armv7image.sh +++ b/scripts/aml805armv7image.sh @@ -147,6 +147,9 @@ echo "==> AML device installed" #rm -r platform-aml sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index 0506ff37e..ade0af00a 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -147,6 +147,9 @@ echo "==> AML device installed" #rm -r platform-aml sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index 989f4b731..4d91fe709 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -147,6 +147,9 @@ echo "==> AML device installed" #rm -r platform-aml sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/armbianimage.sh b/scripts/armbianimage.sh index 657dc8032..f90e3aa1d 100755 --- a/scripts/armbianimage.sh +++ b/scripts/armbianimage.sh @@ -140,6 +140,9 @@ echo "==> BPI-PRO device installed" #rm -r platform-bananapi sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/bbbimage.sh b/scripts/bbbimage.sh index 808b34471..575ee5821 100755 --- a/scripts/bbbimage.sh +++ b/scripts/bbbimage.sh @@ -141,6 +141,9 @@ echo "==> bbb device installed" #sudo rm -r platforms-bbb sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/bpim2uimage.sh b/scripts/bpim2uimage.sh index 2fdd8d404..7b3a58bfb 100755 --- a/scripts/bpim2uimage.sh +++ b/scripts/bpim2uimage.sh @@ -165,6 +165,9 @@ echo "==> BPI-M2U device installed" #sudo rm -r platform-bananapi sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/bpiproimage.sh b/scripts/bpiproimage.sh index 73677eee1..2bc947ef3 100755 --- a/scripts/bpiproimage.sh +++ b/scripts/bpiproimage.sh @@ -161,6 +161,9 @@ echo "==> BPI-PRO device installed" #rm -r platform-bananapi sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index 798b31574..10baf5730 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -153,6 +153,9 @@ echo "==> cuboxi device installed" #sudo rm -r platforms-cuboxi sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/nanopi64image.sh b/scripts/nanopi64image.sh index 304faf62f..044dba622 100755 --- a/scripts/nanopi64image.sh +++ b/scripts/nanopi64image.sh @@ -152,6 +152,9 @@ echo "==> NanoPI64 device installed" #sudo rm -r platform-nanopi sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 2ae354f28..db424c625 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -158,6 +158,9 @@ echo "==> nanopineo2 device installed" #sudo rm -r platform-nanopineo2 sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/nanopineoimage.sh b/scripts/nanopineoimage.sh index c58316992..8e2d338f2 100755 --- a/scripts/nanopineoimage.sh +++ b/scripts/nanopineoimage.sh @@ -157,6 +157,9 @@ echo "==> nanopineo device installed" #sudo rm -r platform-nanopineo sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index 3dc9346f2..15096818d 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -168,6 +168,9 @@ echo "==> Odroid-C1 device installed" #rm -r platform-odroid sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index fabd35254..c6af95177 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -164,6 +164,9 @@ echo "==> Odroid-C2 device installed" #rm -r platform-odroid sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/odroidx2image.sh b/scripts/odroidx2image.sh index fee48cc1a..acd86d260 100755 --- a/scripts/odroidx2image.sh +++ b/scripts/odroidx2image.sh @@ -166,6 +166,9 @@ umount -l /mnt/volumio/rootfs/sys sync echo "Odroid-XU4 device installed" +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index 87bf6fde9..21734f591 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -156,6 +156,9 @@ umount -l /mnt/volumio/rootfs/sys sync echo "Odroid-XU4 device installed" +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/orangepiimage.sh b/scripts/orangepiimage.sh index c1f97be3f..3ea4fd667 100755 --- a/scripts/orangepiimage.sh +++ b/scripts/orangepiimage.sh @@ -144,6 +144,9 @@ echo "==> OrangePi device installed" #rm -r platform-orangepi sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index a00a8b156..34b47d9db 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -159,6 +159,9 @@ echo "==> Pine64 device installed" #sudo rm -r platform-pine64 sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index af9d45867..ede712895 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -171,6 +171,9 @@ echo "==> rock64 device installed" #sudo rm -r platform-rock64 sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index e237baf88..9aef67644 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -159,6 +159,9 @@ echo "==> soPine64/ Pine64 LTS device installed" #sudo rm -r platform-pine64 sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index 5fa4b35e5..cfb75e87a 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -150,6 +150,9 @@ echo "==> sparky device installed" #sudo rm -r platforms-sparky sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 573fb7027..59e04f4e3 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -150,6 +150,9 @@ echo "==> Tinkerboard device installed" #rm -r platform-asus sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index bf334f40a..675454799 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -150,6 +150,9 @@ echo "==> udoo-neo device installed" #sudo rm -r platforms-udoo sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index d81af97cf..db38d15e5 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -143,6 +143,9 @@ echo "==> udoo-qdl device installed" #sudo rm -r platforms-udoo sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 6bec07fd2..ab6623d40 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -138,6 +138,9 @@ echo "==> Voltastream Zero device installed" sync +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 1740837e9..c428ee0ec 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -145,6 +145,9 @@ sudo umount -l /mnt/volumio/rootfs/sys echo "X86 device installed" +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + echo "Preparing rootfs base for SquashFS" if [ -d /mnt/squash ]; then From 372a8d0c91e8b1cdcfd2aab10ea8919f2f162b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 8 Jul 2018 10:13:13 +0200 Subject: [PATCH 445/673] x86: reduce initial size to < 4Gb --- scripts/x86image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/x86image.sh b/scripts/x86image.sh index c428ee0ec..3b220e58e 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -16,7 +16,7 @@ IMG_FILE="Volumio${VERSION}-${BUILDDATE}-x86.img" echo "Creating Image Bed" echo "Image file: ${IMG_FILE}" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=3900 +dd if=/dev/zero of=${IMG_FILE} bs=1M count=3700 LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` sudo parted -s "${LOOP_DEV}" mklabel gpt From c1371b9ddfab3757c3b5da50e0ee279b8e9da666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 9 Jul 2018 18:17:25 +0200 Subject: [PATCH 446/673] X86: resize datapart now depends on freespace on device --- scripts/initramfs/init-x86 | 14 +++++++------- scripts/x86config.sh | 3 --- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index bafa665b7..ce4f15512 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -203,6 +203,7 @@ y EOF rm -rf /mnt/imgpart/move-gpt print_msg "Succesfully moved the backup GPT table" + sync fi # @@ -365,17 +366,16 @@ fi # ============================================================= # print_msg "Checking for data partition re-size" -#mkdir boot -#mount -t vfat ${BOOTPART} /boot -if [ -e "/boot/resize-volumio-datapart" ]; then +# Re-sizing is not necessary when we already reached maximum (shows with decimals less than 1MB). +FREESIZE="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $3}' | awk -F 'MB' '{print $1}')" +if [ "$(awk 'BEGIN {print ("'$FREESIZE'" >= "'1'")}')" -eq "1" ]; then print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" parted -s ${BOOT_DEVICE} resizepart 3 ${END} > /boot/resize-datapart.log - e2fsck -f ${BOOT_DEVICE}3 -y - resize2fs ${BOOT_DEVICE}3 > /boot/resize-datapart.log + e2fsck -f ${BOOT_DEVICE}3 -y >> /boot/resize-datapart.log + resize2fs ${BOOT_DEVICE}3 >> /boot/resize-datapart.log print_msg "Volumio data partition succesfully resized" - parted -s ${BOOT_DEVICE} unit MB print > /boot/resize-datapart.log - rm /boot/resize-volumio-datapart + parted -s ${BOOT_DEVICE} unit MB print >> /boot/resize-datapart.log fi umount /boot rm -r /boot diff --git a/scripts/x86config.sh b/scripts/x86config.sh index b6c643358..703c45bc7 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -261,7 +261,4 @@ rm -rf ${PATCH} fi rm /patch -echo "Signalling the init script to re-size the volumio data partition" -touch /boot/resize-volumio-datapart - echo "Bootloader configuration and initrd.img complete" From ea3511dea18206dfce00f79e1ce3b8c3578a98c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 10 Jul 2018 12:38:16 +0200 Subject: [PATCH 447/673] X86: fix Free Space determination --- scripts/initramfs/init-x86 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index ce4f15512..f2dfebb55 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -367,7 +367,7 @@ fi # print_msg "Checking for data partition re-size" # Re-sizing is not necessary when we already reached maximum (shows with decimals less than 1MB). -FREESIZE="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $3}' | awk -F 'MB' '{print $1}')" +FREESIZE="$(parted -s ${BOOT_DEVICE} unit MB print free | tail -n 2 | grep Free | awk '{print $3}' | awk -F 'MB' '{print $1}')" if [ "$(awk 'BEGIN {print ("'$FREESIZE'" >= "'1'")}')" -eq "1" ]; then print_msg "Re-sizing Volumio data partition..." END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" From 2621e980f353c29cd3a44e5e3b24576f494d3fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 10 Jul 2018 20:57:56 +0200 Subject: [PATCH 448/673] X86: Detect GPT PMBR size mismatch without trigger --- scripts/initramfs/init-x86 | 8 ++++---- scripts/x86image.sh | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index f2dfebb55..9b96c25bf 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -188,20 +188,20 @@ print_msg "Initrd initialisation finished" # # Step 1: As the image likely has been dd'ed to a bigger disk, # the backup GPT table is not at the end of the disk. -# Fix it before doing anything else (only at first boot) +# Fix it before doing anything else. # ============================================================== # BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') -if [ -e "/mnt/imgpart/move-gpt" ]; then - print_msg "First time boot, moving the backup GPT table to the end of the disk..." +GPTSIZEMISMATCH="$(sudo fdisk -l ${BOOT_DEVICE} 2>&1 | grep 'GPT PMBR size mismatch')" +if [ -z "${GPTSIZEMISMATCH}" ]; then + print_msg "GPT PMBR size mismatch, moving the backup GPT table to the end of the disk..." gdisk ${BOOT_DEVICE} > /dev/null 2>&1 < Date: Wed, 18 Jul 2018 13:09:48 +0200 Subject: [PATCH 449/673] Add tvservice and renice to nopwd cmd --- scripts/cuboxiconfig.sh | 1 + scripts/volumioconfig.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cuboxiconfig.sh b/scripts/cuboxiconfig.sh index 6e58d7dbd..dbfab9c5b 100755 --- a/scripts/cuboxiconfig.sh +++ b/scripts/cuboxiconfig.sh @@ -30,6 +30,7 @@ apt-get -y install u-boot-tools echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlayfs" >> /etc/initramfs-tools/modules +echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index d06d5131e..f1a5bdf2d 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -41,7 +41,7 @@ echo "" #Adding Main user Volumio echo "Adding Volumio User" groupadd volumio -useradd -c volumio -d /home/volumio -m -g volumio -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev -s /bin/bash -p '$6$tRtTtICB$Ki6z.DGyFRopSDJmLUcf3o2P2K8vr5QxRx5yk3lorDrWUhH64GKotIeYSNKefcniSVNcGHlFxZOqLM6xiDa.M.' volumio +useradd -c volumio -d /home/volumio -m -g volumio -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lp -s /bin/bash -p '$6$tRtTtICB$Ki6z.DGyFRopSDJmLUcf3o2P2K8vr5QxRx5yk3lorDrWUhH64GKotIeYSNKefcniSVNcGHlFxZOqLM6xiDa.M.' volumio #Setting Root Password echo 'root:$1$JVNbxLRo$pNn5AmZxwRtWZ.xF.8xUq/' | chpasswd -e @@ -99,7 +99,7 @@ echo 'Adding Safe Sudoers NoPassw permissions' cat > ${SUDOERS_FILE} << EOF # Add permissions for volumio user volumio ALL=(ALL) ALL -volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd +volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd,/opt/vc/bin/tvservice,/usr/bin/renice volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh, /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/pull.sh EOF chmod 0440 ${SUDOERS_FILE} From d544fcc8bb245274fd98b2b6aa02799c9c3a5c8a Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 19 Jul 2018 11:33:14 +0200 Subject: [PATCH 450/673] trying to reduce footprint --- scripts/volumioconfig.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index f1a5bdf2d..efd4760c1 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -11,6 +11,18 @@ exit 101 EOF chmod +x /usr/sbin/policy-rc.d +echo "Configuring dpkg to not include Manual pages and docs" +echo "path-exclude /usr/share/doc/* +# we need to keep copyright files for legal reasons +path-include /usr/share/doc/*/copyright +path-exclude /usr/share/man/* +path-exclude /usr/share/groff/* +path-exclude /usr/share/info/* +# lintian stuff is small, but really unnecessary +path-exclude /usr/share/lintian/* +path-exclude /usr/share/linda/*" > /etc/dpkg/dpkg.cfg.d/01_nodoc + + export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true export LC_ALL=C LANGUAGE=C LANG=C /var/lib/dpkg/info/dash.preinst install From 14434d5faa1daa9adf51c1492f278c349d0a3ed3 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 22 Jul 2018 14:51:11 +0200 Subject: [PATCH 451/673] Cleanup of man pages --- scripts/finalize.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/finalize.sh b/scripts/finalize.sh index 213bda119..682e09350 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -4,3 +4,8 @@ echo "Computing Volumio folder Hash Checksum" HASH=`/usr/bin/md5deep -r -l -s -q /mnt/volumio/rootfs/volumio | sort | md5sum | tr -d "-" | tr -d " \t\n\r"` echo "VOLUMIO_HASH=\"${HASH}\"" >> /mnt/volumio/rootfs/etc/os-release +echo "Cleanup to save space" +find /mnt/volumio/rootfs/usr/share/doc -depth -type f ! -name copyright|xargs rm || true +find /mnt/volumio/rootfs/usr/share/doc -empty|xargs rmdir || true +rm -rf /mnt/volumio/rootfs/usr/share/man/* /mnt/volumio/rootfs/usr/share/groff/* /mnt/volumio/rootfs/usr/share/info/* +rm -rf /mnt/volumio/rootfs/usr/share/lintian/* /mnt/volumio/rootfs/usr/share/linda/* /mnt/volumio/rootfs/var/cache/man/* From b04fe6396fbf8777d7c298798450889bbd898dc5 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 22 Jul 2018 17:21:06 +0200 Subject: [PATCH 452/673] volumio mirror repo --- recipes/arm.conf | 14 +++++++------- scripts/raspberryconfig.sh | 4 ++-- volumio/etc/apt/sources.list.arm | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index a02d19154..152047a0a 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -13,43 +13,43 @@ omitrequired=false [Base] packages=busybox acl dmsetup insserv libbz2-1.0 libcap2 libcap2-bin libdebconfclient0 libdevmapper1.02.1 libgpg-error0 libprocps3 libsemanage-common libsemanage1 systemd libsystemd0 libudev1 udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common base-files base-passwd bash debconf debconf-i18n debianutils e2fslibs e2fsprogs gcc-4.8-base gcc-4.9-base initscripts libacl1 libattr1 libaudit-common libaudit1 libblkid1 libc-bin libc6 libcomerr2 libcryptsetup4 libdb5.3 libgcc1 libgcrypt20 libkmod2 liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsepol1 libslang2 libsmartcols1 libss2 libtinfo5 libustr-1.0-1 libuuid1 lsb-base mawk multiarch-support ncurses-base ncurses-bin procps startpar tzdata util-linux zlib1g apt apt-transport-https sudo xz-utils -source=http://mirrordirector.raspbian.org/raspbian +source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie [Net] packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd -source=http://mirrordirector.raspbian.org/raspbian +source=http://archive.volumio..org/raspbian keyring=debian-archive-keyring suite=jessie [Utils] packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip bc md5deep -source=http://mirrordirector.raspbian.org/raspbian +source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie [FS] packages= cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient samba -source=http://mirrordirector.raspbian.org/raspbian +source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie [Assets] packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool -source=http://mirrordirector.raspbian.org/raspbian +source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie [Spotify] packages=libao-dev libglib2.0-dev libjson-glib-1.0-0 libjson-glib-dev libao-common libasound2-dev libreadline-dev libsox-dev libsoup2.4-dev libsoup2.4-1 -source=http://mirrordirector.raspbian.org/raspbian +source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie [Firmware] packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free -source=http://mirrordirector.raspbian.org/raspbian +source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring components=main non-free suite=jessie diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 755c25938..417786979 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -37,8 +37,8 @@ options snd-usb-audio index=5 options snd_bcm2835 index=0" >> /etc/modprobe.d/alsa-base.conf echo "Adding Raspberrypi.org Repo" -echo "deb http://archive.raspberrypi.org/debian/ jessie main ui -deb-src http://archive.raspberrypi.org/debian/ jessie main ui +echo "deb http://archive.volumio.org/debian/ jessie main ui +deb-src http://archive.volumio.org/debian/ jessie main ui " >> /etc/apt/sources.list.d/raspi.list echo "Adding Raspberrypi.org Repo Key" diff --git a/volumio/etc/apt/sources.list.arm b/volumio/etc/apt/sources.list.arm index 3a0e4ca53..56c358e1b 100644 --- a/volumio/etc/apt/sources.list.arm +++ b/volumio/etc/apt/sources.list.arm @@ -1,2 +1,2 @@ -deb http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi -deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi +deb http://archive.volumio.org/raspbian/ jessie main contrib non-free rpi +deb-src http://archive.volumio.org/raspbian/ jessie main contrib non-free rpi From 3d9e39d86f9761f0b28f6fcd8a54fc8d0c39b63d Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 22 Jul 2018 18:15:20 +0200 Subject: [PATCH 453/673] Fix recipe file --- recipes/arm.conf | 2 +- scripts/finalize.sh | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 152047a0a..c64f4f3dd 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -19,7 +19,7 @@ suite=jessie [Net] packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd -source=http://archive.volumio..org/raspbian +source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/finalize.sh b/scripts/finalize.sh index 682e09350..a19ae84d2 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -1,11 +1,24 @@ -#!/bin/sh +#!/bin/bash +BASEDIR=/mnt/volumio/rootfs echo "Computing Volumio folder Hash Checksum" HASH=`/usr/bin/md5deep -r -l -s -q /mnt/volumio/rootfs/volumio | sort | md5sum | tr -d "-" | tr -d " \t\n\r"` echo "VOLUMIO_HASH=\"${HASH}\"" >> /mnt/volumio/rootfs/etc/os-release echo "Cleanup to save space" + +echo "Cleaning docs" find /mnt/volumio/rootfs/usr/share/doc -depth -type f ! -name copyright|xargs rm || true find /mnt/volumio/rootfs/usr/share/doc -empty|xargs rmdir || true + +echo "Cleaning man and caches" rm -rf /mnt/volumio/rootfs/usr/share/man/* /mnt/volumio/rootfs/usr/share/groff/* /mnt/volumio/rootfs/usr/share/info/* rm -rf /mnt/volumio/rootfs/usr/share/lintian/* /mnt/volumio/rootfs/usr/share/linda/* /mnt/volumio/rootfs/var/cache/man/* + +echo "Stripping binaries" +DIRECTORIES=($BASEDIR/lib/ $BASEDIR/bin/ $BASEDIR/usr/sbin $BASEDIR/usr/local/bin/) +for DIR in "${DIRECTORIES[@]}"; do + echo "$DIR Pre strip size " $(du -sh0 "$DIR" | awk '{print $1}') + find "$DIR" -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' + echo "$DIR Post strip size " $(du -sh0 "$DIR" | awk '{print $1}') +done From 430ac0549f568e48dd4065960de1923569cfe0b4 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 22 Jul 2018 23:30:33 +0200 Subject: [PATCH 454/673] Fix finalize to handle sh shell --- scripts/finalize.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/finalize.sh b/scripts/finalize.sh index a19ae84d2..2ee067325 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -16,9 +16,17 @@ rm -rf /mnt/volumio/rootfs/usr/share/man/* /mnt/volumio/rootfs/usr/share/groff/* rm -rf /mnt/volumio/rootfs/usr/share/lintian/* /mnt/volumio/rootfs/usr/share/linda/* /mnt/volumio/rootfs/var/cache/man/* echo "Stripping binaries" -DIRECTORIES=($BASEDIR/lib/ $BASEDIR/bin/ $BASEDIR/usr/sbin $BASEDIR/usr/local/bin/) -for DIR in "${DIRECTORIES[@]}"; do - echo "$DIR Pre strip size " $(du -sh0 "$DIR" | awk '{print $1}') - find "$DIR" -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' - echo "$DIR Post strip size " $(du -sh0 "$DIR" | awk '{print $1}') -done + +## GOOD WAY TO DO IT, BUT NOT AVAILABLE IN SH SHELL +#DIRECTORIES=($BASEDIR/lib/ $BASEDIR/bin/ $BASEDIR/usr/sbin $BASEDIR/usr/local/bin/) +#for DIR in "${DIRECTORIES[@]}"; do +# echo "$DIR Pre strip size " $(du -sh0 "$DIR" | awk '{print $1}') +# find "$DIR" -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' +# echo "$DIR Post strip size " $(du -sh0 "$DIR" | awk '{print $1}') +#done + + +find $BASEDIR/lib/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' +find $BASEDIR/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' +find $BASEDIR/usr/sbin -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' +find $BASEDIR/usr/local/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' From a65c3ed3e98724ce37fb66699b00046355991669 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 22 Jul 2018 23:35:15 +0200 Subject: [PATCH 455/673] remove telnet --- recipes/arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index c64f4f3dd..9a8be8dd8 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -18,7 +18,7 @@ keyring=debian-archive-keyring suite=jessie [Net] -packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd +packages=netbase ifupdown iproute net-tools iptables dhcpcd5 openssh-server wireless-tools iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie From b8bf6339d9ac26b8049f2bc84133389af7a6981a Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 23 Jul 2018 09:08:20 +0200 Subject: [PATCH 456/673] add volumio keys --- scripts/raspberryconfig.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 417786979..56ddf118d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -41,8 +41,16 @@ echo "deb http://archive.volumio.org/debian/ jessie main ui deb-src http://archive.volumio.org/debian/ jessie main ui " >> /etc/apt/sources.list.d/raspi.list -echo "Adding Raspberrypi.org Repo Key" -wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key -O - | sudo apt-key add - + +echo "Adding archive.volumio.org PGP Keys" +curl -s http://archive.volumio.org/debian/raspberrypi.gpg.key | sudo apt-key add - +curl -s http://archive.volumio.org/raspbian/raspbian.public.key | sudo apt-key add - + +#echo "Adding Raspberrypi.org Repo Key" +#wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key -O - | sudo apt-key add - +#echo "TEMP FIX FOR APT MIRROR" +#echo "APT::Get::AllowUnauthenticated "true";" > /etc/apt/apt.conf.d/98tempfix + echo "Installing R-pi specific binaries" apt-get update From 991b5f5cab4634d1b209da93a5e7dd558392b40c Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 23 Jul 2018 18:08:43 +0200 Subject: [PATCH 457/673] tinkerhdmi --- scripts/tinkerconfig.sh | 6 ++++++ scripts/tinkerimage.sh | 1 + 2 files changed, 7 insertions(+) diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 515af7fcb..271e5486b 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -58,6 +58,12 @@ echo "Copying volumio initramfs updater" cd /root/ mv volumio-init-updater /usr/local/sbin + +echo "Installing Kiosk" +sh /install-kiosk.sh + +echo "Kiosk installed" +rm /install-kiosk.sh #On The Fly Patch if [ "$PATCH" = "volumio" ]; then echo "No Patch To Apply" diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 59e04f4e3..78ad200bf 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -109,6 +109,7 @@ sync echo "Preparing to run chroot for more Tinkerboard configuration" cp scripts/tinkerconfig.sh /mnt/volumio/rootfs +cp scripts/install-kiosk.sh /mnt/volumio/rootfs cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb From 4f41b1814cbb9aa4cee65cef4d3620931c4c5b5e Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 23 Jul 2018 19:56:35 +0200 Subject: [PATCH 458/673] kernel bump to 4.14.56 --- scripts/raspberryconfig.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 56ddf118d..299c1d98a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.42" +KERNEL_VERSION="4.14.56" case $KERNEL_VERSION in "4.4.9") @@ -87,6 +87,12 @@ case $KERNEL_VERSION in KERNEL_COMMIT="d68045945570b418ac48830374366613de3278f3" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.14.56") + KERNEL_REV="1128" + KERNEL_COMMIT="d985893ae67195d0cce632efe4437e5fcde4b64b" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; + esac # using rpi-update relevant to defined kernel version From 32b8fd4cb294b03c9faed3d471befdf65d6c0c15 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 23 Jul 2018 19:58:44 +0200 Subject: [PATCH 459/673] Install kiosk --- scripts/install-kiosk.sh | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 scripts/install-kiosk.sh diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh new file mode 100755 index 000000000..a9de36d59 --- /dev/null +++ b/scripts/install-kiosk.sh @@ -0,0 +1,83 @@ +#!/bin/sh +export DEBIAN_FRONTEND=noninteractive + +echo "Fixing keyboard input issue" +apt-get update +apt-get install -y keyboard-configuration --no-install-recommends + +echo "Installing Display Plugin dependencies" + +echo "Installing Graphical environment" +sudo apt-get install -y xinit xorg openbox libexif12 unclutter --no-install-recommends + +echo "Temporarily adding Backports sources" +echo "deb http://ftp.de.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list + +echo "Installing Midori" +apt-get update +apt-get install -y midori --no-install-recommends + +echo "Removing temporary Backgports sources" +rm /etc/apt/sources.list.d/jessie-backports.list + +echo "Cleaning" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Dependencies installed" + +echo "Creating Kiosk start script" +echo "#!/bin/bash +mkdir -p /data/volumiokiosk +export DISPLAY=:0 +xset s off -dpms +export XDG_CACHE_HOME=/data/volumiokiosk +rm -rf /data/volumiokiosk/Singleton* +openbox-session & +sleep 4 +while true; do + midori -a http://localhost:3000 -e Fullscreen +done" > /opt/volumiokiosk.sh +/bin/chmod +x /opt/volumiokiosk.sh + +echo "Creating Systemd Unit for Kiosk" +echo "[Unit] +Description=Start Volumio Kiosk +Wants=volumio.service +After=volumio.service +[Service] +Type=simple +User=root +Group=root +ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 +[Install] +WantedBy=multi-user.target +" > /lib/systemd/system/volumio-kiosk.service +/bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service + +echo " Allowing volumio to start an xsession" +/bin/sed -i "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config + +echo "Hide Mouse cursor" + +echo "#!/bin/sh +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi +xrdb -merge ~/.Xresources +xsetroot -cursor_name left_ptr & +exec openbox-session +exec unclutter &" > /root/.xinitrc + +echo "Enabling UI for HDMI output selection" +echo '[{"value": false,"id":"section_hdmi_settings","attribute_name": "hidden"}]' > /volumio/app/plugins/system_controller/system/override.json + +echo "Setting HDMI UI enabled by default" +/usr/bin/jq '.hdmi_enabled.value = true' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json +/usr/bin/jq '.hdmi_enabled.type = "boolean"' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json +systemctl enable volumio-kiosk.service From 3686e5c749983c2b52f621497566574399fc1a6c Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 26 Jul 2018 18:26:06 +0200 Subject: [PATCH 460/673] enable kiosk by default --- scripts/install-kiosk.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh index a9de36d59..9cd72ef00 100755 --- a/scripts/install-kiosk.sh +++ b/scripts/install-kiosk.sh @@ -55,6 +55,8 @@ TimeoutSec=300 [Install] WantedBy=multi-user.target " > /lib/systemd/system/volumio-kiosk.service + +echo "Enabling kiosk" /bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service echo " Allowing volumio to start an xsession" @@ -80,4 +82,5 @@ echo '[{"value": false,"id":"section_hdmi_settings","attribute_name": "hidden"}] echo "Setting HDMI UI enabled by default" /usr/bin/jq '.hdmi_enabled.value = true' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json /usr/bin/jq '.hdmi_enabled.type = "boolean"' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json -systemctl enable volumio-kiosk.service + + From 7124eaf0213deb060cebb17ef631669189a6650e Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 23 Aug 2018 00:21:14 +0200 Subject: [PATCH 461/673] Pi Kernel bump to 4.14.62 --- scripts/raspberryconfig.sh | 7 ++++++- scripts/tinkerconfig.sh | 7 ++++--- scripts/tinkerimage.sh | 19 +++++++++++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 299c1d98a..b29cf31f3 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.56" +KERNEL_VERSION="4.14.62" case $KERNEL_VERSION in "4.4.9") @@ -92,6 +92,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="d985893ae67195d0cce632efe4437e5fcde4b64b" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.14.62") + KERNEL_REV="1134" + KERNEL_COMMIT="911147a3276beee09afc4237e1b7b964e61fb88a" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 271e5486b..f3f844d06 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -45,9 +45,10 @@ apt-get update #apt-get -y install u-boot-tools liblircclient0 lirc apt-get -y install u-boot-tools -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean + +echo "Configuring boot splash" +apt-get -y install plymouth plymouth-themes +plymouth-set-default-theme volumio echo "Adding custom modules overlay, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index 78ad200bf..e2be8636f 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -121,8 +121,16 @@ mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - echo "Starting config.js" - node config.js $PATCH + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi fi echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) @@ -139,6 +147,13 @@ EOF #cleanup rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/tinkerconfig.sh +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc From 7fcdfa7738a2a185179a3516bbe69e7c4d042d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 23 Aug 2018 15:01:51 +0200 Subject: [PATCH 462/673] Add i2c-tools to help detect i2c devices --- recipes/arm-dev.conf | 2 +- recipes/arm.conf | 2 +- recipes/armv7-dev.conf | 2 +- recipes/armv7.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/arm-dev.conf b/recipes/arm-dev.conf index 706e1cf6b..633927f49 100644 --- a/recipes/arm-dev.conf +++ b/recipes/arm-dev.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget haveged minizip +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget haveged minizip i2c-tools source=http://mirrordirector.raspbian.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/arm.conf b/recipes/arm.conf index 9a8be8dd8..5e84ba4a2 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -24,7 +24,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip bc md5deep +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq plymouth minizip bc md5deep i2c-tools source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7-dev.conf b/recipes/armv7-dev.conf index 7259f952a..3815bced6 100644 --- a/recipes/armv7-dev.conf +++ b/recipes/armv7-dev.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged minizip +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged minizip i2c-tools source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 94b6b2449..1f6e05386 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip bc md5deep +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip bc md5deep i2c-tools source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie From 8c843183682f18d815a718166c5602f06ce693fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 23 Aug 2018 21:42:05 +0200 Subject: [PATCH 463/673] Tinkerboard: add DAC detection --- scripts/initramfs/init.nextarm | 21 ++++++++++++++------- scripts/tinkerconfig.sh | 23 ++++++++++++++++++++++- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index fa0a3aaf3..de45afc9c 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -353,12 +353,22 @@ fi if [ -e "/boot/kernel_update" ]; then print_msg "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot + BACKUP="" if [ -e "/mnt/imgpart/config.txt.bak" ]; then +### DT overlay and config backup from RPi + BACKUP="/mnt/imgpart/config.txt.bak" + CONFIGORG="/boot/config.txt" + elif [ -e "/mnt/imgpart/hw_intf.conf.bak" ]; then +### DT overlay backup from Tinkerboard + BACKUP="/mnt/imgpart/hw_intf.conf.bak" + CONFIGORG="/boot/hw_intf.conf" + fi + if [ ! -z $BACKUP ]; then print_msg "Restoring custom config.txt content" - I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' /mnt/imgpart/config.txt.bak` - echo "" >> /boot/config.txt - echo "$I2S" >> /boot/config.txt - rm /mnt/imgpart/config.txt.bak + I2S=`sed -n -e '/#### Volumio i2s setting below: do not alter ####/,$p' ${BACKUP}` + echo "" >> $CONFIGORG + echo "$I2S" >> $CONFIGORG + cp ${BACKUP} ${BACKUP}.saved fi # When a new volumio version is loaded, partition UUIDs will have changed. @@ -462,9 +472,6 @@ else fi fi -#######TODO: replace or delete the following when the restart issue for Tinkerboard has been solved -echo 0 > /proc/sys/kernel/panic - umount /proc umount /sys diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index f3f844d06..795ccb831 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -36,8 +36,30 @@ echo 2 > /proc/irq/45/smp_affinity " > /usr/local/bin/tinker-init.sh chmod +x /usr/local/bin/tinker-init.sh +echo "primodac=\`sudo /usr/sbin/i2cdetect -y 1 0x48 0x48 | grep -E 'UU|48' | awk '{print \$2}'\` +if [ ! -z \"\$primodac\" ]; then + configured=\`cat /boot/hw_intf.conf | grep es90x8q2m-dac | awk -F '=' '{print \$2}'\` + if [ -z \"\$configured\" ]; then + echo \"For information only, you may safely delete this file\" > /boot/dacdetect.log + echo \"\`date\`: Volumio Primo DAC detected on i2c address 0x48...\" >> /boot/dacdetect.log + volumioconfigured=\`cat /boot/hw_intf.conf | grep \"#### Volumio i2s \" \` + if [ ! -z \"\$volumioconfigured\" ]; then + echo \"\`date\`: Another DAC configured, wiping it out...\" >> /boot/dacdetect.log + mv /boot/hw_intf.conf /boot/hw_intf.tmp + sed '/#### Volumio i2s setting below/Q' /boot/hw_intf.tmp >/boot/hw_intf.conf + rm /boot/hw_intf.tmp + fi + echo \"\`date\`: Automatically configuring ES90x8Q2M and reboot...\" >> /boot/dacdetect.log + echo \"#### Volumio i2s setting below: do not alter ####\" >> /boot/hw_intf.conf + echo \"intf:dtoverlay=es90x8q2m-dac\" >> /boot/hw_intf.conf + /sbin/reboot + fi +fi" > /usr/local/bin/detect-primo.sh +chmod +x /usr/local/bin/detect-primo.sh + echo "#!/bin/sh -e /usr/local/bin/tinker-init.sh +/usr/local/bin/detect-primo.sh exit 0" > /etc/rc.local echo "Installing additonal packages" @@ -45,7 +67,6 @@ apt-get update #apt-get -y install u-boot-tools liblircclient0 lirc apt-get -y install u-boot-tools - echo "Configuring boot splash" apt-get -y install plymouth plymouth-themes plymouth-set-default-theme volumio From 21e13adf01084a7ed4f6dde67ca87e397ad4b773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 4 Sep 2018 15:48:46 +0200 Subject: [PATCH 464/673] Armbian builds: suspend support (not deleting yet) --- scripts/armbianimage.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/armbianimage.sh b/scripts/armbianimage.sh index f90e3aa1d..265f0e6b5 100755 --- a/scripts/armbianimage.sh +++ b/scripts/armbianimage.sh @@ -26,6 +26,9 @@ BRANCH=$3 set +f IFS="$old" +echo "We're sorry, due to various failure reports and currently missing community support, Armbian builds had to be suspended" +exit 1 + echo BOARD:$BOARD BRANCH:$BRANCH BUILDDATE=$(date -I) From b49c62bade701b53b8b22dd2cd16cad124f09a6c Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 14 Sep 2018 21:22:15 +0200 Subject: [PATCH 465/673] Networking for jessie and stretch --- volumio/bin/wireless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index b37d1d2fd..4c209ae69 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -18,6 +18,7 @@ var ifconfigHotspot = "ifconfig " + wlan + " 192.168.211.1 up"; var ifconfigWlan = "ifconfig " + wlan + " up"; var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan + " down"; var execSync = require('child_process').execSync; +var ifconfig = require('/volumio/app/plugins/system_controller/network/lib/ifconfig.js'); var conf = {}; if (debug) { var wpasupp = "wpa_supplicant -d -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; @@ -178,7 +179,6 @@ function startFlow() { } else { var SSID = undefined; - var ifconfig = require('wireless-tools/ifconfig'); console.log("trying..."); try { var SSID = execSync("/usr/bin/sudo /sbin/iwgetid -r", { uid: 1000, gid: 1000, encoding: 'utf8'}); From 0f2518b49883db69baeb882e8cb2deddfb882fba Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 16 Sep 2018 03:07:49 +0200 Subject: [PATCH 466/673] rm as nopasswd --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index efd4760c1..6dd38c668 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -111,7 +111,7 @@ echo 'Adding Safe Sudoers NoPassw permissions' cat > ${SUDOERS_FILE} << EOF # Add permissions for volumio user volumio ALL=(ALL) ALL -volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd,/opt/vc/bin/tvservice,/usr/bin/renice +volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd,/opt/vc/bin/tvservice,/usr/bin/renice,/bin/rm volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh, /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/pull.sh EOF chmod 0440 ${SUDOERS_FILE} From 8e816c8490ec25e530839a078600d541aed15f8a Mon Sep 17 00:00:00 2001 From: macmpi Date: Sun, 16 Sep 2018 11:52:50 +0200 Subject: [PATCH 467/673] Latest brcm80211_20161130 firmware as per https://github.com/RPi-Distro/firmware-nonfree/commit/b518de45ced519e8f7a499f4778100173402ae43 : Improved brcmfmac BT coexistence parameters You'll need to mirror the file from: https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20161130-3+rpt4_all.deb --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b29cf31f3..8ceb30931 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -125,9 +125,9 @@ echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 # Temporary brcm firmware fix solution until we use Stretch -wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20161130-3%2Brpt3_all.deb -dpkg -i firmware-brcm80211_20161130-3+rpt3_all.deb -rm firmware-brcm80211_20161130-3+rpt3_all.deb +wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20161130-3+rpt4_all.deb +dpkg -i firmware-brcm80211_20161130-3+rpt4_all.deb +rm firmware-brcm80211_20161130-3+rpt4_all.deb if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" From c00a19098320053824010d132d6bfb39774a7d2f Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 17 Sep 2018 00:08:15 +0200 Subject: [PATCH 468/673] pi kernel bump to 4.14.69 --- scripts/raspberryconfig.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b29cf31f3..c29553f8a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.62" +KERNEL_VERSION="4.14.69" case $KERNEL_VERSION in "4.4.9") @@ -97,7 +97,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="911147a3276beee09afc4237e1b7b964e61fb88a" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - + "4.14.69") + KERNEL_REV="1141" + KERNEL_COMMIT="c8da643e606a55971d22482ce829a6c109a6a7ad" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From 4f6b48fa47e7188ce6abea1d5241d2bb41fc90ff Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 18 Sep 2018 13:16:13 +0200 Subject: [PATCH 469/673] revert to .62 kernel for pi --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index c29553f8a..8016eabdc 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.69" +KERNEL_VERSION="4.14.62" case $KERNEL_VERSION in "4.4.9") From bb50b126b7ce9c472a6d2bc5081c70d6a0cc24de Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 19 Sep 2018 00:30:52 +0200 Subject: [PATCH 470/673] pi kernel bump to 4.14.70 --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 9e42160ad..7ae19a458 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.62" +KERNEL_VERSION="4.14.70" case $KERNEL_VERSION in "4.4.9") @@ -97,9 +97,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="911147a3276beee09afc4237e1b7b964e61fb88a" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - "4.14.69") - KERNEL_REV="1141" - KERNEL_COMMIT="c8da643e606a55971d22482ce829a6c109a6a7ad" + "4.14.70") + KERNEL_REV="1144" + KERNEL_COMMIT="2ab4575a54317a26238aa0e6c809282d1c7a0889" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 19491f50eded236de6874d31640dedebc248dfa0 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 24 Sep 2018 16:48:13 +0200 Subject: [PATCH 471/673] pi kernel bump to 4.14.71 --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7ae19a458..84cff90b8 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.70" +KERNEL_VERSION="4.14.71" case $KERNEL_VERSION in "4.4.9") @@ -97,9 +97,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="911147a3276beee09afc4237e1b7b964e61fb88a" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - "4.14.70") - KERNEL_REV="1144" - KERNEL_COMMIT="2ab4575a54317a26238aa0e6c809282d1c7a0889" + "4.14.71") + KERNEL_REV="1145" + KERNEL_COMMIT="c919d632ddc2a88bcb87b7d0cddd61446d1a36bf" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From f59854855d5690b72383d63797ce31118a7a30fe Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 3 Oct 2018 22:17:06 +0200 Subject: [PATCH 472/673] adding autossh and xbindkeys --- recipes/arm.conf | 8 +++++++- recipes/armv7.conf | 8 +++++++- recipes/x86.conf | 8 +++++++- scripts/nanopineo2config.sh | 4 ++++ scripts/nanopineo2image.sh | 21 +++++++++++++++++++++ 5 files changed, 46 insertions(+), 3 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 5e84ba4a2..554f6f37c 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -1,7 +1,7 @@ [General] noauth=true unpack=true -debootstrap=Base Net Utils Assets FS Firmware +debootstrap=Base Net Utils Assets FS Firmware Accessories aptsources=Debian cleanup=true arch=armhf @@ -53,3 +53,9 @@ source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring components=main non-free suite=jessie + +[Accessories] +packages=autossh xbindkeys +source=http://archive.volumio.org/raspbian +keyring=debian-archive-keyring +suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 1f6e05386..925537a1a 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -1,7 +1,7 @@ [General] noauth=true unpack=true -debootstrap=Base BaseDebPlus Net Utils Assets FS Firmware +debootstrap=Base BaseDebPlus Net Utils Assets FS Firmware Accessories aptsources=Debian cleanup=true arch=armhf @@ -53,3 +53,9 @@ source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring components=main non-free suite=jessie + +[Accessories] +packages=autossh xbindkeys +source=http://ftp.nl.debian.org/debian +keyring=debian-archive-keyring +suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index d2b7fc64e..183bf5560 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -1,7 +1,7 @@ [General] noauth=true unpack=true -debootstrap=Base Net Utils Assets FS Tools Firmware +debootstrap=Base Net Utils Assets FS Tools Firmware Accessories aptsources=Debian cleanup=true arch=i386 @@ -72,3 +72,9 @@ source=http://httpredir.debian.org/debian keyring=debian-archive-keyring components=main non-free suite=jessie + +[Tools] +packages=autossh xbindkeys +source=http://httpredir.debian.org/debian +keyring=debian-archive-keyring +suite=jessie diff --git a/scripts/nanopineo2config.sh b/scripts/nanopineo2config.sh index d89573748..99747c647 100755 --- a/scripts/nanopineo2config.sh +++ b/scripts/nanopineo2config.sh @@ -71,11 +71,15 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi rm /patch + #echo "Changing to 'modules=dep'" #echo "(otherwise NanoPi-NEO2 won't boot due to uInitrd 4MB limit)" #sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index db424c625..6fe7c99f0 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -138,11 +138,32 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /nanopineo2config.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + + #cleanup rm /mnt/volumio/rootfs/nanopineo2config.sh /mnt/volumio/rootfs/root/init From dfad40b73df8dc4a14fc02c2db06d87606368014 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 3 Oct 2018 22:18:09 +0200 Subject: [PATCH 473/673] remove obsolete upmpdcli streaming services modules --- scripts/volumioconfig.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 6dd38c668..eadb30159 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -400,17 +400,6 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] fi -echo "Installing Upmpdcli Streaming Modules" -wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-gmusic_1.2.12-1_all.deb -wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-qobuz_1.2.12-1_all.deb -wget http://repo.volumio.org/Packages/Upmpdcli/upmpdcli-tidal_1.2.12-1_all.deb -dpkg -i upmpdcli-gmusic_1.2.12-1_all.deb -dpkg -i upmpdcli-qobuz_1.2.12-1_all.deb -dpkg -i upmpdcli-tidal_1.2.12-1_all.deb -rm /upmpdcli-gmusic_1.2.12-1_all.deb -rm /upmpdcli-qobuz_1.2.12-1_all.deb -rm /upmpdcli-tidal_1.2.12-1_all.deb - echo "Creating Volumio Folder Structure" # Media Mount Folders mkdir /mnt/NAS From 0176333b7b9850e7cc754d5a826c5e83ee9b7182 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 3 Oct 2018 22:24:56 +0200 Subject: [PATCH 474/673] Xbindkeys configuration --- scripts/volumioconfig.sh | 21 +++++++++++++++++++ .../lib/systemd/system/xbindkeysrc.service | 14 +++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 volumio/lib/systemd/system/xbindkeysrc.service diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index eadb30159..6f4a580df 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -558,3 +558,24 @@ rm /etc/avahi/services/udisks.service echo "Setting CPU governor to performance" echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils +##################### +#Multimedia Keys#----------------------------------------- +##################### + +echo "Configuring xbindkeys" + +echo '"/usr/local/bin/volumio toggle" + XF86AudioPlay +"/usr/local/bin/volumio previous" + XF86AudioPrev +"/usr/local/bin/volumio next" + XF86AudioNext +"/usr/local/bin/volumio volume toggle" + XF86AudioMute +"/usr/local/bin/volumio volume minus" + XF86AudioLowerVolume +"/usr/local/bin/volumio volume plus" + XF86AudioRaiseVolume' > /etc/xbindkeysrc + +echo "Enabling xbindkeys" +ln -s /lib/systemd/system/xbindkeysrc.service /etc/systemd/system/multi-user.target.wants/xbindkeysrc.service diff --git a/volumio/lib/systemd/system/xbindkeysrc.service b/volumio/lib/systemd/system/xbindkeysrc.service new file mode 100644 index 000000000..78a0b95bc --- /dev/null +++ b/volumio/lib/systemd/system/xbindkeysrc.service @@ -0,0 +1,14 @@ +[Unit] +Description = Xbindrc + +[Service] +ExecStart=/usr/bin/xbindkeys -X :0 -f /etc/xbindkeysrc +Restart=always +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=xbindrc +User=root +Group=root + +[Install] +WantedBy=multi-user.target From e43ad3ed0757700b26dc6767452ebc681c4e6741 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 5 Oct 2018 02:01:26 +0200 Subject: [PATCH 475/673] fix x86 recipe --- recipes/x86.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/x86.conf b/recipes/x86.conf index 183bf5560..76a068f23 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -73,7 +73,7 @@ keyring=debian-archive-keyring components=main non-free suite=jessie -[Tools] +[Accessories] packages=autossh xbindkeys source=http://httpredir.debian.org/debian keyring=debian-archive-keyring From 42bf6bb5a911606623fc0571e65c798e53679156 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 6 Oct 2018 17:37:13 +0200 Subject: [PATCH 476/673] Fix cgmanager in x86 --- scripts/volumioconfig.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 6f4a580df..216e901ac 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -26,6 +26,15 @@ path-exclude /usr/share/linda/*" > /etc/dpkg/dpkg.cfg.d/01_nodoc export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true export LC_ALL=C LANGUAGE=C LANG=C /var/lib/dpkg/info/dash.preinst install + +if [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then + echo "Fix for cgmanager not starting on x86" + sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager + dpkg --configure --force-all cgmanager + sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager +fi + +echo "Configuring packages" dpkg --configure -a # Reduce locales to just one beyond C.UTF-8 From 984104359bbd2a20ffa6a4a27fde61d4d868f2b8 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sun, 7 Oct 2018 20:17:53 +0200 Subject: [PATCH 477/673] X86variant (#357) * x86variant * install.sh --- scripts/finalize.sh | 7 +++++++ scripts/volumioconfig.sh | 12 ++++++------ scripts/x86config.sh | 5 ++++- scripts/x86image.sh | 22 +++++++++++++++++++++- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/scripts/finalize.sh b/scripts/finalize.sh index 2ee067325..71df43db6 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -1,5 +1,6 @@ #!/bin/bash +HARDWARE=`/bin/cat /mnt/volumio/rootfs/etc/os-release | grep "VOLUMIO_HARDWARE" | cut -d \\" -f2 | tr -d "\n"` BASEDIR=/mnt/volumio/rootfs echo "Computing Volumio folder Hash Checksum" HASH=`/usr/bin/md5deep -r -l -s -q /mnt/volumio/rootfs/volumio | sort | md5sum | tr -d "-" | tr -d " \t\n\r"` @@ -11,6 +12,8 @@ echo "Cleaning docs" find /mnt/volumio/rootfs/usr/share/doc -depth -type f ! -name copyright|xargs rm || true find /mnt/volumio/rootfs/usr/share/doc -empty|xargs rmdir || true +if [ $HARDWARE != "x86" ]; then + echo "Cleaning man and caches" rm -rf /mnt/volumio/rootfs/usr/share/man/* /mnt/volumio/rootfs/usr/share/groff/* /mnt/volumio/rootfs/usr/share/info/* rm -rf /mnt/volumio/rootfs/usr/share/lintian/* /mnt/volumio/rootfs/usr/share/linda/* /mnt/volumio/rootfs/var/cache/man/* @@ -30,3 +33,7 @@ find $BASEDIR/lib/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/usr/sbin -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/usr/local/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' + +else + echo "X86 Environmant detected, not cleaning" +fi diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 216e901ac..362404348 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -27,12 +27,12 @@ export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true export LC_ALL=C LANGUAGE=C LANG=C /var/lib/dpkg/info/dash.preinst install -if [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then - echo "Fix for cgmanager not starting on x86" - sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager - dpkg --configure --force-all cgmanager - sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager -fi +#if [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then +# echo "Fix for cgmanager not starting on x86" +# sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager +# dpkg --configure --force-all cgmanager +# sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager +#fi echo "Configuring packages" dpkg --configure -a diff --git a/scripts/x86config.sh b/scripts/x86config.sh index 703c45bc7..7f4c28224 100755 --- a/scripts/x86config.sh +++ b/scripts/x86config.sh @@ -251,14 +251,17 @@ PATCHPATH=/${PATCH} cd $PATCHPATH #Check the existence of patch script if [ -f "patch.sh" ]; then -chmod a+x patch.sh sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi rm /patch + echo "Bootloader configuration and initrd.img complete" diff --git a/scripts/x86image.sh b/scripts/x86image.sh index e3e4a718f..624cac365 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -126,12 +126,32 @@ BOOT_PART=${BOOT_PART} " >> /mnt/volumio/rootfs/init.sh chmod +x /mnt/volumio/rootfs/init.sh - echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' /x86config.sh -p EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + rm /mnt/volumio/rootfs/linux-image-*.deb rm /mnt/volumio/rootfs/init.sh /mnt/volumio/rootfs/linux-firmware-*.deb rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86config.sh From 00557ccedc87b3bef5afbbf9cabc1b2c7aa1b0a3 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 7 Oct 2018 22:47:22 +0200 Subject: [PATCH 478/673] Finalizing propery for x86 --- scripts/finalize.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/finalize.sh b/scripts/finalize.sh index 71df43db6..c03196e0e 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -36,4 +36,9 @@ find $BASEDIR/usr/local/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 { else echo "X86 Environmant detected, not cleaning" + find $BASEDIR/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' +find $BASEDIR/usr/sbin -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' +find $BASEDIR/usr/local/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' + + fi From 799336af25678656067f01b19a4048fba5591473 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 8 Oct 2018 00:49:41 +0200 Subject: [PATCH 479/673] match cd --- volumio/etc/udisks-glue.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/volumio/etc/udisks-glue.conf b/volumio/etc/udisks-glue.conf index be09361d7..7c2635115 100644 --- a/volumio/etc/udisks-glue.conf +++ b/volumio/etc/udisks-glue.conf @@ -22,6 +22,11 @@ filter other-partitions { usage = filesystem } +filter audio-disk { + optical = true + optical_disc_has_audio_tracks = true +} + match volumio-data { automount = false } @@ -49,3 +54,8 @@ match other-partitions { post_unmount_command = "/usr/bin/mpc update USB" post_removal_command = "/usr/bin/mpc update USB" } + +match audio-disk { + post_insertion_command = "/bin/echo 1 > /tmp/cd && /usr/bin/curl http://localhost:3000/api/v1/pluginEndpoint?endpoint=detectCD" + post_removal_command = "/bin/echo 0 > /tmp/cd && /usr/bin/curl http://localhost:3000/api/v1/pluginEndpoint?endpoint=cdRemove" +} From e3664efeb960474b3e3a003c23a916b248395e9b Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 23 Oct 2018 13:05:00 +0200 Subject: [PATCH 480/673] Default gpu mem to 32 --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 84cff90b8..cd3ec7227 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -157,7 +157,7 @@ apt-get -y remove binutils echo "Writing config.txt file" echo "initramfs volumio.initrd -gpu_mem=16 +gpu_mem=32 max_usb_current=1 dtparam=audio=on audio_pwm_mode=2 From c52efa8090336a1aa08c5caa4d93eb926a1a7bed Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 30 Oct 2018 23:02:58 +0100 Subject: [PATCH 481/673] Sparky myvolumio --- scripts/sparkyconfig.sh | 3 +++ scripts/sparkyimage.sh | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/scripts/sparkyconfig.sh b/scripts/sparkyconfig.sh index 3eab76087..1bbc03671 100755 --- a/scripts/sparkyconfig.sh +++ b/scripts/sparkyconfig.sh @@ -53,6 +53,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index cfb75e87a..21f90bca4 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -129,12 +129,36 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + + echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /sparkyconfig.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/sparkyconfig.sh /mnt/volumio/rootfs/root/init From c8e5a55b66479d5d643de1cea35a5bb5f94fc79c Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 15 Nov 2018 13:11:16 +0100 Subject: [PATCH 482/673] myvolumio on odroids --- scripts/odroidc1config.sh | 3 +++ scripts/odroidc1image.sh | 21 +++++++++++++++++++++ scripts/odroidc2config.sh | 3 +++ scripts/odroidc2image.sh | 21 +++++++++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/scripts/odroidc1config.sh b/scripts/odroidc1config.sh index 4e2bdb969..71c9237be 100755 --- a/scripts/odroidc1config.sh +++ b/scripts/odroidc1config.sh @@ -52,6 +52,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index 15096818d..610dd909d 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -141,13 +141,34 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /odroidc1config.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/odroidc1config.sh /mnt/volumio/rootfs/root/init diff --git a/scripts/odroidc2config.sh b/scripts/odroidc2config.sh index e5eddb587..4b62f240a 100755 --- a/scripts/odroidc2config.sh +++ b/scripts/odroidc2config.sh @@ -57,6 +57,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index c6af95177..44304a98d 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -137,13 +137,34 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /odroidc2config.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/odroidc2config.sh /mnt/volumio/rootfs/root/init From 753f8718df0bc04f0aedc2807a4445f4d104a0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 29 Nov 2018 18:26:00 +0100 Subject: [PATCH 483/673] rock64: added support for dtoverlay --- scripts/rock64config.sh | 21 +++++---------------- scripts/rock64image.sh | 33 +++++++++++++++++++++------------ 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/scripts/rock64config.sh b/scripts/rock64config.sh index 13202a02f..1f7ee255b 100755 --- a/scripts/rock64config.sh +++ b/scripts/rock64config.sh @@ -29,31 +29,17 @@ echo "label kernel-4.4 echo "#!/bin/sh sysctl abi.cp15_barrier=2 " > /usr/local/bin/rock64-init.sh -#TODO,. add the following to the init script after verification -#for i in 1 2 3 ; do -# echo 4 >/proc/irq/$(awk -F":" "/xhci/ {print \$1}" /proc/irq/$(awk -F":" "/eth0/ {print \$1}" /sys/class/net/eth0/queues/rx-0/rps_cpus -#echo 32768 >/proc/sys/net/core/rps_sock_flow_entries -#echo 32768 >/sys/class/net/eth0/queues/rx-0/rps_flow_cnt -#exit 0 -# -# chmod +x /usr/local/bin/rock64-init.sh +chmod +x /usr/local/sbin/enable_dtoverlay echo "#!/bin/sh -e /usr/local/bin/rock64-init.sh exit 0" > /etc/rc.local -echo "Adding default sound modules" -#echo " -#" >> /etc/modules - echo "Installing additonal packages" apt-get update -apt-get -y install u-boot-tools liblircclient0 lirc +apt-get -y install device-tree-compiler u-boot-tools liblircclient0 lirc echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* @@ -81,6 +67,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index ede712895..84a323f41 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -112,18 +112,15 @@ mkdir /mnt/volumio/rootfs/boot/dtb mkdir /mnt/volumio/rootfs/boot/extlinux sudo cp platform-rock64/rock64/boot/Image /mnt/volumio/rootfs/boot sudo cp platform-rock64/rock64/boot/dtb/*.dtb /mnt/volumio/rootfs/boot/ -#####################sudo cp platform-rock64/rock64/boot/extlinux/* /mnt/volumio/rootfs/boot/extlinux sudo cp platform-rock64/rock64/boot/config* /mnt/volumio/rootfs/boot echo "Copying rock64 modules and firmware" sudo cp -pdR platform-rock64/rock64/lib/modules /mnt/volumio/rootfs/lib/ sudo cp -pdR platform-rock64/rock64/lib/firmware /mnt/volumio/rootfs/lib/ -#TODO: remove this block -echo "Adding missing alsa dependencies" +echo "Adding missing alsa dependencies and dt-overlay tool" sudo cp -pdR platform-rock64/rock64/usr /mnt/volumio/rootfs/ -#TODO: remove this block echo "Adding temporary fixes to Rock64 board" sudo cp -pdR platform-rock64/rock64/etc /mnt/volumio/rootfs/ sync @@ -146,11 +143,31 @@ UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) " > /mnt/volumio/rootfs/root/init.sh chmod +x /mnt/volumio/rootfs/root/init.sh +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /rock64config.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/rock64config.sh /mnt/volumio/rootfs/root/init @@ -159,16 +176,8 @@ umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys -#echo "Copying LIRC configuration files" -#sudo cp platform-rock64/rock64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc -#sudo cp platform-rock64/rock64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc -#sudo cp platform-rock64/rock64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc - echo "==> rock64 device installed" -#echo "Removing temporary platform files" -#echo "(you can keep it safely as long as you're sure of no changes)" -#sudo rm -r platform-rock64 sync echo "Finalizing Rootfs creation" From 517644ba70b07904a7cfd78158fa2a8b12e9b934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 4 Dec 2018 16:59:32 +0100 Subject: [PATCH 484/673] Pine64/soPine64/VSZero: prepare for myVolumio --- scripts/pine64config.sh | 3 +++ scripts/pine64image.sh | 14 ++++++++++++++ scripts/sopine64image.sh | 14 ++++++++++++++ scripts/vszeroconfig.sh | 3 +++ scripts/vszeroimage.sh | 14 ++++++++++++++ 5 files changed, 48 insertions(+) diff --git a/scripts/pine64config.sh b/scripts/pine64config.sh index 72e42f815..3b3a396a8 100755 --- a/scripts/pine64config.sh +++ b/scripts/pine64config.sh @@ -56,6 +56,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 34b47d9db..6eb2fb4ab 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -132,8 +132,22 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /pine64config.sh diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index 9aef67644..dbb329e0d 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -132,8 +132,22 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /pine64config.sh diff --git a/scripts/vszeroconfig.sh b/scripts/vszeroconfig.sh index 803faf090..a5aa3b162 100755 --- a/scripts/vszeroconfig.sh +++ b/scripts/vszeroconfig.sh @@ -63,6 +63,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index ab6623d40..3f22a0303 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -119,8 +119,22 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /vszeroconfig.sh From 07d0f3cfd258c6bc4d5d6c0286b336cb01df8676 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 22 Dec 2018 17:12:06 +0100 Subject: [PATCH 485/673] USB Audio ordering --- scripts/tinkerconfig.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 795ccb831..e74a94232 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -31,6 +31,12 @@ echo "Adding default sound modules" # #" >> /etc/modules +echo "USB Card Ordering" +echo " +options snd-usb-audio nrpacks=1 +# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + echo "#!/bin/sh echo 2 > /proc/irq/45/smp_affinity " > /usr/local/bin/tinker-init.sh From 7fe03c65bf5d01c1bb2251983f7e4b4a960a86a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 1 Jan 2019 13:18:43 +0100 Subject: [PATCH 486/673] Switching to kernel 4.14 and prepare for myVolumio --- scripts/cuboxiconfig.sh | 3 +++ scripts/cuboxiimage.sh | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/scripts/cuboxiconfig.sh b/scripts/cuboxiconfig.sh index dbfab9c5b..a5e8ee6db 100755 --- a/scripts/cuboxiconfig.sh +++ b/scripts/cuboxiconfig.sh @@ -51,6 +51,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index 10baf5730..a5d0fe3cc 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -104,11 +104,10 @@ mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying cuboxi boot files, Kernel, Modules and Firmware" -cp platform-cuboxi/cuboxi/boot/* /mnt/volumio/rootfs/boot +echo "Copying cuboxi boot files, Kernel, Modules and Headerfiles" +cp -R platform-cuboxi/cuboxi/boot/* /mnt/volumio/rootfs/boot cp -pdR platform-cuboxi/cuboxi/lib/modules /mnt/volumio/rootfs/lib -cp -pdR platform-cuboxi/cuboxi/lib/firmware /mnt/volumio/rootfs/lib -tar cfJ /mnt/volumio/rootfs/usr/linux-headers.tar.xz platform-cuboxi/cuboxi/usr/include +cp platform-cuboxi/cuboxi/usr/src/* /mnt/volumio/rootfs/usr/src cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4329-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4330-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ @@ -132,7 +131,22 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /cuboxiconfig.sh From 04f3b18a50449572a954fa45e304b18a992b2990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 1 Jan 2019 13:26:38 +0100 Subject: [PATCH 487/673] Switch to kernel 4.14.y and prepare for myVolumio --- scripts/cuboxiconfig.sh | 3 +++ scripts/cuboxiimage.sh | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/scripts/cuboxiconfig.sh b/scripts/cuboxiconfig.sh index dbfab9c5b..a5e8ee6db 100755 --- a/scripts/cuboxiconfig.sh +++ b/scripts/cuboxiconfig.sh @@ -51,6 +51,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index 10baf5730..a5d0fe3cc 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -104,11 +104,10 @@ mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying cuboxi boot files, Kernel, Modules and Firmware" -cp platform-cuboxi/cuboxi/boot/* /mnt/volumio/rootfs/boot +echo "Copying cuboxi boot files, Kernel, Modules and Headerfiles" +cp -R platform-cuboxi/cuboxi/boot/* /mnt/volumio/rootfs/boot cp -pdR platform-cuboxi/cuboxi/lib/modules /mnt/volumio/rootfs/lib -cp -pdR platform-cuboxi/cuboxi/lib/firmware /mnt/volumio/rootfs/lib -tar cfJ /mnt/volumio/rootfs/usr/linux-headers.tar.xz platform-cuboxi/cuboxi/usr/include +cp platform-cuboxi/cuboxi/usr/src/* /mnt/volumio/rootfs/usr/src cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4329-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ cp platform-cuboxi/cuboxi/nvram-fw/brcmfmac4330-sdio.txt /mnt/volumio/rootfs/lib/firmware/brcm/ @@ -132,7 +131,22 @@ wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volum mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /cuboxiconfig.sh From 48bee13cbdd61579841861f1dbbbfc42a3d801b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 3 Jan 2019 22:35:42 +0100 Subject: [PATCH 488/673] Odroid XU4/HC1/HC2: Kernel 4.14 LTS, Improved native DSD support --- scripts/odroidxu4config.sh | 45 ++++++++++++++++++++++++++++++-------- scripts/odroidxu4image.sh | 31 ++++++++++++++++++-------- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/scripts/odroidxu4config.sh b/scripts/odroidxu4config.sh index b073d6962..955fba827 100755 --- a/scripts/odroidxu4config.sh +++ b/scripts/odroidxu4config.sh @@ -3,6 +3,8 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh # *************** # Create fstab @@ -11,7 +13,7 @@ echo "Creating \"fstab\"" echo "# OdroidXU fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -19,6 +21,35 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab +echo "Modifying boot.ini template" + +sed -i "s/%%VOLUMIO-PARAMS%%/imgpart=UUID=${UUID_IMG} imgfile=\/volumio_current.sqsh hwdevice=OdroidXU4 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=\/boot\/boot.ini/g" /boot/boot.ini + + +echo "Adding XU4 fan control" +echo "# XU4 Fan Control +# Target temperature: 30°C, 50°C, 70°C +TRIP_POINT_0=30000 +TRIP_POINT_1=50000 +TRIP_POINT_2=70000 + +echo $TRIP_POINT_0 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp +echo $TRIP_POINT_0 > /sys/devices/virtual/thermal/thermal_zone1/trip_point_0_temp +echo $TRIP_POINT_0 > /sys/devices/virtual/thermal/thermal_zone2/trip_point_0_temp +echo $TRIP_POINT_0 > /sys/devices/virtual/thermal/thermal_zone3/trip_point_0_temp + +echo $TRIP_POINT_1 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_1_temp +echo $TRIP_POINT_1 > /sys/devices/virtual/thermal/thermal_zone1/trip_point_1_temp +echo $TRIP_POINT_1 > /sys/devices/virtual/thermal/thermal_zone2/trip_point_1_temp +echo $TRIP_POINT_1 > /sys/devices/virtual/thermal/thermal_zone3/trip_point_1_temp + +echo $TRIP_POINT_2 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_2_temp +echo $TRIP_POINT_2 > /sys/devices/virtual/thermal/thermal_zone1/trip_point_2_temp +echo $TRIP_POINT_2 > /sys/devices/virtual/thermal/thermal_zone2/trip_point_2_temp +echo $TRIP_POINT_2 > /sys/devices/virtual/thermal/thermal_zone3/trip_point_2_temp + +exit 0 +" > /etc/rc.local echo "Installing additonal packages" apt-get update @@ -29,7 +60,7 @@ rm -f /var/lib/apt/lists/*archive* apt-get clean -echo "Adding custom module squashfs" +echo "Adding custom module overlay/ squashfs" echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "Adding custom module nls_cp437" @@ -41,17 +72,10 @@ cd /root/ mv volumio-init-updater /usr/local/sbin echo "Changing to 'modules=dep'" -echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf echo "Tweaking: disable energy sensor error message" echo "blacklist ina231_sensor" >> /etc/modprobe.d/blacklist-odroid.conf -echo "Tweaking: optimize fan-control" -echo "DRIVER==\"odroid-fan\", ACTION==\"add\", ATTR{fan_speeds}=\"1 20 50 95\", ATTR{temp_levels}=\"50 70 80\"" > /etc/udev/rules.d/60-odroid_fan.rules -echo "Enabling Fan Control Service" -mv /opt/fan-control/odroid-xu3-fan-control.service /lib/systemd/system -#systemctl enable odroid-xu3-fan-control.service -ln -s /lib/systemd/system/odroid-xu3-fan-control.service /etc/systemd/system/multi-user.target.wants/odroid-xu3-fan-control.service #On The Fly Patch if [ $PATCH == "volumio" ]; then @@ -66,6 +90,9 @@ else else echo "Cannot Find Patch File, aborting" fi + if [ -f "install.sh" ]; then + sh install.sh + fi cd / rm -rf ${PATCH} fi diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index 21734f591..1850663b9 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -118,25 +118,41 @@ cp platform-odroid/odroidxu4/boot/zImage /mnt/volumio/rootfs/boot echo "Copying modules and firmware and inittab" cp -pdR platform-odroid/odroidxu4/lib/modules /mnt/volumio/rootfs/lib/ -cp -pdR platform-odroid/odroidxu4/lib/firmware /mnt/volumio/rootfs/lib/ echo "Copying modified securetty (oDroid-XU4 console)" cp platform-odroid/odroidxu4/etc/securetty /mnt/volumio/rootfs/etc/ echo "Preparing to run chroot for more OdroidXU configuration" cp scripts/odroidxu4config.sh /mnt/volumio/rootfs -cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater -echo "Adding fancontrol" -mkdir /mnt/volumio/rootfs/opt/fan-control -cp platform-odroid/odroidxu4/opt/fan-control/odroid-xu3-fan-control.sh /mnt/volumio/rootfs/opt/fan-control -cp platform-odroid/odroidxu4/opt/fan-control/odroid-xu3-fan-control.service /mnt/volumio/rootfs/opt/fan-control mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs + echo $PATCH > /mnt/volumio/rootfs/patch + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /odroidxu4config.sh @@ -150,9 +166,6 @@ umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys -#TODO echo "Copying inittab" -#TODO cp platform-odroid/odroidxu4/etc/inittab /mnt/volumio/etc/ - sync echo "Odroid-XU4 device installed" From a08e4bed99c495d97c63d0e95a3ac66845ddebc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Laubacher?= Date: Fri, 4 Jan 2019 11:53:13 +0100 Subject: [PATCH 489/673] Fix some comments in volumioconfig.sh (#363) --- scripts/volumioconfig.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 362404348..dd08763b3 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -259,28 +259,27 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then #Remove autostart of upmpdcli update-rc.d upmpdcli remove - echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz - tar xf shairport-sync-metadata-reader-arm.tar.gz - rm /shairport-sync-metadata-reader-arm.tar.gz - - echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-arm.tar.gz tar xf shairport-sync-3.0.2-arm.tar.gz rm /shairport-sync-3.0.2-arm.tar.gz + + echo "Installing Shairport-Sync Metadata Reader" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz + tar xf shairport-sync-metadata-reader-arm.tar.gz + rm /shairport-sync-metadata-reader-arm.tar.gz echo "Volumio Init Updater" wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater chmod a+x /usr/local/sbin/volumio-init-updater + echo "Installing Snapcast for multiroom" - wget http://repo.volumio.org/Volumio2/Binaries/arm/snapserver -P /usr/sbin/ wget http://repo.volumio.org/Volumio2/Binaries/arm/snapclient -P /usr/sbin/ chmod a+x /usr/sbin/snapserver chmod a+x /usr/sbin/snapclient - echo "Zsync" + echo "Installing Zsync" rm /usr/bin/zsync wget http://repo.volumio.org/Volumio2/Binaries/arm/zsync -P /usr/bin/ chmod a+x /usr/bin/zsync @@ -305,13 +304,13 @@ wpa_passphrase=volumio2" >> /etc/hostapd/hostapd-edimax.conf apt-get clean rm -rf tmp/* elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then - echo 'X86 Environment Detected' + echo 'x86 Environment Detected' # cleanup apt-get clean rm -rf tmp/* - echo "Installing X86 Node Environment" + echo "Installing x86 Node Environment" cd / wget http://repo.volumio.org/Volumio2/node-v${NODE_VERSION}-linux-x86.tar.xz tar xf node-v${NODE_VERSION}-linux-x86.tar.xz @@ -396,7 +395,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater chmod a+x /usr/local/sbin/volumio-init-updater - echo "Zsync" + echo "Installing Zsync" rm /usr/bin/zsync wget http://repo.volumio.org/Volumio2/Binaries/x86/zsync -P /usr/bin/ chmod a+x /usr/bin/zsync From 86516abd10ca16e2515b21e3c68cf174766ebdf7 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 10 Jan 2019 15:47:40 +0100 Subject: [PATCH 490/673] kernel: Bump to 4.14.92 --- scripts/raspberryconfig.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index cd3ec7227..1d53ff1f9 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.71" +KERNEL_VERSION="4.14.92" case $KERNEL_VERSION in "4.4.9") @@ -101,6 +101,10 @@ case $KERNEL_VERSION in KERNEL_REV="1145" KERNEL_COMMIT="c919d632ddc2a88bcb87b7d0cddd61446d1a36bf" FIRMWARE_COMMIT=$KERNEL_COMMIT + "4.14.92") + KERNEL_REV="1187" + KERNEL_COMMIT="6aec73ed5547e09bea3e20aa2803343872c254b6" + FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 056b2aeb26c865af21dda67fed550bb7094c710e Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 10 Jan 2019 18:41:40 +0100 Subject: [PATCH 491/673] Mpd 0.20.18 --- scripts/volumioconfig.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index dd08763b3..8ff2e0c09 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -197,10 +197,10 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then rm libasound2_1.1.3-5_armhf.deb rm libasound2-dev_1.1.3-5_armhf.deb - echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv6-DSD-2.deb - dpkg -i mpd_0.20.6-1_armv6-DSD-2.deb - rm mpd_0.20.6-1_armv6-DSD-2.deb + echo "Installing MPD 20.18" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_armv6.deb + dpkg -i mpd_0.20.18-1_armv6.deb + rm mpd_0.20.18-1_armv6.deb echo "Installing Upmpdcli for armv6" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv6/libupnpp3_0.15.1-1_armhf.deb @@ -234,10 +234,10 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then rm libasound2_1.1.3-5_armhf.deb rm libasound2-dev_1.1.3-5_armhf.deb - echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_armv7-DSD.deb - dpkg -i mpd_0.20.6-1_armv7-DSD.deb - rm mpd_0.20.6-1_armv7-DSD.deb + echo "Installing MPD 20.18" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_armv7.deb + dpkg -i mpd_0.20.18-1_armv7.deb + rm mpd_0.20.18-1_armv7.deb echo "Installing Upmpdcli for armv7" wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb @@ -359,10 +359,10 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm libasound2_1.1.3-5_i386.deb rm libasound2-dev_1.1.3-5_i386.deb - echo "Installing MPD 20.6 with Direct DSD Support" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.6-1_i386-DSD-2.deb - dpkg -i mpd_0.20.6-1_i386-DSD-2.deb - rm mpd_0.20.6-1_i386-DSD-2.deb + echo "Installing MPD 20.18" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_i386.deb + dpkg -i mpd_0.20.18-1_i386.deb + rm mpd_0.20.18-1_i386.deb echo "Installing Upmpdcli" wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb From 9c9d9fe945cadd0ad476e0b56bd0c5d42d6ad55d Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 10 Jan 2019 19:11:55 +0100 Subject: [PATCH 492/673] add libsidplayfp3 --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/x86.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 554f6f37c..16a43c882 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -36,7 +36,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool libsidplayfp3 source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 925537a1a..7fdd34816 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -42,7 +42,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool libsidplayfp3 source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 76a068f23..692e5046f 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -43,7 +43,7 @@ keyring=debian-archive-keyring suite=jessie [Assets] -packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool +packages=libasound2 alsa-utils alsa-base sox sqlite3 mpd mpc rlwrap libupnp6 libmpdclient2 libexpat1 libcurl3 libmicrohttpd10 libexpat1 libboost-program-options1.55.0 libboost-system1.55.0 libconfig-dev libjsoncpp0 python-requests exiftool libsidplayfp3 source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 91bc32a3daa69e09170e613c40f8b5c279962098 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 10 Jan 2019 20:08:04 +0100 Subject: [PATCH 493/673] Fix syntax --- scripts/raspberryconfig.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 1d53ff1f9..99e82df42 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -101,6 +101,7 @@ case $KERNEL_VERSION in KERNEL_REV="1145" KERNEL_COMMIT="c919d632ddc2a88bcb87b7d0cddd61446d1a36bf" FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; "4.14.92") KERNEL_REV="1187" KERNEL_COMMIT="6aec73ed5547e09bea3e20aa2803343872c254b6" From a4fd0256228a792522c6040d055b51e9185634cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 12 Jan 2019 17:56:53 +0100 Subject: [PATCH 494/673] cubox, odroidx4, pine, sopine, vs: missing myvolumio build code --- scripts/cuboxiimage.sh | 7 +++++++ scripts/odroidxu4image.sh | 7 +++++++ scripts/pine64image.sh | 7 +++++++ scripts/sopine64image.sh | 7 +++++++ scripts/vszeroimage.sh | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index a5d0fe3cc..2892f6b35 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -152,6 +152,13 @@ su - /cuboxiconfig.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/cuboxiconfig.sh /mnt/volumio/rootfs/root/init diff --git a/scripts/odroidxu4image.sh b/scripts/odroidxu4image.sh index 1850663b9..17cd8105b 100755 --- a/scripts/odroidxu4image.sh +++ b/scripts/odroidxu4image.sh @@ -158,6 +158,13 @@ su - /odroidxu4config.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/odroidxu4config.sh /mnt/volumio/rootfs/root/init diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 6eb2fb4ab..98cf3751c 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -153,6 +153,13 @@ su - /pine64config.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index dbb329e0d..8038faa8f 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -153,6 +153,13 @@ su - /pine64config.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 3f22a0303..0ba112d18 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -140,6 +140,13 @@ su - /vszeroconfig.sh EOF +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + #cleanup rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/vszeroconfig.sh From 6530bdd8cdda60d76d1fbec5f3b06c6384f3e5bb Mon Sep 17 00:00:00 2001 From: gvolt Date: Fri, 25 Jan 2019 00:31:47 +0100 Subject: [PATCH 495/673] Solution to issue #347 --- scripts/raspberryconfig.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 99e82df42..1b3ad6062 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -168,7 +168,9 @@ dtparam=audio=on audio_pwm_mode=2 dtparam=i2c_arm=on disable_splash=1 -hdmi_force_hotplug=1" >> /boot/config.txt +hdmi_force_hotplug=1 + +#include userconfig.txt" >> /boot/config.txt echo "Writing cmdline.txt file" echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt From f1b59d96a3893a42f8609371956ecba0438017d7 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 8 Mar 2019 11:48:57 +0100 Subject: [PATCH 496/673] Proper perms for ping --- scripts/volumioconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 8ff2e0c09..68a493845 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -408,6 +408,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] fi +echo "Setting proper permissions for ping" +chmod u+s /bin/ping + echo "Creating Volumio Folder Structure" # Media Mount Folders mkdir /mnt/NAS From 99999361de2e4fd8b0ac48f90b30c976628016cb Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 12 Mar 2019 18:39:25 +0100 Subject: [PATCH 497/673] Remove dhcp client timeout --- volumio/etc/dhcp/dhclient.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumio/etc/dhcp/dhclient.conf b/volumio/etc/dhcp/dhclient.conf index 13309c13a..4c7e4f1a5 100644 --- a/volumio/etc/dhcp/dhclient.conf +++ b/volumio/etc/dhcp/dhclient.conf @@ -54,4 +54,4 @@ request subnet-mask, broadcast-address, time-offset, routers, # expire 2 2000/1/12 00:00:01; #} -timeout 20; +#timeout 20; From e76f8a5a1344036776ee4357087c70f67d325402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 15 Mar 2019 17:08:28 +0100 Subject: [PATCH 498/673] init: fix an error when updating a fstab uuid --- scripts/initramfs/init.nextarm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index de45afc9c..b4c8a1ba5 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -459,16 +459,12 @@ if [ ! -z "${DEVFSTAB}" ]; then fi else DEVFSTAB=`cat /mnt/ext/union/etc/fstab | grep -E "^/dev/[a-z]{3,6}[0-9]{1,2}[a-z]{0,1}[0-9]{0,2}" -o` - if [ -z "${DEVFSTAB}" ]; then -# normally never gets here ;) - print_msg "Incompatible fstab, no entry found for /boot" - exec sh - exit 0 - fi - print_msg "found fstab entry with device ${DEVFSTAB} for /boot" - if [ ! $BOOTPART == $DEVFSTAB ]; then - sed -i "s/${DEVFSTAB}/${BOOTPART}/g" /mnt/ext/union/etc/fstab - print_msg "fstab entry updated to ${DEVFSTAB}" + if [ ! -z "${DEVFSTAB}" ]; then + print_msg "found fstab entry with device ${DEVFSTAB} for /boot" + if [ ! $BOOTPART == $DEVFSTAB ]; then + sed -i "s/${DEVFSTAB}/${BOOTPART}/g" /mnt/ext/union/etc/fstab + print_msg "fstab entry updated to ${DEVFSTAB}" + fi fi fi From febd0220fb279af859f75cabef06e54c5f6f6905 Mon Sep 17 00:00:00 2001 From: ashthespy Date: Tue, 2 Apr 2019 15:22:37 +0200 Subject: [PATCH 499/673] Exit build script on failures Especially `multistrap` --- build.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 9d4271c40..498b7e55d 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,7 @@ # # Dependencies: # parted squashfs-tools dosfstools multistrap qemu binfmt-support qemu-user-static kpartx +set -eo pipefail #Set fonts for Help. NORM=$(tput sgr0) @@ -37,7 +38,7 @@ Switches: Example: Build a Raspberry PI image from scratch, version 2.0 : ./build.sh -b arm -d pi -v 2.0 -l reponame -" + " exit 1 } @@ -106,7 +107,7 @@ if [ "$(id -u)" -ne 0 ]; then fi if [ -z "${VARIANT}" ]; then - VARIANT="volumio" + VARIANT="volumio" fi if [ -n "$BUILD" ]; then @@ -143,7 +144,12 @@ if [ -n "$BUILD" ]; then mkdir "build/$BUILD" mkdir "build/$BUILD/root" - multistrap -a "$ARCH" -f "$CONF" + + if ! multistrap -a "$ARCH" -f "$CONF" + then + echo multistrap failed. Exitting + exit 1 + fi if [ ! "$BUILD" = x86 ]; then echo "Build for arm/armv7/armv8 platform, copying qemu" cp /usr/bin/qemu-arm-static "build/$BUILD/root/usr/bin/" @@ -157,10 +163,10 @@ if [ -n "$BUILD" ]; then echo 'Cloning Volumio Node Backend' mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then - echo "Cloning Volumio with all its history" - git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + echo "Cloning Volumio with all its history" + git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio else - git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" @@ -226,7 +232,7 @@ case "$DEVICE" in ;; odroidc2) echo 'Writing Odroid-C2 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" -# this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 + # this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 sh scripts/odroidc2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; odroidxu4) echo 'Writing Odroid-XU4 Image File' @@ -255,10 +261,10 @@ case "$DEVICE" in ;; pine64) echo 'Writing Pine64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" -# this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 + # this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 sh scripts/pine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; - nanopi64) echo 'Writing NanoPI A64 Image File' + nanopi64) echo 'Writing NanoPI A64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopi64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; From dd0a2eb8bff9e2424991072e7b874c5a99886a4f Mon Sep 17 00:00:00 2001 From: ashthespy Date: Thu, 4 Apr 2019 14:43:17 +0200 Subject: [PATCH 500/673] Refactor to handle exit codes --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 498b7e55d..d3df532d6 100755 --- a/build.sh +++ b/build.sh @@ -45,11 +45,11 @@ Example: Build a Raspberry PI image from scratch, version 2.0 : #$1 = ${BUILD} $2 = ${VERSION} $3 = ${DEVICE}" function check_os_release { ARCH_BUILD=$1 - HAS_VERSION=$(grep -c VOLUMIO_VERSION "build/${ARCH_BUILD}/root/etc/os-release") VERSION=$2 DEVICE=$3 + HAS_VERSION="grep -c VOLUMIO_VERSION build/${ARCH_BUILD}/root/etc/os-release" - if [ "$HAS_VERSION" -ne "0" ]; then + if $HAS_VERSION; then # os-release already has a VERSION number # cut the last 2 lines in case other devices are being built from the same rootfs head -n -2 "build/${ARCH_BUILD}/root/etc/os-release" > "build/${ARCH_BUILD}/root/etc/tmp-release" @@ -206,7 +206,7 @@ VOLUMIO_BUILD_DATE=\"${CUR_DATE}\" umount -l "build/$BUILD/root/proc" umount -l "build/$BUILD/root/sys" # Setting up cgmanager under chroot/qemu leaves a mounted fs behind, clean it up - umount -l "build/$BUILD/root/run/cgmanager/fs" + [ -d "build/$BUILD/root/run/cgmanager/fs" ] && umount -l "build/$BUILD/root/run/cgmanager/fs" sh scripts/configure.sh -b "$BUILD" fi From dbdd2279003a844d31cea5df5c7b9f42d9ea836b Mon Sep 17 00:00:00 2001 From: ashthespy Date: Thu, 4 Apr 2019 16:54:52 +0200 Subject: [PATCH 501/673] Warn about building for unknown devices --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index d3df532d6..a3920d1a8 100755 --- a/build.sh +++ b/build.sh @@ -325,6 +325,11 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopineoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + "") echo 'No device specified' + ;; + *) echo Unknown/Unsupported device: $DEVICE + exit 1 + ;; esac #When the tar is created we can build the docker layer From 4e339b70851c8b1937b5cea958f514a89cd7485f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 5 Apr 2019 18:48:14 +0200 Subject: [PATCH 502/673] Odroid N2: First Release --- build.sh | 5 +- scripts/odroidn2config.sh | 94 +++++++++++++++ scripts/odroidn2image.sh | 233 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 331 insertions(+), 1 deletion(-) create mode 100755 scripts/odroidn2config.sh create mode 100755 scripts/odroidn2image.sh diff --git a/build.sh b/build.sh index 9d4271c40..6513e30ff 100755 --- a/build.sh +++ b/build.sh @@ -226,9 +226,12 @@ case "$DEVICE" in ;; odroidc2) echo 'Writing Odroid-C2 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" -# this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 sh scripts/odroidc2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + odroidn2) echo 'Writing Odroid-N2 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/odroidn2image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; odroidxu4) echo 'Writing Odroid-XU4 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/odroidxu4image.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/scripts/odroidn2config.sh b/scripts/odroidn2config.sh new file mode 100755 index 000000000..74040da6c --- /dev/null +++ b/scripts/odroidn2config.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# Odroid N2 fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Creating boot.ini from template" +sed -i "s/%%VOLUMIO-PARAMS%%/imgpart=UUID=${UUID_IMG} imgfile=\/volumio_current.sqsh hwdevice=Odroid-N2 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=boot.ini/g" /boot/boot.ini + + +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf + +echo "#!/bin/sh -e +#/usr/local/bin/n2-init.sh +exit 0" > /etc/rc.local + +echo "Installing additional packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc fbset + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep' to minimise uInitrd size" +echo "(otherwise Odroid may not boot)" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/odroidn2image.sh b/scripts/odroidn2image.sh new file mode 100755 index 000000000..16efc3191 --- /dev/null +++ b/scripts/odroidn2image.sh @@ -0,0 +1,233 @@ +#!/bin/sh + +# Default build for Debian 32bit (to be changed to armv8) +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-odroidn2.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`losetup -f --show ${IMG_FILE}` + +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` + +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the Odroid N2 kernel/ platform files" +if [ -d ./platform-odroid/odroidn2 ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-odroid folder + # that will refresh all the odroid platforms, see below + cd platform-odroid + if [ -f odroidn2.tar.xz ]; then + echo "Found a new tarball, unpacking..." + rm -r odroidn2 + tar xfJ odroidn2.tar.xz + rm odroidn2.tar.xz + fi + cd .. +else + echo "Getting sthe Odroid N2 files from repo" + mkdir platform-odroid + cd platform-odroid + [ ! -f odroidn2.tar.xz ] || rm odroidn2.tar.xz + wget https://github.com/volumio/platform-odroid/raw/master/odroidn2.tar.xz + echo "Unpacking the N2 platform files" + tar xfJ odroidn2.tar.xz + rm odroidn2.tar.xz + cd .. +fi + +echo "Copying the bootloader" +dd if=platform-odroid/odroidn2/uboot/u-boot.bin of=${LOOP_DEV} conv=fsync bs=512 seek=1 +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying OdroidN2 boot files" +cp platform-odroid/odroidn2/boot/boot.ini* /mnt/volumio/rootfs/boot +cp platform-odroid/odroidn2/boot/meson64_odroidn2.dtb /mnt/volumio/rootfs/boot +cp platform-odroid/odroidn2/boot/Image* /mnt/volumio/rootfs/boot + +echo "Copying OdroidN2 modules and firmware" +cp -pdR platform-odroid/odroidn2/lib/modules /mnt/volumio/rootfs/lib/ + +sync + +echo "Preparing to run chroot for more Odroid-N2 configuration" +cp scripts/odroidn2config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs + +echo $PATCH > /mnt/volumio/rootfs/patch + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/odroidn2config.sh +EOF + +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + +echo "Cleaning up temp files" +rm /mnt/volumio/rootfs/odroidn2config.sh /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "Copying LIRC configuration files for HK stock remote" +cp platform-odroid/odroidn2/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc +cp platform-odroid/odroidn2/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc +cp platform-odroid/odroidn2/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc + +echo "==> Odroid-N2 device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-odroid +sync + +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync From 1071397884495d0d37087e778cd31dcca2e8e965 Mon Sep 17 00:00:00 2001 From: Ash Date: Thu, 11 Apr 2019 18:57:20 +0200 Subject: [PATCH 503/673] Fixes in `volumioconfig.sh` (#372) * Fix `hostapd-edimax.conf` location errors * Fix `/media` exists warning --- scripts/volumioconfig.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 68a493845..a0cd00599 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -263,7 +263,7 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-arm.tar.gz tar xf shairport-sync-3.0.2-arm.tar.gz rm /shairport-sync-3.0.2-arm.tar.gz - + echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz tar xf shairport-sync-metadata-reader-arm.tar.gz @@ -272,7 +272,7 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then echo "Volumio Init Updater" wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater chmod a+x /usr/local/sbin/volumio-init-updater - + echo "Installing Snapcast for multiroom" wget http://repo.volumio.org/Volumio2/Binaries/arm/snapserver -P /usr/sbin/ wget http://repo.volumio.org/Volumio2/Binaries/arm/snapclient -P /usr/sbin/ @@ -298,7 +298,7 @@ wpa=2 wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP wpa_passphrase=volumio2" >> /etc/hostapd/hostapd-edimax.conf - chmod -R 777 /etc/hostapd-edimax.conf + chmod -R 777 /etc/hostapd/hostapd-edimax.conf echo "Cleanup" apt-get clean @@ -347,7 +347,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing MPD for i386" # First we manually install a newer alsa-lib to achieve Direct DSD support - + echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2_1.1.3-5_i386.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-data_1.1.3-5_all.deb @@ -357,7 +357,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] dpkg --force-all -i libasound2-dev_1.1.3-5_i386.deb rm libasound2-data_1.1.3-5_all.deb rm libasound2_1.1.3-5_i386.deb - rm libasound2-dev_1.1.3-5_i386.deb + rm libasound2-dev_1.1.3-5_i386.deb echo "Installing MPD 20.18" wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_i386.deb @@ -379,12 +379,12 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz tar xf shairport-sync-3.0.2-i386.tar.gz rm /shairport-sync-3.0.2-i386.tar.gz - + echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz tar xf shairport-sync-metadata-reader-i386.tar.gz rm /shairport-sync-metadata-reader-i386.tar.gz - + echo "Installing LINN Songcast module" wget http://repo.volumio.org/Packages/Upmpdcli/x86/sc2mpd_1.1.1-1_i386.deb @@ -413,8 +413,8 @@ chmod u+s /bin/ping echo "Creating Volumio Folder Structure" # Media Mount Folders -mkdir /mnt/NAS -mkdir /media +mkdir -p /mnt/NAS +mkdir -p /media ln -s /media /mnt/USB #Internal Storage Folder From fe83e03fe4a5ad6387f0fd162f915b7fc3065a36 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 11 Apr 2019 19:02:53 +0200 Subject: [PATCH 504/673] Improved kiosk build --- build.sh | 4 +++ scripts/install-kiosk.sh | 64 +++++++++++++++++++------------------- scripts/raspberryconfig.sh | 2 +- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/build.sh b/build.sh index 6513e30ff..c8cb3cf03 100755 --- a/build.sh +++ b/build.sh @@ -322,6 +322,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopineoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + motivo) echo 'Writing Motivo Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/motivoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; esac #When the tar is created we can build the docker layer diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh index 9cd72ef00..53bb46a34 100755 --- a/scripts/install-kiosk.sh +++ b/scripts/install-kiosk.sh @@ -1,42 +1,53 @@ #!/bin/sh + +echo "Installing Volumio local UI" + export DEBIAN_FRONTEND=noninteractive echo "Fixing keyboard input issue" apt-get update apt-get install -y keyboard-configuration --no-install-recommends -echo "Installing Display Plugin dependencies" +echo "Installing Chromium Dependencies" +sudo apt-get update +sudo apt-get -y install echo "Installing Graphical environment" -sudo apt-get install -y xinit xorg openbox libexif12 unclutter --no-install-recommends +sudo apt-get install -y xinit xorg openbox libexif12 -echo "Temporarily adding Backports sources" -echo "deb http://ftp.de.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list +echo "Download Chromium" +cd /home/volumio/ +wget http://launchpadlibrarian.net/234969703/chromium-browser_48.0.2564.82-0ubuntu0.15.04.1.1193_armhf.deb +wget http://launchpadlibrarian.net/234969705/chromium-codecs-ffmpeg-extra_48.0.2564.82-0ubuntu0.15.04.1.1193_armhf.deb -echo "Installing Midori" -apt-get update -apt-get install -y midori --no-install-recommends +echo "Install Chromium" +sudo dpkg -i /home/volumio/chromium-*.deb +sudo apt-get install -y -f +sudo dpkg -i /home/volumio/chromium-*.deb -echo "Removing temporary Backgports sources" -rm /etc/apt/sources.list.d/jessie-backports.list +rm /home/volumio/chromium-*.deb -echo "Cleaning" -rm -f /var/lib/apt/lists/*archive* -apt-get clean +echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" +apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core echo "Dependencies installed" -echo "Creating Kiosk start script" +echo "Creating Kiosk Data dir" +mkdir /data/volumiokiosk + +echo " Creating chromium kiosk start script" echo "#!/bin/bash mkdir -p /data/volumiokiosk export DISPLAY=:0 +export DISPLAY=:0 xset s off -dpms -export XDG_CACHE_HOME=/data/volumiokiosk rm -rf /data/volumiokiosk/Singleton* + +sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /data/volumiokiosk/Default/Preferences +sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' /data/volumiokiosk/Default/Preferences openbox-session & sleep 4 -while true; do - midori -a http://localhost:3000 -e Fullscreen + /usr/bin/chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar --enable-touchview --enable-pinch --window-size=800,480 --window-position=0,0 --disable-session-crashed-bubble --disable-infobars --no-first-run --no-sandbox --user-data-dir='/data/volumiokiosk' --disable-translate --show-component-extension-options --ignore-gpu-blacklist --disable-background-networking --use-gl=egl --enable-remote-extensions --enable-native-gpu-memory-buffers --disable-quic --enable-fast-unload --enable-tcp-fast-open --disable-gpu-compositing --force-gpu-rasterization --enable-zero-copy --app=http://localhost:3000 done" > /opt/volumiokiosk.sh /bin/chmod +x /opt/volumiokiosk.sh @@ -49,32 +60,21 @@ After=volumio.service Type=simple User=root Group=root -ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh +ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh -- -nocursor # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 [Install] WantedBy=multi-user.target " > /lib/systemd/system/volumio-kiosk.service - -echo "Enabling kiosk" /bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service + echo " Allowing volumio to start an xsession" /bin/sed -i "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config -echo "Hide Mouse cursor" - -echo "#!/bin/sh -if [ -d /etc/X11/xinit/xinitrc.d ]; then - for f in /etc/X11/xinit/xinitrc.d/*; do - [ -x "$f" ] && . "$f" - done - unset f -fi -xrdb -merge ~/.Xresources -xsetroot -cursor_name left_ptr & -exec openbox-session -exec unclutter &" > /root/.xinitrc + +echo "Enabling kiosk" +/bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service echo "Enabling UI for HDMI output selection" echo '[{"value": false,"id":"section_hdmi_settings","attribute_name": "hidden"}]' > /volumio/app/plugins/system_controller/system/override.json diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 99e82df42..7bc86ca98 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -265,7 +265,7 @@ fi rm /patch -if [ "$PATCH" = "volumio" ]; then +if [ "$PATCH" = "volumio" ] || [ "$PATCH" = "my-volumio" ]; then echo "Adding third party Firmware" cd / From 0c2528ad8e2ed58464df49469d7cf90ff1ca17fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 22 May 2019 09:55:54 +0200 Subject: [PATCH 505/673] Asus: separate primo from tinkerboard --- build.sh | 4 + scripts/primoconfig.sh | 138 ++++++++++++++++++++++++++ scripts/primoimage.sh | 213 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 355 insertions(+) create mode 100755 scripts/primoconfig.sh create mode 100755 scripts/primoimage.sh diff --git a/build.sh b/build.sh index c8cb3cf03..1a38f6d03 100755 --- a/build.sh +++ b/build.sh @@ -282,6 +282,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/tinkerimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + primo) echo 'Writing Volumio Primo Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/primoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; sopine64) echo 'Writing Sopine64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/sopine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/scripts/primoconfig.sh b/scripts/primoconfig.sh new file mode 100755 index 000000000..cc728b3f1 --- /dev/null +++ b/scripts/primoconfig.sh @@ -0,0 +1,138 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# Primo fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "(Re-)Creating boot config" +echo "label kernel-4.4 + kernel /zImage + fdt /dtb/rk3288-miniarm.dtb + initrd /uInitrd + append earlyprintk splash plymouth.ignore-serial-consoles console=tty1 console=ttyS3,115200n8 rw init=/sbin/init imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf +" > /boot/extlinux/extlinux.conf + +echo "Adding default sound modules" +#echo " +# +#" >> /etc/modules + +echo "USB Card Ordering" +echo " +options snd-usb-audio nrpacks=1 +# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + +echo "#!/bin/sh +echo 2 > /proc/irq/45/smp_affinity +" > /usr/local/bin/tinker-init.sh +chmod +x /usr/local/bin/tinker-init.sh + +echo "primodac=\`sudo /usr/sbin/i2cdetect -y 1 0x48 0x48 | grep -E 'UU|48' | awk '{print \$2}'\` +if [ ! -z \"\$primodac\" ]; then + configured=\`cat /boot/hw_intf.conf | grep es90x8q2m-dac | awk -F '=' '{print \$2}'\` + if [ -z \"\$configured\" ]; then + echo \"For information only, you may safely delete this file\" > /boot/dacdetect.log + echo \"\`date\`: Volumio Primo DAC detected on i2c address 0x48...\" >> /boot/dacdetect.log + volumioconfigured=\`cat /boot/hw_intf.conf | grep \"#### Volumio i2s \" \` + if [ ! -z \"\$volumioconfigured\" ]; then + echo \"\`date\`: Another DAC configured, wiping it out...\" >> /boot/dacdetect.log + mv /boot/hw_intf.conf /boot/hw_intf.tmp + sed '/#### Volumio i2s setting below/Q' /boot/hw_intf.tmp >/boot/hw_intf.conf + rm /boot/hw_intf.tmp + fi + echo \"\`date\`: Automatically configuring ES90x8Q2M and reboot...\" >> /boot/dacdetect.log + echo \"#### Volumio i2s setting below: do not alter ####\" >> /boot/hw_intf.conf + echo \"intf:dtoverlay=es90x8q2m-dac\" >> /boot/hw_intf.conf + /sbin/reboot + fi +fi" > /usr/local/bin/detect-primo.sh +chmod +x /usr/local/bin/detect-primo.sh + +echo "#!/bin/sh -e +/usr/local/bin/tinker-init.sh +/usr/local/bin/detect-primo.sh +exit 0" > /etc/rc.local + +echo "Installing additonal packages" +apt-get update +#apt-get -y install u-boot-tools liblircclient0 lirc +apt-get -y install u-boot-tools + +echo "Configuring boot splash" +apt-get -y install plymouth plymouth-themes +plymouth-set-default-theme volumio + +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + + +echo "Installing Kiosk" +sh /install-kiosk.sh + +echo "Kiosk installed" +rm /install-kiosk.sh +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep'" +sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd +echo "Cleaning up" +rm /boot/volumio.initrd diff --git a/scripts/primoimage.sh b/scripts/primoimage.sh new file mode 100755 index 000000000..4fbc2d534 --- /dev/null +++ b/scripts/primoimage.sh @@ -0,0 +1,213 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":d:v:p:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-primo.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the Primo (tinkerboard) rockchip kernel/ platform files" +if [ -d platform-primo ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-primo folder + # that will refresh all the primo platforms, see below +else + echo "Clone primo files from repo" + git clone --depth 1 https://github.com/volumio/platform-primo.git platform-primo + echo "Unpack the Volumio Primo platform files" + cd platform-primo + tar xfJ primo.tar.xz + cd .. +fi + +echo "Copying the bootloader" +dd if=platform-primo/primo/u-boot/u-boot.img of=${LOOP_DEV} seek=64 conv=notrunc +sync + +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying Primo boot files" +cp -R platform-primo/primo/boot/* /mnt/volumio/rootfs/boot/ + +echo "Copying Primo modules and firmware" +cp -pdR platform-primo/primo/lib/modules /mnt/volumio/rootfs/lib/ +cp -pdR platform-primo/primo/lib/firmware /mnt/volumio/rootfs/lib/ +sync + +echo "Preparing to run chroot for more Primo configuration" +cp scripts/primoconfig.sh /mnt/volumio/rootfs +cp scripts/install-kiosk.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/primoconfig.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/primoconfig.sh + +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> Volumio Primo device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-asus +sync + +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync From 9fa843999a2093aa59b04b34058ac6d51a18f534 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 22 May 2019 13:02:57 +0200 Subject: [PATCH 506/673] Fix missing md5 checksums on some images (#373) --- scripts/aml805armv7image.sh | 2 ++ scripts/aml812armv7image.sh | 2 ++ scripts/aml9xxxarmv7image.sh | 2 ++ scripts/cuboxiimage.sh | 2 ++ scripts/nanopi64image.sh | 2 ++ scripts/nanopineo2image.sh | 2 ++ scripts/nanopineoimage.sh | 2 ++ scripts/odroidc1image.sh | 2 ++ scripts/odroidc2image.sh | 2 ++ scripts/odroidn2image.sh | 2 ++ scripts/odroidx2image.sh | 2 ++ scripts/pine64image.sh | 2 ++ scripts/raspberryimage.sh | 2 ++ scripts/rock64image.sh | 4 +++- scripts/sopine64image.sh | 2 ++ scripts/sparkyimage.sh | 2 ++ scripts/tinkerimage.sh | 2 ++ scripts/udooneoimage.sh | 2 ++ scripts/udooqdlimage.sh | 2 ++ scripts/vszeroimage.sh | 2 ++ scripts/x86image.sh | 2 ++ 21 files changed, 43 insertions(+), 1 deletion(-) diff --git a/scripts/aml805armv7image.sh b/scripts/aml805armv7image.sh index 42f466a2a..c704cdab1 100755 --- a/scripts/aml805armv7image.sh +++ b/scripts/aml805armv7image.sh @@ -192,3 +192,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/aml812armv7image.sh b/scripts/aml812armv7image.sh index ade0af00a..9c566e049 100755 --- a/scripts/aml812armv7image.sh +++ b/scripts/aml812armv7image.sh @@ -192,3 +192,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index 4d91fe709..99f16f15f 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -192,3 +192,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/cuboxiimage.sh b/scripts/cuboxiimage.sh index 2892f6b35..faca60141 100755 --- a/scripts/cuboxiimage.sh +++ b/scripts/cuboxiimage.sh @@ -219,3 +219,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/nanopi64image.sh b/scripts/nanopi64image.sh index 044dba622..eddad83e6 100755 --- a/scripts/nanopi64image.sh +++ b/scripts/nanopi64image.sh @@ -202,3 +202,5 @@ sudo umount -l /mnt/volumio/rootfs/boot sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 6fe7c99f0..4a204a144 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -229,3 +229,5 @@ sudo umount -l /mnt/volumio/rootfs/boot sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/nanopineoimage.sh b/scripts/nanopineoimage.sh index 8e2d338f2..25be68eeb 100755 --- a/scripts/nanopineoimage.sh +++ b/scripts/nanopineoimage.sh @@ -207,3 +207,5 @@ sudo umount -l /mnt/volumio/rootfs/boot sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/odroidc1image.sh b/scripts/odroidc1image.sh index 610dd909d..6c93b8757 100755 --- a/scripts/odroidc1image.sh +++ b/scripts/odroidc1image.sh @@ -234,3 +234,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/odroidc2image.sh b/scripts/odroidc2image.sh index 44304a98d..2895abb96 100755 --- a/scripts/odroidc2image.sh +++ b/scripts/odroidc2image.sh @@ -230,3 +230,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/odroidn2image.sh b/scripts/odroidn2image.sh index 16efc3191..e108e596f 100755 --- a/scripts/odroidn2image.sh +++ b/scripts/odroidn2image.sh @@ -231,3 +231,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/odroidx2image.sh b/scripts/odroidx2image.sh index acd86d260..0de523fca 100755 --- a/scripts/odroidx2image.sh +++ b/scripts/odroidx2image.sh @@ -212,3 +212,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 98cf3751c..973781a19 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -230,3 +230,5 @@ sudo umount -l /mnt/volumio/rootfs/boot sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/raspberryimage.sh b/scripts/raspberryimage.sh index de088b804..3c2739e4a 100755 --- a/scripts/raspberryimage.sh +++ b/scripts/raspberryimage.sh @@ -179,3 +179,5 @@ sudo umount -l /mnt/volumio/rootfs/boot dmsetup remove_all sudo losetup -d ${LOOP_DEV} + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/rock64image.sh b/scripts/rock64image.sh index 84a323f41..494ebeab6 100755 --- a/scripts/rock64image.sh +++ b/scripts/rock64image.sh @@ -77,7 +77,7 @@ fi echo "Copying the bootloader" sudo dd if=platform-rock64/rock64/u-boot/idbloader.img of=${LOOP_DEV} seek=64 conv=notrunc -sudo dd if=platform-rock64/rock64/u-boot/uboot.img of=${LOOP_DEV} seek=16384 conv=notrunc +sudo dd if=platform-rock64/rock64/u-boot/uboot.img of=${LOOP_DEV} seek=16384 conv=notrunc sudo dd if=platform-rock64/rock64/u-boot/trust.img of=${LOOP_DEV} seek=24576 conv=notrunc sync @@ -225,3 +225,5 @@ sudo umount -l /mnt/volumio/rootfs/boot sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index 8038faa8f..7a8ab61b3 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -225,3 +225,5 @@ sudo umount -l /mnt/volumio/rootfs/boot sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/sparkyimage.sh b/scripts/sparkyimage.sh index 21f90bca4..12e3d9a2a 100755 --- a/scripts/sparkyimage.sh +++ b/scripts/sparkyimage.sh @@ -219,3 +219,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/tinkerimage.sh b/scripts/tinkerimage.sh index e2be8636f..61939a123 100755 --- a/scripts/tinkerimage.sh +++ b/scripts/tinkerimage.sh @@ -211,3 +211,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/udooneoimage.sh b/scripts/udooneoimage.sh index 675454799..8fb228749 100755 --- a/scripts/udooneoimage.sh +++ b/scripts/udooneoimage.sh @@ -195,3 +195,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/udooqdlimage.sh b/scripts/udooqdlimage.sh index db38d15e5..9dab8fa95 100755 --- a/scripts/udooqdlimage.sh +++ b/scripts/udooqdlimage.sh @@ -188,3 +188,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/vszeroimage.sh b/scripts/vszeroimage.sh index 0ba112d18..2ba15f1c9 100755 --- a/scripts/vszeroimage.sh +++ b/scripts/vszeroimage.sh @@ -204,3 +204,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/x86image.sh b/scripts/x86image.sh index 624cac365..b32b219dc 100755 --- a/scripts/x86image.sh +++ b/scripts/x86image.sh @@ -223,6 +223,8 @@ sudo dmsetup remove_all sudo losetup -d ${LOOP_DEV} sync +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" + echo "X86 Image file created" echo "Building VMDK Virtual Image File" qemu-img convert ${IMG_FILE} -O vmdk Volumio-dev.vmdk From 5aedc3abfd6ef4b3cda729008e09bab9ba46b341 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 22 May 2019 13:03:23 +0200 Subject: [PATCH 507/673] Use Travis's integrated `shellcheck` (#370) --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b65264ff9..076008aac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,7 @@ language: bash sudo: false -addons: - apt: - sources: - - debian-sid - packages: - - shellcheck +language: shell script: - find . -iname "*.sh" -exec shellcheck "{}" \; From 7cadd8012d1b447b4982e6316d5f3aa0a572726f Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Thu, 23 May 2019 11:18:59 +0200 Subject: [PATCH 508/673] Update README.md md5deep is asked by build script --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e08b751e5..f5b04ff6f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Copyright Michelangelo Guarise - 2016 #### Requirements ``` -git squashfs-tools kpartx multistrap qemu-user-static samba debootstrap parted dosfstools qemu binfmt-support qemu-utils +git squashfs-tools kpartx multistrap qemu-user-static samba debootstrap parted dosfstools qemu binfmt-support qemu-utils md5deep ``` #### How to From 1f2fbfa207208c0a0911441ea3ef81254561dc26 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 1 Jun 2019 14:35:56 +0200 Subject: [PATCH 509/673] Nanopineo image name fix --- scripts/nanopineoimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nanopineoimage.sh b/scripts/nanopineoimage.sh index 8e2d338f2..fb6c23f2a 100755 --- a/scripts/nanopineoimage.sh +++ b/scripts/nanopineoimage.sh @@ -18,7 +18,7 @@ while getopts ":v:p:a:" opt; do done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${ARCH}-nanopineo.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-nanopineo.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" From 074a8b52bd03468c65e5a209cdebba5007f34703 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 4 Jun 2019 18:18:21 +0200 Subject: [PATCH 510/673] Add udev rule for inputs --- volumio/etc/udev/rules.d/51-audio-input.rules | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 volumio/etc/udev/rules.d/51-audio-input.rules diff --git a/volumio/etc/udev/rules.d/51-audio-input.rules b/volumio/etc/udev/rules.d/51-audio-input.rules new file mode 100644 index 000000000..5d903ee62 --- /dev/null +++ b/volumio/etc/udev/rules.d/51-audio-input.rules @@ -0,0 +1,2 @@ +KERNEL=="pcmC*D0c", DRIVERS=="usb", ACTION=="add", RUN+="/bin/bash -c '/usr/local/bin/volumio scanaudioinputs'" +KERNEL=="pcmC*D0c", DRIVERS=="usb", ACTION=="remove", RUN+="/bin/bash -c '/usr/local/bin/volumio scanaudioinputs'" From f4500da01db02fd1d53669593615587416931226 Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 11 Jun 2019 21:12:00 +0200 Subject: [PATCH 511/673] Fix usb boot nano (#377) * Load fuse module * set default delay of 5 --- scripts/initramfs/init | 6 ++++++ scripts/nanopineoconfig.sh | 1 + 2 files changed, 7 insertions(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index ede78fa7a..cfd12c10b 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -75,6 +75,11 @@ do esac done +# Setting default boot delay of 5 seconds +if [ -z "$BOOTDELAY" ]; then + BOOTDELAY=5 +fi + #Hardware specific adaptions #When we did not already get the device name from the cmdline, try getting it from cpuinfo @@ -105,6 +110,7 @@ else fi modprobe squashfs modprobe nls_cp437 +modprobe fuse if [ -z "${IMGPART}" ]; then print_msg "Specify the squash image partition after the kernel command ${CMDLINE}" diff --git a/scripts/nanopineoconfig.sh b/scripts/nanopineoconfig.sh index 0e3bce1e7..5a50ab444 100755 --- a/scripts/nanopineoconfig.sh +++ b/scripts/nanopineoconfig.sh @@ -43,6 +43,7 @@ echo "Adding custom modules overlay, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules +echo "fuse" >> /etc/initramfs-tools/modules echo "Copying volumio initramfs updater" cd /root/ From 75356cc6ad8d41fafa8402325a5680385f95f6a3 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 23 Jun 2019 19:30:07 +0200 Subject: [PATCH 512/673] Motivo boot logo --- scripts/initramfs/init | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/initramfs/init b/scripts/initramfs/init index ede78fa7a..1ef883ddc 100755 --- a/scripts/initramfs/init +++ b/scripts/initramfs/init @@ -106,6 +106,10 @@ fi modprobe squashfs modprobe nls_cp437 +if [ $HWDEVICE == motivo ]; then + modprobe panel-feiyang-fy07024di26a30d +fi + if [ -z "${IMGPART}" ]; then print_msg "Specify the squash image partition after the kernel command ${CMDLINE}" print_msg "example: kernel... imgpart=/dev/sda2 imgfile=/gentoo.sqs" @@ -229,6 +233,12 @@ VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" # mkdir /mnt/factory mount -t auto /dev/${BOOTDEV}p1 /mnt/factory + +if [ $HWDEVICE == motivo ]; then + print_msg "Showing boot logo" + /bin/busybox lzop -d -c /mnt/factory/motivosplash > /dev/fb0 +fi + if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset" mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 /dev/${BOOTDEV}p3 -L volumio_data From b56fed9cbdcee44f638bf8afb29a8df59d32364e Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 24 Jun 2019 20:43:23 +0200 Subject: [PATCH 513/673] Set consistent card numbering for Tinkerboard --- scripts/tinkerconfig.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index e74a94232..43e780af2 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -32,10 +32,9 @@ echo "Adding default sound modules" #" >> /etc/modules echo "USB Card Ordering" -echo " -options snd-usb-audio nrpacks=1 -# USB DACs will have device number 5 in whole Volumio device range -options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf +echo "# USB DACs will have device number 5 in whole Volumio device range +# For tinkerboard, we specify that internal USB audio should be at device 1 +options snd-usb-audio index=1,5 vid=0x0bda pid=0x481a" >> /etc/modprobe.d/alsa-base.conf echo "#!/bin/sh echo 2 > /proc/irq/45/smp_affinity From 6d882ec0c3f73494e7853376f2f630dc188c7acc Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 26 Jun 2019 14:50:05 +0200 Subject: [PATCH 514/673] Pi kernel bump to 4.19.55 --- scripts/raspberryconfig.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7bc86ca98..0bf1fd277 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.14.92" +KERNEL_VERSION="4.19.55" case $KERNEL_VERSION in "4.4.9") @@ -107,6 +107,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="6aec73ed5547e09bea3e20aa2803343872c254b6" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.19.55") + KERNEL_REV="906" + KERNEL_COMMIT="b39dd764176933407df48424f1d0779da05142b1" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From db93ac8607fa30422705417a03b605a7ea141ad6 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 1 Jul 2019 12:21:39 +0200 Subject: [PATCH 515/673] Kernel 4.19.56 for pi --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 0bf1fd277..f352c3f1c 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -64,7 +64,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.19.55" +KERNEL_VERSION="4.19.56" case $KERNEL_VERSION in "4.4.9") @@ -107,9 +107,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="6aec73ed5547e09bea3e20aa2803343872c254b6" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - "4.19.55") - KERNEL_REV="906" - KERNEL_COMMIT="b39dd764176933407df48424f1d0779da05142b1" + "4.19.56") + KERNEL_REV="1242" + KERNEL_COMMIT="5ed750aaca6aa04c53dbe4f90942e4bb138a1ba6" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; esac From 054f39a8f68ed3f4ea6f5adf5ac1875d89013835 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 2 Jul 2019 20:39:50 +0200 Subject: [PATCH 516/673] tentative fix for check partition function in rpi-config --- scripts/raspberryconfig.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index f352c3f1c..7eaebe5b0 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -60,6 +60,13 @@ apt-get -y install binutils i2c-tools echo "Installing Kernel from Rpi-Update" sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update +#### FIX FOR CHECK PARTITION FUNCTION ON RPI-UPDATE, WHICH DOES NOT WORK WELL IN QEMU ENVIRONMENT +# We rename the check partition function +sed -i -e 's/function check_partition/function checks_partition/' /usr/bin/rpi-update +# We comment the check partition function +sed -i -e 's/check_partition/echo "Commented check_partition"/' /usr/bin/rpi-update + + touch /boot/start.elf mkdir /lib/modules @@ -115,13 +122,13 @@ case $KERNEL_VERSION in esac # using rpi-update relevant to defined kernel version -echo y | SKIP_BACKUP=1 rpi-update $KERNEL_COMMIT +echo y | SKIP_BACKUP=1 WANT_PI4=1 rpi-update $KERNEL_COMMIT echo "Getting actual kernel revision with firmware revision backup" cp /boot/.firmware_revision /boot/.firmware_revision_kernel echo "Updating bootloader files *.elf *.dat *.bin" -echo y | SKIP_KERNEL=1 rpi-update $FIRMWARE_COMMIT +echo y | SKIP_KERNEL=1 WANT_PI4=1 rpi-update $FIRMWARE_COMMIT echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" # these packages critically update kernel & firmware files and break Volumio From 40e4dd5d2349cd75bbde6b704fef4bd9c663a410 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 2 Jul 2019 22:07:04 +0200 Subject: [PATCH 517/673] Volumio3 --- build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.sh b/build.sh index 1a38f6d03..ba783d331 100755 --- a/build.sh +++ b/build.sh @@ -164,6 +164,9 @@ if [ -n "$BUILD" ]; then fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" + echo 'Cloning Volumio3 UI' + git clone --depth 1 -b dist3 --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www3" + echo "Adding os-release infos" { echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" From 34a6a7b1bb59e8b503f4debec096f89419f67557 Mon Sep 17 00:00:00 2001 From: macmpi Date: Tue, 2 Jul 2019 22:20:25 +0200 Subject: [PATCH 518/673] adding some Pi4 v7l drivers (Mr Engman) (#379) need to add the others too (PATCH ones, check TAUDAC) --- scripts/raspberryconfig.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7eaebe5b0..6a2247f67 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -237,6 +237,13 @@ cd wifi for DRIVER in 8188eu 8192eu 8812au mt7610 mt7612 do + echo "WIFI: $DRIVER for armv7l" + wget $MRENGMAN_REPO/$DRIVER-drivers/$DRIVER-$KERNEL_VERSION-v7l-$KERNEL_REV.tar.gz + tar xf $DRIVER-$KERNEL_VERSION-v7l-$KERNEL_REV.tar.gz + sed -i 's/^kernel=.*$/kernel='"$KERNEL_VERSION"'-v7l+/' install.sh + sh install.sh + rm -rf * + echo "WIFI: $DRIVER for armv7" wget $MRENGMAN_REPO/$DRIVER-drivers/$DRIVER-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz tar xf $DRIVER-$KERNEL_VERSION-v7-$KERNEL_REV.tar.gz @@ -330,6 +337,7 @@ apt-get install -y winbind libnss-winbind echo "Finalising drivers installation with depmod on $KERNEL_VERSION+ and $KERNEL_VERSION-v7+" depmod $KERNEL_VERSION+ depmod $KERNEL_VERSION-v7+ +depmod $KERNEL_VERSION-v7l+ echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* From 93e4fc105ad76dc68c5a90184285dfb79d9b3ef6 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 5 Jul 2019 19:57:49 +0200 Subject: [PATCH 519/673] Temporary own rpi-update --- scripts/raspberryconfig.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 6a2247f67..9e0804602 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -59,13 +59,15 @@ apt-get -y install binutils i2c-tools #apt-get -y install libnewt0.52 whiptail triggerhappy lua5.1 locales echo "Installing Kernel from Rpi-Update" -sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update +sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/volumio/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update #### FIX FOR CHECK PARTITION FUNCTION ON RPI-UPDATE, WHICH DOES NOT WORK WELL IN QEMU ENVIRONMENT # We rename the check partition function -sed -i -e 's/function check_partition/function checks_partition/' /usr/bin/rpi-update +#echo "Temporary fix for rpi_update" +#sudo sed -i -e 's/function check_partition/function checks_partition/' /usr/bin/rpi-update # We comment the check partition function -sed -i -e 's/check_partition/echo "Commented check_partition"/' /usr/bin/rpi-update +#sudo sed -i -e 's/check_partition/echo "Commented check_partition"/' /usr/bin/rpi-update +cat /usr/bin/rpi-update touch /boot/start.elf mkdir /lib/modules @@ -122,13 +124,13 @@ case $KERNEL_VERSION in esac # using rpi-update relevant to defined kernel version -echo y | SKIP_BACKUP=1 WANT_PI4=1 rpi-update $KERNEL_COMMIT +echo y | SKIP_BACKUP=1 WANT_PI4=1 IGNORE_PARTITION_CHECK=1 rpi-update $KERNEL_COMMIT echo "Getting actual kernel revision with firmware revision backup" cp /boot/.firmware_revision /boot/.firmware_revision_kernel echo "Updating bootloader files *.elf *.dat *.bin" -echo y | SKIP_KERNEL=1 WANT_PI4=1 rpi-update $FIRMWARE_COMMIT +echo y | SKIP_KERNEL=1 WANT_PI4=1 IGNORE_PARTITION_CHECK=1 rpi-update $FIRMWARE_COMMIT echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" # these packages critically update kernel & firmware files and break Volumio From 4731febc06ba3c6db73515d223e9ad5e530e3eb9 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 6 Jul 2019 00:26:53 +0200 Subject: [PATCH 520/673] Fix for PI4 --- scripts/raspberryconfig.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 9e0804602..8a28c44f6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -59,15 +59,9 @@ apt-get -y install binutils i2c-tools #apt-get -y install libnewt0.52 whiptail triggerhappy lua5.1 locales echo "Installing Kernel from Rpi-Update" +# Temporary fix for PI4 check partition, until it gets merged sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/volumio/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update -#### FIX FOR CHECK PARTITION FUNCTION ON RPI-UPDATE, WHICH DOES NOT WORK WELL IN QEMU ENVIRONMENT -# We rename the check partition function -#echo "Temporary fix for rpi_update" -#sudo sed -i -e 's/function check_partition/function checks_partition/' /usr/bin/rpi-update -# We comment the check partition function -#sudo sed -i -e 's/check_partition/echo "Commented check_partition"/' /usr/bin/rpi-update - -cat /usr/bin/rpi-update +#sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update touch /boot/start.elf mkdir /lib/modules @@ -124,13 +118,13 @@ case $KERNEL_VERSION in esac # using rpi-update relevant to defined kernel version -echo y | SKIP_BACKUP=1 WANT_PI4=1 IGNORE_PARTITION_CHECK=1 rpi-update $KERNEL_COMMIT +echo y | SKIP_BACKUP=1 WANT_PI4=1 SKIP_CHECK_PARTITION=1 UPDATE_SELF=0 /usr/bin/rpi-update $KERNEL_COMMIT echo "Getting actual kernel revision with firmware revision backup" cp /boot/.firmware_revision /boot/.firmware_revision_kernel echo "Updating bootloader files *.elf *.dat *.bin" -echo y | SKIP_KERNEL=1 WANT_PI4=1 IGNORE_PARTITION_CHECK=1 rpi-update $FIRMWARE_COMMIT +echo y | SKIP_KERNEL=1 WANT_PI4=1 SKIP_CHECK_PARTITION=1 UPDATE_SELF=0 /usr/bin/rpi-update $FIRMWARE_COMMIT echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" # these packages critically update kernel & firmware files and break Volumio From eb612c826e4ade50abf716ddd4a7eefa37899bdf Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 6 Jul 2019 12:16:32 +0200 Subject: [PATCH 521/673] Wifi driver for PI4 --- scripts/raspberryconfig.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 8a28c44f6..014b3e86d 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -141,10 +141,10 @@ apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depen echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & few others firmware upgraging to Pi Foundations packages" apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 -# Temporary brcm firmware fix solution until we use Stretch -wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20161130-3+rpt4_all.deb -dpkg -i firmware-brcm80211_20161130-3+rpt4_all.deb -rm firmware-brcm80211_20161130-3+rpt4_all.deb +# Temporary brcm firmware fix solution until we use Buster +wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rpt2_all.deb +dpkg -i firmware-brcm80211_20190114-1+rpt2_all.deb +rm firmware-brcm80211_20190114-1+rpt2_all.deb if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" @@ -153,11 +153,6 @@ echo "Adding support for dtoverlay=pi3-disable-wifi on 4.4.9 kernel" wget -P /boot/overlays/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/overlays/pi3-disable-wifi.dtbo fi -#echo "Adding raspi-config" -#wget -P /raspi http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20151019_all.deb -#dpkg -i /raspi/raspi-config_20151019_all.deb -#rm -Rf /raspi - echo "Installing WiringPi from Raspberrypi.org Repo" apt-get -y install wiringpi From 082600b79c9ab925ff81bf1846249c79812a4b67 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 6 Jul 2019 12:12:55 +0000 Subject: [PATCH 522/673] Differential hotspot --- volumio/bin/hotspot.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/volumio/bin/hotspot.sh b/volumio/bin/hotspot.sh index 76564e941..8d2aead2a 100755 --- a/volumio/bin/hotspot.sh +++ b/volumio/bin/hotspot.sh @@ -1,5 +1,9 @@ #!/bin/bash +HARDWARE=$(cat /etc/os-release | grep ^VOLUMIO_HARDWARE | tr -d 'VOLUMIO_HARDWARE="') +KERNEL_VERSION=$(uname -r | cut -d. -f1-2 --output-delimiter='') +KERNEL_VERSION_HOSTAPD28="419" + case "$1" in 'start') MODULE=$(basename $(readlink /sys/class/net/wlan0/device/driver/module)) @@ -7,10 +11,15 @@ case "$1" in if [ "$MODULE" = "8192cu" ] && [ "$ARCH" = "armhf" ] && !(modinfo "$MODULE" | grep -q '^depends:.*cfg80211.*') ; then echo "Launching Hostapd Edimax" - /usr/sbin/hostapd-edimax /etc/hostapd/hostapd-edimax.conf + /usr/sbin/hostapd-edimax /etc/hostapd/hostapd-edimax.conf else - echo "Launching Ordinary Hostapd" - /usr/sbin/hostapd /etc/hostapd/hostapd.conf + if [[ $KERNEL_VERSION == $KERNEL_VERSION_HOSTAPD28 ]] && [ $HARDWARE == "pi" ] ; then + echo "Launching Hostapd 2.8" + /usr/sbin/hostapd-2.8 /etc/hostapd/hostapd.conf + else + echo "Launching Ordinary Hostapd" + /usr/sbin/hostapd /etc/hostapd/hostapd.conf + fi fi ;; From 1fd340d2783e8bee8e02e7a2980e1527262ee588 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 6 Jul 2019 14:14:10 +0200 Subject: [PATCH 523/673] Hostapd 2.8 --- scripts/volumioconfig.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index a0cd00599..ef90186f8 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -288,6 +288,10 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then wget http://repo.volumio.org/Volumio2/Binaries/arm/hostapd-edimax -P /usr/sbin/ chmod a+x /usr/sbin/hostapd-edimax + echo "Adding special version for kernel 4.19" + wget http://repo.volumio.org/Volumio2/Binaries/arm/hostapd-2.8 -P /usr/sbin/ + chmod a+x /usr/sbin/hostapd-2.8 + echo "interface=wlan0 ssid=Volumio channel=4 From c599938eb888ec78b9c5e443e2b7089b55374eef Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 22 Jul 2019 17:56:35 +0200 Subject: [PATCH 524/673] Primo specific files --- build.sh | 4 ++++ scripts/primoconfig.sh | 9 ++++----- scripts/primoimage.sh | 34 ++++++++++++++++++---------------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/build.sh b/build.sh index ba783d331..652394c72 100755 --- a/build.sh +++ b/build.sh @@ -333,6 +333,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/motivoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + primo) echo 'Writing Primo Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/primoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; esac #When the tar is created we can build the docker layer diff --git a/scripts/primoconfig.sh b/scripts/primoconfig.sh index cc728b3f1..43e780af2 100755 --- a/scripts/primoconfig.sh +++ b/scripts/primoconfig.sh @@ -7,7 +7,7 @@ echo "Initializing.." . init.sh echo "Creating \"fstab\"" -echo "# Primo fstab" > /etc/fstab +echo "# Tinkerboard fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 @@ -32,10 +32,9 @@ echo "Adding default sound modules" #" >> /etc/modules echo "USB Card Ordering" -echo " -options snd-usb-audio nrpacks=1 -# USB DACs will have device number 5 in whole Volumio device range -options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf +echo "# USB DACs will have device number 5 in whole Volumio device range +# For tinkerboard, we specify that internal USB audio should be at device 1 +options snd-usb-audio index=1,5 vid=0x0bda pid=0x481a" >> /etc/modprobe.d/alsa-base.conf echo "#!/bin/sh echo 2 > /proc/irq/45/smp_affinity diff --git a/scripts/primoimage.sh b/scripts/primoimage.sh index 4fbc2d534..e72319f37 100755 --- a/scripts/primoimage.sh +++ b/scripts/primoimage.sh @@ -55,23 +55,23 @@ mkfs -F -t ext4 -L volumio "${SYS_PART}" mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync -echo "Preparing for the Primo (tinkerboard) rockchip kernel/ platform files" -if [ -d platform-primo ] +echo "Preparing for the primo rockchip kernel/ platform files" +if [ -d platform-asus ] then echo "Platform folder already exists - keeping it" - # if you really want to re-clone from the repo, then delete the platform-primo folder - # that will refresh all the primo platforms, see below + # if you really want to re-clone from the repo, then delete the platform-asus folder + # that will refresh all the asus platforms, see below else - echo "Clone primo files from repo" - git clone --depth 1 https://github.com/volumio/platform-primo.git platform-primo - echo "Unpack the Volumio Primo platform files" - cd platform-primo - tar xfJ primo.tar.xz + echo "Clone asus files from repo" + git clone --depth 1 https://github.com/volumio/platform-asus.git platform-asus + echo "Unpack the Primo platform files" + cd platform-asus + tar xfJ tinkerboard.tar.xz cd .. fi echo "Copying the bootloader" -dd if=platform-primo/primo/u-boot/u-boot.img of=${LOOP_DEV} seek=64 conv=notrunc +dd if=platform-asus/tinkerboard/u-boot/u-boot.img of=${LOOP_DEV} seek=64 conv=notrunc sync if [ -d /mnt ] @@ -100,15 +100,15 @@ mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying Primo boot files" -cp -R platform-primo/primo/boot/* /mnt/volumio/rootfs/boot/ +cp -R platform-asus/tinkerboard/boot/* /mnt/volumio/rootfs/boot/ -echo "Copying Primo modules and firmware" -cp -pdR platform-primo/primo/lib/modules /mnt/volumio/rootfs/lib/ -cp -pdR platform-primo/primo/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying Tinkerboard modules and firmware" +cp -pdR platform-asus/tinkerboard/lib/modules /mnt/volumio/rootfs/lib/ +cp -pdR platform-asus/tinkerboard/lib/firmware /mnt/volumio/rootfs/lib/ sync echo "Preparing to run chroot for more Primo configuration" -cp scripts/primoconfig.sh /mnt/volumio/rootfs +cp scripts/tinkerconfig.sh /mnt/volumio/rootfs cp scripts/install-kiosk.sh /mnt/volumio/rootfs cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin @@ -159,7 +159,7 @@ umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys -echo "==> Volumio Primo device installed" +echo "==> Tinkerboard device installed" #echo "Removing temporary platform files" #echo "(you can keep it safely as long as you're sure of no changes)" @@ -211,3 +211,5 @@ umount -l /mnt/volumio/rootfs/boot dmsetup remove_all losetup -d ${LOOP_DEV} sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" From 36ea0e2454f70c3aa34c63c10062a97d9ce1914c Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 25 Jul 2019 18:41:49 +0200 Subject: [PATCH 525/673] Fix --- scripts/primoimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/primoimage.sh b/scripts/primoimage.sh index e72319f37..fc51fef46 100755 --- a/scripts/primoimage.sh +++ b/scripts/primoimage.sh @@ -108,7 +108,7 @@ cp -pdR platform-asus/tinkerboard/lib/firmware /mnt/volumio/rootfs/lib/ sync echo "Preparing to run chroot for more Primo configuration" -cp scripts/tinkerconfig.sh /mnt/volumio/rootfs +cp scripts/primoconfig.sh /mnt/volumio/rootfs cp scripts/install-kiosk.sh /mnt/volumio/rootfs cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin From 76d896b632a135005f5aa213e11ff0507bc3485c Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 26 Jul 2019 14:07:34 +0200 Subject: [PATCH 526/673] PI kernel 4.19.60 --- scripts/raspberryconfig.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 014b3e86d..02a014f99 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,7 +67,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.19.56" +KERNEL_VERSION="4.19.60" case $KERNEL_VERSION in "4.4.9") @@ -115,6 +115,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="5ed750aaca6aa04c53dbe4f90942e4bb138a1ba6" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.19.60") + KERNEL_REV="1247" + KERNEL_COMMIT="ce2a9f85a6fd88f8c42ef54b7bad99b42e76e403" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From aee678f858ab36a42ea5c70e99fd27d53349be3b Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 2 Aug 2019 17:06:31 +0200 Subject: [PATCH 527/673] Fix for pi4 kernel modules in initram --- scripts/initramfs/mkinitramfs-custom.sh | 30 +++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/scripts/initramfs/mkinitramfs-custom.sh b/scripts/initramfs/mkinitramfs-custom.sh index 098009c8c..96f0cab07 100755 --- a/scripts/initramfs/mkinitramfs-custom.sh +++ b/scripts/initramfs/mkinitramfs-custom.sh @@ -264,6 +264,23 @@ if ! command -v ldd >/dev/null 2>&1 ; then exit 1 fi +## FIX FOR EXISTING SYMLINKS + +if [ -f "${DESTDIR}/etc/fstab" ]; then + echo "Removing old fstab file" + rm ${DESTDIR}/etc/mtab +fi + +if [ -f "${DESTDIR}/sbin/mount.ntfs-3g" ]; then + echo "Removing old ntfs 3g file" + rm ${DESTDIR}/sbin/mount.ntfs-3g +fi + +if [ -f "${DESTDIR}/sbin/mount.ntfs" ]; then + echo "Removing old ntfs file" + rm ${DESTDIR}/sbin/mount.ntfs +fi + # fstab and mtab touch "${DESTDIR}/etc/fstab" ln -s /proc/mounts "${DESTDIR}/etc/mtab" @@ -345,10 +362,11 @@ fi touch "$outfile" outfile="$(readlink -f "$outfile")" -versions="$(ls -t /lib/modules | cat | head -n2)" +versions="$(ls -t /lib/modules | sort | cat | head -n3)" + v_version=$(echo ${versions} | awk '{print $1}') o_version=$(echo ${versions} | awk '{print $2}') - +l_version=$(echo ${versions} | awk '{print $3}') @@ -385,6 +403,14 @@ if [ ! ${o_version} = "" ]; then cp -rf "${DESTDIR_OTHER}/lib/modules/${o_version}" "${DESTDIR_REAL}/lib/modules/${o_version}" fi +if [ ! ${l_version} = "" ]; then + DESTDIR=${DESTDIR_OTHER} + version=${l_version} + echo "Version: ${l_version}" + build_initramfs + cp -rf "${DESTDIR_OTHER}/lib/modules/${l_version}" "${DESTDIR_REAL}/lib/modules/${l_version}" +fi + DESTDIR=${DESTDIR_REAL} echo "Adding findfs/ parted/ mkfs.ext4/ e2fsck to initramfs" From 0af2046f6f3fc239f3d68506b41db2a862108ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 28 Aug 2019 13:56:40 +0200 Subject: [PATCH 528/673] Motivo: add reboot-mode option in kernel cmdline --- scripts/initramfs/init.nextarm | 57 +++++++++++++++++++++---- scripts/initramfs/mkinitramfs-custom.sh | 4 ++ 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index b4c8a1ba5..8ac4b10b8 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -59,6 +59,38 @@ parse_disk() { fi } +do_reboot() { + + case $REBOOTMODE in + normal) + echo b > /proc/sysrq-trigger + ;; + file) + echo "Rebooting via mcu control at next system start..." + mkdir /boot + mount -t vfat ${BOOTPART} /boot + echo "" > /boot/executereboot + umount /boot + rm -r /boot + echo "Attempting a reboot anyway..." + echo b > /proc/sysrq-trigger + ;; + mcu) + echo "Immediately rebooting via mcu control..." + /bin/i2crw1 w 33 25 1 + ;; + manual) + echo "Manual reboot, dropping to a shell..." + sh + exit 0 + ;; + *) + echo "Invalid reboot mode option in kernel cmd parameters, using normal reboot..." + echo b > /proc/sysrq-trigger + ;; + esac +} + DO_GEN=no for p in ${CMDLINE}; @@ -100,6 +132,9 @@ do hwdevice) HWDEVICE=$value ;; + rebootmode) + REBOOTMODE=$value + ;; esac done @@ -236,7 +271,8 @@ if [ -e /dev/sda1 ] && [ ! "/dev/sda1" == "${BOOTPART}" ]; then umount /mnt/boot rm -r /mnt/boot print_msg "Restarting" - echo b > /proc/sysrq-trigger + do_reboot + #echo b > /proc/sysrq-trigger fi if [ -e /mnt/usb/factory_reset ]; then print_msg "Factory Reset on USB" @@ -312,7 +348,8 @@ if [ -e "/mnt/factory/factory_reset" ]; then rm -r /boot fi print_msg "Restarting" - echo b > /proc/sysrq-trigger + do_reboot + #echo b > /proc/sysrq-trigger fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data" @@ -459,12 +496,16 @@ if [ ! -z "${DEVFSTAB}" ]; then fi else DEVFSTAB=`cat /mnt/ext/union/etc/fstab | grep -E "^/dev/[a-z]{3,6}[0-9]{1,2}[a-z]{0,1}[0-9]{0,2}" -o` - if [ ! -z "${DEVFSTAB}" ]; then - print_msg "found fstab entry with device ${DEVFSTAB} for /boot" - if [ ! $BOOTPART == $DEVFSTAB ]; then - sed -i "s/${DEVFSTAB}/${BOOTPART}/g" /mnt/ext/union/etc/fstab - print_msg "fstab entry updated to ${DEVFSTAB}" - fi + if [ -z "${DEVFSTAB}" ]; then +# normally never gets here ;) + print_msg "Incompatible fstab, no entry found for /boot" + exec sh + exit 0 + fi + print_msg "found fstab entry with device ${DEVFSTAB} for /boot" + if [ ! $BOOTPART == $DEVFSTAB ]; then + sed -i "s/${DEVFSTAB}/${BOOTPART}/g" /mnt/ext/union/etc/fstab + print_msg "fstab entry updated to ${DEVFSTAB}" fi fi diff --git a/scripts/initramfs/mkinitramfs-custom.sh b/scripts/initramfs/mkinitramfs-custom.sh index 96f0cab07..38de9de43 100755 --- a/scripts/initramfs/mkinitramfs-custom.sh +++ b/scripts/initramfs/mkinitramfs-custom.sh @@ -420,6 +420,10 @@ cp /sbin/mkfs.ext4 "${DESTDIR}/sbin" cp /sbin/e2fsck "${DESTDIR}/sbin" cp /sbin/resize2fs "${DESTDIR}/sbin" cp /sbin/findfs "${DESTDIR}/sbin" +if [ -f /usr/bin/i2crw1 ]; then + echo "Adding i2crw1..." + cp /usr/bin/i2crw1 "${DESTDIR}/bin" +fi if [ ${DPKG_ARCH} = "i386" ]; then cp /sbin/gdisk "${DESTDIR}/sbin" # these libs are only for gdisk From 30bfaeaeab57af60b6d06ff6fb0e5a364dc6e3f9 Mon Sep 17 00:00:00 2001 From: Volumio Date: Wed, 28 Aug 2019 22:52:41 +0200 Subject: [PATCH 529/673] Do not try to reboot anyway in file mode --- scripts/initramfs/init.nextarm | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 8ac4b10b8..b9a569a37 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -72,8 +72,6 @@ do_reboot() { echo "" > /boot/executereboot umount /boot rm -r /boot - echo "Attempting a reboot anyway..." - echo b > /proc/sysrq-trigger ;; mcu) echo "Immediately rebooting via mcu control..." From 3564b78e8f63187567f7cb1fb9bc96732652c140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 29 Aug 2019 21:33:24 +0200 Subject: [PATCH 530/673] Amlogic S9xxx tv boxes: prepare for myVolumio --- scripts/aml9xxxarmv7config.sh | 3 +++ scripts/aml9xxxarmv7image.sh | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/aml9xxxarmv7config.sh b/scripts/aml9xxxarmv7config.sh index 3a3f0e9ad..84120fc35 100755 --- a/scripts/aml9xxxarmv7config.sh +++ b/scripts/aml9xxxarmv7config.sh @@ -60,6 +60,9 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi diff --git a/scripts/aml9xxxarmv7image.sh b/scripts/aml9xxxarmv7image.sh index 99f16f15f..d3b6408d5 100755 --- a/scripts/aml9xxxarmv7image.sh +++ b/scripts/aml9xxxarmv7image.sh @@ -27,7 +27,6 @@ else fi echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" - dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" @@ -125,6 +124,19 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /aml9xxxarmv7config.sh From 7434a810e3a57a07e8ee53a8f2063b5b15d2425c Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 30 Aug 2019 21:33:00 +0200 Subject: [PATCH 531/673] Adding missing do_reboot function --- scripts/initramfs/init.nextarm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index b9a569a37..63062579b 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -423,7 +423,8 @@ if [ -e "/boot/kernel_update" ]; then sync umount /boot rm -rf /boot - echo b > /proc/sysrq-trigger + do_reboot + #echo b > /proc/sysrq-trigger fi # if data partition needs to be resized From 319140d9506b36916556137b3343e07dc5b87c0f Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 28 Sep 2019 11:28:25 +0200 Subject: [PATCH 532/673] PI kernel 4.19.75 HDMI sound fix Hifiberry DAC+DSP soundcard driver ...and many other stuff --- scripts/raspberryconfig.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 02a014f99..59f2c10da 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,7 +67,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.19.60" +KERNEL_VERSION="4.19.75" case $KERNEL_VERSION in "4.4.9") @@ -120,6 +120,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="ce2a9f85a6fd88f8c42ef54b7bad99b42e76e403" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.19.75") + KERNEL_REV="1270" + KERNEL_COMMIT="d9321aceacfc6619b4238c6c764203b1122f2f9b" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From f8c811e0195b91bde5fe4bc9a71cb1e2f16cff54 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 1 Oct 2019 17:09:18 +0200 Subject: [PATCH 533/673] Removing V8 kernel for PI --- build.sh | 4 + scripts/raspberryconfig.sh | 6 ++ scripts/vim1config.sh | 104 ++++++++++++++++++ scripts/vim1image.sh | 210 +++++++++++++++++++++++++++++++++++++ 4 files changed, 324 insertions(+) create mode 100755 scripts/vim1config.sh create mode 100755 scripts/vim1image.sh diff --git a/build.sh b/build.sh index 652394c72..47f397773 100755 --- a/build.sh +++ b/build.sh @@ -337,6 +337,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/primoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + vim1) echo 'Writing VIM1 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/vim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; esac #When the tar is created we can build the docker layer diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 59f2c10da..54b656c4a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -136,6 +136,12 @@ cp /boot/.firmware_revision /boot/.firmware_revision_kernel echo "Updating bootloader files *.elf *.dat *.bin" echo y | SKIP_KERNEL=1 WANT_PI4=1 SKIP_CHECK_PARTITION=1 UPDATE_SELF=0 /usr/bin/rpi-update $FIRMWARE_COMMIT +if [ -d /lib/modules/$KERNEL_VERSION-v8+ ]; then + echo "Removing V8 Kernels" + rm /boot/kernel8.img + rm -rf /lib/modules/$KERNEL_VERSION-v8+ +fi + echo "Blocking unwanted libraspberrypi0, raspberrypi-bootloader, raspberrypi-kernel installs" # these packages critically update kernel & firmware files and break Volumio # may be triggered by manual or plugin installs explicitly or through dependencies like chromium, sense-hat, picamera,... diff --git a/scripts/vim1config.sh b/scripts/vim1config.sh new file mode 100755 index 000000000..0383b1e77 --- /dev/null +++ b/scripts/vim1config.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# Amlogic fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +LABEL=BOOT /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "#!/bin/sh -e +/etc/hdmi.sh & +/etc/fan.sh & +exit 0" > /etc/rc.local + +echo "Adding default sound modules and wifi" +echo "dhd +snd_soc_pcm5102 +snd_soc_odroid_dac +" >> /etc/modules + +echo "USB Card Ordering" +echo " +options snd-usb-audio nrpacks=1 +# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc mc abootimg fbset + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +#echo "Changing to 'modules=dep'" +#echo "(otherwise won't boot due to uInitrd 4MB limit)" +#sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Creating s905_autoscript" +mkimage -A arm -O linux -T script -C none -d /boot/s905_autoscript.cmd /boot/s905_autoscript + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/vim1image.sh b/scripts/vim1image.sh new file mode 100755 index 000000000..8c0d62366 --- /dev/null +++ b/scripts/vim1image.sh @@ -0,0 +1,210 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-vim1.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the AML kernel and platform files" +if [ -d platform-aml ] +then + echo "Pull from repo" + cd platform-aml + git pull + cd .. +else + echo "Clone all AML files from repo" + git clone --depth 1 https://github.com/volumio/platform-aml.git platform-aml +# cd .. +fi + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying boot files" +cp -pdR platform-aml/s9xxx/boot/* /mnt/volumio/rootfs/boot +echo "Copying modules" +cp -pdR platform-aml/s9xxx/lib/modules /mnt/volumio/rootfs/lib/ +echo "Copying firmware" +cp -pdR platform-aml/s9xxx/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying etc files" +cp -pdR platform-aml/s9xxx/etc/* /mnt/volumio/rootfs/etc +echo "Copying usr/bin files" +cp -pdR platform-aml/s9xxx/usr/* /mnt/volumio/rootfs/usr +echo "Copying VIM1 DTB" +cp -rp /mnt/volumio/rootfs/boot/DTB/kvim.dtb /mnt/volumio/rootfs/boot/dtb.img + +sync + +echo "Preparing to run chroot for more AML configuration" +cp scripts/vim1config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm_tvbox /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin + +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/vim1config.sh +EOF + +#cleanup +rm /mnt/volumio/rootfs/vim1config.sh +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/root/init.sh +rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> AML device installed" + +#echo "Removing temporary platform files" +#echo "(you can keep it safely as long as you're sure of no changes)" +#rm -r platform-aml +sync + +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" From ef5da971c6de39c271b162596aa09378bec8523f Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 2 Oct 2019 17:30:23 +0200 Subject: [PATCH 534/673] Remove git folder of UI3 --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 47f397773..0c3e7e1f2 100755 --- a/build.sh +++ b/build.sh @@ -166,7 +166,8 @@ if [ -n "$BUILD" ]; then git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" echo 'Cloning Volumio3 UI' git clone --depth 1 -b dist3 --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www3" - + rm -rf build/$BUILD/root/volumio/http/www/.git + rm -rf build/$BUILD/root/volumio/http/www3/.git echo "Adding os-release infos" { echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" @@ -174,7 +175,7 @@ if [ -n "$BUILD" ]; then echo "VOLUMIO_BE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/.git" rev-parse HEAD)\"" echo "VOLUMIO_ARCH=\"${BUILD}\"" } >> "build/$BUILD/root/etc/os-release" - rm -rf build/$BUILD/root/volumio/http/www/.git + if [ ! "$BUILD" = x86 ]; then chroot "build/$BUILD/root" /bin/bash -x <<'EOF' su - From 87221b069213d027349c23ddd56f24253d7f3df2 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 4 Oct 2019 19:49:39 +0200 Subject: [PATCH 535/673] Tinkerboard S BT FW --- scripts/primoconfig.sh | 5 +++++ scripts/tinkerconfig.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/scripts/primoconfig.sh b/scripts/primoconfig.sh index 43e780af2..57462c5be 100755 --- a/scripts/primoconfig.sh +++ b/scripts/primoconfig.sh @@ -67,6 +67,11 @@ echo "#!/bin/sh -e /usr/local/bin/detect-primo.sh exit 0" > /etc/rc.local +echo "Installing Tinkerboard Bluetooth Utils and Firmware" +wget http://repo.volumio.org/Volumio2/Firmwares/rtl_bt_tinkerboard.tar.gz +tar xf rtl_bt_tinkerboard.tar.gz -C / +rm rtl_bt_tinkerboard.tar.gz + echo "Installing additonal packages" apt-get update #apt-get -y install u-boot-tools liblircclient0 lirc diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 43e780af2..57462c5be 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -67,6 +67,11 @@ echo "#!/bin/sh -e /usr/local/bin/detect-primo.sh exit 0" > /etc/rc.local +echo "Installing Tinkerboard Bluetooth Utils and Firmware" +wget http://repo.volumio.org/Volumio2/Firmwares/rtl_bt_tinkerboard.tar.gz +tar xf rtl_bt_tinkerboard.tar.gz -C / +rm rtl_bt_tinkerboard.tar.gz + echo "Installing additonal packages" apt-get update #apt-get -y install u-boot-tools liblircclient0 lirc From 95c6a286a2f4548a2f429d7e6d2143132ab8436c Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 4 Oct 2019 20:23:08 +0200 Subject: [PATCH 536/673] Enable tinkerbt service --- scripts/primoconfig.sh | 1 + scripts/tinkerconfig.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/primoconfig.sh b/scripts/primoconfig.sh index 57462c5be..c471acad7 100755 --- a/scripts/primoconfig.sh +++ b/scripts/primoconfig.sh @@ -71,6 +71,7 @@ echo "Installing Tinkerboard Bluetooth Utils and Firmware" wget http://repo.volumio.org/Volumio2/Firmwares/rtl_bt_tinkerboard.tar.gz tar xf rtl_bt_tinkerboard.tar.gz -C / rm rtl_bt_tinkerboard.tar.gz +systemctl enable tinkerbt.service echo "Installing additonal packages" apt-get update diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 57462c5be..c471acad7 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -71,6 +71,7 @@ echo "Installing Tinkerboard Bluetooth Utils and Firmware" wget http://repo.volumio.org/Volumio2/Firmwares/rtl_bt_tinkerboard.tar.gz tar xf rtl_bt_tinkerboard.tar.gz -C / rm rtl_bt_tinkerboard.tar.gz +systemctl enable tinkerbt.service echo "Installing additonal packages" apt-get update From fde7d32344c92fdcc1d002de7bb963c3890dabd9 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 8 Oct 2019 16:51:41 +0200 Subject: [PATCH 537/673] BT --- scripts/raspberryconfig.sh | 3 +++ scripts/tinkerconfig.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 54b656c4a..e278ca085 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -162,6 +162,9 @@ wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rp dpkg -i firmware-brcm80211_20190114-1+rpt2_all.deb rm firmware-brcm80211_20190114-1+rpt2_all.deb +echo "Installing Bluetooth Utils" +apt-get install -y pi-bluetooth + if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/bcm2708-rpi-0-w.dtb diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index c471acad7..32b9da1b7 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -73,6 +73,11 @@ tar xf rtl_bt_tinkerboard.tar.gz -C / rm rtl_bt_tinkerboard.tar.gz systemctl enable tinkerbt.service +echo "Installing updated Realtek firmwares" +wget http://repo.volumio.org/Volumio2/Firmwares/firmware-realtek_20190114-2_all.deb +sudo dpkg -i firmware-realtek_20190114-2_all.deb +rm firmware-realtek_20190114-2_all.deb + echo "Installing additonal packages" apt-get update #apt-get -y install u-boot-tools liblircclient0 lirc From ea059e1c4f65a179302e5a0dee65119dd990f5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 8 Oct 2019 23:21:13 +0200 Subject: [PATCH 538/673] Prepare for Debian buster --- README.md | 128 +++++ build.sh | 39 +- recipes/x86-buster.conf | 62 +++ recipes/x86-dev-buster.conf | 69 +++ scripts/initramfs/init-x86 | 122 +++-- .../initramfs/mkinitramfs-custom-single.sh | 413 --------------- scripts/initramfs/mkinitramfs-volumio.sh | 495 ++++++++++++++++++ scripts/volumioconfig.sh | 193 ++++--- scripts/x86b-config.sh | 281 ++++++++++ scripts/x86b-image.sh | 236 +++++++++ 10 files changed, 1497 insertions(+), 541 deletions(-) create mode 100755 recipes/x86-buster.conf create mode 100644 recipes/x86-dev-buster.conf delete mode 100755 scripts/initramfs/mkinitramfs-custom-single.sh create mode 100755 scripts/initramfs/mkinitramfs-volumio.sh create mode 100755 scripts/x86b-config.sh create mode 100755 scripts/x86b-image.sh diff --git a/README.md b/README.md index e08b751e5..2047085eb 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ where switches are : **pi**, **odroidc1/2/xu4/x2**, **udooneo**, **udooqdl**, **cuboxi**, **pine64**, **sparky**, **bbb**, **bpipro**, bpim2u, cubietruck, compulab, **x86** * -l `` Create docker layer. Give a Docker Repository name as the argument. * -v `` Version + * -s `` Allows building for Debian suite 'buster'. Omit this option when building for Debian jessie Example: Build a Raspberry PI image from scratch, version 2.0 : ``` @@ -41,6 +42,44 @@ Example: Build the architecture for x86 first and the image version MyVersion in ./build.sh -d x86 -v MyVersion ``` +#### Updates for Debian Buster +See the list at the end of this README + +#### Modifications for Building on a Ubuntu or Debian Buster host + +This regards **multistrap** (used for building the rootfs) and the use of **mkinhitramfs.sh**. + +**Multistrap** +This does not work OOTB in Debian Buster and Ubuntu, please patch + +#####Ubuntu +Add the following 3 lines to the **build.sh** script, just before calling the multistrap script (code as follows): + + .. + .. + mkdir -p "build/$BUILD/root/etc/apt/trusted.gpg.d" + apt-key --keyring "build/$BUILD/root/etc/apt/trusted.gpg.d/debian.gpg" adv --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 7638D0442B90D010 + apt-key --keyring "build/$BUILD/root/etc/apt/trusted.gpg.d/debian.gpg" adv --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-key CBF8D6FD518E17E1 + multistrap -a "$ARCH" -f "$CONF" + .. + .. + +#####Debian Buster +The above does not work for Debian, but instead patch "/usr/sbin/multistrap". +Look for the line with "AllowInsecureRepositories=true"" and add an extra line above it to allow unauthenticated packages, it should read like this: + + .. + .. + $config_str .= " -o Apt::Get::AllowUnauthenticated=true;" + $config_str .= " -o Acquire::AllowInsecureRepositories=true"; + .. + .. + +**mkinitramfs.sh** +This script is know to fail on Ubuntu and Debian Buster, trying to locate the rootfs device. +This only happens with config.sh scripts which change the initramfs config from MODULES=most to **MODULES=dep**. +As Modules=dep does not seem to add relevant additional module anyway, replace the usage of MODULES=dep to **MODULES=list**, which will only add the modules as specified in the list. The standard dependencies get added anyway. Tested with a number of these scripts, they all work. + #### Sources Kernel Sources @@ -119,3 +158,92 @@ using symbolic links others may work at once or with minor adaptions * + +### List of modifications for Debian Buster (currently only for X86) + +####build.sh +: - add a new option to allow building for other Debian suites. Currently only buster or omit the option to build for jessie (default) +- add a comment (as a warning) just before the call to multistrap, pointing to issues on Debian Buster and Ubuntu host platforms, referring to this README.md for further info. +- depending on OS version, either call the jessie or buster device image script +Currently supported: +x86**b**-image.sh (calls x86**b**-config.sh) + +####recipes +: - added two new recipes: x86-buster.conf and x86-dev-buster.conf +- removed **base-files** and **base-passwd** from the recipes, they get added automatically + +####volumioconfig.sh#### +: - fetch OS version +- the dash.preinst script was removed according to: + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890073 + action: when OS version = buster, then skip "/var/lib/dpkg/info/dash.preinst install" + + if [ ! $OS_VERSION_ID = 10 ]; then + /var/lib/dpkg/info/dash.preinst install + fi + +: - The configuration of package **base-files** depends on package **base-passwd**. +However, base-files gets bootstrapped before base-pwasswd +(This is not a result of removing them from the recipe, it has no influence) +Solution: create a valid /etc/passwd before confioguring anything else. +Use the pre install script for that, to be found in /var/lib/dpgg/info: + + if [ $OS_VERSION_ID = 10 ]; then + echo "Working around a debian buster package dependency issue" + /var/lib/dpkg/info/base-passwd.preinst install + fi +- depending on OS version, skip Shairport-Sync +- depending on OS version, install volumio-specific packages + +####init-x86 +: - adding a function to update UUID's, avoiding code being repeated +- adding "datapart" option to /proc/cmdline +- modprobe modules for nvme and emmc support +- fixing a problem with moving the backup GPT table +- always resize the data partition when the disk is not fully used (not just on first boot) + +####x86image.sh + +: - building for buster +updated/ additional packages (new kernel etc.) +currently adding up-to-date firmware from a tarball +todo: remove the use of the firmware tarball +todo: add the relevant firmware packages during multistrap + +####x86config.sh +: - remove firmware package (.deb) install, unpack tarball instead (see x86image.sh) +- syslinux.tmpl +add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline +- grub.tmpl and /etc/default/grub" +add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline +- adding nvme, emmc modules to /etc/initramfs-tools/modules list + +####mkinitramfs-custom.sh +: - the current "jessie" mkinitramfs-custom.sh version fails in hook-function ""zz-busybox". +It appears to be incompatible with a buster build. +Rewritten based on core code of the original mkinitramfs script from buster's initramfs-tools package. +NOTE: the previous version used "cp" to copy volumio-specific binary packages, along with a copy of their library dependencies. +With buster, this method is not waterproof and results in an unusable initramfs. +Instead of "cp", the new version shall always use "copy_exec", which automatically adds the necessary dependencies. + +TODO: mkinitramfs-custom.sh is not suitable for multiple kernels yet. +Therefore a PI won't work at the moment, this is WIP!! + +####End of Buster modifications + + + + + + + + + + + + + + + + + diff --git a/build.sh b/build.sh index 0c3e7e1f2..6749e23ac 100755 --- a/build.sh +++ b/build.sh @@ -35,6 +35,8 @@ Switches: -p Optionally patch the builder. should contain a tree of files you want to replace within the build tree. Experts only. + -s Allows building for Debian Buster, when omitted it defaults to 'Debian jessie' + Example: Build a Raspberry PI image from scratch, version 2.0 : ./build.sh -b arm -d pi -v 2.0 -l reponame " @@ -58,14 +60,13 @@ function check_os_release { echo "VOLUMIO_HARDWARE=\"${DEVICE}\"" >> "build/${ARCH_BUILD}/root/etc/os-release" } - #Check the number of arguments. If none are passed, print help and exit. NUMARGS=$# if [ "$NUMARGS" -eq 0 ]; then HELP fi -while getopts b:v:d:l:p:t:e FLAG; do +while getopts b:v:d:l:p:t:e:s: FLAG; do case $FLAG in b) BUILD=$OPTARG @@ -89,6 +90,9 @@ while getopts b:v:d:l:p:t:e FLAG; do ;; t) VARIANT=$OPTARG + ;; + s) + SUITE=$OPTARG ;; /?) #unrecognized option - show help echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed." @@ -110,7 +114,18 @@ if [ -z "${VARIANT}" ]; then fi if [ -n "$BUILD" ]; then - CONF="recipes/$BUILD.conf" + if [ ! -z "${SUITE}" ] && [ ! "${SUITE}" = buster ]; then + echo "Invalid Debian distro option '${SUITE}', currently only 'buster' is supported" + echo "(or omit the '-s' option to default to 'jessie')" + exit + fi + + if [ -z "${SUITE}" ]; then + CONF="recipes/$BUILD.conf" + else + CONF="recipes/$BUILD-$SUITE.conf" + fi + if [ "$BUILD" = arm ] || [ "$BUILD" = arm-dev ]; then ARCH="armhf" BUILD="arm" @@ -131,6 +146,7 @@ if [ -n "$BUILD" ]; then echo "Unexpected Base System architecture '$BUILD' - aborting." exit fi + if [ -d "build/$BUILD" ]; then echo "Build folder exists, cleaning it" rm -rf "build/$BUILD" @@ -143,13 +159,17 @@ if [ -n "$BUILD" ]; then mkdir "build/$BUILD" mkdir "build/$BUILD/root" + # + # NOTE: In case you are running the build scripts on a host platform **other than Debian jessie**, please consult the README.md + # In case of Debian Buster or Ubuntu you **WILL** need patches in either this script or in "/usr/bin/multistrap", depending on your particular build host. + # multistrap -a "$ARCH" -f "$CONF" if [ ! "$BUILD" = x86 ]; then echo "Build for arm/armv7/armv8 platform, copying qemu" cp /usr/bin/qemu-arm-static "build/$BUILD/root/usr/bin/" fi cp scripts/volumioconfig.sh "build/$BUILD/root" - + mount /dev "build/$BUILD/root/dev" -o bind mount /proc "build/$BUILD/root/proc" -t proc mount /sys "build/$BUILD/root/sys" -t sysfs @@ -204,7 +224,7 @@ VOLUMIO_BUILD_DATE=\"${CUR_DATE}\" umount -l "build/$BUILD/root/proc" umount -l "build/$BUILD/root/sys" # Setting up cgmanager under chroot/qemu leaves a mounted fs behind, clean it up - umount -l "build/$BUILD/root/run/cgmanager/fs" + # Check: umount -l "build/$BUILD/root/run/cgmanager/fs" sh scripts/configure.sh -b "$BUILD" fi @@ -320,8 +340,13 @@ case "$DEVICE" in ;; x86) echo 'Writing x86 Image File' check_os_release "x86" "$VERSION" "$DEVICE" - sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; - ;; + OS_VERSION_ID=$(cat build/x86/root/etc/os-release | grep ^VERSION_ID | tr -d 'VERSION_ID="') + if [ "${OS_VERSION_ID}" = 10 ]; then + sh scripts/x86b-image.sh -v "$VERSION" -p "$PATCH"; + else + sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; + fi + ;; nanopineo2) echo 'Writing NanoPi-NEO2 armv7 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopineo2image.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/recipes/x86-buster.conf b/recipes/x86-buster.conf new file mode 100755 index 000000000..b21832c6f --- /dev/null +++ b/recipes/x86-buster.conf @@ -0,0 +1,62 @@ +[General] +noauth=true +unpack=true +debootstrap=Base Net Utils Assets FS Tools +aptsources=Debian +cleanup=true +arch=i386 +directory=build/x86/root +retainsources=/build/x86/root/packages +allowrecommends=false +addimportant=false +omitrequired=false + +[Base] +packages=busybox acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup12 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps7 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg5.0 libreadline7 libstdc++6 libusb-0.1-4 readline-common acl adduser bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libgcc1 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsemanage-common libsemanage1 libsepol1 libsmartcols1 libss2 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo6 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv sudo dbus syslinux syslinux-common xorg openbox chromium os-prober unclutter gcc-8-base xserver-xorg-legacy +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Net] +packages=netbase ifupdown iproute2 net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Utils] +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl parted udisks2 policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip bc dmidecode +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[FS] +packages=samba cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient winbind libnss-winbind dcfldd +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Assets] +packages=libasound2 libasound2-data alsa-utils sox sqlite3 mpd mpc rlwrap libupnp13 libmpdclient2 libexpat1 libcurl4 libmicrohttpd12 libboost-program-options1.67.0 libboost-system1.67.0 libconfig-dev libjsoncpp1 python-requests exiftool shairport-sync +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Tools] +packages=subversion initramfs-tools xz-utils pciutils +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[DevTools] +packages=build-essential cmake dh-autoreconf vim +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Firmware] +packages=firmware-atheros firmware-amd-graphics firmware-brcm80211 firmware-realtek firmware-ipw2x00 firmware-iwlwifi +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +components=main non-free +suite=buster + diff --git a/recipes/x86-dev-buster.conf b/recipes/x86-dev-buster.conf new file mode 100644 index 000000000..d71ea8dbf --- /dev/null +++ b/recipes/x86-dev-buster.conf @@ -0,0 +1,69 @@ +[General] +noauth=true +unpack=true +debootstrap=Base Net Utils Assets FS Tools DevTools +aptsources=Debian +cleanup=true +arch=i386 +directory=build/x86/root +retainsources=/build/x86/root/packages +allowrecommends=false +addimportant=false +omitrequired=false + +[Base] +packages=busybox acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup12 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps7 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg5.0 libreadline7 libstdc++6 libusb-0.1-4 readline-common acl adduser bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libgcc1 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsemanage-common libsemanage1 libsepol1 libsmartcols1 libss2 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo6 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv sudo dbus syslinux syslinux-common xorg openbox chromium os-prober unclutter gcc-8-base xserver-xorg-legacy +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Net] +packages=netbase ifupdown iproute2 net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Utils] +packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl parted udisks2 policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip bc dmidecode +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[FS] +packages=samba cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient winbind libnss-winbind dcfldd +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Assets] +packages=libasound2 libasound2-data alsa-utils sox sqlite3 mpd mpc rlwrap libupnp13 libmpdclient2 libexpat1 libcurl4 libmicrohttpd12 libboost-program-options1.67.0 libboost-system1.67.0 libconfig-dev libjsoncpp1 python-requests exiftool shairport-sync +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Tools] +packages=subversion initramfs-tools xz-utils pciutils +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[DevTools] +packages=build-essential cmake dh-autoreconf vim +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +suite=buster + +[Firmware] +packages=firmware-atheros firmware-amd-graphics firmware-brcm80211 firmware-realtek firmware-ipw2x00 firmware-iwlwifi +source=http://deb.debian.org/debian +keyring=debian-archive-keyring +components=main non-free +suite=buster + +[DevTools] +packages=build-essential cmake dh-autoreconf subversion +source=http://httpredir.debian.org/debian +keyring=debian-archive-keyring +suite=buster + + diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 9b96c25bf..2d4a1dd3e 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -1,4 +1,4 @@ -#!/bin/busybox sh +#!/bin/sh # # # Unlike arm devices, an x86 device is much more diverse when it comes to storage devices. @@ -31,12 +31,40 @@ parse_disk() { # Display a message or print directly to /dev/kmsg print_msg() { if [ $USE_KMSG == yes ]; then + echo "initramfs:" $1 echo "initramfs:" $1 >> /dev/kmsg else echo "initramfs:" $1 fi } +update_config_UUIDs() { + mkdir /mnt/configs + mount -t vfat ${BOOTPART} /mnt/configs + + UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) + UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) + UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) + + mv /mnt/configs/syslinux.cfg /mnt/configs/syslinux.cfg.old + mv /mnt/configs/syslinux.tmpl /mnt/configs/syslinux.cfg + sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /mnt/configs/syslinux.cfg + sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /mnt/configs/syslinux.cfg + sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /mnt/configs/syslinux.cfg + + mv /mnt/configs/efi/BOOT/grub.cfg /mnt/configs/efi/BOOT/grub.cfg.old + mv /mnt/configs/efi/BOOT/grub.tmpl /mnt/configs/efi/BOOT/grub.cfg + sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /mnt/configs/efi/BOOT/grub.cfg + sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /mnt/configs/efi/BOOT/grub.cfg + sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /mnt/configs/efi/BOOT/grub.cfg + sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /mnt/configs/efi/BOOT/grub.cfg + + sync + umount /mnt/configs + rm -r /mnt/configs +} + + #Defaults which may be overridden by cmdline parameters USE_KMSG="yes" @@ -54,6 +82,8 @@ modprobe overlay modprobe squashfs modprobe nls_cp437 modprobe nls_utf8 +modprobe nvme_core +modprobe nvme modprobe usb_common modprobe usbcore # The EHCI driver should be loaded before the ones for low speed controllers @@ -66,6 +96,7 @@ modprobe ohci_pci modprobe xhci_hcd modprobe xhci_pci modprobe mmc_core +modprobe mmc_block modprobe sdhci modprobe sdhci_pci modprobe sdhci_acpi @@ -127,6 +158,9 @@ do bootpart) BOOTPART=`parse_disk $value` ;; + datapart) + DATAPART=`parse_disk $value` + ;; imgfile) IMGFILE=$value ;; @@ -137,28 +171,37 @@ do done if [ -z "${BOOTPART}" ]; then - print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGPART}" ]; then - print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + exec sh + exit 0 +fi + +if [ -z "${DATAPART}" ]; then + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGFILE}" ]; then - print_msg "Specify the squash image file after the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" + print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" exec sh exit 0 fi @@ -169,6 +212,7 @@ USE_KMSG=yes print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg BOOTPART=${BOOTPART} +print_msg DATAPART=${DATAPART} if [ ! -b "${IMGPART}" ]; then print_msg "No partition with ${IMGPART} has been found" @@ -188,11 +232,11 @@ print_msg "Initrd initialisation finished" # # Step 1: As the image likely has been dd'ed to a bigger disk, # the backup GPT table is not at the end of the disk. -# Fix it before doing anything else. +# Fix it before doing anything else (only at first boot) # ============================================================== # -BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') +BOOT_DEVICE=$(echo /dev/`lsblk -no PKNAME ${BOOTPART}`) GPTSIZEMISMATCH="$(sudo fdisk -l ${BOOT_DEVICE} 2>&1 | grep 'GPT PMBR size mismatch')" if [ -z "${GPTSIZEMISMATCH}" ]; then print_msg "GPT PMBR size mismatch, moving the backup GPT table to the end of the disk..." @@ -202,8 +246,8 @@ e w y EOF + rm -rf /mnt/imgpart/move-gpt print_msg "Succesfully moved the backup GPT table" - sync fi # @@ -216,7 +260,7 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "Factory image created" print_msg "Creating archive for factory kernel..." mkdir /mnt/factory - mount -t vfat ${BOOT_DEVICE}1 /mnt/factory + mount -t vfat ${BOOTPART} /mnt/factory # exclude ldlinux.sys from kernel tar's to avoid a relocation during kernel-update or factory-reset # (little workaround, as this tar version does not support the --exclude= option) mkdir /mnt/imgpart/boot @@ -270,7 +314,7 @@ for devlink in /dev/sd* print_msg "Checking " $usb_dev"1 for a factory reset" if [ -e /mnt/usb/factory_reset ]; then mkdir /mnt/factory - mount -t auto ${BOOT_DEVICE}1 /mnt/factory + mount -t auto ${BOOTPART} /mnt/factory echo " " > /mnt/factory/factory_reset print_msg "Factory reset initiated" umount /mnt/factory @@ -292,12 +336,15 @@ rmdir /mnt/usb # print_msg "Checking for factory or user-data reset on boot device" mkdir /mnt/factory -mount -t vfat ${BOOT_DEVICE}1 /mnt/factory +mount -t vfat ${BOOTPART} /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data print_msg "Factory reset executed: part I - User Data Part" tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory + update_config_UUIDs + # no re-size + rm /mnt/factory/resize-volumio-datapart print_msg "Factory reset executed: part II - Kernel" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset print_msg "Factory reset executed: part III - Squash" @@ -309,7 +356,8 @@ if [ -e "/mnt/factory/factory_reset" ]; then fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + update_config_UUIDs rm /mnt/factory/user_data print_msg "User Data successfully deleted " @@ -342,17 +390,7 @@ fi if [ -e "/boot/kernel_update" ]; then print_msg "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot - UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) - UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) - mv /boot/syslinux.cfg /boot/syslinux.cfg.old - mv /boot/syslinux.tmpl /boot/syslinux.cfg - sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg - sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg - mv /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.cfg.old - mv /boot/efi/BOOT/grub.tmpl /boot/efi/BOOT/grub.cfg - sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg - sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg - sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg + update_config_UUIDs rm /boot/resize-volumio-datapart rm /boot/kernel_update sync @@ -362,20 +400,22 @@ if [ -e "/boot/kernel_update" ]; then fi # -# Step 6: Re-size the data partition (if sentinel file present) -# ============================================================= +# Step 6: Re-size the data partition +# ================================== # print_msg "Checking for data partition re-size" +DATADEV=$(echo /dev/`lsblk -no PKNAME ${DATAPART}`) # Re-sizing is not necessary when we already reached maximum (shows with decimals less than 1MB). -FREESIZE="$(parted -s ${BOOT_DEVICE} unit MB print free | tail -n 2 | grep Free | awk '{print $3}' | awk -F 'MB' '{print $1}')" +FREESIZE="$(parted -s ${DATADEV} unit MB print free | tail -n 2 | grep Free | awk '{print $3}' | awk -F 'MB' '{print $1}')" +print_msg $FREESIZE if [ "$(awk 'BEGIN {print ("'$FREESIZE'" >= "'1'")}')" -eq "1" ]; then print_msg "Re-sizing Volumio data partition..." - END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" - parted -s ${BOOT_DEVICE} resizepart 3 ${END} > /boot/resize-datapart.log - e2fsck -f ${BOOT_DEVICE}3 -y >> /boot/resize-datapart.log - resize2fs ${BOOT_DEVICE}3 >> /boot/resize-datapart.log + END="$(parted -s ${DATADEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" + parted -s ${DATADEV} resizepart 3 ${END} > /boot/resize-datapart.log + e2fsck -f ${DATAPART} -y >> /boot/resize-datapart.log + resize2fs ${DATAPART} >> /boot/resize-datapart.log print_msg "Volumio data partition succesfully resized" - parted -s ${BOOT_DEVICE} unit MB print >> /boot/resize-datapart.log + parted -s ${DATADEV} unit MB print >> /boot/resize-datapart.log fi umount /boot rm -r /boot @@ -400,7 +440,7 @@ VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" # =================================================== # [ -d /mnt/ext ] || mkdir /mnt/ext -mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext +mount -t ext4 ${DATAPART} /mnt/ext [ -d /mnt/ext/dyn ] || mkdir /mnt/ext/dyn [ -d /mnt/ext/union ] || mkdir /mnt/ext/union [ -d /mnt/ext/work ] || mkdir /mnt/ext/work diff --git a/scripts/initramfs/mkinitramfs-custom-single.sh b/scripts/initramfs/mkinitramfs-custom-single.sh deleted file mode 100755 index 63ca418bb..000000000 --- a/scripts/initramfs/mkinitramfs-custom-single.sh +++ /dev/null @@ -1,413 +0,0 @@ -#!/bin/sh - -umask 0022 -export PATH='/usr/bin:/sbin:/bin' - -CleanUp() { - [ -d /var/tmp ] && rm -rf /var/tmp/mkinitramfs* - [ -n "${TMPDIR}" ] && [ -d "${TMPDIR}" ] && rm -rf "${TMPDIR}"/mkinitramfs* -} # CleanUp -trap 'CleanUp' 0 - -# Defaults -keep="n" -CONFDIR="/etc/initramfs-tools" -verbose="n" -test -e /bin/busybox && BUSYBOXDIR=/bin -test -e /usr/lib/initramfs-tools/bin/busybox && BUSYBOXDIR=/usr/lib/initramfs-tools/bin -export BUSYBOXDIR - -OPTIONS=`getopt -o c:d:ko:r:v -n "$0" -- "$@"` - -# Check for non-GNU getopt -if [ $? != 0 ] ; then echo "W: non-GNU getopt" >&2 ; exit 1 ; fi - -eval set -- "$OPTIONS" - -while true; do - case "$1" in - -c) - compress="$2" - shift 2 - ;; - -d) - CONFDIR="$2" - shift 2 - if [ ! -d "${CONFDIR}" ]; then - echo "${0}: ${CONFDIR}: Not a directory" >&2 - exit 1 - fi - ;; - -o) - outfile="$2" - shift 2 - ;; - -k) - keep="y" - shift - ;; - -r) - ROOT="$2" - shift 2 - ;; - -v) - verbose="y" - shift - ;; - --) - shift - break - ;; - *) - echo "Internal error!" >&2 - exit 1 - ;; - esac -done - -# For dependency ordered mkinitramfs hook scripts. -. /usr/share/initramfs-tools/scripts/functions -. /usr/share/initramfs-tools/hook-functions - -. "${CONFDIR}/initramfs.conf" -EXTRA_CONF='' -for i in /usr/share/initramfs-tools/conf.d/* ${CONFDIR}/conf.d/*; do - [ -e $i ] && EXTRA_CONF="${EXTRA_CONF} $(basename $i \ - | grep '^[[:alnum:]][[:alnum:]\._-]*$' | grep -v '\.dpkg-.*$')"; -done -# FIXME: deprecated those settings on mkinitramfs run -# these conf dirs are for boot scripts and land on initramfs -for i in ${EXTRA_CONF}; do - if [ -d ${CONFDIR}/conf.d/${i} ]; then - echo "Warning: ${CONFDIR}/conf.d/${i} is a directory instead of file, ignoring." - elif [ -e ${CONFDIR}/conf.d/${i} ]; then - . ${CONFDIR}/conf.d/${i} - elif [ -e /usr/share/initramfs-tools/conf.d/${i} ]; then - . /usr/share/initramfs-tools/conf.d/${i} - fi -done - -# source package confs -for i in /usr/share/initramfs-tools/conf-hooks.d/*; do - if [ -d "${i}" ]; then - echo "Warning: ${i} is a directory instead of file, ignoring." - elif [ -e "${i}" ]; then - . "${i}" - fi -done - -if [ -n "${UMASK:-}" ]; then - umask "${UMASK}" -fi - -if [ -z "${outfile}" ]; then - usage -fi - - - - - - - - - - - - - - - - -touch "$outfile" -outfile="$(readlink -f "$outfile")" -version="$(ls -t /lib/modules | cat | head -n1)" -echo "Version: ${version}" - -case "${version}" in -/lib/modules/*/[!/]*) - ;; -/lib/modules/[!/]*) - version="${version#/lib/modules/}" - version="${version%%/*}" - ;; -esac - -case "${version}" in -*/*) - echo "$PROG: ${version} is not a valid kernel version" >&2 - exit 1 - ;; -esac - -# Check userspace and kernel support for compressed initramfs images -if [ -z "${compress:-}" ]; then - compress=${COMPRESS} -else - COMPRESS=${compress} -fi - -if ! command -v "${compress}" >/dev/null 2>&1; then - compress=gzip - [ "${verbose}" = y ] && \ - echo "No ${COMPRESS} in ${PATH}, using gzip" - COMPRESS=gzip -fi - -if dpkg --compare-versions "${version}" lt "2.6.38" 2>/dev/null; then - compress=gzip - [ "${verbose}" = y ] && \ - echo "linux-2.6 likely misses ${COMPRESS} support, using gzip" -fi - -[ "${compress}" = lzop ] && compress="lzop -9" -[ "${compress}" = xz ] && compress="xz --check=crc32" - -if [ -d "${outfile}" ]; then - echo "${outfile} is a directory" >&2 - exit 1 -fi - -MODULESDIR="/lib/modules/${version}" - -if [ ! -e "${MODULESDIR}" ]; then - echo "WARNING: missing ${MODULESDIR}" - echo "Ensure all necessary drivers are built into the linux image!" -fi -if [ ! -e "${MODULESDIR}/modules.dep" ]; then - depmod ${version} -fi - -[ -n "${TMPDIR}" ] && [ ! -w "${TMPDIR}" ] && unset TMPDIR -DESTDIR="$(mktemp -d ${TMPDIR:-/var/tmp}/mkinitramfs_XXXXXX)" || exit 1 -chmod 755 "${DESTDIR}" - -__TMPCPIOGZ="$(mktemp ${TMPDIR:-/var/tmp}/mkinitramfs-OL_XXXXXX)" || exit 1 -__TMPEARLYCPIO="$(mktemp ${TMPDIR:-/var/tmp}/mkinitramfs-FW_XXXXXX)" || exit 1 - -DPKG_ARCH=`dpkg --print-architecture` - -# Export environment for hook scripts. -# -export MODULESDIR -export version -export CONFDIR -export DESTDIR -export DPKG_ARCH -export verbose -export KEYMAP -export MODULES -export BUSYBOX - -# Private, used by 'catenate_cpiogz'. -export __TMPCPIOGZ - -# Private, used by 'prepend_earlyinitramfs'. -export __TMPEARLYCPIO - -for d in bin conf/conf.d etc lib/modules run sbin scripts ${MODULESDIR}; do - mkdir -p "${DESTDIR}/${d}" -done - -# Copy in modules.builtin and modules.order (not generated by depmod) -for x in modules.builtin modules.order; do - if [ -f "${MODULESDIR}/${x}" ]; then - cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}" - fi -done - -# MODULES=list case. Always honour. -for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do - if [ -f "${x}" ]; then - add_modules_from_file "${x}" - fi -done - -# MODULES=most is default -case "${MODULES}" in -dep) - dep_add_modules - ;; -most) - auto_add_modules - ;; -netboot) - auto_add_modules base - auto_add_modules net - ;; -list) - # nothing to add - ;; -*) - echo "W: mkinitramfs: unsupported MODULES setting: ${MODULES}." - echo "W: mkinitramfs: Falling back to MODULES=most." - auto_add_modules - ;; -esac - -# Resolve hidden dependencies -hidden_dep_add_modules - - - - - - - - - - - - - - - - - - - -# First file executed by linux -cp -p /usr/share/initramfs-tools/init ${DESTDIR}/init - -# add existant boot scripts -#for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ -# -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do -# [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ -# || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" -# cp -p "/usr/share/initramfs-tools/scripts/${b}" \ -# "${DESTDIR}/scripts/$(dirname "${b}")/" -#done -#for b in $(cd "${CONFDIR}/scripts" && find . \ -# -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do -# [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ -# || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" -# cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/" -#done - -echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf -cp -p "${CONFDIR}/initramfs.conf" ${DESTDIR}/conf -for i in ${EXTRA_CONF}; do - if [ -e "${CONFDIR}/conf.d/${i}" ]; then - copy_exec "${CONFDIR}/conf.d/${i}" /conf/conf.d - elif [ -e "/usr/share/initramfs-tools/conf.d/${i}" ]; then - copy_exec "/usr/share/initramfs-tools/conf.d/${i}" /conf/conf.d - fi -done - -# ROOT hardcoding -if [ -n "${ROOT:-}" ]; then - echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root -fi - -if ! command -v ldd >/dev/null 2>&1 ; then - echo "WARNING: no ldd around - install libc-bin" >&2 - exit 1 -fi - -# fstab and mtab -touch "${DESTDIR}/etc/fstab" -ln -s /proc/mounts "${DESTDIR}/etc/mtab" - -# module-init-tools -copy_exec /sbin/modprobe /sbin -copy_exec /sbin/rmmod /sbin -mkdir -p "${DESTDIR}/etc/modprobe.d" -cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/" - -# workaround: libgcc always needed on old-abi arm -if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then - cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/" -fi - -run_scripts /usr/share/initramfs-tools/hooks -run_scripts "${CONFDIR}"/hooks - -# cache boot run order -for b in $(cd "${DESTDIR}/scripts" && find . -mindepth 1 -type d); do - cache_run_scripts "${DESTDIR}" "/scripts/${b#./}" -done - -# generate module deps -depmod -a -b "${DESTDIR}" ${version} -rm -f "${DESTDIR}/lib/modules/${version}"/modules.*map - -# make sure that library search path is up to date -cp -ar /etc/ld.so.conf* "$DESTDIR"/etc/ -if ! ldconfig -r "$DESTDIR" ; then - [ $(id -u) != "0" ] \ - && echo "ldconfig might need uid=0 (root) for chroot()" >&2 -fi - -# Apply DSDT to initramfs -if [ -e "${CONFDIR}/DSDT.aml" ]; then - copy_exec "${CONFDIR}/DSDT.aml" / -fi - -# Make sure there is a final sh in initramfs -if [ ! -e "${DESTDIR}/bin/sh" ]; then - copy_exec /bin/sh "${DESTDIR}/bin/" -fi - -# Remove any looping or broken symbolic links, since they break cpio. -[ "${verbose}" = y ] && xargs_verbose="-t" -(cd "${DESTDIR}" && find . -type l -printf '%p %Y\n' | sed -n 's/ [LN]$//p' \ - | xargs ${xargs_verbose:-} -rL1 rm -f) - -# dirty hack for armhf's double-linker situation; if we have one of -# the two known eglibc linkers, nuke both and re-create sanity -if [ "$DPKG_ARCH" = armhf ]; then - if [ -e "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" ] || \ - [ -e "${DESTDIR}/lib/ld-linux-armhf.so.3" ]; then - rm -f "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" - rm -f "${DESTDIR}/lib/ld-linux-armhf.so.3" - cp -aL /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/" - ln -sf /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" - fi -fi - -[ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs" - -if [ -s "${__TMPEARLYCPIO}" ]; then - cat "${__TMPEARLYCPIO}" >"${outfile}" || exit 1 -else - # truncate - > "${outfile}" -fi - -#( -# preserve permissions if root builds the image, see #633582 -#[ "$UID" != 0 ] && cpio_owner_root="-R 0:0" - -#adding parted to the initramfs -echo "Adding parted to initramfs" -cp /sbin/parted "${DESTDIR}/sbin" -cp /sbin/partprobe "${DESTDIR}/sbin" -cp /lib/arm-linux-gnueabihf/libparted.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" -cp /lib/arm-linux-gnueabihf/libreadline.so.6 "${DESTDIR}/lib/arm-linux-gnueabihf" -cp /lib/arm-linux-gnueabihf/libtinfo.so.5 "${DESTDIR}/lib/arm-linux-gnueabihf" - -echo "Adding mkfs.ext4 to initramfs" -cp /sbin/mkfs.ext4 "${DESTDIR}/sbin" -cp /lib/arm-linux-gnueabihf/libext2fs.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" -cp /lib/arm-linux-gnueabihf/libcom_err.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" -cp /lib/arm-linux-gnueabihf/libe2p.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" - -echo "Adding volumio-init-updater to initramfs" -cp /usr/local/sbin/volumio-init-updater "${DESTDIR}/sbin" - -#Manage the destdir folder removing the auto-generated scripts -rm -rf "${DESTDIR}/scripts" -cp /root/init "${DESTDIR}" - -#Creation of the initrd image -cd ${DESTDIR} -find . -print0 | cpio -ov -0 --format=newc | gzip -9 > /boot/volumio.initrd - -echo "initramfs volumio.initrd" >> /boot/config.txt - -if [ -e /boot/cmdline.txt ]; then - mv /boot/cmdline.txt /boot/cmdline.txt.bak -fi -echo "Writing cmdline file" -touch /boot/cmdline.txt -echo "imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh" >> /boot/cmdline.txt diff --git a/scripts/initramfs/mkinitramfs-volumio.sh b/scripts/initramfs/mkinitramfs-volumio.sh new file mode 100755 index 000000000..2d90ab487 --- /dev/null +++ b/scripts/initramfs/mkinitramfs-volumio.sh @@ -0,0 +1,495 @@ +#!/bin/sh + +umask 0022 +export PATH='/usr/bin:/sbin:/bin' + +# Defaults +keep="n" +CONFDIR="/etc/initramfs-tools" +verbose="n" +# Will be updated by busybox's conf hook, if present +BUSYBOXDIR= +export BUSYBOXDIR + +usage() +{ + cat << EOF + +Usage: mkinitramfs [option]... -o outfile [version] + +Options: + -c compress Override COMPRESS setting in initramfs.conf. + -d confdir Specify an alternative configuration directory. + -k Keep temporary directory used to make the image. + -o outfile Write to outfile. + -r root Override ROOT setting in initramfs.conf. + +See mkinitramfs(8) for further details. + +EOF +} + +usage_error() +{ + usage >&2 + exit 2 +} + +OPTIONS=$(getopt -o c:d:hko:r:v --long help -n "$0" -- "$@") || usage_error + +eval set -- "$OPTIONS" + +while true; do + case "$1" in + -c) + compress="$2" + shift 2 + ;; + -d) + CONFDIR="$2" + shift 2 + if [ ! -d "${CONFDIR}" ]; then + echo "${0}: ${CONFDIR}: Not a directory" >&2 + exit 1 + fi + ;; + -h|--help) + usage + exit 0 + ;; + -o) + outfile="$2" + shift 2 + ;; + -k) + keep="y" + shift + ;; + -r) + ROOT="$2" + shift 2 + ;; + -v) + verbose="y" + shift + ;; + --) + shift + break + ;; + *) + echo "Internal error!" >&2 + exit 1 + ;; + esac +done + +# For dependency ordered mkinitramfs hook scripts. +. /usr/share/initramfs-tools/scripts/functions +. /usr/share/initramfs-tools/hook-functions + +. "${CONFDIR}/initramfs.conf" + +EXTRA_CONF='' +maybe_add_conf() { + if [ -e "$1" ] && \ + basename "$1" \ + | grep '^[[:alnum:]][[:alnum:]\._-]*$' \ + | grep -qv '\.dpkg-.*$'; then + if [ -d "$1" ]; then + echo "W: $1 is a directory instead of file" >&2 + else + EXTRA_CONF="${EXTRA_CONF} $1" + . "$1" + fi + fi +} +for i in /usr/share/initramfs-tools/conf.d/*; do + # Configuration files in /etc mask those in /usr/share + if ! [ -e "${CONFDIR}"/conf.d/"$(basename "${i}")" ]; then + maybe_add_conf "${i}" + fi +done +for i in "${CONFDIR}"/conf.d/*; do + maybe_add_conf "${i}" +done + +# source package confs +for i in /usr/share/initramfs-tools/conf-hooks.d/*; do + if [ -d "${i}" ]; then + echo "W: ${i} is a directory instead of file." >&2 + elif [ -e "${i}" ]; then + . "${i}" + fi +done + +# Check busybox dependency +if [ "${BUSYBOX}" = "y" ] && [ -z "${BUSYBOXDIR}" ]; then + echo >&2 "E: busybox or busybox-static, version 1:1.22.0-17~ or later, is required but not installed" + exit 1 +fi + +if [ -n "${UMASK:-}" ]; then + umask "${UMASK}" +fi + +if [ -z "${outfile}" ]; then + usage_error +fi + +touch "$outfile" +outfile="$(readlink -f "$outfile")" + +# And by "version" we really mean path to kernel modules +# This is braindead, and exists to preserve the interface with mkinitrd +if [ ${#} -ne 1 ]; then + version="$(uname -r)" +else + version="${1}" +fi + +case "${version}" in +/lib/modules/*/[!/]*) + ;; +/lib/modules/[!/]*) + version="${version#/lib/modules/}" + version="${version%%/*}" + ;; +esac + +case "${version}" in +*/*) + echo "$PROG: ${version} is not a valid kernel version" >&2 + exit 2 + ;; +esac + +if [ -z "${compress:-}" ]; then + compress=${COMPRESS?} +fi +unset COMPRESS + +if ! command -v "${compress}" >/dev/null 2>&1; then + compress=gzip + [ "${verbose}" = y ] && \ + echo "No ${compress} in ${PATH}, using gzip" +fi + +case "${compress}" in +gzip) # If we're doing a reproducible build, use gzip -n + if [ -n "${SOURCE_DATE_EPOCH}" ]; then + compress="gzip -n" + # Otherwise, substitute pigz if it's available + elif command -v pigz >/dev/null; then + compress=pigz + fi + ;; +lz4) compress="lz4 -9 -l" ;; +xz) compress="xz --check=crc32" ;; +bzip2|lzma|lzop) + # no parameters needed + ;; +*) echo "W: Unknown compression command ${compress}" >&2 ;; +esac + +if [ -d "${outfile}" ]; then + echo "${outfile} is a directory" >&2 + exit 1 +fi + +MODULESDIR="/lib/modules/${version}" + +if [ ! -e "${MODULESDIR}" ]; then + echo "W: missing ${MODULESDIR}" >&2 + echo "W: Ensure all necessary drivers are built into the linux image!" >&2 +fi +if [ ! -e "${MODULESDIR}/modules.dep" ]; then + depmod "${version}" +fi + +# Prepare to clean up temporary files on exit +DESTDIR= +__TMPCPIOGZ= +__TMPEARLYCPIO= +clean_on_exit() { + if [ "${keep}" = "y" ]; then + echo "Working files in ${DESTDIR:-}, early initramfs in ${__TMPEARLYCPIO:-} and overlay in ${__TMPCPIOGZ:-}" + else + for path in "${DESTDIR}" "${__TMPCPIOGZ}" "${__TMPEARLYCPIO}"; do + test -z "${path}" || rm -rf "${path}" + done + fi +} +trap clean_on_exit EXIT +trap "exit 1" INT TERM # makes the EXIT trap effective even when killed + +# Create temporary directory and files for initramfs contents +[ -n "${TMPDIR}" ] && [ ! -w "${TMPDIR}" ] && unset TMPDIR +DESTDIR="$(mktemp -d "${TMPDIR:-/var/tmp}/mkinitramfs_XXXXXX")" || exit 1 +chmod 755 "${DESTDIR}" +__TMPCPIOGZ="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-OL_XXXXXX")" || exit 1 +__TMPEARLYCPIO="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-FW_XXXXXX")" || exit 1 + +DPKG_ARCH=$(dpkg --print-architecture) + +# Export environment for hook scripts. +# +export MODULESDIR +export version +export CONFDIR +export DESTDIR +export DPKG_ARCH +export verbose +export KEYMAP +export MODULES +export BUSYBOX +export RESUME + +# Private, used by 'catenate_cpiogz'. +export __TMPCPIOGZ + +# Private, used by 'prepend_earlyinitramfs'. +export __TMPEARLYCPIO + +# Create usr-merged filesystem layout, to avoid duplicates if the host +# filesystem is usr-merged. +for d in /bin /lib* /sbin; do + mkdir -p "${DESTDIR}/usr${d}" + ln -s "usr${d}" "${DESTDIR}${d}" +done +for d in conf/conf.d etc run scripts ${MODULESDIR}; do + mkdir -p "${DESTDIR}/${d}" +done + +# Copy in modules.builtin and modules.order (not generated by depmod) +for x in modules.builtin modules.order; do + if [ -f "${MODULESDIR}/${x}" ]; then + cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}" + fi +done + +# MODULES=list case. Always honour. +for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do + if [ -f "${x}" ]; then + add_modules_from_file "${x}" + fi +done + +# MODULES=most is default +case "${MODULES}" in +dep) + dep_add_modules + ;; +most) + auto_add_modules + ;; +netboot) + auto_add_modules base + auto_add_modules net + ;; +list) + # nothing to add + ;; +*) + echo "W: mkinitramfs: unsupported MODULES setting: ${MODULES}." >&2 + echo "W: mkinitramfs: Falling back to MODULES=most." >&2 + auto_add_modules + ;; +esac + +# Resolve hidden dependencies +hidden_dep_add_modules + +# First file executed by linux +cp -p /usr/share/initramfs-tools/init "${DESTDIR}/init" + +# add existant boot scripts +for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ + -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "/usr/share/initramfs-tools/scripts/${b}" \ + "${DESTDIR}/scripts/$(dirname "${b}")/" +done +# Prune dot-files/directories and limit depth to exclude VCS files +for b in $(cd "${CONFDIR}/scripts" && find . -maxdepth 2 -name '.?*' -prune -o \ + -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f -print); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/" +done + +echo "DPKG_ARCH=${DPKG_ARCH}" > "${DESTDIR}/conf/arch.conf" +cp -p "${CONFDIR}/initramfs.conf" "${DESTDIR}/conf" +for i in ${EXTRA_CONF}; do + copy_file config "${i}" /conf/conf.d +done + +# ROOT hardcoding +if [ -n "${ROOT:-}" ]; then + echo "ROOT=${ROOT}" > "${DESTDIR}/conf/conf.d/root" +fi + +if ! command -v ldd >/dev/null 2>&1 ; then + echo "E: no ldd around - install libc-bin" >&2 + exit 1 +fi + +# fstab and mtab +touch "${DESTDIR}/etc/fstab" +ln -s /proc/mounts "${DESTDIR}/etc/mtab" + +# module-init-tools +copy_exec /sbin/modprobe /sbin +copy_exec /sbin/rmmod /sbin +mkdir -p "${DESTDIR}/etc/modprobe.d" "${DESTDIR}/lib/modprobe.d" +for file in /etc/modprobe.d/*.conf /lib/modprobe.d/*.conf ; do + if test -e "$file" || test -L "$file" ; then + copy_file config "$file" + fi +done + +# workaround: libgcc always needed on old-abi arm +if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then + cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/" +fi + +run_scripts /usr/share/initramfs-tools/hooks +run_scripts "${CONFDIR}"/hooks + +# Avoid double sleep when using older udev scripts +# shellcheck disable=SC2016 +sed -i 's/^\s*sleep \$ROOTDELAY$/:/' "${DESTDIR}/scripts/init-top/udev" + +# cache boot run order +for b in $(cd "${DESTDIR}/scripts" && find . -mindepth 1 -type d); do + cache_run_scripts "${DESTDIR}" "/scripts/${b#./}" +done + +# generate module deps +depmod -a -b "${DESTDIR}" "${version}" +rm -f "${DESTDIR}/lib/modules/${version}"/modules.*map + +# make sure that library search path is up to date +cp -ar /etc/ld.so.conf* "$DESTDIR"/etc/ +if ! ldconfig -r "$DESTDIR" ; then + [ "$(id -u)" != "0" ] \ + && echo "ldconfig might need uid=0 (root) for chroot()" >&2 +fi +# The auxiliary cache is not reproducible and is always invalid at boot +# (see #845034) +if [ -d "${DESTDIR}"/var/cache/ldconfig ]; then + rm -f "${DESTDIR}"/var/cache/ldconfig/aux-cache + rmdir --ignore-fail-on-non-empty "${DESTDIR}"/var/cache/ldconfig +fi + +# Apply DSDT to initramfs +if [ -e "${CONFDIR}/DSDT.aml" ]; then + copy_file DSDT "${CONFDIR}/DSDT.aml" +fi + +# Make sure there is a final sh in initramfs +if [ ! -e "${DESTDIR}/bin/sh" ]; then + copy_exec /bin/sh "${DESTDIR}/bin/" +fi + +# dirty hack for armhf's double-linker situation; if we have one of +# the two known eglibc linkers, nuke both and re-create sanity +if [ "$DPKG_ARCH" = armhf ]; then + if [ -e "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" ] || \ + [ -e "${DESTDIR}/lib/ld-linux-armhf.so.3" ]; then + rm -f "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" + rm -f "${DESTDIR}/lib/ld-linux-armhf.so.3" + cp -aL /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/" + ln -sf /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" + fi +fi + +# ===================== Finishing with Volumio-specific additions to the initramfs file structure + +echo "Volumio custom: adding findfs/ parted/ mkfs.ext4/ e2fsck to initramfs..." +copy_exec /sbin/parted /sbin +copy_exec /sbin/findfs /sbin +copy_exec /sbin/mkfs.ext4 /sbin +copy_exec /sbin/e2fsck /sbin +copy_exec /sbin/resize2fs /sbin + +if [ ${DPKG_ARCH} = "i386" ]; then + echo "Volumio custom: adding gdisk/ lsblk to initramfs..." + copy_exec /sbin/gdisk /sbin + copy_exec /bin/lsblk /sbin + echo "Volumio custom: adding x86-specific dmidecode to initramfs..." + copy_exec /usr/sbin/dmidecode /sbin +fi + +echo "Volumio custom: adding volumio-init-updater to initramfs..." +chmod +x /usr/local/sbin/volumio-init-updater +copy_exec /usr/local/sbin/volumio-init-updater /sbin + +# ===================== Building an initrd image from the initramfs file structure + +[ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs" + +if [ -s "${__TMPEARLYCPIO}" ]; then + cat "${__TMPEARLYCPIO}" >"${outfile}" || exit 1 +else + # truncate + true > "${outfile}" +fi + +( +# preserve permissions if root builds the image, see #633582 +[ "$(id -ru)" != 0 ] && cpio_owner_root="-R 0:0" + +# if SOURCE_DATE_EPOCH is set, try and create a reproducible image +if [ -n "${SOURCE_DATE_EPOCH}" ]; then + # ensure that no timestamps are newer than $SOURCE_DATE_EPOCH + find "${DESTDIR}" -newermt "@${SOURCE_DATE_EPOCH}" -print0 | \ + xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + + # --reproducible requires cpio >= 2.12 + cpio_reproducible="--reproducible" +fi + +OPTS="-o" +[ "${verbose}" = y ] && OPTS="-v ${OPTS}" + +# work around lack of "set -o pipefail" for the following pipe: +# cd "${DESTDIR}" && find . | LC_ALL=C sort | cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc | gzip >>"${outfile}" || exit 1 +ec1=1 +ec2=1 +ec3=1 +exec 3>&1 +eval "$( + # http://cfaj.freeshell.org/shell/cus-faq-2.html + exec 4>&1 >&3 3>&- + cd "${DESTDIR}" + { + find . 4>&-; echo "ec1=$?;" >&4 + } | { + LC_ALL=C sort + } | { + # shellcheck disable=SC2086 + cpio --quiet $cpio_owner_root $cpio_reproducible ${OPTS} -H newc 4>&-; echo "ec2=$?;" >&4 + } | ${compress} >>"${outfile}" + echo "ec3=$?;" >&4 +)" +if [ "$ec1" -ne 0 ]; then + echo "E: mkinitramfs failure find $ec1 cpio $ec2 $compress $ec3" >&2 + exit "$ec1" +fi +if [ "$ec2" -ne 0 ]; then + echo "E: mkinitramfs failure cpio $ec2 $compress $ec3" >&2 + exit "$ec2" +fi +if [ "$ec3" -ne 0 ]; then + echo "E: mkinitramfs failure $compress $ec3" >&2 + exit "$ec3" +fi +) || exit 1 + +if [ -s "${__TMPCPIOGZ}" ]; then + cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1 +fi + +exit 0 diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index ef90186f8..a4656ed03 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -1,6 +1,7 @@ #!/bin/bash NODE_VERSION=8.11.1 +OS_VERSION_ID=$(cat /etc/os-release | grep ^VERSION_ID | tr -d 'VERSION_ID="') # This script will be run in chroot under qemu. @@ -25,7 +26,12 @@ path-exclude /usr/share/linda/*" > /etc/dpkg/dpkg.cfg.d/01_nodoc export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true export LC_ALL=C LANGUAGE=C LANG=C -/var/lib/dpkg/info/dash.preinst install + +# the dash.preinst script was removed from Debian buster according to: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890073 +if [ ! $OS_VERSION_ID = 10 ]; then + /var/lib/dpkg/info/dash.preinst install +fi #if [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then # echo "Fix for cgmanager not starting on x86" @@ -34,6 +40,14 @@ export LC_ALL=C LANGUAGE=C LANG=C # sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager #fi +if [ $OS_VERSION_ID = 10 ]; then +# configuration of package base-files depends on package base-passwd. +# But for some reason, base-files gets bootstrapped before base-passwd. +# Create a valid /etc/passwd before configuring anything else. + echo "Working around a debian buster package dependency issue" + /var/lib/dpkg/info/base-passwd.preinst install +fi + echo "Configuring packages" dpkg --configure -a @@ -185,7 +199,7 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then echo "Installing MPD for armv6" # First we manually install a newer alsa-lib to achieve Direct DSD support - + : ' echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2_1.1.3-5_armhf.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2-data_1.1.3-5_all.deb @@ -217,12 +231,11 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armhf.deb dpkg -i volumio-remote-updater_1.3-armhf.deb rm volumio-remote-updater_1.3-armhf.deb - - + ' elif [ $ARCH = armv7 ]; then echo "Installing MPD for armv7" # First we manually install a newer alsa-lib to achieve Direct DSD support - + : ' echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2_1.1.3-5_armhf.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2-data_1.1.3-5_all.deb @@ -239,26 +252,27 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then dpkg -i mpd_0.20.18-1_armv7.deb rm mpd_0.20.18-1_armv7.deb - echo "Installing Upmpdcli for armv7" - wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb - wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnp6_1.6.20.jfd5-1_armhf.deb - wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/upmpdcli_1.2.12-1_armhf.deb - dpkg -i libupnpp3_0.15.1-1_armhf.deb - dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb - dpkg -i upmpdcli_1.2.12-1_armhf.deb - rm libupnpp3_0.15.1-1_armhf.deb - rm libupnp6_1.6.20.jfd5-1_armhf.deb - rm upmpdcli_1.2.12-1_armhf.deb - - echo "Adding volumio-remote-updater for armv7" - wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armv7.deb - dpkg -i volumio-remote-updater_1.3-armv7.deb - rm volumio-remote-updater_1.3-armv7.deb + echo "Installing Upmpdcli for armv7" + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnp6_1.6.20.jfd5-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/upmpdcli_1.2.12-1_armhf.deb + dpkg -i libupnpp3_0.15.1-1_armhf.deb + dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb + dpkg -i upmpdcli_1.2.12-1_armhf.deb + rm libupnpp3_0.15.1-1_armhf.deb + rm libupnp6_1.6.20.jfd5-1_armhf.deb + rm upmpdcli_1.2.12-1_armhf.deb + echo "Adding volumio-remote-updater for armv7" + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armv7.deb + dpkg -i volumio-remote-updater_1.3-armv7.deb + rm volumio-remote-updater_1.3-armv7.deb + ' fi #Remove autostart of upmpdcli update-rc.d upmpdcli remove + : ' echo "Installing Shairport-Sync" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-arm.tar.gz tar xf shairport-sync-3.0.2-arm.tar.gz @@ -291,7 +305,7 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then echo "Adding special version for kernel 4.19" wget http://repo.volumio.org/Volumio2/Binaries/arm/hostapd-2.8 -P /usr/sbin/ chmod a+x /usr/sbin/hostapd-2.8 - + ' echo "interface=wlan0 ssid=Volumio channel=4 @@ -307,8 +321,9 @@ wpa_passphrase=volumio2" >> /etc/hostapd/hostapd-edimax.conf echo "Cleanup" apt-get clean rm -rf tmp/* + elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then - echo 'x86 Environment Detected' + echo "x86 Environment Detected" # cleanup apt-get clean @@ -334,7 +349,6 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] tar xf node_modules_x86-${NODE_VERSION}.tar.gz rm node_modules_x86-${NODE_VERSION}.tar.gz - echo "Setting proper ownership" chown -R volumio:volumio /volumio @@ -349,66 +363,81 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Custom Packages" cd / - echo "Installing MPD for i386" +# MPD and alsa-lib are in Debian buster + if [ ! $OS_VERSION_ID = 10 ]; then + echo "Installing MPD for i386" # First we manually install a newer alsa-lib to achieve Direct DSD support + echo "Installing alsa-lib 1.1.3" + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2_1.1.3-5_i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-data_1.1.3-5_all.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-dev_1.1.3-5_i386.deb + dpkg --force-all -i libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2_1.1.3-5_i386.deb + dpkg --force-all -i libasound2-dev_1.1.3-5_i386.deb + rm libasound2-data_1.1.3-5_all.deb + rm libasound2_1.1.3-5_i386.deb + rm libasound2-dev_1.1.3-5_i386.deb + + echo "Installing MPD 20.18" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_i386.deb + dpkg -i mpd_0.20.18-1_i386.deb + rm mpd_0.20.18-1_i386.deb + fi + + if [ ! $OS_VERSION_ID = 10 ]; then + echo "Installing Upmpdcli" + wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb + wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb + wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnpp3_0.15.1-1_i386.deb + dpkg -i libupnpp3_0.15.1-1_i386.deb + dpkg -i libupnp6_1.6.20.jfd5-1_i386.deb + dpkg -i upmpdcli_1.2.12-1_i386.deb + rm /libupnpp3_0.15.1-1_i386.deb + rm /upmpdcli_1.2.12-1_i386.deb + rm /libupnp6_1.6.20.jfd5-1_i386.deb + else + echo "===> TODO: add missing upmpdcli for buster" + fi - echo "Installing alsa-lib 1.1.3" - wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2_1.1.3-5_i386.deb - wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-data_1.1.3-5_all.deb - wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-dev_1.1.3-5_i386.deb - dpkg --force-all -i libasound2-data_1.1.3-5_all.deb - dpkg --force-all -i libasound2_1.1.3-5_i386.deb - dpkg --force-all -i libasound2-dev_1.1.3-5_i386.deb - rm libasound2-data_1.1.3-5_all.deb - rm libasound2_1.1.3-5_i386.deb - rm libasound2-dev_1.1.3-5_i386.deb - - echo "Installing MPD 20.18" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_i386.deb - dpkg -i mpd_0.20.18-1_i386.deb - rm mpd_0.20.18-1_i386.deb - - echo "Installing Upmpdcli" - wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb - wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb - wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnpp3_0.15.1-1_i386.deb - dpkg -i libupnpp3_0.15.1-1_i386.deb - dpkg -i libupnp6_1.6.20.jfd5-1_i386.deb - dpkg -i upmpdcli_1.2.12-1_i386.deb - rm /libupnpp3_0.15.1-1_i386.deb - rm /upmpdcli_1.2.12-1_i386.deb - rm /libupnp6_1.6.20.jfd5-1_i386.deb - - echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz - tar xf shairport-sync-3.0.2-i386.tar.gz - rm /shairport-sync-3.0.2-i386.tar.gz - - echo "Installing Shairport-Sync Metadata Reader" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz - tar xf shairport-sync-metadata-reader-i386.tar.gz - rm /shairport-sync-metadata-reader-i386.tar.gz - - - echo "Installing LINN Songcast module" - wget http://repo.volumio.org/Packages/Upmpdcli/x86/sc2mpd_1.1.1-1_i386.deb - dpkg -i sc2mpd_1.1.1-1_i386.deb - rm /sc2mpd_1.1.1-1_i386.deb - - echo "Volumio Init Updater" - wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater - chmod a+x /usr/local/sbin/volumio-init-updater - - echo "Installing Zsync" - rm /usr/bin/zsync - wget http://repo.volumio.org/Volumio2/Binaries/x86/zsync -P /usr/bin/ - chmod a+x /usr/bin/zsync - - echo "Adding volumio-remote-updater for i386" - wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.3-i386.deb - dpkg -i volumio-remote-updater_1.3-i386.deb - rm /volumio-remote-updater_1.3-i386.deb +# Shairport-Sync is in the Debian buster repo + if [ ! $OS_VERSION_ID = 10 ]; then + echo "Installing Shairport-Sync" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz + tar xf shairport-sync-3.0.2-i386.tar.gz + rm /shairport-sync-3.0.2-i386.tar.gz + fi + + if [ ! $OS_VERSION_ID = 10 ]; then + echo "Installing Shairport-Sync Metadata Reader" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz + tar xf shairport-sync-metadata-reader-i386.tar.gz + rm /shairport-sync-metadata-reader-i386.tar.gz + + echo "Installing LINN Songcast module" + wget http://repo.volumio.org/Packages/Upmpdcli/x86/sc2mpd_1.1.1-1_i386.deb + dpkg -i sc2mpd_1.1.1-1_i386.deb + rm /sc2mpd_1.1.1-1_i386.deb + else + echo "===> TODO: add missing Shairport-Sync Metadata Reader, LINN Songcast for buster" + fi + if [ ! $OS_VERSION_ID = 10 ]; then + echo "Volumio Init Updater" + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater + chmod a+x /usr/local/sbin/volumio-init-updater + + echo "Installing Zsync" + rm /usr/bin/zsync + wget http://repo.volumio.org/Volumio2/Binaries/x86/zsync -P /usr/bin/ + chmod a+x /usr/bin/zsync + + echo "Adding volumio-remote-updater for i386" + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.3-i386.deb + dpkg -i volumio-remote-updater_1.3-i386.deb + rm /volumio-remote-updater_1.3-i386.deb + else + echo "===> TODO: add missing Volumio Init Updater, Zsync and Volumio Remote Updater for buster" + fi fi @@ -485,10 +514,12 @@ update-rc.d mpd remove systemctl enable mpd.service echo "Preventing hotspot services from starting at boot" +echo "===> TODO: check hotspot.service error for buster" systemctl disable hotspot.service systemctl disable dnsmasq.service echo "Preventing un-needed dhcp servers to start automatically" +echo "===> TODO: check dhcpd.service error for buster" systemctl disable isc-dhcp-server.service systemctl disable dhcpd.service @@ -517,6 +548,7 @@ echo '#' > /var/lib/alsa/asound.state chmod 777 /var/lib/alsa/asound.state echo "Fixing UPNP L16 Playback issue" +echo "===> TODO: check protocolinfo.txtrepl error for buster" grep -v '^@ENABLEL16' /usr/share/upmpdcli/protocolinfo.txt > /usr/share/upmpdcli/protocolinfo.txtrepl && mv /usr/share/upmpdcli/protocolinfo.txtrepl /usr/share/upmpdcli/protocolinfo.txt ##################### @@ -564,6 +596,7 @@ chmod 666 /etc/resolv.conf.* ln -s /etc/resolv.conf.tail.tmpl /etc/resolv.conf.tail echo "Removing Avahi Service for UDISK-SSH" +echo "===> TODO: check UDISK-SSH error for buster" rm /etc/avahi/services/udisks.service ##################### diff --git a/scripts/x86b-config.sh b/scripts/x86b-config.sh new file mode 100755 index 000000000..b9504a900 --- /dev/null +++ b/scripts/x86b-config.sh @@ -0,0 +1,281 @@ +#!/bin/bash + +PATCH=$(cat /patch) +# This script will be run in chroot. +echo "Initializing.." +. init.sh + +echo "Installing the kernel" +# Exact kernel version not known +# Not brilliant, but safe enough as x86image.sh only copied one image +dpkg -i linux-image-*_i386.deb + +echo "Setting sane defaults for baytrail/cherrytrail soundcards" +echo "#!/bin/sh -e +/usr/local/bin/bytcr-init.sh +exit 0" > /etc/rc.local + +echo "Creating node/ nodejs symlinks to stay compatible with the armv6/v7 platforms" +ln -s /usr/bin/nodejs /usr/local/bin/nodejs + +echo "Blacklisting PC speaker" +echo "blacklist snd_pcsp" >> /etc/modprobe.d/blacklist.conf + +echo "X86 USB Card Ordering" +echo "# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + +echo "Installing Syslinux Legacy BIOS" +syslinux -v +syslinux "${BOOT_PART}" + +echo "Getting the current kernel filename" +KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` + +echo "Creating run-time template for syslinux config" +DEBUG="use_kmsg=no" +echo "DEFAULT volumio + +LABEL volumio + SAY Legacy Boot Volumio Audiophile Music Player (default) + LINUX ${KRNL} + APPEND net.ifnames=0 biosdevname=0 imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% datapart=UUID=%%DATAPART%% imgfile=volumio_current.sqsh splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=7 ${DEBUG} + INITRD volumio.initrd +" > /boot/syslinux.tmpl + +echo "Creating syslinux.cfg from template" +cp /boot/syslinux.tmpl /boot/syslinux.cfg +sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg +sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg +sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/syslinux.cfg + +echo "Editing the Grub UEFI config template" +# Make grub boot menu transparent +sed -i "s/menu_color_normal=cyan\/blue/menu_color_normal=white\/black/g" /etc/grub.d/05_debian_theme +sed -i "s/menu_color_highlight=white\/blue/menu_color_highlight=green\/dark-gray/g" /etc/grub.d/05_debian_theme +# replace the initrd string in the template +sed -i "s/initrd=\"\$i\"/initrd=\"volumio.initrd\"/g" /etc/grub.d/10_linux + +#replace both LINUX_ROOT_DEVICE and LINUX_ROOT_DEVICE=UUID= in the template +# to a string which we can replace after creating the grub config file +#TODO: update the default grub file +sed -i "s/LINUX_ROOT_DEVICE=\${GRUB_DEVICE}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux +sed -i "s/LINUX_ROOT_DEVICE=UUID=\${GRUB_DEVICE_UUID}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux + +echo "Setting plymouth image" +cp /usr/share/plymouth/themes/volumio/volumio-logo16.png /boot/volumio.png + +echo "Creating Grub config folder" +mkdir /boot/grub + +echo "Applying Grub configuration" +grub-mkconfig -o /boot/grub/grub.cfg +chmod +w /boot/grub/grub.cfg + +echo "Coyping the new Grub config to the EFI bootloader folder" +cp /boot/grub/grub.cfg /boot/efi/BOOT/grub.cfg + +echo "Telling the bootloader to read an external config" +echo 'configfile ${cmdpath}/grub.cfg' > /grub-redir.cfg + +echo "Using current grub.cfg as run-time template for kernel updates" +cp /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.tmpl +sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/efi/BOOT/grub.tmpl +sed -i "s/${UUID_DATA}/%%DATAPART%%/g" /boot/efi/BOOT/grub.tmpl + +echo "Inserting root and boot partition UUIDs (building the boot cmdline used in initramfs)" +# Opting for finding partitions by-UUID +sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg +sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg +sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/efi/BOOT/grub.cfg + +cat > /usr/sbin/policy-rc.d << EOF +exit 101 +EOF +chmod +x /usr/sbin/policy-rc.d + +echo "Installing grub-efi-amd64 to make the 64bit UEFI bootloader" +apt-get update +apt-get -y install grub-efi-amd64-bin +grub-mkstandalone --compress=gz -O x86_64-efi -o /boot/efi/BOOT/BOOTX64.EFI "boot/grub/grub.cfg=grub-redir.cfg" -d /usr/lib/grub/x86_64-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" +if [ ! -e /boot/efi/BOOT/BOOTX64.EFI ]; then + echo "Fatal error, no 64bit bootmanager created, aborting..." + exit 1 +fi + +#we cannot install grub-efi-amd64 and grub-efi-ia32 on the same machine. +#on the off-chance that we need a 32bit bootloader, we remove amd64 and install ia32 to generate one +echo "Uninstalling grub-efi-amd64" +apt-get -y --purge remove grub-efi-amd64-bin + +echo "Installing grub-efi-ia32 to make the 32bit UEFI bootloader" +apt-get -y install grub-efi-ia32-bin +grub-mkstandalone --compress=gz -O i386-efi -o /boot/efi/BOOT/BOOTIA32.EFI "boot/grub/grub.cfg=grub-redir.cfg" -d /usr/lib/grub/i386-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" +if [ ! -e /boot/efi/BOOT/BOOTIA32.EFI ]; then + echo "Fatal error, no 32bit bootmanager created, aborting..." + exit 1 +fi +#and remove it again +echo "Uninstalling grub-efi-ia32-bin and cleaning up grub install" +apt-get -y --purge remove grub-efi-ia32-bin +apt-get -y --purge remove efibootmgr libefiboot1 libefivar1 +rm /grub-redir.cfg +rm -r /boot/grub + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +echo "Copying fstab as a template to be used in initrd" +cp /etc/fstab /etc/fstab.tmpl + +echo "Editing fstab to use UUID=" +sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /etc/fstab + +echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" +apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core + +echo "Configuring boot splash" +apt-get -y install plymouth plymouth-themes plymouth-x11 +plymouth-set-default-theme volumio +echo "[Daemon] +Theme=volumio +ShowDelay=0 +" > /usr/share/plymouth/plymouthd.defaults + +echo "Setting up in kiosk-mode" +echo "Creating chromium kiosk start script" +echo "#!/bin/bash + +xset -dpms +xset s off +openbox-session & + +while true; do + rm -rf ~/.{config,cache}/chromium/ + /usr/bin/chromium --disable-session-crashed-bubble --disable-infobars --kiosk --no-first-run 'http://localhost:3000' +done" > /opt/volumiokiosk.sh +chmod +x /opt/volumiokiosk.sh + +echo "[Unit] +Description=Start Volumio Kiosk +Wants=volumio.service +After=volumio.service +[Service] +Type=simple +User=volumio +Group=audio +ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 +[Install] +WantedBy=multi-user.target +" > /lib/systemd/system/volumio-kiosk.service +ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service + +echo "Hide Mouse cursor" + +echo "#!/bin/sh + +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +xrdb -merge ~/.Xresources # aggiorna x resources db + +#xscreensaver -no-splash & # avvia il demone di xscreensaver +xsetroot -cursor_name left_ptr & # setta il cursore di X +#sh ~/.fehbg & # setta lo sfondo con feh + +exec openbox-session # avvia il window manager + +exec unclutter &" > /root/.xinitrc + + +echo "Allowing volumio to start an xsession" +echo "allowed_users=anybody +needs_root_rights=yes" > /etc/X11/Xwrapper.config + + +echo "Creating initramfs" +echo "Adding custom modules" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "usbcore" >> /etc/initramfs-tools/modules +echo "usb_common" >> /etc/initramfs-tools/modules +echo "mmc_core" >> /etc/initramfs-tools/modules +echo "mmc_block" >> /etc/initramfs-tools/modules +echo "nvme_core" >> /etc/initramfs-tools/modules +echo "nvme" >> /etc/initramfs-tools/modules +echo "sdhci" >> /etc/initramfs-tools/modules +echo "sdhci_pci" >> /etc/initramfs-tools/modules +echo "sdhci_acpi" >> /etc/initramfs-tools/modules +echo "ehci_pci" >> /etc/initramfs-tools/modules +echo "ohci_pci" >> /etc/initramfs-tools/modules +echo "uhci_hcd" >> /etc/initramfs-tools/modules +echo "ehci_hcd" >> /etc/initramfs-tools/modules +echo "xhci_hcd" >> /etc/initramfs-tools/modules +echo "ohci_hcd" >> /etc/initramfs-tools/modules +echo "usbhid" >> /etc/initramfs-tools/modules +echo "hid_cherry" >> /etc/initramfs-tools/modules +echo "hid_generic" >> /etc/initramfs-tools/modules +echo "hid" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules +echo "nls_utf8" >> /etc/initramfs-tools/modules +echo "vfat" >> /etc/initramfs-tools/modules +echo "Adding ata modules for various chipsets" +cat /ata-modules.x86 >> /etc/initramfs-tools/modules +echo "Adding modules for Plymouth" +echo "intel_agp" >> /etc/initramfs-tools/modules +echo "drm" >> /etc/initramfs-tools/modules +echo "i915 modeset=1" >> /etc/initramfs-tools/modules +echo "nouveau modeset=1" >> /etc/initramfs-tools/modules +echo "radeon modeset=1" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +VERSION=`echo ${KRNL} | awk -F "vmlinuz-" '{print $2}'` +echo "Creating initramfs 'volumio.initrd' with kernel ${VERSION}..." +cp /root/init /usr/share/initramfs-tools/ +#TODO replace mkinitramfs.sh +mkinitramfs-volumio.sh -v -o /tmp/initramfs-tmp ${VERSION} +cp /tmp/initramfs-tmp /boot/volumio.initrd + +echo "No need to keep the original initrd" +DELFILE=`ls -l /boot |grep initrd.img | awk '{print $9}'` +echo "Found "$DELFILE", deleting" +rm /boot/${DELFILE} +echo "No need for the system map either" +DELFILE=`ls -l /boot |grep System.map | awk '{print $9}'` +echo "Found "$DELFILE", deleting" +rm /boot/${DELFILE} + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +chmod a+x patch.sh +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Bootloader configuration and initrd.img complete" diff --git a/scripts/x86b-image.sh b/scripts/x86b-image.sh new file mode 100755 index 000000000..ca1252730 --- /dev/null +++ b/scripts/x86b-image.sh @@ -0,0 +1,236 @@ +#!/bin/sh + +while getopts ":v:p:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + + esac +done +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-x86.img" + +echo "Creating Image Bed" +echo "Image file: ${IMG_FILE}" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=3700 +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` + +sudo parted -s "${LOOP_DEV}" mklabel gpt +sudo parted -s "${LOOP_DEV}" mkpart primary 1 512 #legacy and uefi boot +sudo parted -s "${LOOP_DEV}" mkpart primary 512 3500 #volumio +sudo parted -s "${LOOP_DEV}" mkpart primary 3500 100% #data +sudo parted -s "${LOOP_DEV}" set 1 legacy_boot on +sudo parted -s "${LOOP_DEV}" set 1 esp on +sudo partprobe "${LOOP_DEV}" +sudo kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo $LOOP_DEV | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +IMG_PART=`echo /dev/mapper/"$( echo $LOOP_DEV | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo $LOOP_DEV | sed -e 's/.*\/\(\w*\)/\1/' )"p3` + +if [ ! -b "$BOOT_PART" ] +then + echo "$BOOT_PART doesn't exist" + exit 1 +fi + +echo "Creating filesystems" +#sudo mkdosfs "${BOOT_PART}" +sudo mkfs -t vfat -F 32 -n volumioboot "${BOOT_PART}" +sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${IMG_PART}" -L volumioimg +sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${DATA_PART}" -L volumio_data +sudo parted -s "${LOOP_DEV}" print + +sync + +if [ -d /mnt ] +then + echo "/mnt folder exist" +else + sudo mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + sudo mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +sudo mount -t ext4 "${IMG_PART}" /mnt/volumio/images +sudo mkdir /mnt/volumio/rootfs +echo "Copying Volumio RootFs" +sudo cp -pdR build/x86/root/* /mnt/volumio/rootfs + +echo "Copying the Syslinux boot sector" +dd conv=notrunc bs=440 count=1 if=/mnt/volumio/rootfs/usr/lib/syslinux/mbr/gptmbr.bin of=${LOOP_DEV} +sync + +echo "Entering Chroot Environment" +sudo mkdir /mnt/volumio/boot +sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +cp scripts/x86b-config.sh /mnt/volumio/rootfs +if [ ! -d platform-x86 ]; then + echo "Platform files (packages) not available yet, getting them from the repo" + git clone http://github.com/volumio/platform-x86 --depth 1 +fi +echo "Copying kernel install package" +cp platform-x86/packages-buster/linux-image-*.deb /mnt/volumio/rootfs + +echo "Copying the latest firmware into /lib/firmware" +tar xfJ platform-x86/packages-buster/linux-firmware-buster.tar.xz -C /mnt/volumio/rootfs + +echo "Copying firmware additions" +tar xf platform-x86/packages-buster/firmware-brcm-sdio-nvram/broadcom-nvram.tar.xz -C /mnt/volumio/rootfs + +echo "Copying Alsa Use Case Manager files" +cp -R platform-x86/packages-buster/UCM/* /mnt/volumio/rootfs/usr/share/alsa/ucm/ + +cat /mnt/volumio/rootfs/etc/apt/sources.list +echo "deb http://deb.debian.org/debian/ buster main contrib non-free +deb-src http://deb.debian.org/debian/ buster main contrib non-free" > /mnt/volumio/rootfs/etc/apt/sources.list + +#TODO: not checked with other Intel SST bytrt/cht audio boards yet, needs more input +mkdir -p /mnt/volumio/rootfs/usr/local/bin/ +cp platform-x86/packages-buster/bytcr-init/bytcr-init.sh /mnt/volumio/rootfs/usr/local/bin/ +chmod +x /mnt/volumio/rootfs/usr/local/bin/bytcr-init.sh + +cp volumio/splash/volumio.png /mnt/volumio/rootfs/boot + +cp scripts/initramfs/init-x86 /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-volumio.sh /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-volumio.sh + +cp volumio/etc/ata-modules.x86 /mnt/volumio/rootfs/ata-modules.x86 + +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs + +mkdir -p /mnt/volumio/rootfs/boot/efi +mkdir -p /mnt/volumio/rootfs/boot/efi/EFI/debian +mkdir -p /mnt/volumio/rootfs/boot/efi/BOOT/ +#modprobe efivarfs + +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +UUID_IMG=$(blkid -s UUID -o value ${IMG_PART}) +UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +echo "UUID_BOOT=${UUID_BOOT} +UUID_IMG=${UUID_IMG} +UUID_DATA=${UUID_DATA} +LOOP_DEV=${LOOP_DEV} +BOOT_PART=${BOOT_PART} +" >> /mnt/volumio/rootfs/init.sh +chmod +x /mnt/volumio/rootfs/init.sh + +echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +/x86b-config.sh -p +EOF + + +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + +rm /mnt/volumio/rootfs/*.deb +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86b-config.sh +rm /mnt/volumio/rootfs/ata-modules.x86 + +sync + +echo "Unmounting Temp Devices" +sudo umount -l /mnt/volumio/rootfs/dev +sudo umount -l /mnt/volumio/rootfs/proc +sudo umount -l /mnt/volumio/rootfs/sys + +echo "X86 device installed" + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + sudo mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='ldlinux.sys' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh + +sync + +echo "Unmounting Temp Devices" +sudo umount -l /mnt/volumio/images +sudo umount -l /mnt/volumio/rootfs/boot + +echo "Avoiding fsck errors on boot" +# as the syslinux boot sector has no backup, no idea why (yet), simply fix that by coyping to the backup) +fsck.vfat -r > /dev/null 2>&1 "${BOOT_PART}" < Volumio-dev.vmdk.md5 +#echo "VMDK Virtual Image File generated" From 60a47236d6f3a78f89f116292f50f83efae889d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 8 Oct 2019 23:29:44 +0200 Subject: [PATCH 539/673] Correct layout issues in README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2047085eb..2e6cff4f0 100644 --- a/README.md +++ b/README.md @@ -47,12 +47,12 @@ See the list at the end of this README #### Modifications for Building on a Ubuntu or Debian Buster host -This regards **multistrap** (used for building the rootfs) and the use of **mkinhitramfs.sh**. +This regards **multistrap** (used for building the rootfs) and the use of **mkinitramfs.sh**. **Multistrap** This does not work OOTB in Debian Buster and Ubuntu, please patch -#####Ubuntu +##### Ubuntu Add the following 3 lines to the **build.sh** script, just before calling the multistrap script (code as follows): .. @@ -64,7 +64,7 @@ Add the following 3 lines to the **build.sh** script, just before calling the mu .. .. -#####Debian Buster +##### Debian Buster The above does not work for Debian, but instead patch "/usr/sbin/multistrap". Look for the line with "AllowInsecureRepositories=true"" and add an extra line above it to allow unauthenticated packages, it should read like this: @@ -161,18 +161,18 @@ others may work at once or with minor adaptions ### List of modifications for Debian Buster (currently only for X86) -####build.sh +#### build.sh : - add a new option to allow building for other Debian suites. Currently only buster or omit the option to build for jessie (default) - add a comment (as a warning) just before the call to multistrap, pointing to issues on Debian Buster and Ubuntu host platforms, referring to this README.md for further info. - depending on OS version, either call the jessie or buster device image script Currently supported: x86**b**-image.sh (calls x86**b**-config.sh) -####recipes +#### recipes : - added two new recipes: x86-buster.conf and x86-dev-buster.conf - removed **base-files** and **base-passwd** from the recipes, they get added automatically -####volumioconfig.sh#### +#### volumioconfig.sh#### : - fetch OS version - the dash.preinst script was removed according to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890073 @@ -195,14 +195,14 @@ Use the pre install script for that, to be found in /var/lib/dpgg/info: - depending on OS version, skip Shairport-Sync - depending on OS version, install volumio-specific packages -####init-x86 +#### init-x86 : - adding a function to update UUID's, avoiding code being repeated - adding "datapart" option to /proc/cmdline - modprobe modules for nvme and emmc support - fixing a problem with moving the backup GPT table - always resize the data partition when the disk is not fully used (not just on first boot) -####x86image.sh +#### x86image.sh : - building for buster updated/ additional packages (new kernel etc.) @@ -210,7 +210,7 @@ currently adding up-to-date firmware from a tarball todo: remove the use of the firmware tarball todo: add the relevant firmware packages during multistrap -####x86config.sh +#### x86config.sh : - remove firmware package (.deb) install, unpack tarball instead (see x86image.sh) - syslinux.tmpl add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline @@ -218,7 +218,7 @@ add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline - adding nvme, emmc modules to /etc/initramfs-tools/modules list -####mkinitramfs-custom.sh +#### mkinitramfs-custom.sh : - the current "jessie" mkinitramfs-custom.sh version fails in hook-function ""zz-busybox". It appears to be incompatible with a buster build. Rewritten based on core code of the original mkinitramfs script from buster's initramfs-tools package. @@ -229,7 +229,7 @@ Instead of "cp", the new version shall always use "copy_exec", which automatical TODO: mkinitramfs-custom.sh is not suitable for multiple kernels yet. Therefore a PI won't work at the moment, this is WIP!! -####End of Buster modifications +#### End of Buster modifications From 81f5fadd565f74d9c6f1183a4e0572f4194e5a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 8 Oct 2019 23:36:30 +0200 Subject: [PATCH 540/673] More layout corrections in README.md --- README.md | 76 +++++++++++++++++++++++-------------------------------- 1 file changed, 31 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 2e6cff4f0..836d0ce74 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Look for the line with "AllowInsecureRepositories=true"" and add an extra line a .. **mkinitramfs.sh** -This script is know to fail on Ubuntu and Debian Buster, trying to locate the rootfs device. +This script is known to fail on Ubuntu and Debian Buster, trying to locate the rootfs device. This only happens with config.sh scripts which change the initramfs config from MODULES=most to **MODULES=dep**. As Modules=dep does not seem to add relevant additional module anyway, replace the usage of MODULES=dep to **MODULES=list**, which will only add the modules as specified in the list. The standard dependencies get added anyway. Tested with a number of these scripts, they all work. @@ -162,30 +162,31 @@ others may work at once or with minor adaptions ### List of modifications for Debian Buster (currently only for X86) #### build.sh -: - add a new option to allow building for other Debian suites. Currently only buster or omit the option to build for jessie (default) +- add a new option to allow building for other Debian suites. +Currently only buster or omit the option to build for jessie (default) - add a comment (as a warning) just before the call to multistrap, pointing to issues on Debian Buster and Ubuntu host platforms, referring to this README.md for further info. -- depending on OS version, either call the jessie or buster device image script -Currently supported: +- depending on OS version, either call the jessie or buster device image script +Currently supported: x86**b**-image.sh (calls x86**b**-config.sh) #### recipes -: - added two new recipes: x86-buster.conf and x86-dev-buster.conf +- added two new recipes: x86-buster.conf and x86-dev-buster.conf - removed **base-files** and **base-passwd** from the recipes, they get added automatically -#### volumioconfig.sh#### -: - fetch OS version +#### volumioconfig.sh +- fetch OS version - the dash.preinst script was removed according to: - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890073 - action: when OS version = buster, then skip "/var/lib/dpkg/info/dash.preinst install" + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890073 +Action: when OS version = buster, then skip "/var/lib/dpkg/info/dash.preinst install" if [ ! $OS_VERSION_ID = 10 ]; then /var/lib/dpkg/info/dash.preinst install fi -: - The configuration of package **base-files** depends on package **base-passwd**. -However, base-files gets bootstrapped before base-pwasswd -(This is not a result of removing them from the recipe, it has no influence) -Solution: create a valid /etc/passwd before confioguring anything else. +- The configuration of package **base-files** depends on package **base-passwd**. +However, base-files gets bootstrapped before base-passwd +(This is not a result of removing them from the recipe, it has no influence) +Solution: create a valid /etc/passwd before confioguring anything else. Use the pre install script for that, to be found in /var/lib/dpgg/info: if [ $OS_VERSION_ID = 10 ]; then @@ -196,7 +197,7 @@ Use the pre install script for that, to be found in /var/lib/dpgg/info: - depending on OS version, install volumio-specific packages #### init-x86 -: - adding a function to update UUID's, avoiding code being repeated +- adding a function to update UUID's, avoiding code being repeated - adding "datapart" option to /proc/cmdline - modprobe modules for nvme and emmc support - fixing a problem with moving the backup GPT table @@ -204,46 +205,31 @@ Use the pre install script for that, to be found in /var/lib/dpgg/info: #### x86image.sh -: - building for buster -updated/ additional packages (new kernel etc.) -currently adding up-to-date firmware from a tarball -todo: remove the use of the firmware tarball -todo: add the relevant firmware packages during multistrap +- building for buster +updated/ additional packages (new kernel etc.) +currently adding up-to-date firmware from a tarball +todo: remove the use of the firmware tarball +todo: add the relevant firmware packages during multistrap #### x86config.sh -: - remove firmware package (.deb) install, unpack tarball instead (see x86image.sh) -- syslinux.tmpl +- remove firmware package (.deb) install, unpack tarball instead (see x86image.sh) +- syslinux.tmpl add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline -- grub.tmpl and /etc/default/grub" +- grub.tmpl and /etc/default/grub" add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline - adding nvme, emmc modules to /etc/initramfs-tools/modules list #### mkinitramfs-custom.sh -: - the current "jessie" mkinitramfs-custom.sh version fails in hook-function ""zz-busybox". -It appears to be incompatible with a buster build. -Rewritten based on core code of the original mkinitramfs script from buster's initramfs-tools package. -NOTE: the previous version used "cp" to copy volumio-specific binary packages, along with a copy of their library dependencies. -With buster, this method is not waterproof and results in an unusable initramfs. -Instead of "cp", the new version shall always use "copy_exec", which automatically adds the necessary dependencies. - -TODO: mkinitramfs-custom.sh is not suitable for multiple kernels yet. +- the current "jessie" mkinitramfs-custom.sh version fails in hook-function ""zz-busybox". +It appears to be incompatible with a buster build. +Rewritten based on core code of the original mkinitramfs script from buster's initramfs-tools package. +NOTE: the previous version used "cp" to copy volumio-specific binary packages, along with a copy of their library dependencies. +With buster, this method is not waterproof and results in an unusable initramfs. +Instead of "cp", the new version shall always use "copy_exec", which automatically adds the necessary dependencies. + +TODO: mkinitramfs-custom.sh is not suitable for multiple kernels yet. Therefore a PI won't work at the moment, this is WIP!! #### End of Buster modifications - - - - - - - - - - - - - - - From df5728d38da1d573b79b5016d1afdb156c19d81d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 8 Oct 2019 23:40:52 +0200 Subject: [PATCH 541/673] README.md updates --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 836d0ce74..8e61b61b6 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ See the list at the end of this README #### Modifications for Building on a Ubuntu or Debian Buster host -This regards **multistrap** (used for building the rootfs) and the use of **mkinitramfs.sh**. +This regards **multistrap** (used for building the rootfs) and the use of **mkinitramfs-custom.sh** (jessie) or **mkinitramfs-volumio.sh** (buster). **Multistrap** This does not work OOTB in Debian Buster and Ubuntu, please patch @@ -162,15 +162,15 @@ others may work at once or with minor adaptions ### List of modifications for Debian Buster (currently only for X86) #### build.sh -- add a new option to allow building for other Debian suites. -Currently only buster or omit the option to build for jessie (default) +- add a new option (-s) to allow building for other Debian suites. +Currently only buster can be used, or omit the option to build for jessie (default) - add a comment (as a warning) just before the call to multistrap, pointing to issues on Debian Buster and Ubuntu host platforms, referring to this README.md for further info. - depending on OS version, either call the jessie or buster device image script Currently supported: x86**b**-image.sh (calls x86**b**-config.sh) #### recipes -- added two new recipes: x86-buster.conf and x86-dev-buster.conf +- added two new recipes: **x86-buster.conf** and **x86-dev-buster.conf** - removed **base-files** and **base-passwd** from the recipes, they get added automatically #### volumioconfig.sh From be3df1ca2eca3693969ed10c399586338f367f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 9 Oct 2019 00:09:33 +0200 Subject: [PATCH 542/673] Revert "Prepare for Debian Buster" --- README.md | 114 ---- build.sh | 39 +- recipes/x86-buster.conf | 62 --- recipes/x86-dev-buster.conf | 69 --- scripts/initramfs/init-x86 | 122 ++--- .../initramfs/mkinitramfs-custom-single.sh | 413 +++++++++++++++ scripts/initramfs/mkinitramfs-volumio.sh | 495 ------------------ scripts/volumioconfig.sh | 193 +++---- scripts/x86b-config.sh | 281 ---------- scripts/x86b-image.sh | 236 --------- 10 files changed, 541 insertions(+), 1483 deletions(-) delete mode 100755 recipes/x86-buster.conf delete mode 100644 recipes/x86-dev-buster.conf create mode 100755 scripts/initramfs/mkinitramfs-custom-single.sh delete mode 100755 scripts/initramfs/mkinitramfs-volumio.sh delete mode 100755 scripts/x86b-config.sh delete mode 100755 scripts/x86b-image.sh diff --git a/README.md b/README.md index 8e61b61b6..e08b751e5 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ where switches are : **pi**, **odroidc1/2/xu4/x2**, **udooneo**, **udooqdl**, **cuboxi**, **pine64**, **sparky**, **bbb**, **bpipro**, bpim2u, cubietruck, compulab, **x86** * -l `` Create docker layer. Give a Docker Repository name as the argument. * -v `` Version - * -s `` Allows building for Debian suite 'buster'. Omit this option when building for Debian jessie Example: Build a Raspberry PI image from scratch, version 2.0 : ``` @@ -42,44 +41,6 @@ Example: Build the architecture for x86 first and the image version MyVersion in ./build.sh -d x86 -v MyVersion ``` -#### Updates for Debian Buster -See the list at the end of this README - -#### Modifications for Building on a Ubuntu or Debian Buster host - -This regards **multistrap** (used for building the rootfs) and the use of **mkinitramfs-custom.sh** (jessie) or **mkinitramfs-volumio.sh** (buster). - -**Multistrap** -This does not work OOTB in Debian Buster and Ubuntu, please patch - -##### Ubuntu -Add the following 3 lines to the **build.sh** script, just before calling the multistrap script (code as follows): - - .. - .. - mkdir -p "build/$BUILD/root/etc/apt/trusted.gpg.d" - apt-key --keyring "build/$BUILD/root/etc/apt/trusted.gpg.d/debian.gpg" adv --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 7638D0442B90D010 - apt-key --keyring "build/$BUILD/root/etc/apt/trusted.gpg.d/debian.gpg" adv --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-key CBF8D6FD518E17E1 - multistrap -a "$ARCH" -f "$CONF" - .. - .. - -##### Debian Buster -The above does not work for Debian, but instead patch "/usr/sbin/multistrap". -Look for the line with "AllowInsecureRepositories=true"" and add an extra line above it to allow unauthenticated packages, it should read like this: - - .. - .. - $config_str .= " -o Apt::Get::AllowUnauthenticated=true;" - $config_str .= " -o Acquire::AllowInsecureRepositories=true"; - .. - .. - -**mkinitramfs.sh** -This script is known to fail on Ubuntu and Debian Buster, trying to locate the rootfs device. -This only happens with config.sh scripts which change the initramfs config from MODULES=most to **MODULES=dep**. -As Modules=dep does not seem to add relevant additional module anyway, replace the usage of MODULES=dep to **MODULES=list**, which will only add the modules as specified in the list. The standard dependencies get added anyway. Tested with a number of these scripts, they all work. - #### Sources Kernel Sources @@ -158,78 +119,3 @@ using symbolic links others may work at once or with minor adaptions * - -### List of modifications for Debian Buster (currently only for X86) - -#### build.sh -- add a new option (-s) to allow building for other Debian suites. -Currently only buster can be used, or omit the option to build for jessie (default) -- add a comment (as a warning) just before the call to multistrap, pointing to issues on Debian Buster and Ubuntu host platforms, referring to this README.md for further info. -- depending on OS version, either call the jessie or buster device image script -Currently supported: -x86**b**-image.sh (calls x86**b**-config.sh) - -#### recipes -- added two new recipes: **x86-buster.conf** and **x86-dev-buster.conf** -- removed **base-files** and **base-passwd** from the recipes, they get added automatically - -#### volumioconfig.sh -- fetch OS version -- the dash.preinst script was removed according to: - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890073 -Action: when OS version = buster, then skip "/var/lib/dpkg/info/dash.preinst install" - - if [ ! $OS_VERSION_ID = 10 ]; then - /var/lib/dpkg/info/dash.preinst install - fi - -- The configuration of package **base-files** depends on package **base-passwd**. -However, base-files gets bootstrapped before base-passwd -(This is not a result of removing them from the recipe, it has no influence) -Solution: create a valid /etc/passwd before confioguring anything else. -Use the pre install script for that, to be found in /var/lib/dpgg/info: - - if [ $OS_VERSION_ID = 10 ]; then - echo "Working around a debian buster package dependency issue" - /var/lib/dpkg/info/base-passwd.preinst install - fi -- depending on OS version, skip Shairport-Sync -- depending on OS version, install volumio-specific packages - -#### init-x86 -- adding a function to update UUID's, avoiding code being repeated -- adding "datapart" option to /proc/cmdline -- modprobe modules for nvme and emmc support -- fixing a problem with moving the backup GPT table -- always resize the data partition when the disk is not fully used (not just on first boot) - -#### x86image.sh - -- building for buster -updated/ additional packages (new kernel etc.) -currently adding up-to-date firmware from a tarball -todo: remove the use of the firmware tarball -todo: add the relevant firmware packages during multistrap - -#### x86config.sh -- remove firmware package (.deb) install, unpack tarball instead (see x86image.sh) -- syslinux.tmpl -add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline -- grub.tmpl and /etc/default/grub" -add "net.ifnames=0 biosdevname=0" and "datapart=" to /proc/cmdline -- adding nvme, emmc modules to /etc/initramfs-tools/modules list - -#### mkinitramfs-custom.sh -- the current "jessie" mkinitramfs-custom.sh version fails in hook-function ""zz-busybox". -It appears to be incompatible with a buster build. -Rewritten based on core code of the original mkinitramfs script from buster's initramfs-tools package. -NOTE: the previous version used "cp" to copy volumio-specific binary packages, along with a copy of their library dependencies. -With buster, this method is not waterproof and results in an unusable initramfs. -Instead of "cp", the new version shall always use "copy_exec", which automatically adds the necessary dependencies. - -TODO: mkinitramfs-custom.sh is not suitable for multiple kernels yet. -Therefore a PI won't work at the moment, this is WIP!! - -#### End of Buster modifications - - diff --git a/build.sh b/build.sh index 6749e23ac..0c3e7e1f2 100755 --- a/build.sh +++ b/build.sh @@ -35,8 +35,6 @@ Switches: -p Optionally patch the builder. should contain a tree of files you want to replace within the build tree. Experts only. - -s Allows building for Debian Buster, when omitted it defaults to 'Debian jessie' - Example: Build a Raspberry PI image from scratch, version 2.0 : ./build.sh -b arm -d pi -v 2.0 -l reponame " @@ -60,13 +58,14 @@ function check_os_release { echo "VOLUMIO_HARDWARE=\"${DEVICE}\"" >> "build/${ARCH_BUILD}/root/etc/os-release" } + #Check the number of arguments. If none are passed, print help and exit. NUMARGS=$# if [ "$NUMARGS" -eq 0 ]; then HELP fi -while getopts b:v:d:l:p:t:e:s: FLAG; do +while getopts b:v:d:l:p:t:e FLAG; do case $FLAG in b) BUILD=$OPTARG @@ -90,9 +89,6 @@ while getopts b:v:d:l:p:t:e:s: FLAG; do ;; t) VARIANT=$OPTARG - ;; - s) - SUITE=$OPTARG ;; /?) #unrecognized option - show help echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed." @@ -114,18 +110,7 @@ if [ -z "${VARIANT}" ]; then fi if [ -n "$BUILD" ]; then - if [ ! -z "${SUITE}" ] && [ ! "${SUITE}" = buster ]; then - echo "Invalid Debian distro option '${SUITE}', currently only 'buster' is supported" - echo "(or omit the '-s' option to default to 'jessie')" - exit - fi - - if [ -z "${SUITE}" ]; then - CONF="recipes/$BUILD.conf" - else - CONF="recipes/$BUILD-$SUITE.conf" - fi - + CONF="recipes/$BUILD.conf" if [ "$BUILD" = arm ] || [ "$BUILD" = arm-dev ]; then ARCH="armhf" BUILD="arm" @@ -146,7 +131,6 @@ if [ -n "$BUILD" ]; then echo "Unexpected Base System architecture '$BUILD' - aborting." exit fi - if [ -d "build/$BUILD" ]; then echo "Build folder exists, cleaning it" rm -rf "build/$BUILD" @@ -159,17 +143,13 @@ if [ -n "$BUILD" ]; then mkdir "build/$BUILD" mkdir "build/$BUILD/root" - # - # NOTE: In case you are running the build scripts on a host platform **other than Debian jessie**, please consult the README.md - # In case of Debian Buster or Ubuntu you **WILL** need patches in either this script or in "/usr/bin/multistrap", depending on your particular build host. - # multistrap -a "$ARCH" -f "$CONF" if [ ! "$BUILD" = x86 ]; then echo "Build for arm/armv7/armv8 platform, copying qemu" cp /usr/bin/qemu-arm-static "build/$BUILD/root/usr/bin/" fi cp scripts/volumioconfig.sh "build/$BUILD/root" - + mount /dev "build/$BUILD/root/dev" -o bind mount /proc "build/$BUILD/root/proc" -t proc mount /sys "build/$BUILD/root/sys" -t sysfs @@ -224,7 +204,7 @@ VOLUMIO_BUILD_DATE=\"${CUR_DATE}\" umount -l "build/$BUILD/root/proc" umount -l "build/$BUILD/root/sys" # Setting up cgmanager under chroot/qemu leaves a mounted fs behind, clean it up - # Check: umount -l "build/$BUILD/root/run/cgmanager/fs" + umount -l "build/$BUILD/root/run/cgmanager/fs" sh scripts/configure.sh -b "$BUILD" fi @@ -340,13 +320,8 @@ case "$DEVICE" in ;; x86) echo 'Writing x86 Image File' check_os_release "x86" "$VERSION" "$DEVICE" - OS_VERSION_ID=$(cat build/x86/root/etc/os-release | grep ^VERSION_ID | tr -d 'VERSION_ID="') - if [ "${OS_VERSION_ID}" = 10 ]; then - sh scripts/x86b-image.sh -v "$VERSION" -p "$PATCH"; - else - sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; - fi - ;; + sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; + ;; nanopineo2) echo 'Writing NanoPi-NEO2 armv7 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopineo2image.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/recipes/x86-buster.conf b/recipes/x86-buster.conf deleted file mode 100755 index b21832c6f..000000000 --- a/recipes/x86-buster.conf +++ /dev/null @@ -1,62 +0,0 @@ -[General] -noauth=true -unpack=true -debootstrap=Base Net Utils Assets FS Tools -aptsources=Debian -cleanup=true -arch=i386 -directory=build/x86/root -retainsources=/build/x86/root/packages -allowrecommends=false -addimportant=false -omitrequired=false - -[Base] -packages=busybox acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup12 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps7 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg5.0 libreadline7 libstdc++6 libusb-0.1-4 readline-common acl adduser bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libgcc1 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsemanage-common libsemanage1 libsepol1 libsmartcols1 libss2 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo6 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv sudo dbus syslinux syslinux-common xorg openbox chromium os-prober unclutter gcc-8-base xserver-xorg-legacy -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Net] -packages=netbase ifupdown iproute2 net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl parted udisks2 policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip bc dmidecode -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[FS] -packages=samba cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient winbind libnss-winbind dcfldd -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Assets] -packages=libasound2 libasound2-data alsa-utils sox sqlite3 mpd mpc rlwrap libupnp13 libmpdclient2 libexpat1 libcurl4 libmicrohttpd12 libboost-program-options1.67.0 libboost-system1.67.0 libconfig-dev libjsoncpp1 python-requests exiftool shairport-sync -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Tools] -packages=subversion initramfs-tools xz-utils pciutils -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[DevTools] -packages=build-essential cmake dh-autoreconf vim -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Firmware] -packages=firmware-atheros firmware-amd-graphics firmware-brcm80211 firmware-realtek firmware-ipw2x00 firmware-iwlwifi -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -components=main non-free -suite=buster - diff --git a/recipes/x86-dev-buster.conf b/recipes/x86-dev-buster.conf deleted file mode 100644 index d71ea8dbf..000000000 --- a/recipes/x86-dev-buster.conf +++ /dev/null @@ -1,69 +0,0 @@ -[General] -noauth=true -unpack=true -debootstrap=Base Net Utils Assets FS Tools DevTools -aptsources=Debian -cleanup=true -arch=i386 -directory=build/x86/root -retainsources=/build/x86/root/packages -allowrecommends=false -addimportant=false -omitrequired=false - -[Base] -packages=busybox acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup12 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps7 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg5.0 libreadline7 libstdc++6 libusb-0.1-4 readline-common acl adduser bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libgcc1 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libselinux1 libsemanage-common libsemanage1 libsepol1 libsmartcols1 libss2 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo6 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv sudo dbus syslinux syslinux-common xorg openbox chromium os-prober unclutter gcc-8-base xserver-xorg-legacy -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Net] -packages=netbase ifupdown iproute2 net-tools iptables dhcpcd5 openssh-server wireless-tools telnet iputils-ping libgnutls-openssl27 libnl-3-200 libnl-genl-3-200 libpcsclite1 rfkill wpasupplicant libavahi-compat-libdnssd-dev netplug iw ethtool wireless-regdb crda dnsmasq isc-dhcp-server hostapd ifplugd -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Utils] -packages=nano psmisc git wget ethtool curl ca-certificates ntp rpl avahi-daemon avahi-discover libnss-mdns zsync git-core binutils ca-certificates curl parted udisks2 policykit-1 less usbutils gdisk locales localepurge rsync cpufrequtils jq minizip bc dmidecode -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[FS] -packages=samba cifs-utils ntfs-3g dosfstools exfat-utils nfs-common exfat-fuse smbclient winbind libnss-winbind dcfldd -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Assets] -packages=libasound2 libasound2-data alsa-utils sox sqlite3 mpd mpc rlwrap libupnp13 libmpdclient2 libexpat1 libcurl4 libmicrohttpd12 libboost-program-options1.67.0 libboost-system1.67.0 libconfig-dev libjsoncpp1 python-requests exiftool shairport-sync -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Tools] -packages=subversion initramfs-tools xz-utils pciutils -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[DevTools] -packages=build-essential cmake dh-autoreconf vim -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -suite=buster - -[Firmware] -packages=firmware-atheros firmware-amd-graphics firmware-brcm80211 firmware-realtek firmware-ipw2x00 firmware-iwlwifi -source=http://deb.debian.org/debian -keyring=debian-archive-keyring -components=main non-free -suite=buster - -[DevTools] -packages=build-essential cmake dh-autoreconf subversion -source=http://httpredir.debian.org/debian -keyring=debian-archive-keyring -suite=buster - - diff --git a/scripts/initramfs/init-x86 b/scripts/initramfs/init-x86 index 2d4a1dd3e..9b96c25bf 100755 --- a/scripts/initramfs/init-x86 +++ b/scripts/initramfs/init-x86 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/busybox sh # # # Unlike arm devices, an x86 device is much more diverse when it comes to storage devices. @@ -31,40 +31,12 @@ parse_disk() { # Display a message or print directly to /dev/kmsg print_msg() { if [ $USE_KMSG == yes ]; then - echo "initramfs:" $1 echo "initramfs:" $1 >> /dev/kmsg else echo "initramfs:" $1 fi } -update_config_UUIDs() { - mkdir /mnt/configs - mount -t vfat ${BOOTPART} /mnt/configs - - UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) - UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) - UUID_DATA=$(blkid -s UUID -o value ${DATAPART}) - - mv /mnt/configs/syslinux.cfg /mnt/configs/syslinux.cfg.old - mv /mnt/configs/syslinux.tmpl /mnt/configs/syslinux.cfg - sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /mnt/configs/syslinux.cfg - sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /mnt/configs/syslinux.cfg - sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /mnt/configs/syslinux.cfg - - mv /mnt/configs/efi/BOOT/grub.cfg /mnt/configs/efi/BOOT/grub.cfg.old - mv /mnt/configs/efi/BOOT/grub.tmpl /mnt/configs/efi/BOOT/grub.cfg - sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /mnt/configs/efi/BOOT/grub.cfg - sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /mnt/configs/efi/BOOT/grub.cfg - sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /mnt/configs/efi/BOOT/grub.cfg - sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /mnt/configs/efi/BOOT/grub.cfg - - sync - umount /mnt/configs - rm -r /mnt/configs -} - - #Defaults which may be overridden by cmdline parameters USE_KMSG="yes" @@ -82,8 +54,6 @@ modprobe overlay modprobe squashfs modprobe nls_cp437 modprobe nls_utf8 -modprobe nvme_core -modprobe nvme modprobe usb_common modprobe usbcore # The EHCI driver should be loaded before the ones for low speed controllers @@ -96,7 +66,6 @@ modprobe ohci_pci modprobe xhci_hcd modprobe xhci_pci modprobe mmc_core -modprobe mmc_block modprobe sdhci modprobe sdhci_pci modprobe sdhci_acpi @@ -158,9 +127,6 @@ do bootpart) BOOTPART=`parse_disk $value` ;; - datapart) - DATAPART=`parse_disk $value` - ;; imgfile) IMGFILE=$value ;; @@ -171,37 +137,28 @@ do done if [ -z "${BOOTPART}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGPART}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" - exec sh - exit 0 -fi - -if [ -z "${DATAPART}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + print_msg "Specify the squash image partition on the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" exec sh exit 0 fi if [ -z "${IMGFILE}" ]; then - print_msg "Specify the boot, data and squash image partition on the kernel command ${CMDLINE}" - print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 datapart=/dev/sda3 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 datapart=b44ac11b-eabb-5add-8211-816893807ad6 imgfile=/volumio_current.sqs or" - print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot datapart=LABEL=volumiodata imgfile=/volumio_current.sqs" + print_msg "Specify the squash image file after the kernel command ${CMDLINE}" + print_msg "example: kernel... imgpart=/dev/sda2 bootpart=/dev/sda1 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=UUID=b99ad11b-ec63-4a8b-8010-816893807ad6 bootpart=UUID=4A8B-8010 imgfile=/volumio_current.sqs or" + print_msg " kernel... imgpart=LABEL=volumioimg bootpart=LABEL=volumioboot imgfile=/volumio_current.sqs" exec sh exit 0 fi @@ -212,7 +169,6 @@ USE_KMSG=yes print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg BOOTPART=${BOOTPART} -print_msg DATAPART=${DATAPART} if [ ! -b "${IMGPART}" ]; then print_msg "No partition with ${IMGPART} has been found" @@ -232,11 +188,11 @@ print_msg "Initrd initialisation finished" # # Step 1: As the image likely has been dd'ed to a bigger disk, # the backup GPT table is not at the end of the disk. -# Fix it before doing anything else (only at first boot) +# Fix it before doing anything else. # ============================================================== # -BOOT_DEVICE=$(echo /dev/`lsblk -no PKNAME ${BOOTPART}`) +BOOT_DEVICE=$(echo ${BOOTPART} | sed 's/[0-9]*//g') GPTSIZEMISMATCH="$(sudo fdisk -l ${BOOT_DEVICE} 2>&1 | grep 'GPT PMBR size mismatch')" if [ -z "${GPTSIZEMISMATCH}" ]; then print_msg "GPT PMBR size mismatch, moving the backup GPT table to the end of the disk..." @@ -246,8 +202,8 @@ e w y EOF - rm -rf /mnt/imgpart/move-gpt print_msg "Succesfully moved the backup GPT table" + sync fi # @@ -260,7 +216,7 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then print_msg "Factory image created" print_msg "Creating archive for factory kernel..." mkdir /mnt/factory - mount -t vfat ${BOOTPART} /mnt/factory + mount -t vfat ${BOOT_DEVICE}1 /mnt/factory # exclude ldlinux.sys from kernel tar's to avoid a relocation during kernel-update or factory-reset # (little workaround, as this tar version does not support the --exclude= option) mkdir /mnt/imgpart/boot @@ -314,7 +270,7 @@ for devlink in /dev/sd* print_msg "Checking " $usb_dev"1 for a factory reset" if [ -e /mnt/usb/factory_reset ]; then mkdir /mnt/factory - mount -t auto ${BOOTPART} /mnt/factory + mount -t auto ${BOOT_DEVICE}1 /mnt/factory echo " " > /mnt/factory/factory_reset print_msg "Factory reset initiated" umount /mnt/factory @@ -336,15 +292,12 @@ rmdir /mnt/usb # print_msg "Checking for factory or user-data reset on boot device" mkdir /mnt/factory -mount -t vfat ${BOOTPART} /mnt/factory +mount -t vfat ${BOOT_DEVICE}1 /mnt/factory if [ -e "/mnt/factory/factory_reset" ]; then print_msg "Executing factory reset..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data print_msg "Factory reset executed: part I - User Data Part" tar xf /mnt/imgpart/kernel_factory.tar -C /mnt/factory - update_config_UUIDs - # no re-size - rm /mnt/factory/resize-volumio-datapart print_msg "Factory reset executed: part II - Kernel" cp /mnt/imgpart/volumio_factory.sqsh /mnt/imgpart/volumio_current.sqsh && rm /mnt/factory/factory_reset print_msg "Factory reset executed: part III - Squash" @@ -356,8 +309,7 @@ if [ -e "/mnt/factory/factory_reset" ]; then fi if [ -e "/mnt/factory/user_data" ]; then print_msg "Deleting User Data..." - mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${DATAPART} -L volumio_data - update_config_UUIDs + mkfs.ext4 -F -E stride=2,stripe-width=1024 -b 4096 ${BOOT_DEVICE}3 -L volumio_data rm /mnt/factory/user_data print_msg "User Data successfully deleted " @@ -390,7 +342,17 @@ fi if [ -e "/boot/kernel_update" ]; then print_msg "unpacking kernel" tar xf /mnt/imgpart/kernel_current.tar -C /boot - update_config_UUIDs + UUID_BOOT=$(blkid -s UUID -o value ${BOOTPART}) + UUID_IMG=$(blkid -s UUID -o value ${IMGPART}) + mv /boot/syslinux.cfg /boot/syslinux.cfg.old + mv /boot/syslinux.tmpl /boot/syslinux.cfg + sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg + sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg + mv /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.cfg.old + mv /boot/efi/BOOT/grub.tmpl /boot/efi/BOOT/grub.cfg + sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg + sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg + sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg rm /boot/resize-volumio-datapart rm /boot/kernel_update sync @@ -400,22 +362,20 @@ if [ -e "/boot/kernel_update" ]; then fi # -# Step 6: Re-size the data partition -# ================================== +# Step 6: Re-size the data partition (if sentinel file present) +# ============================================================= # print_msg "Checking for data partition re-size" -DATADEV=$(echo /dev/`lsblk -no PKNAME ${DATAPART}`) # Re-sizing is not necessary when we already reached maximum (shows with decimals less than 1MB). -FREESIZE="$(parted -s ${DATADEV} unit MB print free | tail -n 2 | grep Free | awk '{print $3}' | awk -F 'MB' '{print $1}')" -print_msg $FREESIZE +FREESIZE="$(parted -s ${BOOT_DEVICE} unit MB print free | tail -n 2 | grep Free | awk '{print $3}' | awk -F 'MB' '{print $1}')" if [ "$(awk 'BEGIN {print ("'$FREESIZE'" >= "'1'")}')" -eq "1" ]; then print_msg "Re-sizing Volumio data partition..." - END="$(parted -s ${DATADEV} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" - parted -s ${DATADEV} resizepart 3 ${END} > /boot/resize-datapart.log - e2fsck -f ${DATAPART} -y >> /boot/resize-datapart.log - resize2fs ${DATAPART} >> /boot/resize-datapart.log + END="$(parted -s ${BOOT_DEVICE} unit MB print free | grep Free | tail -1 | awk '{print $2}' | grep -o '[0-9]\+')" + parted -s ${BOOT_DEVICE} resizepart 3 ${END} > /boot/resize-datapart.log + e2fsck -f ${BOOT_DEVICE}3 -y >> /boot/resize-datapart.log + resize2fs ${BOOT_DEVICE}3 >> /boot/resize-datapart.log print_msg "Volumio data partition succesfully resized" - parted -s ${DATADEV} unit MB print >> /boot/resize-datapart.log + parted -s ${BOOT_DEVICE} unit MB print >> /boot/resize-datapart.log fi umount /boot rm -r /boot @@ -440,7 +400,7 @@ VOLUMIO_VERSION="$(cat /mnt/static/etc/os-release | grep VOLUMIO_VERSION)" # =================================================== # [ -d /mnt/ext ] || mkdir /mnt/ext -mount -t ext4 ${DATAPART} /mnt/ext +mount -t ext4 ${BOOT_DEVICE}3 /mnt/ext [ -d /mnt/ext/dyn ] || mkdir /mnt/ext/dyn [ -d /mnt/ext/union ] || mkdir /mnt/ext/union [ -d /mnt/ext/work ] || mkdir /mnt/ext/work diff --git a/scripts/initramfs/mkinitramfs-custom-single.sh b/scripts/initramfs/mkinitramfs-custom-single.sh new file mode 100755 index 000000000..63ca418bb --- /dev/null +++ b/scripts/initramfs/mkinitramfs-custom-single.sh @@ -0,0 +1,413 @@ +#!/bin/sh + +umask 0022 +export PATH='/usr/bin:/sbin:/bin' + +CleanUp() { + [ -d /var/tmp ] && rm -rf /var/tmp/mkinitramfs* + [ -n "${TMPDIR}" ] && [ -d "${TMPDIR}" ] && rm -rf "${TMPDIR}"/mkinitramfs* +} # CleanUp +trap 'CleanUp' 0 + +# Defaults +keep="n" +CONFDIR="/etc/initramfs-tools" +verbose="n" +test -e /bin/busybox && BUSYBOXDIR=/bin +test -e /usr/lib/initramfs-tools/bin/busybox && BUSYBOXDIR=/usr/lib/initramfs-tools/bin +export BUSYBOXDIR + +OPTIONS=`getopt -o c:d:ko:r:v -n "$0" -- "$@"` + +# Check for non-GNU getopt +if [ $? != 0 ] ; then echo "W: non-GNU getopt" >&2 ; exit 1 ; fi + +eval set -- "$OPTIONS" + +while true; do + case "$1" in + -c) + compress="$2" + shift 2 + ;; + -d) + CONFDIR="$2" + shift 2 + if [ ! -d "${CONFDIR}" ]; then + echo "${0}: ${CONFDIR}: Not a directory" >&2 + exit 1 + fi + ;; + -o) + outfile="$2" + shift 2 + ;; + -k) + keep="y" + shift + ;; + -r) + ROOT="$2" + shift 2 + ;; + -v) + verbose="y" + shift + ;; + --) + shift + break + ;; + *) + echo "Internal error!" >&2 + exit 1 + ;; + esac +done + +# For dependency ordered mkinitramfs hook scripts. +. /usr/share/initramfs-tools/scripts/functions +. /usr/share/initramfs-tools/hook-functions + +. "${CONFDIR}/initramfs.conf" +EXTRA_CONF='' +for i in /usr/share/initramfs-tools/conf.d/* ${CONFDIR}/conf.d/*; do + [ -e $i ] && EXTRA_CONF="${EXTRA_CONF} $(basename $i \ + | grep '^[[:alnum:]][[:alnum:]\._-]*$' | grep -v '\.dpkg-.*$')"; +done +# FIXME: deprecated those settings on mkinitramfs run +# these conf dirs are for boot scripts and land on initramfs +for i in ${EXTRA_CONF}; do + if [ -d ${CONFDIR}/conf.d/${i} ]; then + echo "Warning: ${CONFDIR}/conf.d/${i} is a directory instead of file, ignoring." + elif [ -e ${CONFDIR}/conf.d/${i} ]; then + . ${CONFDIR}/conf.d/${i} + elif [ -e /usr/share/initramfs-tools/conf.d/${i} ]; then + . /usr/share/initramfs-tools/conf.d/${i} + fi +done + +# source package confs +for i in /usr/share/initramfs-tools/conf-hooks.d/*; do + if [ -d "${i}" ]; then + echo "Warning: ${i} is a directory instead of file, ignoring." + elif [ -e "${i}" ]; then + . "${i}" + fi +done + +if [ -n "${UMASK:-}" ]; then + umask "${UMASK}" +fi + +if [ -z "${outfile}" ]; then + usage +fi + + + + + + + + + + + + + + + + +touch "$outfile" +outfile="$(readlink -f "$outfile")" +version="$(ls -t /lib/modules | cat | head -n1)" +echo "Version: ${version}" + +case "${version}" in +/lib/modules/*/[!/]*) + ;; +/lib/modules/[!/]*) + version="${version#/lib/modules/}" + version="${version%%/*}" + ;; +esac + +case "${version}" in +*/*) + echo "$PROG: ${version} is not a valid kernel version" >&2 + exit 1 + ;; +esac + +# Check userspace and kernel support for compressed initramfs images +if [ -z "${compress:-}" ]; then + compress=${COMPRESS} +else + COMPRESS=${compress} +fi + +if ! command -v "${compress}" >/dev/null 2>&1; then + compress=gzip + [ "${verbose}" = y ] && \ + echo "No ${COMPRESS} in ${PATH}, using gzip" + COMPRESS=gzip +fi + +if dpkg --compare-versions "${version}" lt "2.6.38" 2>/dev/null; then + compress=gzip + [ "${verbose}" = y ] && \ + echo "linux-2.6 likely misses ${COMPRESS} support, using gzip" +fi + +[ "${compress}" = lzop ] && compress="lzop -9" +[ "${compress}" = xz ] && compress="xz --check=crc32" + +if [ -d "${outfile}" ]; then + echo "${outfile} is a directory" >&2 + exit 1 +fi + +MODULESDIR="/lib/modules/${version}" + +if [ ! -e "${MODULESDIR}" ]; then + echo "WARNING: missing ${MODULESDIR}" + echo "Ensure all necessary drivers are built into the linux image!" +fi +if [ ! -e "${MODULESDIR}/modules.dep" ]; then + depmod ${version} +fi + +[ -n "${TMPDIR}" ] && [ ! -w "${TMPDIR}" ] && unset TMPDIR +DESTDIR="$(mktemp -d ${TMPDIR:-/var/tmp}/mkinitramfs_XXXXXX)" || exit 1 +chmod 755 "${DESTDIR}" + +__TMPCPIOGZ="$(mktemp ${TMPDIR:-/var/tmp}/mkinitramfs-OL_XXXXXX)" || exit 1 +__TMPEARLYCPIO="$(mktemp ${TMPDIR:-/var/tmp}/mkinitramfs-FW_XXXXXX)" || exit 1 + +DPKG_ARCH=`dpkg --print-architecture` + +# Export environment for hook scripts. +# +export MODULESDIR +export version +export CONFDIR +export DESTDIR +export DPKG_ARCH +export verbose +export KEYMAP +export MODULES +export BUSYBOX + +# Private, used by 'catenate_cpiogz'. +export __TMPCPIOGZ + +# Private, used by 'prepend_earlyinitramfs'. +export __TMPEARLYCPIO + +for d in bin conf/conf.d etc lib/modules run sbin scripts ${MODULESDIR}; do + mkdir -p "${DESTDIR}/${d}" +done + +# Copy in modules.builtin and modules.order (not generated by depmod) +for x in modules.builtin modules.order; do + if [ -f "${MODULESDIR}/${x}" ]; then + cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}" + fi +done + +# MODULES=list case. Always honour. +for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do + if [ -f "${x}" ]; then + add_modules_from_file "${x}" + fi +done + +# MODULES=most is default +case "${MODULES}" in +dep) + dep_add_modules + ;; +most) + auto_add_modules + ;; +netboot) + auto_add_modules base + auto_add_modules net + ;; +list) + # nothing to add + ;; +*) + echo "W: mkinitramfs: unsupported MODULES setting: ${MODULES}." + echo "W: mkinitramfs: Falling back to MODULES=most." + auto_add_modules + ;; +esac + +# Resolve hidden dependencies +hidden_dep_add_modules + + + + + + + + + + + + + + + + + + + +# First file executed by linux +cp -p /usr/share/initramfs-tools/init ${DESTDIR}/init + +# add existant boot scripts +#for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ +# -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do +# [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ +# || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" +# cp -p "/usr/share/initramfs-tools/scripts/${b}" \ +# "${DESTDIR}/scripts/$(dirname "${b}")/" +#done +#for b in $(cd "${CONFDIR}/scripts" && find . \ +# -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do +# [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ +# || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" +# cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/" +#done + +echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf +cp -p "${CONFDIR}/initramfs.conf" ${DESTDIR}/conf +for i in ${EXTRA_CONF}; do + if [ -e "${CONFDIR}/conf.d/${i}" ]; then + copy_exec "${CONFDIR}/conf.d/${i}" /conf/conf.d + elif [ -e "/usr/share/initramfs-tools/conf.d/${i}" ]; then + copy_exec "/usr/share/initramfs-tools/conf.d/${i}" /conf/conf.d + fi +done + +# ROOT hardcoding +if [ -n "${ROOT:-}" ]; then + echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root +fi + +if ! command -v ldd >/dev/null 2>&1 ; then + echo "WARNING: no ldd around - install libc-bin" >&2 + exit 1 +fi + +# fstab and mtab +touch "${DESTDIR}/etc/fstab" +ln -s /proc/mounts "${DESTDIR}/etc/mtab" + +# module-init-tools +copy_exec /sbin/modprobe /sbin +copy_exec /sbin/rmmod /sbin +mkdir -p "${DESTDIR}/etc/modprobe.d" +cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/" + +# workaround: libgcc always needed on old-abi arm +if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then + cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/" +fi + +run_scripts /usr/share/initramfs-tools/hooks +run_scripts "${CONFDIR}"/hooks + +# cache boot run order +for b in $(cd "${DESTDIR}/scripts" && find . -mindepth 1 -type d); do + cache_run_scripts "${DESTDIR}" "/scripts/${b#./}" +done + +# generate module deps +depmod -a -b "${DESTDIR}" ${version} +rm -f "${DESTDIR}/lib/modules/${version}"/modules.*map + +# make sure that library search path is up to date +cp -ar /etc/ld.so.conf* "$DESTDIR"/etc/ +if ! ldconfig -r "$DESTDIR" ; then + [ $(id -u) != "0" ] \ + && echo "ldconfig might need uid=0 (root) for chroot()" >&2 +fi + +# Apply DSDT to initramfs +if [ -e "${CONFDIR}/DSDT.aml" ]; then + copy_exec "${CONFDIR}/DSDT.aml" / +fi + +# Make sure there is a final sh in initramfs +if [ ! -e "${DESTDIR}/bin/sh" ]; then + copy_exec /bin/sh "${DESTDIR}/bin/" +fi + +# Remove any looping or broken symbolic links, since they break cpio. +[ "${verbose}" = y ] && xargs_verbose="-t" +(cd "${DESTDIR}" && find . -type l -printf '%p %Y\n' | sed -n 's/ [LN]$//p' \ + | xargs ${xargs_verbose:-} -rL1 rm -f) + +# dirty hack for armhf's double-linker situation; if we have one of +# the two known eglibc linkers, nuke both and re-create sanity +if [ "$DPKG_ARCH" = armhf ]; then + if [ -e "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" ] || \ + [ -e "${DESTDIR}/lib/ld-linux-armhf.so.3" ]; then + rm -f "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" + rm -f "${DESTDIR}/lib/ld-linux-armhf.so.3" + cp -aL /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/" + ln -sf /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" + fi +fi + +[ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs" + +if [ -s "${__TMPEARLYCPIO}" ]; then + cat "${__TMPEARLYCPIO}" >"${outfile}" || exit 1 +else + # truncate + > "${outfile}" +fi + +#( +# preserve permissions if root builds the image, see #633582 +#[ "$UID" != 0 ] && cpio_owner_root="-R 0:0" + +#adding parted to the initramfs +echo "Adding parted to initramfs" +cp /sbin/parted "${DESTDIR}/sbin" +cp /sbin/partprobe "${DESTDIR}/sbin" +cp /lib/arm-linux-gnueabihf/libparted.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" +cp /lib/arm-linux-gnueabihf/libreadline.so.6 "${DESTDIR}/lib/arm-linux-gnueabihf" +cp /lib/arm-linux-gnueabihf/libtinfo.so.5 "${DESTDIR}/lib/arm-linux-gnueabihf" + +echo "Adding mkfs.ext4 to initramfs" +cp /sbin/mkfs.ext4 "${DESTDIR}/sbin" +cp /lib/arm-linux-gnueabihf/libext2fs.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" +cp /lib/arm-linux-gnueabihf/libcom_err.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" +cp /lib/arm-linux-gnueabihf/libe2p.so.2 "${DESTDIR}/lib/arm-linux-gnueabihf" + +echo "Adding volumio-init-updater to initramfs" +cp /usr/local/sbin/volumio-init-updater "${DESTDIR}/sbin" + +#Manage the destdir folder removing the auto-generated scripts +rm -rf "${DESTDIR}/scripts" +cp /root/init "${DESTDIR}" + +#Creation of the initrd image +cd ${DESTDIR} +find . -print0 | cpio -ov -0 --format=newc | gzip -9 > /boot/volumio.initrd + +echo "initramfs volumio.initrd" >> /boot/config.txt + +if [ -e /boot/cmdline.txt ]; then + mv /boot/cmdline.txt /boot/cmdline.txt.bak +fi +echo "Writing cmdline file" +touch /boot/cmdline.txt +echo "imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh" >> /boot/cmdline.txt diff --git a/scripts/initramfs/mkinitramfs-volumio.sh b/scripts/initramfs/mkinitramfs-volumio.sh deleted file mode 100755 index 2d90ab487..000000000 --- a/scripts/initramfs/mkinitramfs-volumio.sh +++ /dev/null @@ -1,495 +0,0 @@ -#!/bin/sh - -umask 0022 -export PATH='/usr/bin:/sbin:/bin' - -# Defaults -keep="n" -CONFDIR="/etc/initramfs-tools" -verbose="n" -# Will be updated by busybox's conf hook, if present -BUSYBOXDIR= -export BUSYBOXDIR - -usage() -{ - cat << EOF - -Usage: mkinitramfs [option]... -o outfile [version] - -Options: - -c compress Override COMPRESS setting in initramfs.conf. - -d confdir Specify an alternative configuration directory. - -k Keep temporary directory used to make the image. - -o outfile Write to outfile. - -r root Override ROOT setting in initramfs.conf. - -See mkinitramfs(8) for further details. - -EOF -} - -usage_error() -{ - usage >&2 - exit 2 -} - -OPTIONS=$(getopt -o c:d:hko:r:v --long help -n "$0" -- "$@") || usage_error - -eval set -- "$OPTIONS" - -while true; do - case "$1" in - -c) - compress="$2" - shift 2 - ;; - -d) - CONFDIR="$2" - shift 2 - if [ ! -d "${CONFDIR}" ]; then - echo "${0}: ${CONFDIR}: Not a directory" >&2 - exit 1 - fi - ;; - -h|--help) - usage - exit 0 - ;; - -o) - outfile="$2" - shift 2 - ;; - -k) - keep="y" - shift - ;; - -r) - ROOT="$2" - shift 2 - ;; - -v) - verbose="y" - shift - ;; - --) - shift - break - ;; - *) - echo "Internal error!" >&2 - exit 1 - ;; - esac -done - -# For dependency ordered mkinitramfs hook scripts. -. /usr/share/initramfs-tools/scripts/functions -. /usr/share/initramfs-tools/hook-functions - -. "${CONFDIR}/initramfs.conf" - -EXTRA_CONF='' -maybe_add_conf() { - if [ -e "$1" ] && \ - basename "$1" \ - | grep '^[[:alnum:]][[:alnum:]\._-]*$' \ - | grep -qv '\.dpkg-.*$'; then - if [ -d "$1" ]; then - echo "W: $1 is a directory instead of file" >&2 - else - EXTRA_CONF="${EXTRA_CONF} $1" - . "$1" - fi - fi -} -for i in /usr/share/initramfs-tools/conf.d/*; do - # Configuration files in /etc mask those in /usr/share - if ! [ -e "${CONFDIR}"/conf.d/"$(basename "${i}")" ]; then - maybe_add_conf "${i}" - fi -done -for i in "${CONFDIR}"/conf.d/*; do - maybe_add_conf "${i}" -done - -# source package confs -for i in /usr/share/initramfs-tools/conf-hooks.d/*; do - if [ -d "${i}" ]; then - echo "W: ${i} is a directory instead of file." >&2 - elif [ -e "${i}" ]; then - . "${i}" - fi -done - -# Check busybox dependency -if [ "${BUSYBOX}" = "y" ] && [ -z "${BUSYBOXDIR}" ]; then - echo >&2 "E: busybox or busybox-static, version 1:1.22.0-17~ or later, is required but not installed" - exit 1 -fi - -if [ -n "${UMASK:-}" ]; then - umask "${UMASK}" -fi - -if [ -z "${outfile}" ]; then - usage_error -fi - -touch "$outfile" -outfile="$(readlink -f "$outfile")" - -# And by "version" we really mean path to kernel modules -# This is braindead, and exists to preserve the interface with mkinitrd -if [ ${#} -ne 1 ]; then - version="$(uname -r)" -else - version="${1}" -fi - -case "${version}" in -/lib/modules/*/[!/]*) - ;; -/lib/modules/[!/]*) - version="${version#/lib/modules/}" - version="${version%%/*}" - ;; -esac - -case "${version}" in -*/*) - echo "$PROG: ${version} is not a valid kernel version" >&2 - exit 2 - ;; -esac - -if [ -z "${compress:-}" ]; then - compress=${COMPRESS?} -fi -unset COMPRESS - -if ! command -v "${compress}" >/dev/null 2>&1; then - compress=gzip - [ "${verbose}" = y ] && \ - echo "No ${compress} in ${PATH}, using gzip" -fi - -case "${compress}" in -gzip) # If we're doing a reproducible build, use gzip -n - if [ -n "${SOURCE_DATE_EPOCH}" ]; then - compress="gzip -n" - # Otherwise, substitute pigz if it's available - elif command -v pigz >/dev/null; then - compress=pigz - fi - ;; -lz4) compress="lz4 -9 -l" ;; -xz) compress="xz --check=crc32" ;; -bzip2|lzma|lzop) - # no parameters needed - ;; -*) echo "W: Unknown compression command ${compress}" >&2 ;; -esac - -if [ -d "${outfile}" ]; then - echo "${outfile} is a directory" >&2 - exit 1 -fi - -MODULESDIR="/lib/modules/${version}" - -if [ ! -e "${MODULESDIR}" ]; then - echo "W: missing ${MODULESDIR}" >&2 - echo "W: Ensure all necessary drivers are built into the linux image!" >&2 -fi -if [ ! -e "${MODULESDIR}/modules.dep" ]; then - depmod "${version}" -fi - -# Prepare to clean up temporary files on exit -DESTDIR= -__TMPCPIOGZ= -__TMPEARLYCPIO= -clean_on_exit() { - if [ "${keep}" = "y" ]; then - echo "Working files in ${DESTDIR:-}, early initramfs in ${__TMPEARLYCPIO:-} and overlay in ${__TMPCPIOGZ:-}" - else - for path in "${DESTDIR}" "${__TMPCPIOGZ}" "${__TMPEARLYCPIO}"; do - test -z "${path}" || rm -rf "${path}" - done - fi -} -trap clean_on_exit EXIT -trap "exit 1" INT TERM # makes the EXIT trap effective even when killed - -# Create temporary directory and files for initramfs contents -[ -n "${TMPDIR}" ] && [ ! -w "${TMPDIR}" ] && unset TMPDIR -DESTDIR="$(mktemp -d "${TMPDIR:-/var/tmp}/mkinitramfs_XXXXXX")" || exit 1 -chmod 755 "${DESTDIR}" -__TMPCPIOGZ="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-OL_XXXXXX")" || exit 1 -__TMPEARLYCPIO="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-FW_XXXXXX")" || exit 1 - -DPKG_ARCH=$(dpkg --print-architecture) - -# Export environment for hook scripts. -# -export MODULESDIR -export version -export CONFDIR -export DESTDIR -export DPKG_ARCH -export verbose -export KEYMAP -export MODULES -export BUSYBOX -export RESUME - -# Private, used by 'catenate_cpiogz'. -export __TMPCPIOGZ - -# Private, used by 'prepend_earlyinitramfs'. -export __TMPEARLYCPIO - -# Create usr-merged filesystem layout, to avoid duplicates if the host -# filesystem is usr-merged. -for d in /bin /lib* /sbin; do - mkdir -p "${DESTDIR}/usr${d}" - ln -s "usr${d}" "${DESTDIR}${d}" -done -for d in conf/conf.d etc run scripts ${MODULESDIR}; do - mkdir -p "${DESTDIR}/${d}" -done - -# Copy in modules.builtin and modules.order (not generated by depmod) -for x in modules.builtin modules.order; do - if [ -f "${MODULESDIR}/${x}" ]; then - cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}" - fi -done - -# MODULES=list case. Always honour. -for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do - if [ -f "${x}" ]; then - add_modules_from_file "${x}" - fi -done - -# MODULES=most is default -case "${MODULES}" in -dep) - dep_add_modules - ;; -most) - auto_add_modules - ;; -netboot) - auto_add_modules base - auto_add_modules net - ;; -list) - # nothing to add - ;; -*) - echo "W: mkinitramfs: unsupported MODULES setting: ${MODULES}." >&2 - echo "W: mkinitramfs: Falling back to MODULES=most." >&2 - auto_add_modules - ;; -esac - -# Resolve hidden dependencies -hidden_dep_add_modules - -# First file executed by linux -cp -p /usr/share/initramfs-tools/init "${DESTDIR}/init" - -# add existant boot scripts -for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ - -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do - [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ - || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" - cp -p "/usr/share/initramfs-tools/scripts/${b}" \ - "${DESTDIR}/scripts/$(dirname "${b}")/" -done -# Prune dot-files/directories and limit depth to exclude VCS files -for b in $(cd "${CONFDIR}/scripts" && find . -maxdepth 2 -name '.?*' -prune -o \ - -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f -print); do - [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ - || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" - cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/" -done - -echo "DPKG_ARCH=${DPKG_ARCH}" > "${DESTDIR}/conf/arch.conf" -cp -p "${CONFDIR}/initramfs.conf" "${DESTDIR}/conf" -for i in ${EXTRA_CONF}; do - copy_file config "${i}" /conf/conf.d -done - -# ROOT hardcoding -if [ -n "${ROOT:-}" ]; then - echo "ROOT=${ROOT}" > "${DESTDIR}/conf/conf.d/root" -fi - -if ! command -v ldd >/dev/null 2>&1 ; then - echo "E: no ldd around - install libc-bin" >&2 - exit 1 -fi - -# fstab and mtab -touch "${DESTDIR}/etc/fstab" -ln -s /proc/mounts "${DESTDIR}/etc/mtab" - -# module-init-tools -copy_exec /sbin/modprobe /sbin -copy_exec /sbin/rmmod /sbin -mkdir -p "${DESTDIR}/etc/modprobe.d" "${DESTDIR}/lib/modprobe.d" -for file in /etc/modprobe.d/*.conf /lib/modprobe.d/*.conf ; do - if test -e "$file" || test -L "$file" ; then - copy_file config "$file" - fi -done - -# workaround: libgcc always needed on old-abi arm -if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then - cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/" -fi - -run_scripts /usr/share/initramfs-tools/hooks -run_scripts "${CONFDIR}"/hooks - -# Avoid double sleep when using older udev scripts -# shellcheck disable=SC2016 -sed -i 's/^\s*sleep \$ROOTDELAY$/:/' "${DESTDIR}/scripts/init-top/udev" - -# cache boot run order -for b in $(cd "${DESTDIR}/scripts" && find . -mindepth 1 -type d); do - cache_run_scripts "${DESTDIR}" "/scripts/${b#./}" -done - -# generate module deps -depmod -a -b "${DESTDIR}" "${version}" -rm -f "${DESTDIR}/lib/modules/${version}"/modules.*map - -# make sure that library search path is up to date -cp -ar /etc/ld.so.conf* "$DESTDIR"/etc/ -if ! ldconfig -r "$DESTDIR" ; then - [ "$(id -u)" != "0" ] \ - && echo "ldconfig might need uid=0 (root) for chroot()" >&2 -fi -# The auxiliary cache is not reproducible and is always invalid at boot -# (see #845034) -if [ -d "${DESTDIR}"/var/cache/ldconfig ]; then - rm -f "${DESTDIR}"/var/cache/ldconfig/aux-cache - rmdir --ignore-fail-on-non-empty "${DESTDIR}"/var/cache/ldconfig -fi - -# Apply DSDT to initramfs -if [ -e "${CONFDIR}/DSDT.aml" ]; then - copy_file DSDT "${CONFDIR}/DSDT.aml" -fi - -# Make sure there is a final sh in initramfs -if [ ! -e "${DESTDIR}/bin/sh" ]; then - copy_exec /bin/sh "${DESTDIR}/bin/" -fi - -# dirty hack for armhf's double-linker situation; if we have one of -# the two known eglibc linkers, nuke both and re-create sanity -if [ "$DPKG_ARCH" = armhf ]; then - if [ -e "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" ] || \ - [ -e "${DESTDIR}/lib/ld-linux-armhf.so.3" ]; then - rm -f "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" - rm -f "${DESTDIR}/lib/ld-linux-armhf.so.3" - cp -aL /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/" - ln -sf /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" - fi -fi - -# ===================== Finishing with Volumio-specific additions to the initramfs file structure - -echo "Volumio custom: adding findfs/ parted/ mkfs.ext4/ e2fsck to initramfs..." -copy_exec /sbin/parted /sbin -copy_exec /sbin/findfs /sbin -copy_exec /sbin/mkfs.ext4 /sbin -copy_exec /sbin/e2fsck /sbin -copy_exec /sbin/resize2fs /sbin - -if [ ${DPKG_ARCH} = "i386" ]; then - echo "Volumio custom: adding gdisk/ lsblk to initramfs..." - copy_exec /sbin/gdisk /sbin - copy_exec /bin/lsblk /sbin - echo "Volumio custom: adding x86-specific dmidecode to initramfs..." - copy_exec /usr/sbin/dmidecode /sbin -fi - -echo "Volumio custom: adding volumio-init-updater to initramfs..." -chmod +x /usr/local/sbin/volumio-init-updater -copy_exec /usr/local/sbin/volumio-init-updater /sbin - -# ===================== Building an initrd image from the initramfs file structure - -[ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs" - -if [ -s "${__TMPEARLYCPIO}" ]; then - cat "${__TMPEARLYCPIO}" >"${outfile}" || exit 1 -else - # truncate - true > "${outfile}" -fi - -( -# preserve permissions if root builds the image, see #633582 -[ "$(id -ru)" != 0 ] && cpio_owner_root="-R 0:0" - -# if SOURCE_DATE_EPOCH is set, try and create a reproducible image -if [ -n "${SOURCE_DATE_EPOCH}" ]; then - # ensure that no timestamps are newer than $SOURCE_DATE_EPOCH - find "${DESTDIR}" -newermt "@${SOURCE_DATE_EPOCH}" -print0 | \ - xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" - - # --reproducible requires cpio >= 2.12 - cpio_reproducible="--reproducible" -fi - -OPTS="-o" -[ "${verbose}" = y ] && OPTS="-v ${OPTS}" - -# work around lack of "set -o pipefail" for the following pipe: -# cd "${DESTDIR}" && find . | LC_ALL=C sort | cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc | gzip >>"${outfile}" || exit 1 -ec1=1 -ec2=1 -ec3=1 -exec 3>&1 -eval "$( - # http://cfaj.freeshell.org/shell/cus-faq-2.html - exec 4>&1 >&3 3>&- - cd "${DESTDIR}" - { - find . 4>&-; echo "ec1=$?;" >&4 - } | { - LC_ALL=C sort - } | { - # shellcheck disable=SC2086 - cpio --quiet $cpio_owner_root $cpio_reproducible ${OPTS} -H newc 4>&-; echo "ec2=$?;" >&4 - } | ${compress} >>"${outfile}" - echo "ec3=$?;" >&4 -)" -if [ "$ec1" -ne 0 ]; then - echo "E: mkinitramfs failure find $ec1 cpio $ec2 $compress $ec3" >&2 - exit "$ec1" -fi -if [ "$ec2" -ne 0 ]; then - echo "E: mkinitramfs failure cpio $ec2 $compress $ec3" >&2 - exit "$ec2" -fi -if [ "$ec3" -ne 0 ]; then - echo "E: mkinitramfs failure $compress $ec3" >&2 - exit "$ec3" -fi -) || exit 1 - -if [ -s "${__TMPCPIOGZ}" ]; then - cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1 -fi - -exit 0 diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index a4656ed03..ef90186f8 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -1,7 +1,6 @@ #!/bin/bash NODE_VERSION=8.11.1 -OS_VERSION_ID=$(cat /etc/os-release | grep ^VERSION_ID | tr -d 'VERSION_ID="') # This script will be run in chroot under qemu. @@ -26,12 +25,7 @@ path-exclude /usr/share/linda/*" > /etc/dpkg/dpkg.cfg.d/01_nodoc export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true export LC_ALL=C LANGUAGE=C LANG=C - -# the dash.preinst script was removed from Debian buster according to: -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890073 -if [ ! $OS_VERSION_ID = 10 ]; then - /var/lib/dpkg/info/dash.preinst install -fi +/var/lib/dpkg/info/dash.preinst install #if [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then # echo "Fix for cgmanager not starting on x86" @@ -40,14 +34,6 @@ fi # sed -i -e 's/# Required-Start: mountkernfs/# Required-Start:/g' /etc/init.d/cgmanager #fi -if [ $OS_VERSION_ID = 10 ]; then -# configuration of package base-files depends on package base-passwd. -# But for some reason, base-files gets bootstrapped before base-passwd. -# Create a valid /etc/passwd before configuring anything else. - echo "Working around a debian buster package dependency issue" - /var/lib/dpkg/info/base-passwd.preinst install -fi - echo "Configuring packages" dpkg --configure -a @@ -199,7 +185,7 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then echo "Installing MPD for armv6" # First we manually install a newer alsa-lib to achieve Direct DSD support - : ' + echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2_1.1.3-5_armhf.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv6/libasound2-data_1.1.3-5_all.deb @@ -231,11 +217,12 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armhf.deb dpkg -i volumio-remote-updater_1.3-armhf.deb rm volumio-remote-updater_1.3-armhf.deb - ' + + elif [ $ARCH = armv7 ]; then echo "Installing MPD for armv7" # First we manually install a newer alsa-lib to achieve Direct DSD support - : ' + echo "Installing alsa-lib 1.1.3" wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2_1.1.3-5_armhf.deb wget http://repo.volumio.org/Volumio2/Binaries/libasound2/armv7/libasound2-data_1.1.3-5_all.deb @@ -252,27 +239,26 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then dpkg -i mpd_0.20.18-1_armv7.deb rm mpd_0.20.18-1_armv7.deb - echo "Installing Upmpdcli for armv7" - wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb - wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnp6_1.6.20.jfd5-1_armhf.deb - wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/upmpdcli_1.2.12-1_armhf.deb - dpkg -i libupnpp3_0.15.1-1_armhf.deb - dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb - dpkg -i upmpdcli_1.2.12-1_armhf.deb - rm libupnpp3_0.15.1-1_armhf.deb - rm libupnp6_1.6.20.jfd5-1_armhf.deb - rm upmpdcli_1.2.12-1_armhf.deb + echo "Installing Upmpdcli for armv7" + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnpp3_0.15.1-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/libupnp6_1.6.20.jfd5-1_armhf.deb + wget http://repo.volumio.org/Volumio2/Binaries/upmpdcli/armv7/upmpdcli_1.2.12-1_armhf.deb + dpkg -i libupnpp3_0.15.1-1_armhf.deb + dpkg -i libupnp6_1.6.20.jfd5-1_armhf.deb + dpkg -i upmpdcli_1.2.12-1_armhf.deb + rm libupnpp3_0.15.1-1_armhf.deb + rm libupnp6_1.6.20.jfd5-1_armhf.deb + rm upmpdcli_1.2.12-1_armhf.deb + + echo "Adding volumio-remote-updater for armv7" + wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armv7.deb + dpkg -i volumio-remote-updater_1.3-armv7.deb + rm volumio-remote-updater_1.3-armv7.deb - echo "Adding volumio-remote-updater for armv7" - wget http://repo.volumio.org/Volumio2/Binaries/arm/volumio-remote-updater_1.3-armv7.deb - dpkg -i volumio-remote-updater_1.3-armv7.deb - rm volumio-remote-updater_1.3-armv7.deb - ' fi #Remove autostart of upmpdcli update-rc.d upmpdcli remove - : ' echo "Installing Shairport-Sync" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-arm.tar.gz tar xf shairport-sync-3.0.2-arm.tar.gz @@ -305,7 +291,7 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then echo "Adding special version for kernel 4.19" wget http://repo.volumio.org/Volumio2/Binaries/arm/hostapd-2.8 -P /usr/sbin/ chmod a+x /usr/sbin/hostapd-2.8 - ' + echo "interface=wlan0 ssid=Volumio channel=4 @@ -321,9 +307,8 @@ wpa_passphrase=volumio2" >> /etc/hostapd/hostapd-edimax.conf echo "Cleanup" apt-get clean rm -rf tmp/* - elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] ; then - echo "x86 Environment Detected" + echo 'x86 Environment Detected' # cleanup apt-get clean @@ -349,6 +334,7 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] tar xf node_modules_x86-${NODE_VERSION}.tar.gz rm node_modules_x86-${NODE_VERSION}.tar.gz + echo "Setting proper ownership" chown -R volumio:volumio /volumio @@ -363,81 +349,66 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] echo "Installing Custom Packages" cd / -# MPD and alsa-lib are in Debian buster - if [ ! $OS_VERSION_ID = 10 ]; then - echo "Installing MPD for i386" + echo "Installing MPD for i386" # First we manually install a newer alsa-lib to achieve Direct DSD support - echo "Installing alsa-lib 1.1.3" - wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2_1.1.3-5_i386.deb - wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-data_1.1.3-5_all.deb - wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-dev_1.1.3-5_i386.deb - dpkg --force-all -i libasound2-data_1.1.3-5_all.deb - dpkg --force-all -i libasound2_1.1.3-5_i386.deb - dpkg --force-all -i libasound2-dev_1.1.3-5_i386.deb - rm libasound2-data_1.1.3-5_all.deb - rm libasound2_1.1.3-5_i386.deb - rm libasound2-dev_1.1.3-5_i386.deb - - echo "Installing MPD 20.18" - wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_i386.deb - dpkg -i mpd_0.20.18-1_i386.deb - rm mpd_0.20.18-1_i386.deb - fi - - if [ ! $OS_VERSION_ID = 10 ]; then - echo "Installing Upmpdcli" - wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb - wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb - wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnpp3_0.15.1-1_i386.deb - dpkg -i libupnpp3_0.15.1-1_i386.deb - dpkg -i libupnp6_1.6.20.jfd5-1_i386.deb - dpkg -i upmpdcli_1.2.12-1_i386.deb - rm /libupnpp3_0.15.1-1_i386.deb - rm /upmpdcli_1.2.12-1_i386.deb - rm /libupnp6_1.6.20.jfd5-1_i386.deb - else - echo "===> TODO: add missing upmpdcli for buster" - fi -# Shairport-Sync is in the Debian buster repo - if [ ! $OS_VERSION_ID = 10 ]; then - echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz - tar xf shairport-sync-3.0.2-i386.tar.gz - rm /shairport-sync-3.0.2-i386.tar.gz - fi - - if [ ! $OS_VERSION_ID = 10 ]; then - echo "Installing Shairport-Sync Metadata Reader" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz - tar xf shairport-sync-metadata-reader-i386.tar.gz - rm /shairport-sync-metadata-reader-i386.tar.gz - - echo "Installing LINN Songcast module" - wget http://repo.volumio.org/Packages/Upmpdcli/x86/sc2mpd_1.1.1-1_i386.deb - dpkg -i sc2mpd_1.1.1-1_i386.deb - rm /sc2mpd_1.1.1-1_i386.deb - else - echo "===> TODO: add missing Shairport-Sync Metadata Reader, LINN Songcast for buster" - fi + echo "Installing alsa-lib 1.1.3" + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2_1.1.3-5_i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-data_1.1.3-5_all.deb + wget http://repo.volumio.org/Volumio2/Binaries/libasound2/i386/libasound2-dev_1.1.3-5_i386.deb + dpkg --force-all -i libasound2-data_1.1.3-5_all.deb + dpkg --force-all -i libasound2_1.1.3-5_i386.deb + dpkg --force-all -i libasound2-dev_1.1.3-5_i386.deb + rm libasound2-data_1.1.3-5_all.deb + rm libasound2_1.1.3-5_i386.deb + rm libasound2-dev_1.1.3-5_i386.deb + + echo "Installing MPD 20.18" + wget http://repo.volumio.org/Volumio2/Binaries/mpd-DSD/mpd_0.20.18-1_i386.deb + dpkg -i mpd_0.20.18-1_i386.deb + rm mpd_0.20.18-1_i386.deb + + echo "Installing Upmpdcli" + wget http://repo.volumio.org/Packages/Upmpdcli/x86/upmpdcli_1.2.12-1_i386.deb + wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnp6_1.6.20.jfd5-1_i386.deb + wget http://repo.volumio.org/Packages/Upmpdcli/x86/libupnpp3_0.15.1-1_i386.deb + dpkg -i libupnpp3_0.15.1-1_i386.deb + dpkg -i libupnp6_1.6.20.jfd5-1_i386.deb + dpkg -i upmpdcli_1.2.12-1_i386.deb + rm /libupnpp3_0.15.1-1_i386.deb + rm /upmpdcli_1.2.12-1_i386.deb + rm /libupnp6_1.6.20.jfd5-1_i386.deb + + echo "Installing Shairport-Sync" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz + tar xf shairport-sync-3.0.2-i386.tar.gz + rm /shairport-sync-3.0.2-i386.tar.gz + + echo "Installing Shairport-Sync Metadata Reader" + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz + tar xf shairport-sync-metadata-reader-i386.tar.gz + rm /shairport-sync-metadata-reader-i386.tar.gz + + + echo "Installing LINN Songcast module" + wget http://repo.volumio.org/Packages/Upmpdcli/x86/sc2mpd_1.1.1-1_i386.deb + dpkg -i sc2mpd_1.1.1-1_i386.deb + rm /sc2mpd_1.1.1-1_i386.deb + + echo "Volumio Init Updater" + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater + chmod a+x /usr/local/sbin/volumio-init-updater + + echo "Installing Zsync" + rm /usr/bin/zsync + wget http://repo.volumio.org/Volumio2/Binaries/x86/zsync -P /usr/bin/ + chmod a+x /usr/bin/zsync + + echo "Adding volumio-remote-updater for i386" + wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.3-i386.deb + dpkg -i volumio-remote-updater_1.3-i386.deb + rm /volumio-remote-updater_1.3-i386.deb - if [ ! $OS_VERSION_ID = 10 ]; then - echo "Volumio Init Updater" - wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-init-updater-v2 -O /usr/local/sbin/volumio-init-updater - chmod a+x /usr/local/sbin/volumio-init-updater - - echo "Installing Zsync" - rm /usr/bin/zsync - wget http://repo.volumio.org/Volumio2/Binaries/x86/zsync -P /usr/bin/ - chmod a+x /usr/bin/zsync - - echo "Adding volumio-remote-updater for i386" - wget http://repo.volumio.org/Volumio2/Binaries/x86/volumio-remote-updater_1.3-i386.deb - dpkg -i volumio-remote-updater_1.3-i386.deb - rm /volumio-remote-updater_1.3-i386.deb - else - echo "===> TODO: add missing Volumio Init Updater, Zsync and Volumio Remote Updater for buster" - fi fi @@ -514,12 +485,10 @@ update-rc.d mpd remove systemctl enable mpd.service echo "Preventing hotspot services from starting at boot" -echo "===> TODO: check hotspot.service error for buster" systemctl disable hotspot.service systemctl disable dnsmasq.service echo "Preventing un-needed dhcp servers to start automatically" -echo "===> TODO: check dhcpd.service error for buster" systemctl disable isc-dhcp-server.service systemctl disable dhcpd.service @@ -548,7 +517,6 @@ echo '#' > /var/lib/alsa/asound.state chmod 777 /var/lib/alsa/asound.state echo "Fixing UPNP L16 Playback issue" -echo "===> TODO: check protocolinfo.txtrepl error for buster" grep -v '^@ENABLEL16' /usr/share/upmpdcli/protocolinfo.txt > /usr/share/upmpdcli/protocolinfo.txtrepl && mv /usr/share/upmpdcli/protocolinfo.txtrepl /usr/share/upmpdcli/protocolinfo.txt ##################### @@ -596,7 +564,6 @@ chmod 666 /etc/resolv.conf.* ln -s /etc/resolv.conf.tail.tmpl /etc/resolv.conf.tail echo "Removing Avahi Service for UDISK-SSH" -echo "===> TODO: check UDISK-SSH error for buster" rm /etc/avahi/services/udisks.service ##################### diff --git a/scripts/x86b-config.sh b/scripts/x86b-config.sh deleted file mode 100755 index b9504a900..000000000 --- a/scripts/x86b-config.sh +++ /dev/null @@ -1,281 +0,0 @@ -#!/bin/bash - -PATCH=$(cat /patch) -# This script will be run in chroot. -echo "Initializing.." -. init.sh - -echo "Installing the kernel" -# Exact kernel version not known -# Not brilliant, but safe enough as x86image.sh only copied one image -dpkg -i linux-image-*_i386.deb - -echo "Setting sane defaults for baytrail/cherrytrail soundcards" -echo "#!/bin/sh -e -/usr/local/bin/bytcr-init.sh -exit 0" > /etc/rc.local - -echo "Creating node/ nodejs symlinks to stay compatible with the armv6/v7 platforms" -ln -s /usr/bin/nodejs /usr/local/bin/nodejs - -echo "Blacklisting PC speaker" -echo "blacklist snd_pcsp" >> /etc/modprobe.d/blacklist.conf - -echo "X86 USB Card Ordering" -echo "# USB DACs will have device number 5 in whole Volumio device range -options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf - -echo "Installing Syslinux Legacy BIOS" -syslinux -v -syslinux "${BOOT_PART}" - -echo "Getting the current kernel filename" -KRNL=`ls -l /boot |grep vmlinuz | awk '{print $9}'` - -echo "Creating run-time template for syslinux config" -DEBUG="use_kmsg=no" -echo "DEFAULT volumio - -LABEL volumio - SAY Legacy Boot Volumio Audiophile Music Player (default) - LINUX ${KRNL} - APPEND net.ifnames=0 biosdevname=0 imgpart=UUID=%%IMGPART%% bootpart=UUID=%%BOOTPART%% datapart=UUID=%%DATAPART%% imgfile=volumio_current.sqsh splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 loglevel=7 ${DEBUG} - INITRD volumio.initrd -" > /boot/syslinux.tmpl - -echo "Creating syslinux.cfg from template" -cp /boot/syslinux.tmpl /boot/syslinux.cfg -sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/syslinux.cfg -sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/syslinux.cfg -sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/syslinux.cfg - -echo "Editing the Grub UEFI config template" -# Make grub boot menu transparent -sed -i "s/menu_color_normal=cyan\/blue/menu_color_normal=white\/black/g" /etc/grub.d/05_debian_theme -sed -i "s/menu_color_highlight=white\/blue/menu_color_highlight=green\/dark-gray/g" /etc/grub.d/05_debian_theme -# replace the initrd string in the template -sed -i "s/initrd=\"\$i\"/initrd=\"volumio.initrd\"/g" /etc/grub.d/10_linux - -#replace both LINUX_ROOT_DEVICE and LINUX_ROOT_DEVICE=UUID= in the template -# to a string which we can replace after creating the grub config file -#TODO: update the default grub file -sed -i "s/LINUX_ROOT_DEVICE=\${GRUB_DEVICE}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux -sed -i "s/LINUX_ROOT_DEVICE=UUID=\${GRUB_DEVICE_UUID}/LINUX_ROOT_DEVICE=imgpart=%%IMGPART%% /g" /etc/grub.d/10_linux - -echo "Setting plymouth image" -cp /usr/share/plymouth/themes/volumio/volumio-logo16.png /boot/volumio.png - -echo "Creating Grub config folder" -mkdir /boot/grub - -echo "Applying Grub configuration" -grub-mkconfig -o /boot/grub/grub.cfg -chmod +w /boot/grub/grub.cfg - -echo "Coyping the new Grub config to the EFI bootloader folder" -cp /boot/grub/grub.cfg /boot/efi/BOOT/grub.cfg - -echo "Telling the bootloader to read an external config" -echo 'configfile ${cmdpath}/grub.cfg' > /grub-redir.cfg - -echo "Using current grub.cfg as run-time template for kernel updates" -cp /boot/efi/BOOT/grub.cfg /boot/efi/BOOT/grub.tmpl -sed -i "s/${UUID_BOOT}/%%BOOTPART%%/g" /boot/efi/BOOT/grub.tmpl -sed -i "s/${UUID_DATA}/%%DATAPART%%/g" /boot/efi/BOOT/grub.tmpl - -echo "Inserting root and boot partition UUIDs (building the boot cmdline used in initramfs)" -# Opting for finding partitions by-UUID -sed -i "s/root=imgpart=%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/efi/BOOT/grub.cfg -sed -i "s/bootpart=%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/efi/BOOT/grub.cfg -sed -i "s/datapart=%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/efi/BOOT/grub.cfg - -cat > /usr/sbin/policy-rc.d << EOF -exit 101 -EOF -chmod +x /usr/sbin/policy-rc.d - -echo "Installing grub-efi-amd64 to make the 64bit UEFI bootloader" -apt-get update -apt-get -y install grub-efi-amd64-bin -grub-mkstandalone --compress=gz -O x86_64-efi -o /boot/efi/BOOT/BOOTX64.EFI "boot/grub/grub.cfg=grub-redir.cfg" -d /usr/lib/grub/x86_64-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" -if [ ! -e /boot/efi/BOOT/BOOTX64.EFI ]; then - echo "Fatal error, no 64bit bootmanager created, aborting..." - exit 1 -fi - -#we cannot install grub-efi-amd64 and grub-efi-ia32 on the same machine. -#on the off-chance that we need a 32bit bootloader, we remove amd64 and install ia32 to generate one -echo "Uninstalling grub-efi-amd64" -apt-get -y --purge remove grub-efi-amd64-bin - -echo "Installing grub-efi-ia32 to make the 32bit UEFI bootloader" -apt-get -y install grub-efi-ia32-bin -grub-mkstandalone --compress=gz -O i386-efi -o /boot/efi/BOOT/BOOTIA32.EFI "boot/grub/grub.cfg=grub-redir.cfg" -d /usr/lib/grub/i386-efi --modules="part_gpt part_msdos" --fonts="unicode" --themes="" -if [ ! -e /boot/efi/BOOT/BOOTIA32.EFI ]; then - echo "Fatal error, no 32bit bootmanager created, aborting..." - exit 1 -fi -#and remove it again -echo "Uninstalling grub-efi-ia32-bin and cleaning up grub install" -apt-get -y --purge remove grub-efi-ia32-bin -apt-get -y --purge remove efibootmgr libefiboot1 libefivar1 -rm /grub-redir.cfg -rm -r /boot/grub - -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d - -echo "Copying fstab as a template to be used in initrd" -cp /etc/fstab /etc/fstab.tmpl - -echo "Editing fstab to use UUID=" -sed -i "s/%%BOOTPART%%/UUID=${UUID_BOOT}/g" /etc/fstab - -echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" -apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core - -echo "Configuring boot splash" -apt-get -y install plymouth plymouth-themes plymouth-x11 -plymouth-set-default-theme volumio -echo "[Daemon] -Theme=volumio -ShowDelay=0 -" > /usr/share/plymouth/plymouthd.defaults - -echo "Setting up in kiosk-mode" -echo "Creating chromium kiosk start script" -echo "#!/bin/bash - -xset -dpms -xset s off -openbox-session & - -while true; do - rm -rf ~/.{config,cache}/chromium/ - /usr/bin/chromium --disable-session-crashed-bubble --disable-infobars --kiosk --no-first-run 'http://localhost:3000' -done" > /opt/volumiokiosk.sh -chmod +x /opt/volumiokiosk.sh - -echo "[Unit] -Description=Start Volumio Kiosk -Wants=volumio.service -After=volumio.service -[Service] -Type=simple -User=volumio -Group=audio -ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 -[Install] -WantedBy=multi-user.target -" > /lib/systemd/system/volumio-kiosk.service -ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service - -echo "Hide Mouse cursor" - -echo "#!/bin/sh - -if [ -d /etc/X11/xinit/xinitrc.d ]; then - for f in /etc/X11/xinit/xinitrc.d/*; do - [ -x "$f" ] && . "$f" - done - unset f -fi - -xrdb -merge ~/.Xresources # aggiorna x resources db - -#xscreensaver -no-splash & # avvia il demone di xscreensaver -xsetroot -cursor_name left_ptr & # setta il cursore di X -#sh ~/.fehbg & # setta lo sfondo con feh - -exec openbox-session # avvia il window manager - -exec unclutter &" > /root/.xinitrc - - -echo "Allowing volumio to start an xsession" -echo "allowed_users=anybody -needs_root_rights=yes" > /etc/X11/Xwrapper.config - - -echo "Creating initramfs" -echo "Adding custom modules" -echo "overlay" >> /etc/initramfs-tools/modules -echo "squashfs" >> /etc/initramfs-tools/modules -echo "usbcore" >> /etc/initramfs-tools/modules -echo "usb_common" >> /etc/initramfs-tools/modules -echo "mmc_core" >> /etc/initramfs-tools/modules -echo "mmc_block" >> /etc/initramfs-tools/modules -echo "nvme_core" >> /etc/initramfs-tools/modules -echo "nvme" >> /etc/initramfs-tools/modules -echo "sdhci" >> /etc/initramfs-tools/modules -echo "sdhci_pci" >> /etc/initramfs-tools/modules -echo "sdhci_acpi" >> /etc/initramfs-tools/modules -echo "ehci_pci" >> /etc/initramfs-tools/modules -echo "ohci_pci" >> /etc/initramfs-tools/modules -echo "uhci_hcd" >> /etc/initramfs-tools/modules -echo "ehci_hcd" >> /etc/initramfs-tools/modules -echo "xhci_hcd" >> /etc/initramfs-tools/modules -echo "ohci_hcd" >> /etc/initramfs-tools/modules -echo "usbhid" >> /etc/initramfs-tools/modules -echo "hid_cherry" >> /etc/initramfs-tools/modules -echo "hid_generic" >> /etc/initramfs-tools/modules -echo "hid" >> /etc/initramfs-tools/modules -echo "nls_cp437" >> /etc/initramfs-tools/modules -echo "nls_utf8" >> /etc/initramfs-tools/modules -echo "vfat" >> /etc/initramfs-tools/modules -echo "Adding ata modules for various chipsets" -cat /ata-modules.x86 >> /etc/initramfs-tools/modules -echo "Adding modules for Plymouth" -echo "intel_agp" >> /etc/initramfs-tools/modules -echo "drm" >> /etc/initramfs-tools/modules -echo "i915 modeset=1" >> /etc/initramfs-tools/modules -echo "nouveau modeset=1" >> /etc/initramfs-tools/modules -echo "radeon modeset=1" >> /etc/initramfs-tools/modules - -echo "Copying volumio initramfs updater" -cd /root/ -mv volumio-init-updater /usr/local/sbin - -VERSION=`echo ${KRNL} | awk -F "vmlinuz-" '{print $2}'` -echo "Creating initramfs 'volumio.initrd' with kernel ${VERSION}..." -cp /root/init /usr/share/initramfs-tools/ -#TODO replace mkinitramfs.sh -mkinitramfs-volumio.sh -v -o /tmp/initramfs-tmp ${VERSION} -cp /tmp/initramfs-tmp /boot/volumio.initrd - -echo "No need to keep the original initrd" -DELFILE=`ls -l /boot |grep initrd.img | awk '{print $9}'` -echo "Found "$DELFILE", deleting" -rm /boot/${DELFILE} -echo "No need for the system map either" -DELFILE=`ls -l /boot |grep System.map | awk '{print $9}'` -echo "Found "$DELFILE", deleting" -rm /boot/${DELFILE} - -#On The Fly Patch -if [ "$PATCH" = "volumio" ]; then -echo "No Patch To Apply" -else -echo "Applying Patch ${PATCH}" -PATCHPATH=/${PATCH} -cd $PATCHPATH -#Check the existence of patch script -if [ -f "patch.sh" ]; then -chmod a+x patch.sh -sh patch.sh -else -echo "Cannot Find Patch File, aborting" -fi -if [ -f "install.sh" ]; then -sh install.sh -fi -cd / -rm -rf ${PATCH} -fi -rm /patch - -echo "Bootloader configuration and initrd.img complete" diff --git a/scripts/x86b-image.sh b/scripts/x86b-image.sh deleted file mode 100755 index ca1252730..000000000 --- a/scripts/x86b-image.sh +++ /dev/null @@ -1,236 +0,0 @@ -#!/bin/sh - -while getopts ":v:p:" opt; do - case $opt in - v) - VERSION=$OPTARG - ;; - p) - PATCH=$OPTARG - ;; - - esac -done -BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-x86.img" - -echo "Creating Image Bed" -echo "Image file: ${IMG_FILE}" -dd if=/dev/zero of=${IMG_FILE} bs=1M count=3700 -LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` - -sudo parted -s "${LOOP_DEV}" mklabel gpt -sudo parted -s "${LOOP_DEV}" mkpart primary 1 512 #legacy and uefi boot -sudo parted -s "${LOOP_DEV}" mkpart primary 512 3500 #volumio -sudo parted -s "${LOOP_DEV}" mkpart primary 3500 100% #data -sudo parted -s "${LOOP_DEV}" set 1 legacy_boot on -sudo parted -s "${LOOP_DEV}" set 1 esp on -sudo partprobe "${LOOP_DEV}" -sudo kpartx -s -a "${LOOP_DEV}" - -BOOT_PART=`echo /dev/mapper/"$( echo $LOOP_DEV | sed -e 's/.*\/\(\w*\)/\1/' )"p1` -IMG_PART=`echo /dev/mapper/"$( echo $LOOP_DEV | sed -e 's/.*\/\(\w*\)/\1/' )"p2` -DATA_PART=`echo /dev/mapper/"$( echo $LOOP_DEV | sed -e 's/.*\/\(\w*\)/\1/' )"p3` - -if [ ! -b "$BOOT_PART" ] -then - echo "$BOOT_PART doesn't exist" - exit 1 -fi - -echo "Creating filesystems" -#sudo mkdosfs "${BOOT_PART}" -sudo mkfs -t vfat -F 32 -n volumioboot "${BOOT_PART}" -sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${IMG_PART}" -L volumioimg -sudo mkfs.ext4 -E stride=2,stripe-width=1024 -b 4096 "${DATA_PART}" -L volumio_data -sudo parted -s "${LOOP_DEV}" print - -sync - -if [ -d /mnt ] -then - echo "/mnt folder exist" -else - sudo mkdir /mnt -fi -if [ -d /mnt/volumio ] -then - echo "Volumio Temp Directory Exists - Cleaning it" - rm -rf /mnt/volumio/* -else - echo "Creating Volumio Temp Directory" - sudo mkdir /mnt/volumio -fi - -echo "Creating mount point for the images partition" -mkdir /mnt/volumio/images -sudo mount -t ext4 "${IMG_PART}" /mnt/volumio/images -sudo mkdir /mnt/volumio/rootfs -echo "Copying Volumio RootFs" -sudo cp -pdR build/x86/root/* /mnt/volumio/rootfs - -echo "Copying the Syslinux boot sector" -dd conv=notrunc bs=440 count=1 if=/mnt/volumio/rootfs/usr/lib/syslinux/mbr/gptmbr.bin of=${LOOP_DEV} -sync - -echo "Entering Chroot Environment" -sudo mkdir /mnt/volumio/boot -sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot - -cp scripts/x86b-config.sh /mnt/volumio/rootfs -if [ ! -d platform-x86 ]; then - echo "Platform files (packages) not available yet, getting them from the repo" - git clone http://github.com/volumio/platform-x86 --depth 1 -fi -echo "Copying kernel install package" -cp platform-x86/packages-buster/linux-image-*.deb /mnt/volumio/rootfs - -echo "Copying the latest firmware into /lib/firmware" -tar xfJ platform-x86/packages-buster/linux-firmware-buster.tar.xz -C /mnt/volumio/rootfs - -echo "Copying firmware additions" -tar xf platform-x86/packages-buster/firmware-brcm-sdio-nvram/broadcom-nvram.tar.xz -C /mnt/volumio/rootfs - -echo "Copying Alsa Use Case Manager files" -cp -R platform-x86/packages-buster/UCM/* /mnt/volumio/rootfs/usr/share/alsa/ucm/ - -cat /mnt/volumio/rootfs/etc/apt/sources.list -echo "deb http://deb.debian.org/debian/ buster main contrib non-free -deb-src http://deb.debian.org/debian/ buster main contrib non-free" > /mnt/volumio/rootfs/etc/apt/sources.list - -#TODO: not checked with other Intel SST bytrt/cht audio boards yet, needs more input -mkdir -p /mnt/volumio/rootfs/usr/local/bin/ -cp platform-x86/packages-buster/bytcr-init/bytcr-init.sh /mnt/volumio/rootfs/usr/local/bin/ -chmod +x /mnt/volumio/rootfs/usr/local/bin/bytcr-init.sh - -cp volumio/splash/volumio.png /mnt/volumio/rootfs/boot - -cp scripts/initramfs/init-x86 /mnt/volumio/rootfs/root/init -cp scripts/initramfs/mkinitramfs-volumio.sh /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-volumio.sh - -cp volumio/etc/ata-modules.x86 /mnt/volumio/rootfs/ata-modules.x86 - -#copy the scripts for updating from usb -wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater - -mount /dev /mnt/volumio/rootfs/dev -o bind -mount /proc /mnt/volumio/rootfs/proc -t proc -mount /sys /mnt/volumio/rootfs/sys -t sysfs - -mkdir -p /mnt/volumio/rootfs/boot/efi -mkdir -p /mnt/volumio/rootfs/boot/efi/EFI/debian -mkdir -p /mnt/volumio/rootfs/boot/efi/BOOT/ -#modprobe efivarfs - -UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) -UUID_IMG=$(blkid -s UUID -o value ${IMG_PART}) -UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) -echo "UUID_BOOT=${UUID_BOOT} -UUID_IMG=${UUID_IMG} -UUID_DATA=${UUID_DATA} -LOOP_DEV=${LOOP_DEV} -BOOT_PART=${BOOT_PART} -" >> /mnt/volumio/rootfs/init.sh -chmod +x /mnt/volumio/rootfs/init.sh - -echo $PATCH > /mnt/volumio/rootfs/patch - -if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then - UIVARIANT=$(cat "UIVARIANT") - echo "Configuring variant $UIVARIANT" - echo "Starting config.js for variant $UIVARIANT" - node config.js $PATCH $UIVARIANT - echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT - else - echo "Starting config.js" - node config.js $PATCH - fi -fi - -chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' -/x86b-config.sh -p -EOF - - -UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT -if [ -f "${UIVARIANT_FILE}" ]; then - echo "Starting variant.js" - node variant.js - rm $UIVARIANT_FILE -fi - -rm /mnt/volumio/rootfs/*.deb -rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/x86b-config.sh -rm /mnt/volumio/rootfs/ata-modules.x86 - -sync - -echo "Unmounting Temp Devices" -sudo umount -l /mnt/volumio/rootfs/dev -sudo umount -l /mnt/volumio/rootfs/proc -sudo umount -l /mnt/volumio/rootfs/sys - -echo "X86 device installed" - -echo "Preparing rootfs base for SquashFS" - -if [ -d /mnt/squash ]; then - echo "Volumio SquashFS Temp Dir Exists - Cleaning it" - rm -rf /mnt/squash/* -else - echo "Creating Volumio SquashFS Temp Dir" - sudo mkdir /mnt/squash -fi - -echo "Copying Volumio rootfs to Temp Dir" -cp -rp /mnt/volumio/rootfs/* /mnt/squash/ - -if [ -e /mnt/kernel_current.tar ]; then - echo "Volumio Kernel Partition Archive exists - Cleaning it" - rm -rf /mnt/kernel_current.tar -fi - -echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar --exclude='ldlinux.sys' -C /mnt/squash/boot/ . - -echo "Removing the Kernel" -rm -rf /mnt/squash/boot/* - -echo "Creating SquashFS, removing any previous one" -rm -r Volumio.sqsh -mksquashfs /mnt/squash/* Volumio.sqsh - -echo "Squash filesystem created" -echo "Cleaning squash environment" -rm -rf /mnt/squash - -#copy the squash image inside the boot partition -cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh - -sync - -echo "Unmounting Temp Devices" -sudo umount -l /mnt/volumio/images -sudo umount -l /mnt/volumio/rootfs/boot - -echo "Avoiding fsck errors on boot" -# as the syslinux boot sector has no backup, no idea why (yet), simply fix that by coyping to the backup) -fsck.vfat -r > /dev/null 2>&1 "${BOOT_PART}" < Volumio-dev.vmdk.md5 -#echo "VMDK Virtual Image File generated" From 98e528a81fc54bf343616a910a76d7689c17b44e Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 9 Oct 2019 23:38:38 +0200 Subject: [PATCH 543/673] Further work on BT for PI --- scripts/raspberryconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index e278ca085..cbd24cd2b 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -152,7 +152,7 @@ Pin-Priority: -1 Package: raspberrypi-kernel Pin: release * Pin-Priority: -1" > /etc/apt/preferences -apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depends on raspberrypi-bootloader +apt-mark hold raspberrypi-kernel raspberrypi-bootloader #libraspberrypi0 depends on raspberrypi-bootloader echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & few others firmware upgraging to Pi Foundations packages" apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 @@ -162,9 +162,6 @@ wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rp dpkg -i firmware-brcm80211_20190114-1+rpt2_all.deb rm firmware-brcm80211_20190114-1+rpt2_all.deb -echo "Installing Bluetooth Utils" -apt-get install -y pi-bluetooth - if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/bcm2708-rpi-0-w.dtb @@ -208,6 +205,9 @@ rm /etc/sudoers.d/010_pi-nopasswd unlink /etc/systemd/system/multi-user.target.wants/sshswitch.service rm /lib/systemd/system/sshswitch.service +echo "Installing Bluetooth Utils" +apt-get install -y bluez bluez-firmware pi-bluetooth + echo "Exporting /opt/vc/bin variable" export LD_LIBRARY_PATH=/opt/vc/lib/:LD_LIBRARY_PATH From 8c8f2c1d27c6f2f9f55feacfbca5031f1e952b94 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 10 Oct 2019 22:48:43 +0200 Subject: [PATCH 544/673] Align mpd.conf with default values --- volumio/etc/mpd.conf | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/volumio/etc/mpd.conf b/volumio/etc/mpd.conf index dc4777c9a..fe1d1fefc 100755 --- a/volumio/etc/mpd.conf +++ b/volumio/etc/mpd.conf @@ -1,24 +1,24 @@ # Volumio MPD Configuration File # Files and directories ####################################################### -music_directory "/var/lib/mpd/music" -playlist_directory "/var/lib/mpd/playlists" -db_file "/var/lib/mpd/tag_cache" -#log_file "/var/log/mpd/mpd.log" -pid_file "/var/run/mpd/pid" -#state_file "/var/lib/mpd/state" +music_directory "/var/lib/mpd/music" +playlist_directory "/var/lib/mpd/playlists" +db_file "/var/lib/mpd/tag_cache" +log_file "/var/log/mpd.log" +#pid_file "/var/run/mpd/pid" +#state_file "/var/lib/mpd/state" #sticker_file "/var/lib/mpd/sticker.sql" ############################################################################### # General music daemon options ################################################ -user "mpd" +user "mpd" group "audio" -bind_to_address "any" -#port "6600" -#log_level "default" -#gapless_mp3_playback "yes" -#save_absolute_paths_in_playlists "no" -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" +bind_to_address "any" +#port "6600" +#log_level "default" +gapless_mp3_playback "no" +#save_absolute_paths_in_playlists "no" +#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" auto_update "yes" #auto_update_depth "3" ############################################################################### @@ -56,24 +56,23 @@ audio_output { format "44100:16:2" } -samplerate_converter "soxr very high" #replaygain "album" #replaygain_preamp "0" -#volume_normalization "yes" +volume_normalization "no" ############################################################################### # MPD Internal Buffering ###################################################### -audio_buffer_size "8192" -buffer_before_play "10%" +audio_buffer_size "2048" +buffer_before_play "10%" ############################################################################### # Resource Limitations ######################################################## #connection_timeout "60" max_connections "20" -#max_playlist_length "16384" -#max_command_list_size "2048" -#max_output_buffer_size "8192" +max_playlist_length "81920" +max_command_list_size "81920" +max_output_buffer_size "81920" ############################################################################### # Character Encoding ########################################################## From 3399c1ba9e7a6cfdb266f11cb3d70f8a52a8e802 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 11 Oct 2019 01:14:54 +0200 Subject: [PATCH 545/673] Revert "Merge pull request #369 from ashthespy/master" This reverts commit 34102b03499d871cb46cdbdb02973b895b4ef7fb, reversing changes made to e127ced9ec62c99378fa4b967644434467664ed6. --- build.sh | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/build.sh b/build.sh index cade1f81b..0c3e7e1f2 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,6 @@ # # Dependencies: # parted squashfs-tools dosfstools multistrap qemu binfmt-support qemu-user-static kpartx -set -eo pipefail #Set fonts for Help. NORM=$(tput sgr0) @@ -38,18 +37,18 @@ Switches: Example: Build a Raspberry PI image from scratch, version 2.0 : ./build.sh -b arm -d pi -v 2.0 -l reponame - " +" exit 1 } #$1 = ${BUILD} $2 = ${VERSION} $3 = ${DEVICE}" function check_os_release { ARCH_BUILD=$1 + HAS_VERSION=$(grep -c VOLUMIO_VERSION "build/${ARCH_BUILD}/root/etc/os-release") VERSION=$2 DEVICE=$3 - HAS_VERSION="grep -c VOLUMIO_VERSION build/${ARCH_BUILD}/root/etc/os-release" - if $HAS_VERSION; then + if [ "$HAS_VERSION" -ne "0" ]; then # os-release already has a VERSION number # cut the last 2 lines in case other devices are being built from the same rootfs head -n -2 "build/${ARCH_BUILD}/root/etc/os-release" > "build/${ARCH_BUILD}/root/etc/tmp-release" @@ -107,7 +106,7 @@ if [ "$(id -u)" -ne 0 ]; then fi if [ -z "${VARIANT}" ]; then - VARIANT="volumio" + VARIANT="volumio" fi if [ -n "$BUILD" ]; then @@ -144,12 +143,7 @@ if [ -n "$BUILD" ]; then mkdir "build/$BUILD" mkdir "build/$BUILD/root" - - if ! multistrap -a "$ARCH" -f "$CONF" - then - echo multistrap failed. Exitting - exit 1 - fi + multistrap -a "$ARCH" -f "$CONF" if [ ! "$BUILD" = x86 ]; then echo "Build for arm/armv7/armv8 platform, copying qemu" cp /usr/bin/qemu-arm-static "build/$BUILD/root/usr/bin/" @@ -163,10 +157,10 @@ if [ -n "$BUILD" ]; then echo 'Cloning Volumio Node Backend' mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then - echo "Cloning Volumio with all its history" - git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + echo "Cloning Volumio with all its history" + git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio else - git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio + git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" @@ -210,7 +204,7 @@ VOLUMIO_BUILD_DATE=\"${CUR_DATE}\" umount -l "build/$BUILD/root/proc" umount -l "build/$BUILD/root/sys" # Setting up cgmanager under chroot/qemu leaves a mounted fs behind, clean it up - [ -d "build/$BUILD/root/run/cgmanager/fs" ] && umount -l "build/$BUILD/root/run/cgmanager/fs" + umount -l "build/$BUILD/root/run/cgmanager/fs" sh scripts/configure.sh -b "$BUILD" fi @@ -268,10 +262,10 @@ case "$DEVICE" in ;; pine64) echo 'Writing Pine64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" - # this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 +# this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 sh scripts/pine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; - nanopi64) echo 'Writing NanoPI A64 Image File' + nanopi64) echo 'Writing NanoPI A64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopi64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; @@ -347,10 +341,6 @@ case "$DEVICE" in vim1) echo 'Writing VIM1 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/vim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 - "") echo 'No device specified' - ;; - *) echo Unknown/Unsupported device: $DEVICE - exit 1 ;; esac From 6c3e4fa86d5413587e5bfd2f824b888a0ddfaa8b Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 14 Oct 2019 18:01:03 +0200 Subject: [PATCH 546/673] Bump PI Kernel to 4.19.79 --- scripts/raspberryconfig.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index cbd24cd2b..b54383e28 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,7 +67,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.19.75" +KERNEL_VERSION="4.19.79" case $KERNEL_VERSION in "4.4.9") @@ -125,6 +125,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="d9321aceacfc6619b4238c6c764203b1122f2f9b" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.19.79") + KERNEL_REV="1273" + KERNEL_COMMIT="985bc5353e4f5fe5a11c8b6c4c646dc7165bbc21" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From 073c4138b07eab3ece89eb8521accf269ec58622 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 22 Oct 2019 14:44:23 +0200 Subject: [PATCH 547/673] Improve Kiosk script to allow for mouse pointer and lowest prio --- scripts/install-kiosk.sh | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh index 53bb46a34..a588138e9 100755 --- a/scripts/install-kiosk.sh +++ b/scripts/install-kiosk.sh @@ -13,7 +13,7 @@ sudo apt-get update sudo apt-get -y install echo "Installing Graphical environment" -sudo apt-get install -y xinit xorg openbox libexif12 +sudo apt-get install -y xinit xorg openbox libexif12 unclutter --no-install-recommends echo "Download Chromium" cd /home/volumio/ @@ -39,14 +39,13 @@ echo " Creating chromium kiosk start script" echo "#!/bin/bash mkdir -p /data/volumiokiosk export DISPLAY=:0 -export DISPLAY=:0 xset s off -dpms rm -rf /data/volumiokiosk/Singleton* - sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /data/volumiokiosk/Default/Preferences sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' /data/volumiokiosk/Default/Preferences openbox-session & sleep 4 +while true; do /usr/bin/chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar --enable-touchview --enable-pinch --window-size=800,480 --window-position=0,0 --disable-session-crashed-bubble --disable-infobars --no-first-run --no-sandbox --user-data-dir='/data/volumiokiosk' --disable-translate --show-component-extension-options --ignore-gpu-blacklist --disable-background-networking --use-gl=egl --enable-remote-extensions --enable-native-gpu-memory-buffers --disable-quic --enable-fast-unload --enable-tcp-fast-open --disable-gpu-compositing --force-gpu-rasterization --enable-zero-copy --app=http://localhost:3000 done" > /opt/volumiokiosk.sh /bin/chmod +x /opt/volumiokiosk.sh @@ -60,7 +59,10 @@ After=volumio.service Type=simple User=root Group=root -ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh -- -nocursor +Nice=9 +CPUSchedulingPolicy=idle +CPUSchedulingPriority=1 +ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 [Install] @@ -68,7 +70,6 @@ WantedBy=multi-user.target " > /lib/systemd/system/volumio-kiosk.service /bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service - echo " Allowing volumio to start an xsession" /bin/sed -i "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config @@ -83,4 +84,22 @@ echo "Setting HDMI UI enabled by default" /usr/bin/jq '.hdmi_enabled.value = true' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json /usr/bin/jq '.hdmi_enabled.type = "boolean"' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json - +echo "Setting localhost" +echo '{"localhost": "http://127.0.0.1:3000"}' > /volumio/http/www/app/local-config.json +if [ -d "/volumio/http/www3" ]; then + echo '{"localhost": "http://127.0.0.1:3000"}' > /volumio/http/www3/app/local-config.json +fi + +echo "Hide Mouse cursor if not moved" + +echo "#!/bin/sh +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi +xrdb -merge ~/.Xresources +xsetroot -cursor_name left_ptr & +exec openbox-session +exec unclutter &" > /root/.xinitrc From 40b1846b48a6a26e1f7475368cdb795ffaf7436f Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 22 Oct 2019 18:09:54 +0200 Subject: [PATCH 548/673] Further tweaks to kiosk --- scripts/install-kiosk.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh index a588138e9..cfbf1b62d 100755 --- a/scripts/install-kiosk.sh +++ b/scripts/install-kiosk.sh @@ -60,9 +60,7 @@ Type=simple User=root Group=root Nice=9 -CPUSchedulingPolicy=idle -CPUSchedulingPriority=1 -ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh +ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh -- -keeptty # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 [Install] From 72f87c1062fdb64d4d000afb0ac778666ecb44c2 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 22 Oct 2019 20:14:31 +0200 Subject: [PATCH 549/673] Silent output for tinkerboard and do not start kiosk in while loop --- scripts/install-kiosk.sh | 3 +-- scripts/tinkerconfig.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh index cfbf1b62d..ee1cc7383 100755 --- a/scripts/install-kiosk.sh +++ b/scripts/install-kiosk.sh @@ -45,9 +45,8 @@ sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /data/volumiokiosk/Defa sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' /data/volumiokiosk/Default/Preferences openbox-session & sleep 4 -while true; do /usr/bin/chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar --enable-touchview --enable-pinch --window-size=800,480 --window-position=0,0 --disable-session-crashed-bubble --disable-infobars --no-first-run --no-sandbox --user-data-dir='/data/volumiokiosk' --disable-translate --show-component-extension-options --ignore-gpu-blacklist --disable-background-networking --use-gl=egl --enable-remote-extensions --enable-native-gpu-memory-buffers --disable-quic --enable-fast-unload --enable-tcp-fast-open --disable-gpu-compositing --force-gpu-rasterization --enable-zero-copy --app=http://localhost:3000 -done" > /opt/volumiokiosk.sh +" > /opt/volumiokiosk.sh /bin/chmod +x /opt/volumiokiosk.sh echo "Creating Systemd Unit for Kiosk" diff --git a/scripts/tinkerconfig.sh b/scripts/tinkerconfig.sh index 32b9da1b7..0e0df0dd4 100755 --- a/scripts/tinkerconfig.sh +++ b/scripts/tinkerconfig.sh @@ -23,7 +23,7 @@ echo "label kernel-4.4 kernel /zImage fdt /dtb/rk3288-miniarm.dtb initrd /uInitrd - append earlyprintk splash plymouth.ignore-serial-consoles console=tty1 console=ttyS3,115200n8 rw init=/sbin/init imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf + append earlyprintk splash plymouth.ignore-serial-consoles console=tty1 console=ttyS3,115200n8 rw init=/sbin/init imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf logo.nologo vt.global_cursor_default=0 loglevel=0 " > /boot/extlinux/extlinux.conf echo "Adding default sound modules" From 2002ac47aa6f563f02c5bfc08e0e14230b301ba4 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 23 Oct 2019 14:43:58 +0200 Subject: [PATCH 550/673] Remove niceness and xinitrc from kiosk install --- scripts/install-kiosk.sh | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh index ee1cc7383..1a51c095a 100755 --- a/scripts/install-kiosk.sh +++ b/scripts/install-kiosk.sh @@ -58,7 +58,6 @@ After=volumio.service Type=simple User=root Group=root -Nice=9 ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh -- -keeptty # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=300 @@ -86,17 +85,3 @@ echo '{"localhost": "http://127.0.0.1:3000"}' > /volumio/http/www/app/local-conf if [ -d "/volumio/http/www3" ]; then echo '{"localhost": "http://127.0.0.1:3000"}' > /volumio/http/www3/app/local-config.json fi - -echo "Hide Mouse cursor if not moved" - -echo "#!/bin/sh -if [ -d /etc/X11/xinit/xinitrc.d ]; then - for f in /etc/X11/xinit/xinitrc.d/*; do - [ -x "$f" ] && . "$f" - done - unset f -fi -xrdb -merge ~/.Xresources -xsetroot -cursor_name left_ptr & -exec openbox-session -exec unclutter &" > /root/.xinitrc From a9cfa65d69919fe6e2f57a990134abfecbe894ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 29 Oct 2019 00:08:58 +0100 Subject: [PATCH 551/673] NanoPI Neo2: modified build scripts --- scripts/nanopineo2config.sh | 10 +-- scripts/nanopineo2image.sh | 127 ++++++++++++++++++++---------------- 2 files changed, 75 insertions(+), 62 deletions(-) diff --git a/scripts/nanopineo2config.sh b/scripts/nanopineo2config.sh index 99747c647..17d030f05 100755 --- a/scripts/nanopineo2config.sh +++ b/scripts/nanopineo2config.sh @@ -4,11 +4,14 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + echo "Creating \"fstab\"" echo "# NanoPi-NEO 2 fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -80,9 +83,8 @@ fi rm /patch -#echo "Changing to 'modules=dep'" -#echo "(otherwise NanoPi-NEO2 won't boot due to uInitrd 4MB limit)" -#sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +echo "Changing to 'modules=list' to reduce the size of initrd" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 4a204a144..62016680a 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -31,16 +31,16 @@ echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" -LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +LOOP_DEV=`losetup -f --show ${IMG_FILE}` # Note: leave the first 20Mb free for the firmware -sudo parted -s "${LOOP_DEV}" mklabel msdos -sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% -sudo parted -s "${LOOP_DEV}" set 1 boot on -sudo parted -s "${LOOP_DEV}" print -sudo partprobe "${LOOP_DEV}" -sudo kpartx -s -a "${LOOP_DEV}" +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 +parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` @@ -55,31 +55,45 @@ then fi echo "Creating boot and rootfs filesystems" -sudo mkfs -t vfat -n BOOT "${BOOT_PART}" -sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" -sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync -echo "Preparing for the nanopineo2 kernel/ platform files" -if [ -d platform-nanopineo2 ] -then +GETNEO2=yes +echo "Preparing for the nanopi-neo2 kernel/ platform files" +if [ -d platform-nanopi ]; then echo "Platform folder already exists - keeping it" - # if you really want to re-clone from the repo, then delete the platform-nanopineo2 folder - # that will refresh all the odroid platforms, see below -else - echo "Clone nanopineo2 files from repo" - sudo mkdir platform-nanopineo2 - cd platform-nanopineo2 - wget https://github.com/volumio/nanopineo2-platform/raw/master/nanopineo2.tar.xz + # if you really want to re-clone from the repo, then delete the platform-nanopi/nanopi-neo2 folder + cd platform-nanopi + if [ -d nanopi-neo2 ]; then + GETNEO2=no + if [ -f nanopi-neo2.tar.xz ]; then + echo "Found a new tarball, unpacking..." + rm -r nanopi-neo2 + tar xfJ nanopi-neo2.tar.xz + rm nanopi-neo2.tar.xz + fi + fi + cd .. +fi + +if [ "$GETNEO2" = "yes" ]; then + echo "Clone nanopi-neo2 files from repo" + if [ ! -d platform-nanopi ]; then + mkdir platform-nanopi + fi + cd platform-nanopi + wget https://github.com/volumio/platform-nanopi/raw/master/nanopi-neo2.tar.xz echo "Unpack the platform files" - tar xfJ nanopineo2.tar.xz - rm nanopineo2.tar.xz + tar xfJ nanopi-neo2.tar.xz + rm nanopi-neo2.tar.xz cd .. fi echo "Copying the bootloader" -sudo dd if=platform-nanopineo2/nanopineo2/u-boot/sunxi-spl.bin of=${LOOP_DEV} bs=1024 seek=8 -sudo dd if=platform-nanopineo2/nanopineo2/u-boot/u-boot.itb of=${LOOP_DEV} bs=1024 seek=40 +dd if=platform-nanopi/nanopi-neo2/u-boot/sunxi-spl.bin of=${LOOP_DEV} bs=1024 seek=8 +dd if=platform-nanopi/nanopi-neo2/u-boot/u-boot.itb of=${LOOP_DEV} bs=1024 seek=40 sync echo "Preparing for Volumio rootfs" @@ -87,7 +101,7 @@ if [ -d /mnt ] then echo "/mount folder exist" else - sudo mkdir /mnt + mkdir /mnt fi if [ -d /mnt/volumio ] then @@ -95,40 +109,35 @@ then rm -rf /mnt/volumio/* else echo "Creating Volumio Temp Directory" - sudo mkdir /mnt/volumio + mkdir /mnt/volumio fi echo "Creating mount point for the images partition" mkdir /mnt/volumio/images -sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images -sudo mkdir /mnt/volumio/rootfs -sudo mkdir /mnt/volumio/rootfs/boot -sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" -sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying nanopineo2 boot files" -sudo cp platform-nanopineo2/nanopineo2/boot/Image /mnt/volumio/rootfs/boot -sudo cp platform-nanopineo2/nanopineo2/boot/*.dtb /mnt/volumio/rootfs/boot +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying nanopineo2 boot & kernel config files" +cp platform-nanopi/nanopi-neo2/boot/Image /mnt/volumio/rootfs/boot +cp platform-nanopi/nanopi-neo2/boot/*.dtb /mnt/volumio/rootfs/boot +cp platform-nanopi/nanopi-neo2/boot/config* /mnt/volumio/rootfs/boot +cp platform-nanopi/nanopi-neo2/boot/boot.cmd /mnt/volumio/rootfs/boot -sudo cp platform-nanopineo2/nanopineo2/boot/boot.cmd /mnt/volumio/rootfs/boot -sudo cp platform-nanopineo2/nanopineo2/boot/boot.scr /mnt/volumio/rootfs/boot +echo "Compiling u-boot boot script" +mkimage -C none -A arm -T script -d platform-nanopi/nanopi-neo2/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr -sudo cp platform-nanopineo2/nanopineo2/boot/Image.version /mnt/volumio/rootfs/boot -sudo cp platform-nanopineo2/nanopineo2/boot/config* /mnt/volumio/rootfs/boot - -echo "Copying nanopineo2 modules and firmware" -sudo cp -pdR platform-nanopineo2/nanopineo2/lib/modules /mnt/volumio/rootfs/lib/ -sudo cp -pdR platform-nanopineo2/nanopineo2/lib/firmware /mnt/volumio/rootfs/lib/ - -echo "Confguring ALSA with sane defaults" -#sudo cp platform-nanopineo2/nanopineo2/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +echo "Copying nanopineo2 modules" +cp -pdR platform-nanopi/nanopi-neo2/lib/modules /mnt/volumio/rootfs/lib/ sync -echo "Preparing to run chroot for more nanopineo2 configuration" +echo "Preparing to run chroot for more nanopi neo2 configuration" cp scripts/nanopineo2config.sh /mnt/volumio/rootfs -cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater @@ -138,6 +147,12 @@ mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then UIVARIANT=$(cat "UIVARIANT") @@ -173,10 +188,6 @@ umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys echo "==> nanopineo2 device installed" - -#echo "Removing temporary platform files" -#echo "(you can keep it safely as long as you're sure of no changes)" -#sudo rm -r platform-nanopineo2 sync echo "Finalizing Rootfs creation" @@ -189,7 +200,7 @@ if [ -d /mnt/squash ]; then rm -rf /mnt/squash/* else echo "Creating Volumio SquashFS Temp Dir" - sudo mkdir /mnt/squash + mkdir /mnt/squash fi echo "Copying Volumio rootfs to Temp Dir" @@ -223,11 +234,11 @@ rm -rf /mnt/squash cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh sync echo "Unmounting Temp Devices" -sudo umount -l /mnt/volumio/images -sudo umount -l /mnt/volumio/rootfs/boot +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot -sudo dmsetup remove_all -sudo losetup -d ${LOOP_DEV} +dmsetup remove_all +losetup -d ${LOOP_DEV} sync md5sum "$IMG_FILE" > "${IMG_FILE}.md5" From 3d1ed47ae3c99d8c58494493a9638ab1345f8e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 30 Oct 2019 19:18:21 +0100 Subject: [PATCH 552/673] Copy firmware, all dtb's and set default dtb --- scripts/nanopineo2image.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 62016680a..519f1faf1 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -124,6 +124,7 @@ cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying nanopineo2 boot & kernel config files" cp platform-nanopi/nanopi-neo2/boot/Image /mnt/volumio/rootfs/boot cp platform-nanopi/nanopi-neo2/boot/*.dtb /mnt/volumio/rootfs/boot +cp platform-nanopi/nanopi-neo2/boot/sun50i-h5-nanopi-neo2-i2s-generic.dtb /mnt/volumio/rootfs/boot/sun50i-h5-nanopi-neo2.dtb cp platform-nanopi/nanopi-neo2/boot/config* /mnt/volumio/rootfs/boot cp platform-nanopi/nanopi-neo2/boot/boot.cmd /mnt/volumio/rootfs/boot @@ -132,7 +133,7 @@ mkimage -C none -A arm -T script -d platform-nanopi/nanopi-neo2/boot/boot.cmd /m echo "Copying nanopineo2 modules" cp -pdR platform-nanopi/nanopi-neo2/lib/modules /mnt/volumio/rootfs/lib/ - +cp -pdR platform-nanopi/nanopi-neo2/lib/firmware /mnt/volumio/rootfs/lib/ sync echo "Preparing to run chroot for more nanopi neo2 configuration" From eb5c334ec58d1d4e6b29ffa0ed1fdfe78bc24cd6 Mon Sep 17 00:00:00 2001 From: gvolt <36240972+gvolt@users.noreply.github.com> Date: Mon, 4 Nov 2019 17:32:10 +0100 Subject: [PATCH 553/673] Uncommented "include userconfig.txt" in /boot/config.txt Implementing Volumio's suggestion from to https://github.com/volumio/Build/pull/368#issuecomment-540792020 --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 1b3ad6062..fd214aabe 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -170,7 +170,7 @@ dtparam=i2c_arm=on disable_splash=1 hdmi_force_hotplug=1 -#include userconfig.txt" >> /boot/config.txt +include userconfig.txt" >> /boot/config.txt echo "Writing cmdline.txt file" echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt From 03f1bdf07d885ed35efafec9c25b4eec048818d5 Mon Sep 17 00:00:00 2001 From: gvolt <36240972+gvolt@users.noreply.github.com> Date: Mon, 4 Nov 2019 17:32:13 +0100 Subject: [PATCH 554/673] Create /boot/userconfig.txt on first boot Implementing Volumio's suggestion from https://github.com/volumio/Build/pull/368#issuecomment-540792020 --- volumio/bin/firststart.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/volumio/bin/firststart.sh b/volumio/bin/firststart.sh index a9883d49a..13a8dbf5c 100755 --- a/volumio/bin/firststart.sh +++ b/volumio/bin/firststart.sh @@ -8,6 +8,9 @@ dpkg --configure --pending echo "Creating /var/log/samba folder" mkdir /var/log/samba +echo "Creating /boot/userconfig.txt" +echo "# Add your custom config.txt options to this file, which will be preserved during updates" >> /boot/userconfig.txt + echo "Removing default SSH host keys" # These should be created on first boot to ensure they are unique on each system rm -v /etc/ssh/ssh_host_* From 6104e432971ac16a7168edfa6d5c0ee699cefabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 6 Nov 2019 10:54:28 +0100 Subject: [PATCH 555/673] Nanopi NEO2: optimations --- scripts/nanopineo2config.sh | 39 +++++++------------------------------ scripts/nanopineo2image.sh | 2 ++ 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/scripts/nanopineo2config.sh b/scripts/nanopineo2config.sh index 17d030f05..28d94e5fc 100755 --- a/scripts/nanopineo2config.sh +++ b/scripts/nanopineo2config.sh @@ -19,38 +19,13 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab -ARCH=$(cat /etc/os-release | grep ^VOLUMIO_ARCH | tr -d 'VOLUMIO_ARCH="') -echo $ARCH +echo "Alsa Card Ordering" +echo " +# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf -if [ $ARCH = armv7 ]; then - echo "Armv7 Environment detected" - echo "#!/bin/sh -sysctl abi.cp15_barrier=2 -" > /usr/local/bin/nanopineo2-init.sh - chmod +x /usr/local/bin/nanopineo2-init.sh - - echo "#!/bin/sh -e - /usr/local/bin/nanopineo2-init.sh - exit 0" > /etc/rc.local -fi - -#echo "Adding default sound modules and wifi" -#echo "sunxi_codec -#sunxi_i2s -#sunxi_sndcodec -#8723bs -#" >> /etc/modules - -#echo "Blacklisting 8723bs_vq0" -#echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-nanopineo2.conf - -echo "Installing additonal packages" -#apt-get update -#apt-get -y install u-boot-tools liblircclient0 lirc - -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf echo "Adding custom modules overlay, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules @@ -88,7 +63,7 @@ sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update -apt-get install -y winbind libnss-winbind +apt-get install -y winbind libnss-winbind u-boot-tools echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 519f1faf1..27989978e 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -124,6 +124,8 @@ cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying nanopineo2 boot & kernel config files" cp platform-nanopi/nanopi-neo2/boot/Image /mnt/volumio/rootfs/boot cp platform-nanopi/nanopi-neo2/boot/*.dtb /mnt/volumio/rootfs/boot +echo "Setting i2s-generic dtb version as default..." +cp /mnt/volumio/rootfs/boot/sun50i-h5-nanopi-neo2.dtb /mnt/volumio/rootfs/boot/sun50i-h5-nanopi-neo2-org-default.dts cp platform-nanopi/nanopi-neo2/boot/sun50i-h5-nanopi-neo2-i2s-generic.dtb /mnt/volumio/rootfs/boot/sun50i-h5-nanopi-neo2.dtb cp platform-nanopi/nanopi-neo2/boot/config* /mnt/volumio/rootfs/boot cp platform-nanopi/nanopi-neo2/boot/boot.cmd /mnt/volumio/rootfs/boot From cdba632b3d871ca1945fc6b561ea5c5d449c7ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 16 Nov 2019 18:33:34 +0100 Subject: [PATCH 556/673] Introduce Khadas VIM1 and VIM3L builds --- scripts/kvim1config.sh | 106 +++++++++++++++++ scripts/kvim1image.sh | 262 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 368 insertions(+) create mode 100755 scripts/kvim1config.sh create mode 100755 scripts/kvim1image.sh diff --git a/scripts/kvim1config.sh b/scripts/kvim1config.sh new file mode 100755 index 000000000..9ea223210 --- /dev/null +++ b/scripts/kvim1config.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# Amlogic fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +LABEL=BOOT /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf +echo "Remove default dmesg restriction" +echo "kernel.dmesg_restrict = 0" >> /etc/sysctl.conf + + +echo "#!/bin/sh -e +echo heartbeat > /sys/class/leds/sys_led/trigger +exit 0" > /etc/rc.local + +#TODO: perhaps add fancontrol +# not really needed for VIM3L, in fact: it should be forbidden to add such a loud thing to a volumio device ;) +# .....but as the VIM3L HTPC kit already has one ....) + +echo "Adding default wifi" +echo "dhd +" >> /etc/modules + +echo "USB Card Ordering" +echo " +# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools mc abootimg fbset bluez-firmware bluetooth bluez bluez-tools device-tree-compiler + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "overlayfs" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +#echo "Changing to 'modules=list' to reduce the size of uInitrd" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/kvim1image.sh b/scripts/kvim1image.sh new file mode 100755 index 000000000..a52d87021 --- /dev/null +++ b/scripts/kvim1image.sh @@ -0,0 +1,262 @@ +#!/bin/sh + +# Default build for Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:m:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + m) + MODEL=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${MODEL}.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 16MB 80MB +parted -s "${LOOP_DEV}" mkpart primary ext3 81MB 2581 +parted -s "${LOOP_DEV}" mkpart primary ext3 2582 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n VBOOT "${BOOT_PART}" +mkfs -F -t ext4 -L VIMAGE "${SYS_PART}" +mkfs -F -t ext4 -L VSTORAGE "${DATA_PART}" +sync + +echo "Preparing for the vims kernel/ platform files" +if [ -d platform-khadas ] +then +# if you really want to re-clone from the repo, then delete the platform-khadas folder + # that will refresh all, see below + cd platform-khadas + if [ -f vims.tar.xz ]; then + echo "Found a new tarball, unpacking..." + [ -d vims ] || rm -r vims + tar xfJ vims.tar.xz + rm vims.tar.xz + fi + cd .. +else + echo "Clone vims files from repo" + mkdir platform-khadas + cd platform-khadas + wget https://github.com/gkkpch/platform-khadas/raw/master/vims.tar.xz + echo "Unpacking the platform files" + tar xfJ vims.tar.xz + rm vims.tar.xz + cd .. +fi + +echo "Installing u-boot" +if [ "$MODEL" = kvim1 ]; then + echo " for khadas vim1..." + dd if=platform-khadas/vims/uboot/u-boot.vim1.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync + dd if=platform-khadas/vims/uboot/u-boot.vim1.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 +else + echo " for khadas vim3l..." + dd if=platform-khadas/vims/uboot/u-boot.vim3l.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync + dd if=platform-khadas/vims/uboot/u-boot.vim3l.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 +fi + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +echo "Creating mount point for the boot partition" +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "Copying boot files" +cp platform-khadas/vims/boot/Image /mnt/volumio/rootfs/boot +cp platform-khadas/vims/boot/config* /mnt/volumio/rootfs/boot +cp platform-khadas/vims/boot/boot.ini /mnt/volumio/rootfs/boot +cp -r platform-khadas/vims/boot/dtb /mnt/volumio/rootfs/boot +echo "Keeping copies of u-boot files" +cp -r platform-khadas/vims/uboot /mnt/volumio/rootfs/boot + +echo "Copying modules" +cp -Rp platform-khadas/vims/lib/modules /mnt/volumio/rootfs/lib/ +echo "Copying general firmware" +cp -Rp platform-khadas/vims/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Adding services" +cp -Rp platform-khadas/vims/lib/systemd/ /mnt/volumio/rootfs/lib +echo "Adding usr/local/bin & usr/bin files" +cp -Rp platform-khadas/vims/usr/* /mnt/volumio/rootfs/usr + +echo "Adding emmc utility scripts" +cp platform-khadas/vims/opt/mmc_boots /mnt/volumio/rootfs/usr/bin +cp platform-khadas/vims/opt/mmcdisk /mnt/volumio/rootfs/usr/bin +cp platform-khadas/vims/opt/mmc_install_from_sd /mnt/volumio/rootfs/usr/bin +chmod +x /mnt/volumio/rootfs/usr/bin/mmc_boots +chmod +x /mnt/volumio/rootfs/usr/bin/mmcdisk +chmod +x /mnt/volumio/rootfs/usr/bin/mmc_install_from_sd + +echo "Adding specific wlan firmware" +cp -r platform-khadas/vims/hwpacks/wlan-firmware/brcm/ /mnt/volumio/rootfs/lib/firmware + +echo "Adding Meson video firmware" +cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/video /mnt/volumio/rootfs/lib/firmware/ +cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/meson /mnt/volumio/rootfs/lib/firmware/ + +#TODO: remove when volumio has been updated +echo "Adding vim-specific cards.json" +cp -r platform-khadas/vims/volumio/app/ /mnt/volumio/rootfs/volumio + +echo "Preparing to run chroot for more Khadas ${MODEL} configuration" +cp scripts/kvim1config.sh /mnt/volumio/rootfs +#TODO: change init script +cp scripts/initramfs/init.nextarm_tvbox /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin + +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh +sync + + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/kvim1config.sh +EOF + +echo "Removing chroot files" +rm /mnt/volumio/rootfs/kvim1config.sh +rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/root/init.sh +rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh + +echo "Unmounting chroot temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys +sync + +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync + +echo "==> Khadas ${MODEL} device installed" +echo "Unmounting temp devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +echo "Releasing loop devices" +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" From 0b7bc7aa49ad79c39d8784ec74b472ece9428b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 16 Nov 2019 18:33:57 +0100 Subject: [PATCH 557/673] Add missing build.sh --- build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.sh b/build.sh index 0c3e7e1f2..0cd9eb1c0 100755 --- a/build.sh +++ b/build.sh @@ -342,6 +342,14 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/vim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + kvim1) echo 'Writing VIM1 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/kvim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} + ;; + kvim3l) echo 'Writing VIM3L Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/kvim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} + ;; esac #When the tar is created we can build the docker layer From 9d4bf929ebb72d0cae7d8406e87604a62a93a054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 17 Nov 2019 16:58:46 +0100 Subject: [PATCH 558/673] Khadas: rename buildscripts to logical name --- build.sh | 4 ++-- scripts/{kvim1config.sh => kvimsconfig.sh} | 10 +++++++--- scripts/{kvim1image.sh => kvimsimage.sh} | 8 ++++---- 3 files changed, 13 insertions(+), 9 deletions(-) rename scripts/{kvim1config.sh => kvimsconfig.sh} (87%) rename scripts/{kvim1image.sh => kvimsimage.sh} (97%) diff --git a/build.sh b/build.sh index 0cd9eb1c0..3360218e1 100755 --- a/build.sh +++ b/build.sh @@ -344,11 +344,11 @@ case "$DEVICE" in ;; kvim1) echo 'Writing VIM1 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" - sh scripts/kvim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} + sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} ;; kvim3l) echo 'Writing VIM3L Image File' check_os_release "armv7" "$VERSION" "$DEVICE" - sh scripts/kvim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} + sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} ;; esac diff --git a/scripts/kvim1config.sh b/scripts/kvimsconfig.sh similarity index 87% rename from scripts/kvim1config.sh rename to scripts/kvimsconfig.sh index 9ea223210..e9a6ab504 100755 --- a/scripts/kvim1config.sh +++ b/scripts/kvimsconfig.sh @@ -10,7 +10,7 @@ echo "Creating \"fstab\"" echo "# Amlogic fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -LABEL=BOOT /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -18,6 +18,10 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab +sed -i "s/%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/boot.ini +sed -i "s/%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/boot.ini +sed -i "s/%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/boot.ini + echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf echo "Remove default dmesg restriction" @@ -28,8 +32,8 @@ echo "#!/bin/sh -e echo heartbeat > /sys/class/leds/sys_led/trigger exit 0" > /etc/rc.local -#TODO: perhaps add fancontrol -# not really needed for VIM3L, in fact: it should be forbidden to add such a loud thing to a volumio device ;) +#TODO: perhaps add fancontrol, though this is really "not done" for an audiophile device +# not really needed for VIM3L, # .....but as the VIM3L HTPC kit already has one ....) echo "Adding default wifi" diff --git a/scripts/kvim1image.sh b/scripts/kvimsimage.sh similarity index 97% rename from scripts/kvim1image.sh rename to scripts/kvimsimage.sh index a52d87021..f09b2bd10 100755 --- a/scripts/kvim1image.sh +++ b/scripts/kvimsimage.sh @@ -160,9 +160,9 @@ echo "Adding vim-specific cards.json" cp -r platform-khadas/vims/volumio/app/ /mnt/volumio/rootfs/volumio echo "Preparing to run chroot for more Khadas ${MODEL} configuration" -cp scripts/kvim1config.sh /mnt/volumio/rootfs +cp scripts/kvimsconfig.sh /mnt/volumio/rootfs #TODO: change init script -cp scripts/initramfs/init.nextarm_tvbox /mnt/volumio/rootfs/root/init +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb @@ -196,11 +196,11 @@ sync chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - -/kvim1config.sh +/kvimsconfig.sh EOF echo "Removing chroot files" -rm /mnt/volumio/rootfs/kvim1config.sh +rm /mnt/volumio/rootfs/kvimsconfig.sh rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/root/init.sh rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh From f85207c7fc2f9d3174ed08cb3012dd4d453b2717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 18 Nov 2019 18:24:31 +0100 Subject: [PATCH 559/673] Fix factory-reset nanopineo2 --- scripts/initramfs/init.nextarm | 7 +++++++ scripts/nanopineo2config.sh | 1 + 2 files changed, 8 insertions(+) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 63062579b..2eef9a529 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -142,6 +142,12 @@ if [ $DO_GEN == yes ]; then DATAPART="/dev/${BOOTDEV}${DPS}3" BOOTPART="/dev/${BOOTDEV}${DPS}1" fi + +# Setting default boot delay of 5 seconds +if [ -z "$BOOTDELAY" ]; then + BOOTDELAY=5 +fi + #Hardware specific adaptions #When we did not already get the device name from the cmdline, try getting it from cpuinfo @@ -172,6 +178,7 @@ else fi modprobe squashfs modprobe nls_cp437 +modprobe fuse if [ -z "${IMGPART}" ]; then print_msg "Specify the squash image partition after the kernel command ${CMDLINE}" diff --git a/scripts/nanopineo2config.sh b/scripts/nanopineo2config.sh index 28d94e5fc..fa58fdade 100755 --- a/scripts/nanopineo2config.sh +++ b/scripts/nanopineo2config.sh @@ -31,6 +31,7 @@ echo "Adding custom modules overlay, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules +echo "fuse" >> /etc/initramfs-tools/modules echo "Copying volumio initramfs updater" cd /root/ From 76976c3150e60fa37f55c84c5ca4b7a47b667b83 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 20 Nov 2019 19:04:18 +0100 Subject: [PATCH 560/673] Superdrive support --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/x86.conf | 2 +- volumio/etc/udev/rules.d/91-superdrive.rules | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 volumio/etc/udev/rules.d/91-superdrive.rules diff --git a/recipes/arm.conf b/recipes/arm.conf index 16a43c882..0a42cf246 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -55,7 +55,7 @@ components=main non-free suite=jessie [Accessories] -packages=autossh xbindkeys +packages=autossh xbindkeys sg3-utils source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 7fdd34816..6b22b4efb 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -55,7 +55,7 @@ components=main non-free suite=jessie [Accessories] -packages=autossh xbindkeys +packages=autossh xbindkeys sg3-utils source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 692e5046f..015cfaa9f 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -74,7 +74,7 @@ components=main non-free suite=jessie [Accessories] -packages=autossh xbindkeys +packages=autossh xbindkeys sg3-utils source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/volumio/etc/udev/rules.d/91-superdrive.rules b/volumio/etc/udev/rules.d/91-superdrive.rules new file mode 100644 index 000000000..f6db04488 --- /dev/null +++ b/volumio/etc/udev/rules.d/91-superdrive.rules @@ -0,0 +1,2 @@ +# Initialise Apple SuperDrive +ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw /dev/$kernel EA 00 00 00 00 00 01" From 8f30ac55e3e9aba99956e734a03eecd1188cadbf Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 3 Dec 2019 16:23:40 +0100 Subject: [PATCH 561/673] PI Kernel bump to 4.19.86 --- scripts/raspberryconfig.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 760844f20..6cfb575e6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,7 +67,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.19.79" +KERNEL_VERSION="4.19.86" case $KERNEL_VERSION in "4.4.9") @@ -130,6 +130,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="985bc5353e4f5fe5a11c8b6c4c646dc7165bbc21" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.19.86") + KERNEL_REV="1283" + KERNEL_COMMIT="b9ecbe8d0e3177afed08c54fc938938100a0b73f" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From 2edcfc45fa978eace5e5b6e72b58f5d3130869bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 4 Dec 2019 12:29:01 +0100 Subject: [PATCH 562/673] Beaglebone: prepare for myVolumio --- scripts/bbbconfig.sh | 6 +++++- scripts/bbbimage.sh | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/scripts/bbbconfig.sh b/scripts/bbbconfig.sh index 843db689f..9c186f043 100755 --- a/scripts/bbbconfig.sh +++ b/scripts/bbbconfig.sh @@ -46,17 +46,21 @@ sh patch.sh else echo "Cannot Find Patch File, aborting" fi +if [ -f "install.sh" ]; then +sh install.sh +fi cd / rm -rf ${PATCH} fi rm /patch + # Retrieve choosen kernel version uname_r=$(sed -n 's/^uname_r=//p' /boot/uEnv.txt) # Update kernel dependencies depmod -a ${uname_r} -sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update diff --git a/scripts/bbbimage.sh b/scripts/bbbimage.sh index 575ee5821..92374130e 100755 --- a/scripts/bbbimage.sh +++ b/scripts/bbbimage.sh @@ -121,6 +121,26 @@ mount /dev /mnt/volumio/rootfs/dev -o bind mount /proc /mnt/volumio/rootfs/proc -t proc mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - /bbbconfig.sh From c4b0c2a0c46e197258552e13d3dc42f3d91edf06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 6 Dec 2019 19:47:36 +0100 Subject: [PATCH 563/673] build.sh: fix an arm/ armv7 mismatch for bbb --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 3360218e1..b2d06ed4c 100755 --- a/build.sh +++ b/build.sh @@ -249,7 +249,7 @@ case "$DEVICE" in sh scripts/sparkyimage.sh -v "$VERSION" -p "$PATCH" -a arm ;; bbb) echo 'Writing BeagleBone Black Image File' - check_os_release "arm" "$VERSION" "$DEVICE" + check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/bbbimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; udooneo) echo 'Writing UDOO NEO Image File' From e41834022d76e878587555d9999432e1a380f2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 9 Dec 2019 18:06:31 +0100 Subject: [PATCH 564/673] Khadas boards: add new functionality (kiosk mode, bluetooth) --- build.sh | 9 +++----- recipes/armv7.conf | 4 ++-- scripts/kvimsconfig.sh | 42 ++++++++++++++++++++++++++++++++-- scripts/kvimsimage.sh | 51 +++++++++++++++++++++++++++++------------- 4 files changed, 81 insertions(+), 25 deletions(-) diff --git a/build.sh b/build.sh index b2d06ed4c..bae76ec12 100755 --- a/build.sh +++ b/build.sh @@ -249,7 +249,7 @@ case "$DEVICE" in sh scripts/sparkyimage.sh -v "$VERSION" -p "$PATCH" -a arm ;; bbb) echo 'Writing BeagleBone Black Image File' - check_os_release "armv7" "$VERSION" "$DEVICE" + check_os_release "arm" "$VERSION" "$DEVICE" sh scripts/bbbimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; udooneo) echo 'Writing UDOO NEO Image File' @@ -342,13 +342,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/vim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; - kvim1) echo 'Writing VIM1 Image File' - check_os_release "armv7" "$VERSION" "$DEVICE" - sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} - ;; - kvim3l) echo 'Writing VIM3L Image File' + kvim1|kvim2|kvim3|kvim3l) echo 'Writing VIM1 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} + ;; esac diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 6b22b4efb..66fe66434 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -30,7 +30,7 @@ keyring=debian-archive-keyring suite=jessie [Utils] -packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip bc md5deep i2c-tools +packages=nano psmisc ethtool curl ca-certificates ntp git-core parted wget avahi-daemon avahi-discover libnss-mdns zsync udisks udisks-glue policykit-1 less fake-hwclock usbutils locales localepurge haveged rsync cpufrequtils jq minizip bc md5deep i2c-tools kpartx source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie @@ -55,7 +55,7 @@ components=main non-free suite=jessie [Accessories] -packages=autossh xbindkeys sg3-utils +packages=autossh xbindkeys source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index e9a6ab504..abf659194 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -45,9 +45,47 @@ echo " # USB DACs will have device number 5 in whole Volumio device range options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf -echo "Installing additonal packages" +echo "Installing additional packages" apt-get update -apt-get -y install u-boot-tools mc abootimg fbset bluez-firmware bluetooth bluez bluez-tools device-tree-compiler +apt-get -y install u-boot-tools mc abootimg fbset bluez-firmware bluetooth bluez bluez-tools device-tree-compiler linux-base + +echo "Enabling KVIM Bluetooth stack" +ln -sf /lib/firmware /etc/firmware +ln -s /lib/systemd/system/bluetooth-khadas.service /etc/systemd/system/multi-user.target.wants/bluetooth-khadas.service +if [ ! "$MODEL" = kvim1 ]; then + ln -s /lib/systemd/system/fan.service /etc/systemd/system/multi-user.target.wants/fan.service +fi + +#echo "Bluetooth Audio Sink/ Media configuration" +#echo "[General]" > /etc/bluetooth/audio.conf +#echo "Enable=Source,Sink,Media,Socket" >> /etc/bluetooth/audio.conf +#echo "HFP=true" >> /etc/bluetooth/audio.conf +#echo "Class=0x00041C" >> /etc/bluetooth/audio.conf + +#echo "Various device conf" +#echo "[General]" > /etc/bluetooth/main.conf +#echo "Name = Volumio" >> /etc/bluetooth/main.conf +#echo "Class = 0x00041C" >> /etc/bluetooth/main.conf +#echo "DiscoverableTimeout = 0" >> /etc/bluetooth/main.conf +#echo "Discoverable = true" >> /etc/bluetooth/main.conf +#echo "PairableTimeout = 0" >> /etc/bluetooth/main.conf +#echo "AutoConnectTimeout = 0" >> /etc/bluetooth/main.conf + +#echo "Setting default Bluetooth Name" +#echo "Volumio" > /etc/machine-info +#chmod 777 /etc/machine-info + +#echo "volumio ALL=(ALL) NOPASSWD: /bin/hciconfig" >> /etc/sudoers + +echo "Configuring boot splash" +apt-get -y install plymouth plymouth-themes +plymouth-set-default-theme volumio + +echo "Installing Kiosk" +sh /install-kiosk.sh + +echo "Kiosk installed" +rm /install-kiosk.sh echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index f09b2bd10..1c8a96a2e 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -87,15 +87,28 @@ else fi echo "Installing u-boot" -if [ "$MODEL" = kvim1 ]; then - echo " for khadas vim1..." + +case $MODEL in + kvim1) + echo " for khadas vim1..." dd if=platform-khadas/vims/uboot/u-boot.vim1.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync dd if=platform-khadas/vims/uboot/u-boot.vim1.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 -else + ;; + kvim2) + echo " for khadas vim2..." + dd if=platform-khadas/vims/uboot/u-boot.vim2.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync + dd if=platform-khadas/vims/uboot/u-boot.vim2.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1;; + kvim3) + echo " for khadas vim3..." + dd if=platform-khadas/vims/uboot/u-boot.vim3.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync + dd if=platform-khadas/vims/uboot/u-boot.vim3.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1;; + kvim3l) echo " for khadas vim3l..." dd if=platform-khadas/vims/uboot/u-boot.vim3l.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync dd if=platform-khadas/vims/uboot/u-boot.vim3l.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 -fi + ;; +esac + echo "Preparing for Volumio rootfs" if [ -d /mnt ] @@ -136,18 +149,14 @@ cp -Rp platform-khadas/vims/lib/modules /mnt/volumio/rootfs/lib/ echo "Copying general firmware" cp -Rp platform-khadas/vims/lib/firmware /mnt/volumio/rootfs/lib/ echo "Adding services" -cp -Rp platform-khadas/vims/lib/systemd/ /mnt/volumio/rootfs/lib +mkdir -p /mnt/volumio/rootfs/lib/systemd/system +cp platform-khadas/vims/lib/systemd/system/bluetooth-khadas.service /mnt/volumio/rootfs/lib/systemd/system +if [ ! "$MODEL" = kvim1 ];then + cp platform-khadas/vims/lib/systemd/system/fan.service /mnt/volumio/rootfs/lib/systemd/system +fi echo "Adding usr/local/bin & usr/bin files" cp -Rp platform-khadas/vims/usr/* /mnt/volumio/rootfs/usr -echo "Adding emmc utility scripts" -cp platform-khadas/vims/opt/mmc_boots /mnt/volumio/rootfs/usr/bin -cp platform-khadas/vims/opt/mmcdisk /mnt/volumio/rootfs/usr/bin -cp platform-khadas/vims/opt/mmc_install_from_sd /mnt/volumio/rootfs/usr/bin -chmod +x /mnt/volumio/rootfs/usr/bin/mmc_boots -chmod +x /mnt/volumio/rootfs/usr/bin/mmcdisk -chmod +x /mnt/volumio/rootfs/usr/bin/mmc_install_from_sd - echo "Adding specific wlan firmware" cp -r platform-khadas/vims/hwpacks/wlan-firmware/brcm/ /mnt/volumio/rootfs/lib/firmware @@ -155,13 +164,25 @@ echo "Adding Meson video firmware" cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/video /mnt/volumio/rootfs/lib/firmware/ cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/meson /mnt/volumio/rootfs/lib/firmware/ +echo "Adding Wifi & Bluetooth firmware and helpers" +cp platform-khadas/vims/hwpacks/bluez/hciattach-armhf /mnt/volumio/rootfs/usr/local/bin/hciattach +cp platform-khadas/vims/hwpacks/bluez/brcm_patchram_plus-armhf /mnt/volumio/rootfs/usr/local/bin/brcm_patchram_plus +if [ "$MODEL" = kvim3 ] || [ "$MODEL" = kvim3l ]; then + + echo " fixing AP6359SA and AP6398S using the same chipid and rev for VIM3/VIM3L" + mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_apsta_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_apsta.bin + mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag.bin + mv /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6398s.txt /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6359sa.txt + mv /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0_ap6398s.hcd /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0.hcd +fi + #TODO: remove when volumio has been updated echo "Adding vim-specific cards.json" cp -r platform-khadas/vims/volumio/app/ /mnt/volumio/rootfs/volumio echo "Preparing to run chroot for more Khadas ${MODEL} configuration" cp scripts/kvimsconfig.sh /mnt/volumio/rootfs -#TODO: change init script +cp scripts/install-kiosk.sh /mnt/volumio/rootfs cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin @@ -189,7 +210,7 @@ fi echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) -" > /mnt/volumio/rootfs/root/init.sh +MODEL=${MODEL}" > /mnt/volumio/rootfs/root/init.sh chmod +x /mnt/volumio/rootfs/root/init.sh sync From fcd97523f81ec13529ee1208d198906722e8c3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 14 Dec 2019 19:02:29 +0100 Subject: [PATCH 565/673] Khadas: boot delay handling improved --- scripts/initramfs/init.nextarm | 51 +++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 2eef9a529..65cf09134 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -15,9 +15,6 @@ mknod /dev/tty c 5 0 mdev -s -#######TODO: replace or delete the following when the restart issue for Tinkerboard has been solved -echo 5 > /proc/sys/kernel/panic - #Defaults which may be overridden by cmdline parameters USE_KMSG="yes" HWDEVICE="empty" @@ -29,6 +26,27 @@ DPS="p" IMGPART="/dev/${BOOTDEV}${DPS}2" DATAPART="/dev/${BOOTDEV}${DPS}3" BOOTPART="/dev/${BOOTDEV}${DPS}1" +BOOTDELAY=5 +REBOOTMODE=normal + +for p in ${CMDLINE}; +do + key=${p%%=*} + value=${p#*=} + case $key in + bootdelay) + BOOTDELAY=$value + ;; + esac +done + +if [ ! -z "$BOOTDELAY" ]; then + sleep $BOOTDELAY + mdev -s +fi + +#######TODO: replace or delete the following when the restart issue for Tinkerboard has been solved +echo 5 > /proc/sys/kernel/panic # Display a message or print directly to /dev/kmsg print_msg() { @@ -57,6 +75,7 @@ parse_disk() { # $1 is unrecognized. echo "unknown-disk" fi + } do_reboot() { @@ -97,7 +116,18 @@ do value=${p#*=} case $key in imgpart) - IMGPART=`parse_disk $value` + + for i in 1 2 3 4 5 + do + IMGPART=`parse_disk $value` + if [ -z "${IMGPART}" ]; then + print_msg "Image partition not ready, retry $1" + sleep 1 + mdev -s + else + break + fi + done ;; imgfile) IMGFILE=$value @@ -143,11 +173,6 @@ if [ $DO_GEN == yes ]; then BOOTPART="/dev/${BOOTDEV}${DPS}1" fi -# Setting default boot delay of 5 seconds -if [ -z "$BOOTDELAY" ]; then - BOOTDELAY=5 -fi - #Hardware specific adaptions #When we did not already get the device name from the cmdline, try getting it from cpuinfo @@ -202,16 +227,13 @@ if [ ! -z "${UUIDFMT}" ]; then exit 0 fi fi + print_msg IMGPART=${IMGPART} print_msg IMGFILE=${IMGFILE} print_msg DATAPART=${DATAPART} print_msg BOOTPART=${BOOTPART} print_msg BOOTCONFIG=${BOOTCONFIG} -if [ ! -z "${BOOTDELAY}" ]; then - print_msg "Boot delay (except first time) will be ${BOOTDELAY} seconds" -fi - # Retry mdev -s 3 times before throwing the towel for i in 1 2 3 4 5 6 do @@ -254,9 +276,6 @@ if [ ! -e "/mnt/imgpart/volumio_factory.sqsh" ]; then umount /mnt/factory rm -r /mnt/factory sync -elif [ ! -z "${BOOTDELAY}" ]; then - print_msg "Doing a ${BOOTDELAY} second delay here to give kernel load a headstart" - sleep ${BOOTDELAY} fi print_msg "Checking for USB updates if you did not boot from USB..." From 6f6a0a1e87d011d762c5171424872673e1b85a85 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 17 Dec 2019 21:33:25 +0100 Subject: [PATCH 566/673] New Shairport Sync version for ARM --- scripts/volumioconfig.sh | 10 +++++++--- volumio/lib/systemd/system/airplay.service | 13 ------------- volumio/lib/systemd/system/shairport-sync.service | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 16 deletions(-) delete mode 100644 volumio/lib/systemd/system/airplay.service create mode 100644 volumio/lib/systemd/system/shairport-sync.service diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index ef90186f8..efcdcf452 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -260,9 +260,9 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then update-rc.d upmpdcli remove echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-arm.tar.gz - tar xf shairport-sync-3.0.2-arm.tar.gz - rm /shairport-sync-3.0.2-arm.tar.gz + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-arm.deb + dpkg -i shairport-sync_3.3.5-arm.deb + rm shairport-sync_3.3.5-arm.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz @@ -496,6 +496,10 @@ echo "Linking Volumio Command Line Client" ln -s /volumio/app/plugins/system_controller/volumio_command_line_client/volumio.sh /usr/local/bin/volumio chmod a+x /usr/local/bin/volumio +echo "Adding Shairport-Sync User" +getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null +getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null + ##################### #Audio Optimizations#----------------------------------------- ##################### diff --git a/volumio/lib/systemd/system/airplay.service b/volumio/lib/systemd/system/airplay.service deleted file mode 100644 index bb762e7e1..000000000 --- a/volumio/lib/systemd/system/airplay.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=ShairportSync AirTunes receiver -After=sound.target -Requires=avahi-daemon.service -After=avahi-daemon.service - -[Service] -ExecStart=/usr/local/bin/shairport-sync -User=volumio -Group=volumio - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/volumio/lib/systemd/system/shairport-sync.service b/volumio/lib/systemd/system/shairport-sync.service new file mode 100644 index 000000000..8c54f7626 --- /dev/null +++ b/volumio/lib/systemd/system/shairport-sync.service @@ -0,0 +1,14 @@ +[Unit] +Description=Shairport Sync - AirPlay Audio Receiver +After=sound.target +Requires=avahi-daemon.service +After=avahi-daemon.service +Wants=network-online.target +After=network.target network-online.target + +[Service] +ExecStart=/usr/local/bin/shairport-sync --configfile=/tmp/shairport-sync.conf +User=shairport-sync +Group=shairport-sync + +[Install] From 3cd70e232f0d2dd87875b4c31c4dd7737aef7787 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 18 Dec 2019 00:36:30 +0100 Subject: [PATCH 567/673] Add /bin/kill to volumio nopasswd --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index efcdcf452..1220075e7 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -120,7 +120,7 @@ echo 'Adding Safe Sudoers NoPassw permissions' cat > ${SUDOERS_FILE} << EOF # Add permissions for volumio user volumio ALL=(ALL) ALL -volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd,/opt/vc/bin/tvservice,/usr/bin/renice,/bin/rm +volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd,/opt/vc/bin/tvservice,/usr/bin/renice,/bin/rm,/bin/kill volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh, /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/pull.sh EOF chmod 0440 ${SUDOERS_FILE} From a5c3b970210c0536e97ea93225a8051cbd4ddbd2 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 18 Dec 2019 11:44:01 +0100 Subject: [PATCH 568/673] New Shairport-sync for X86 --- scripts/volumioconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 1220075e7..2c3c0e909 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -380,9 +380,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /libupnp6_1.6.20.jfd5-1_i386.deb echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-3.0.2-i386.tar.gz - tar xf shairport-sync-3.0.2-i386.tar.gz - rm /shairport-sync-3.0.2-i386.tar.gz + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-i386.deb + dpkg -i shairport-sync_3.3.5-i386.deb + rm shairport-sync_3.3.5-i386.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz From 80e3a7415791a01dac7cd7cc2cc0a3d3fc65ba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 19 Dec 2019 22:08:28 +0100 Subject: [PATCH 569/673] Khadas: remove local audio cards config --- scripts/kvimsimage.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 1c8a96a2e..9fc2bc7ce 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -168,18 +168,16 @@ echo "Adding Wifi & Bluetooth firmware and helpers" cp platform-khadas/vims/hwpacks/bluez/hciattach-armhf /mnt/volumio/rootfs/usr/local/bin/hciattach cp platform-khadas/vims/hwpacks/bluez/brcm_patchram_plus-armhf /mnt/volumio/rootfs/usr/local/bin/brcm_patchram_plus if [ "$MODEL" = kvim3 ] || [ "$MODEL" = kvim3l ]; then - echo " fixing AP6359SA and AP6398S using the same chipid and rev for VIM3/VIM3L" mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_apsta_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_apsta.bin mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag.bin mv /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6398s.txt /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6359sa.txt mv /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0_ap6398s.hcd /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0.hcd + cp /platform-khadas/vims/var/lib/alsa/asound.state.vim3-3l /mnt/volumio/rootfs/var/lib/alsa/asound.state +else + cp /platform-khadas/vims/var/lib/alsa/asound.state.vim1-2 /mnt/volumio/rootfs/var/lib/alsa/asound.state fi -#TODO: remove when volumio has been updated -echo "Adding vim-specific cards.json" -cp -r platform-khadas/vims/volumio/app/ /mnt/volumio/rootfs/volumio - echo "Preparing to run chroot for more Khadas ${MODEL} configuration" cp scripts/kvimsconfig.sh /mnt/volumio/rootfs cp scripts/install-kiosk.sh /mnt/volumio/rootfs From 7441f93fb55fc13e1243278874bfebef55eaac89 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 15 Feb 2020 02:35:02 +0100 Subject: [PATCH 570/673] BLE compatibility --- scripts/volumioconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 2c3c0e909..017d2bc79 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -500,6 +500,9 @@ echo "Adding Shairport-Sync User" getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null +echo "Adding cap_net_raw privileges, to allow BLE communications" +setcap cap_net_raw+eip /bin/node + ##################### #Audio Optimizations#----------------------------------------- ##################### From 3eb5dd633c7247889ae7aa3fcfe174f38b54b428 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 15 Feb 2020 19:00:55 +0100 Subject: [PATCH 571/673] Revert "BLE compatibility" This reverts commit 7441f93fb55fc13e1243278874bfebef55eaac89. --- scripts/volumioconfig.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 017d2bc79..2c3c0e909 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -500,9 +500,6 @@ echo "Adding Shairport-Sync User" getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null -echo "Adding cap_net_raw privileges, to allow BLE communications" -setcap cap_net_raw+eip /bin/node - ##################### #Audio Optimizations#----------------------------------------- ##################### From bc634bbd0a778c25528abbfc017df412682c4218 Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 21 Feb 2020 15:46:29 +0000 Subject: [PATCH 572/673] Volumio Log Rotation Service --- scripts/volumioconfig.sh | 3 ++ volumio/bin/volumiologrotate | 37 +++++++++++++++++++ .../systemd/system/volumiologrotate.service | 15 ++++++++ 3 files changed, 55 insertions(+) create mode 100755 volumio/bin/volumiologrotate create mode 100644 volumio/lib/systemd/system/volumiologrotate.service diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 2c3c0e909..4894c9f6b 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -480,6 +480,9 @@ systemctl disable ssh.service echo "Enable Volumio SSH enabler" ln -s /lib/systemd/system/volumiossh.service /etc/systemd/system/multi-user.target.wants/volumiossh.service +echo "Enable Volumio Log Rotation Service" +ln -s /lib/systemd/system/volumiologrotate.service /etc/systemd/system/multi-user.target.wants/volumiologrotate.service + echo "Setting Mpd to SystemD instead of Init" update-rc.d mpd remove systemctl enable mpd.service diff --git a/volumio/bin/volumiologrotate b/volumio/bin/volumiologrotate new file mode 100755 index 000000000..ca176cd37 --- /dev/null +++ b/volumio/bin/volumiologrotate @@ -0,0 +1,37 @@ +#!/bin/bash + +LOG_FOLDER=/var/log +MAX_TOTAL_LOG_SIZE=18000000 + +function clearLogs { + for LOG_FILE in "$LOG_FOLDER"/* + do + SIZE=`ls -la "$LOG_FILE" | cut -d' ' -f 5 ` + if [[ ${SIZE} -gt 0 ]];then + echo "Clearing $LOG_FILE" + echo "-------------- CLEARED LOG --------------" > $LOG_FILE + fi + done +} + +function checkLogFilesTotalSize { + TOTAL_LOG_SIZE=0 + for LOG_FILE in "$LOG_FOLDER"/* + do + SIZE=`ls -la "$LOG_FILE" | cut -d' ' -f 5 ` + if [[ ${SIZE} -gt 0 ]];then + TOTAL_LOG_SIZE=$((${TOTAL_LOG_SIZE}+${SIZE})) + fi + done + + if [[ ${TOTAL_LOG_SIZE} -gt ${MAX_TOTAL_LOG_SIZE} ]];then + echo "Total log size is greater than 18MB, cleaning logs" + clearLogs + fi +} + +while true +do + checkLogFilesTotalSize + sleep 60 +done diff --git a/volumio/lib/systemd/system/volumiologrotate.service b/volumio/lib/systemd/system/volumiologrotate.service new file mode 100644 index 000000000..c210eb8ae --- /dev/null +++ b/volumio/lib/systemd/system/volumiologrotate.service @@ -0,0 +1,15 @@ +[Unit] +Description = Volumio Log Rotation Service + +[Service] +ExecStart=/bin/volumiologrotate +Restart=always +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=volumiologrotate +User=root +Group=root + +[Install] +WantedBy=multi-user.target + From cf92c93c97e30e4324b7a4f80a289ffb61767d4e Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 21 Feb 2020 16:42:56 +0000 Subject: [PATCH 573/673] Increase default mpd buffer size and playlist lenght --- volumio/etc/mpd.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/etc/mpd.conf b/volumio/etc/mpd.conf index fe1d1fefc..12ddc2b84 100755 --- a/volumio/etc/mpd.conf +++ b/volumio/etc/mpd.conf @@ -70,9 +70,9 @@ buffer_before_play "10%" # Resource Limitations ######################################################## #connection_timeout "60" max_connections "20" -max_playlist_length "81920" +max_playlist_length "819200" max_command_list_size "81920" -max_output_buffer_size "81920" +max_output_buffer_size "819200" ############################################################################### # Character Encoding ########################################################## From eb67d125f7642faf9993dc311e0bec30fd6d0266 Mon Sep 17 00:00:00 2001 From: volumio Date: Sat, 22 Feb 2020 01:02:13 +0100 Subject: [PATCH 574/673] Semistandard --- scripts/volumioconfig.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 4894c9f6b..3c5f6ffe8 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -503,6 +503,9 @@ echo "Adding Shairport-Sync User" getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null +echo "Semistandard" +ln -s /volumio/node_modules/semistandard/bin/cmd.js /bin/semistandard + ##################### #Audio Optimizations#----------------------------------------- ##################### From 580b070de5f6bfcf0ef445fead3d73c4b1e996c3 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 22 Feb 2020 00:47:18 +0000 Subject: [PATCH 575/673] Refactor of wireless JS --- volumio/bin/wireless.js | 64 +++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 0475f6fc8..31ae2257e 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -19,7 +19,6 @@ var ifconfigWlan = "ifconfig " + wlan + " up"; var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan + " down"; var execSync = require('child_process').execSync; var ifconfig = require('/volumio/app/plugins/system_controller/network/lib/ifconfig.js'); -var conf = {}; if (debug) { var wpasupp = "wpa_supplicant -d -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; } else { @@ -79,7 +78,7 @@ function launch(fullprocess, name, sync, callback) { function startHotspot() { stopHotspot(function(err) { - if (conf != undefined && conf.enable_hotspot != undefined && conf.enable_hotspot.value != undefined && !conf.enable_hotspot.value) { + if (isHotspotDisabled()) { console.log('Hotspot is disabled, not starting it'); launch(ifconfigWlan, "configwlanup", true, function(err) { logger("ifconfig " + err); @@ -140,7 +139,7 @@ function startFlow() { var directhotspot = true; } - if (conf != undefined && conf.wireless_enabled != undefined && conf.wireless_enabled.value != undefined && !conf.wireless_enabled.value) { + if (isWirelessDisabled()) { console.log('Wireless Networking DISABLED, not starting wireless flow'); } else if (directhotspot){ startHotspot(function () { @@ -158,7 +157,7 @@ function startFlow() { if (actualTime > totalSecondsForConnection) { console.log("Overtime, starting plan B"); - if (conf != undefined && conf.hotspot_fallback != undefined && conf.hotspot_fallback.value != undefined && conf.hotspot_fallback.value) { + if (hotspotFallbackCondition()) { console.log('STARTING HOTSPOT'); apstopped = 1; clearTimeout(lesstimer); @@ -228,17 +227,7 @@ if (process.argv.length < 2) { console.log("Use: start|stop"); } else { var args = process.argv[2]; - console.log('WIRELESS DAEMON: ' + args); - try { - conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); - console.log('WIRELESS: Loaded configuration'); - if (debug) { - console.log('WIRELESS CONF: ' + JSON.stringify(conf)) - } - } catch (e) { - console.log('WIRELESS: First boot'); - conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); - } + logger('WIRELESS DAEMON: ' + args); switch (args) { case "start": @@ -271,3 +260,48 @@ function logger(msg) { console.log(msg) } } + +function getWirelessConfiguration() { + try { + var conf = fs.readJsonSync('/data/configuration/system_controller/network/config.json'); + logger('WIRELESS: Loaded configuration'); + logger('WIRELESS CONF: ' + JSON.stringify(conf)); + } catch (e) { + logger('WIRELESS: First boot'); + var conf = fs.readJsonSync('/volumio/app/plugins/system_controller/network/config.json'); + } + return conf +} + +function isHotspotDisabled() { + var hotspotConf = getWirelessConfiguration(); + var hotspotDisabled = false; + + if (hotspotConf !== undefined && hotspotConf.enable_hotspot !== undefined && hotspotConf.enable_hotspot.value !== undefined && !hotspotConf.enable_hotspot.value) { + hotspotDisabled = true; + } + + return hotspotDisabled +} + +function isWirelessDisabled() { + var wirelessConf = getWirelessConfiguration(); + var wirelessDisabled = false; + + if (wirelessConf !== undefined && wirelessConf.wireless_enabled !== undefined && wirelessConf.wireless_enabled.value !== undefined && !wirelessConf.wireless_enabled.value) { + wirelessDisabled = true; + } + + return wirelessDisabled +} + +function hotspotFallbackCondition() { + var hotspotFallbackConf = getWirelessConfiguration(); + var startHotspotFallback = false; + + if (hotspotFallbackConf !== undefined && hotspotFallbackConf.hotspot_fallback !== undefined && hotspotFallbackConf.hotspot_fallback.value !== undefined && hotspotFallbackConf.hotspot_fallback.value) { + startHotspotFallback = true; + } + + return startHotspotFallback = false; +} \ No newline at end of file From 5aa54e0fb8cbdca91771a1a08fb27aa983f71e40 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 22 Feb 2020 01:18:09 +0000 Subject: [PATCH 576/673] Fix hotspot fallback --- volumio/bin/wireless.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 31ae2257e..9398230ee 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -149,7 +149,7 @@ function startFlow() { console.log("Start wireless flow"); startAP(function () { console.log("Start ap"); - lesstimer = setInterval(function () { + lesstimer = setInterval(()=> { actualTime += pollingTime; if (wpaerr > 0) { actualTime = totalSecondsForConnection + 1; @@ -162,10 +162,11 @@ function startFlow() { apstopped = 1; clearTimeout(lesstimer); stopAP(function () { - setTimeout(function () { - startHotspot(function () { - - + setTimeout(()=> { + startHotspot(function (err) { + if(err) { + console.log('Could not start Hotspot Fallback: ' + err); + } }); }, settleTime); }); @@ -303,5 +304,5 @@ function hotspotFallbackCondition() { startHotspotFallback = true; } - return startHotspotFallback = false; + return startHotspotFallback } \ No newline at end of file From 3af03db8fca926e82baec3273f9be069f3e57195 Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 22 Feb 2020 01:57:40 +0000 Subject: [PATCH 577/673] Restart Hotspot if no wireless connection has been established --- volumio/bin/wireless.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 9398230ee..538315ab3 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -19,6 +19,7 @@ var ifconfigWlan = "ifconfig " + wlan + " up"; var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan + " down"; var execSync = require('child_process').execSync; var ifconfig = require('/volumio/app/plugins/system_controller/network/lib/ifconfig.js'); +var wirelessEstablishedOnceFlagFile = '/data/flagfiles/wirelessEstablishedOnce'; if (debug) { var wpasupp = "wpa_supplicant -d -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; } else { @@ -201,6 +202,7 @@ function startFlow() { wstatus("ap"); clearTimeout(lesstimer); restartAvahi(); + saveWirelessConnectionEstablished(); } } }); @@ -304,5 +306,28 @@ function hotspotFallbackCondition() { startHotspotFallback = true; } + if (!startHotspotFallback && !hasWirelessConnectionBeenEstablishedOnce()) { + startHotspotFallback = true; + } + return startHotspotFallback +} + +function saveWirelessConnectionEstablished() { + try { + fs.ensureFileSync(wirelessEstablishedOnceFlagFile) + } catch (e) { + logger('Could not save Wireless Connection Established: ' + e); + } +} + +function hasWirelessConnectionBeenEstablishedOnce() { + var wirelessEstablished = false; + try { + if (fs.existsSync(wirelessEstablishedOnceFlagFile)) { + wirelessEstablished = true; + } + } catch(err) {} + + return wirelessEstablished } \ No newline at end of file From a1e5cda251153507b2de00626340e9a575fd4b5d Mon Sep 17 00:00:00 2001 From: HowardQiao Date: Sun, 23 Feb 2020 19:32:53 +0800 Subject: [PATCH 578/673] Auto check and install prerequisite packages --- build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build.sh b/build.sh index bae76ec12..5737cc1b8 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,9 @@ BOLD=$(tput bold) REV=$(tput smso) ARCH=none + +PACKAGES="git squashfs-tools kpartx multistrap qemu-user-static samba debootstrap parted dosfstools qemu binfmt-support qemu-utils docker.io md5deep" + #Help function function HELP { echo " @@ -41,6 +44,18 @@ Example: Build a Raspberry PI image from scratch, version 2.0 : exit 1 } +# Auto check and install prerequisite packages +function check_sysreq { + echo "Auto check and install prerequisite packages" + REQ_STATE=$(dpkg -l $PACKAGES | grep "un ") + if [ -n "$REQ_STATE" ]; then + echo "Start installing packages." + apt update + apt -y install $PACKAGES + fi + echo "Build continues." +} + #$1 = ${BUILD} $2 = ${VERSION} $3 = ${DEVICE}" function check_os_release { ARCH_BUILD=$1 @@ -110,6 +125,7 @@ if [ -z "${VARIANT}" ]; then fi if [ -n "$BUILD" ]; then + check_sysreq CONF="recipes/$BUILD.conf" if [ "$BUILD" = arm ] || [ "$BUILD" = arm-dev ]; then ARCH="armhf" From 14e505ebc0c0b6541b6ad04e5b86c2128df58d23 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 2 Mar 2020 22:55:11 +0100 Subject: [PATCH 579/673] Revert "Increase default mpd buffer size and playlist lenght" This reverts commit cf92c93c97e30e4324b7a4f80a289ffb61767d4e. --- volumio/etc/mpd.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/etc/mpd.conf b/volumio/etc/mpd.conf index 12ddc2b84..fe1d1fefc 100755 --- a/volumio/etc/mpd.conf +++ b/volumio/etc/mpd.conf @@ -70,9 +70,9 @@ buffer_before_play "10%" # Resource Limitations ######################################################## #connection_timeout "60" max_connections "20" -max_playlist_length "819200" +max_playlist_length "81920" max_command_list_size "81920" -max_output_buffer_size "819200" +max_output_buffer_size "81920" ############################################################################### # Character Encoding ########################################################## From da662f84b7180a994094c8cfc4ae1b3211dd56a2 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 5 Mar 2020 20:28:31 +0100 Subject: [PATCH 580/673] GPIO Rules --- volumio/etc/udev/rules.d/92-gpio.rules | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 volumio/etc/udev/rules.d/92-gpio.rules diff --git a/volumio/etc/udev/rules.d/92-gpio.rules b/volumio/etc/udev/rules.d/92-gpio.rules new file mode 100644 index 000000000..29cc6d8db --- /dev/null +++ b/volumio/etc/udev/rules.d/92-gpio.rules @@ -0,0 +1,2 @@ +SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", +KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'" From 54f075432efbb1c173d257b8437ef5fb42badffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 9 Mar 2020 13:13:15 +0100 Subject: [PATCH 581/673] Khadas board: optimizations --- scripts/kvimsconfig.sh | 21 --------------------- scripts/kvimsimage.sh | 32 +++++++------------------------- 2 files changed, 7 insertions(+), 46 deletions(-) diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index abf659194..e932114cf 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -56,27 +56,6 @@ if [ ! "$MODEL" = kvim1 ]; then ln -s /lib/systemd/system/fan.service /etc/systemd/system/multi-user.target.wants/fan.service fi -#echo "Bluetooth Audio Sink/ Media configuration" -#echo "[General]" > /etc/bluetooth/audio.conf -#echo "Enable=Source,Sink,Media,Socket" >> /etc/bluetooth/audio.conf -#echo "HFP=true" >> /etc/bluetooth/audio.conf -#echo "Class=0x00041C" >> /etc/bluetooth/audio.conf - -#echo "Various device conf" -#echo "[General]" > /etc/bluetooth/main.conf -#echo "Name = Volumio" >> /etc/bluetooth/main.conf -#echo "Class = 0x00041C" >> /etc/bluetooth/main.conf -#echo "DiscoverableTimeout = 0" >> /etc/bluetooth/main.conf -#echo "Discoverable = true" >> /etc/bluetooth/main.conf -#echo "PairableTimeout = 0" >> /etc/bluetooth/main.conf -#echo "AutoConnectTimeout = 0" >> /etc/bluetooth/main.conf - -#echo "Setting default Bluetooth Name" -#echo "Volumio" > /etc/machine-info -#chmod 777 /etc/machine-info - -#echo "volumio ALL=(ALL) NOPASSWD: /bin/hciconfig" >> /etc/sudoers - echo "Configuring boot splash" apt-get -y install plymouth plymouth-themes plymouth-set-default-theme volumio diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 9fc2bc7ce..eaa543ea5 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -58,8 +58,8 @@ fi echo "Creating boot and rootfs filesystems" mkfs -t vfat -n VBOOT "${BOOT_PART}" -mkfs -F -t ext4 -L VIMAGE "${SYS_PART}" -mkfs -F -t ext4 -L VSTORAGE "${DATA_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync echo "Preparing for the vims kernel/ platform files" @@ -88,27 +88,9 @@ fi echo "Installing u-boot" -case $MODEL in - kvim1) - echo " for khadas vim1..." - dd if=platform-khadas/vims/uboot/u-boot.vim1.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync - dd if=platform-khadas/vims/uboot/u-boot.vim1.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 - ;; - kvim2) - echo " for khadas vim2..." - dd if=platform-khadas/vims/uboot/u-boot.vim2.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync - dd if=platform-khadas/vims/uboot/u-boot.vim2.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1;; - kvim3) - echo " for khadas vim3..." - dd if=platform-khadas/vims/uboot/u-boot.vim3.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync - dd if=platform-khadas/vims/uboot/u-boot.vim3.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1;; - kvim3l) - echo " for khadas vim3l..." - dd if=platform-khadas/vims/uboot/u-boot.vim3l.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync - dd if=platform-khadas/vims/uboot/u-boot.vim3l.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 - ;; -esac - +echo "Installing u-boot for $MODEL" +dd if=platform-khadas/vims/uboot/u-boot.$MODEL.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync +dd if=platform-khadas/vims/uboot/u-boot.$MODEL.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 echo "Preparing for Volumio rootfs" if [ -d /mnt ] @@ -173,9 +155,9 @@ if [ "$MODEL" = kvim3 ] || [ "$MODEL" = kvim3l ]; then mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag.bin mv /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6398s.txt /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6359sa.txt mv /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0_ap6398s.hcd /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0.hcd - cp /platform-khadas/vims/var/lib/alsa/asound.state.vim3-3l /mnt/volumio/rootfs/var/lib/alsa/asound.state + cp platform-khadas/vims/var/lib/alsa/asound.state.vim3-3l /mnt/volumio/rootfs/var/lib/alsa/asound.state else - cp /platform-khadas/vims/var/lib/alsa/asound.state.vim1-2 /mnt/volumio/rootfs/var/lib/alsa/asound.state + cp platform-khadas/vims/var/lib/alsa/asound.state.vim1-2 /mnt/volumio/rootfs/var/lib/alsa/asound.state fi echo "Preparing to run chroot for more Khadas ${MODEL} configuration" From 8e5b002fe474efe3aa8f0a61ade1ce91d07bd5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 10 Mar 2020 10:09:21 +0100 Subject: [PATCH 582/673] Khadas: fix to enable Krescue --- scripts/kvimsimage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index eaa543ea5..9a0dc8792 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -58,8 +58,8 @@ fi echo "Creating boot and rootfs filesystems" mkfs -t vfat -n VBOOT "${BOOT_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L VIMAGE "${SYS_PART}" || mkfs -F -t ext4 -L VIMAGE "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L VDATA "${DATA_PART}" || mkfs -F -t ext4 -L VDATA "${DATA_PART}" sync echo "Preparing for the vims kernel/ platform files" From 335437b3d9bbff5886bc9fd710f80644348d890e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 10 Mar 2020 17:06:51 +0100 Subject: [PATCH 583/673] Khadas: use renamed u-boot files to align with krescue --- scripts/kvimsimage.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 9a0dc8792..316eb7dd9 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -86,11 +86,25 @@ else cd .. fi -echo "Installing u-boot" - -echo "Installing u-boot for $MODEL" -dd if=platform-khadas/vims/uboot/u-boot.$MODEL.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync -dd if=platform-khadas/vims/uboot/u-boot.$MODEL.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 +echo "Use $MODEL u-boot naming as Krescue also needs it.." +case $MODEL in + kvim1 ) + BOARD=VIM1 + ;; + kvim2 ) + BOARD=VIM2 + ;; + kvim3 ) + BOARD=VIM3 + ;; + kvim3l ) + BOARD=VIM3L + ;; +esac + +echo "Installing u-boot for $BOARD" +dd if=platform-khadas/vims/uboot/u-boot.$BOARD.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync +dd if=platform-khadas/vims/uboot/u-boot.$BOARD.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 echo "Preparing for Volumio rootfs" if [ -d /mnt ] From ce5f144ce777a9ca314ae9614b00ff3934284ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 11 Mar 2020 13:53:38 +0100 Subject: [PATCH 584/673] Khadas: remove asound.state & umute hdmi/spdif --- scripts/kvimsconfig.sh | 2 ++ scripts/kvimsimage.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index e932114cf..19bdfc3cb 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -30,6 +30,8 @@ echo "kernel.dmesg_restrict = 0" >> /etc/sysctl.conf echo "#!/bin/sh -e echo heartbeat > /sys/class/leds/sys_led/trigger +/usr/bin/amixer sset 'Audio hdmi-out mute' off +/usr/bin/amixer sset 'Audio spdif mute' off exit 0" > /etc/rc.local #TODO: perhaps add fancontrol, though this is really "not done" for an audiophile device diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 316eb7dd9..03b1e91fe 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -169,9 +169,9 @@ if [ "$MODEL" = kvim3 ] || [ "$MODEL" = kvim3l ]; then mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag.bin mv /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6398s.txt /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6359sa.txt mv /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0_ap6398s.hcd /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0.hcd - cp platform-khadas/vims/var/lib/alsa/asound.state.vim3-3l /mnt/volumio/rootfs/var/lib/alsa/asound.state +# cp platform-khadas/vims/var/lib/alsa/asound.state.vim3-3l /mnt/volumio/rootfs/var/lib/alsa/asound.state else - cp platform-khadas/vims/var/lib/alsa/asound.state.vim1-2 /mnt/volumio/rootfs/var/lib/alsa/asound.state +# cp platform-khadas/vims/var/lib/alsa/asound.state.vim1-2 /mnt/volumio/rootfs/var/lib/alsa/asound.state fi echo "Preparing to run chroot for more Khadas ${MODEL} configuration" From 820425bfca4aead18c29707e2ba10bc0a14cf6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 11 Mar 2020 23:38:12 +0100 Subject: [PATCH 585/673] Khadas: improvements --- scripts/kvimsimage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 03b1e91fe..91046108f 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -102,7 +102,7 @@ case $MODEL in ;; esac -echo "Installing u-boot for $BOARD" +echo "Installing u-boot u-boot.$BOARD.sd.bin" dd if=platform-khadas/vims/uboot/u-boot.$BOARD.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync dd if=platform-khadas/vims/uboot/u-boot.$BOARD.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1 @@ -170,7 +170,7 @@ if [ "$MODEL" = kvim3 ] || [ "$MODEL" = kvim3l ]; then mv /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6398s.txt /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6359sa.txt mv /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0_ap6398s.hcd /mnt/volumio/rootfs/lib/firmware/brcm/BCM4359C0.hcd # cp platform-khadas/vims/var/lib/alsa/asound.state.vim3-3l /mnt/volumio/rootfs/var/lib/alsa/asound.state -else +#else # cp platform-khadas/vims/var/lib/alsa/asound.state.vim1-2 /mnt/volumio/rootfs/var/lib/alsa/asound.state fi From ba22215fabbe766d668749499a1c25fcefd90f0a Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 12 Mar 2020 12:50:56 +0100 Subject: [PATCH 586/673] Add Volumiologrotate to bin folder --- scripts/configure.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/configure.sh b/scripts/configure.sh index ab41ad675..d2b39f59c 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -81,6 +81,8 @@ cp volumio/bin/hotspot.sh build/$BUILD/root/bin/hotspot.sh cp volumio/bin/dynswap.sh build/$BUILD/root/bin/dynswap.sh #Wireless cp volumio/bin/wireless.js build/$BUILD/root/volumio/app/plugins/system_controller/network/wireless.js +#Volumio Log Rotate +cp volumio/bin/volumiologrotate build/$BUILD/root/bin/volumiologrotate #dhcpcd cp -rp volumio/etc/dhcpcd.conf build/$BUILD/root/etc/ #wifi pre script From eb100eea439546406e7cdf289601dd35b49aa90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 20 Mar 2020 12:19:30 +0100 Subject: [PATCH 587/673] Khadas: add support for Krescue --- scripts/kvimsconfig.sh | 7 +++---- scripts/kvimsimage.sh | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index 19bdfc3cb..c05a35f01 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -18,16 +18,15 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab -sed -i "s/%%IMGPART%%/imgpart=UUID=${UUID_IMG}/g" /boot/boot.ini -sed -i "s/%%BOOTPART%%/bootpart=UUID=${UUID_BOOT}/g" /boot/boot.ini -sed -i "s/%%DATAPART%%/datapart=UUID=${UUID_DATA}/g" /boot/boot.ini +sed -i "s/#IMG_PART=UUID=/IMG_PART=UUID=${UUID_IMG}/g" /boot/env.txt +sed -i "s/#BOOT_PART=UUID=/BOOT_PART=UUID=${UUID_BOOT}/g" /boot/env.txt +sed -i "s/#DATA_PART=UUID=/DATA_PART=UUID=${UUID_DATA}/g" /boot/env.txt echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf echo "Remove default dmesg restriction" echo "kernel.dmesg_restrict = 0" >> /etc/sysctl.conf - echo "#!/bin/sh -e echo heartbeat > /sys/class/leds/sys_led/trigger /usr/bin/amixer sset 'Audio hdmi-out mute' off diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 91046108f..60beb07d4 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -136,9 +136,12 @@ echo "Copying boot files" cp platform-khadas/vims/boot/Image /mnt/volumio/rootfs/boot cp platform-khadas/vims/boot/config* /mnt/volumio/rootfs/boot cp platform-khadas/vims/boot/boot.ini /mnt/volumio/rootfs/boot +cp platform-khadas/vims/boot/env.txt /mnt/volumio/rootfs/boot +cp platform-khadas/vims/boot/env.txt.header.tpl /mnt/volumio/rootfs/boot cp -r platform-khadas/vims/boot/dtb /mnt/volumio/rootfs/boot echo "Keeping copies of u-boot files" cp -r platform-khadas/vims/uboot /mnt/volumio/rootfs/boot +cp -r platform-khadas/vims/uboot-mainline /mnt/volumio/rootfs/boot echo "Copying modules" cp -Rp platform-khadas/vims/lib/modules /mnt/volumio/rootfs/lib/ From f89e79f31e376f6230d6849420acc27c04934be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 20 Mar 2020 13:31:34 +0100 Subject: [PATCH 588/673] Khadas: using github.com/volumio/platform-khadas --- scripts/kvimsimage.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 60beb07d4..482038711 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -70,16 +70,16 @@ then cd platform-khadas if [ -f vims.tar.xz ]; then echo "Found a new tarball, unpacking..." - [ -d vims ] || rm -r vims + [ -d vims ] || rm -r vims tar xfJ vims.tar.xz - rm vims.tar.xz + rm vims.tar.xz fi cd .. else echo "Clone vims files from repo" mkdir platform-khadas cd platform-khadas - wget https://github.com/gkkpch/platform-khadas/raw/master/vims.tar.xz + wget https://github.com/volumio/platform-khadas/raw/master/vims.tar.xz echo "Unpacking the platform files" tar xfJ vims.tar.xz rm vims.tar.xz From 3e04524420fbcd6fb79a79afbdd6e230516b908e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 23 Mar 2020 22:03:43 +0100 Subject: [PATCH 589/673] Khadas OTA: fix partition name vars --- scripts/kvimsconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index c05a35f01..db891a630 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -18,9 +18,9 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab -sed -i "s/#IMG_PART=UUID=/IMG_PART=UUID=${UUID_IMG}/g" /boot/env.txt -sed -i "s/#BOOT_PART=UUID=/BOOT_PART=UUID=${UUID_BOOT}/g" /boot/env.txt -sed -i "s/#DATA_PART=UUID=/DATA_PART=UUID=${UUID_DATA}/g" /boot/env.txt +sed -i "s/#imgpart=UUID=/imgpart=UUID=${UUID_IMG}/g" /boot/env.txt +sed -i "s/#bootpart=UUID=/bootpart=UUID=${UUID_BOOT}/g" /boot/env.txt +sed -i "s/#datapart=UUID=/datapart=UUID=${UUID_DATA}/g" /boot/env.txt echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf From 09c2559d796da35d4032a7ae9a62b242521e7115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9?= Date: Thu, 26 Mar 2020 21:10:18 +0100 Subject: [PATCH 590/673] HEMIMX8MMINI: add build scripts --- build.sh | 4 + scripts/hemx8mminiconfig.sh | 96 +++++++++++++++ scripts/hemx8mminiimage.sh | 239 ++++++++++++++++++++++++++++++++++++ 3 files changed, 339 insertions(+) create mode 100755 scripts/hemx8mminiconfig.sh create mode 100755 scripts/hemx8mminiimage.sh diff --git a/build.sh b/build.sh index 5737cc1b8..f52128471 100755 --- a/build.sh +++ b/build.sh @@ -358,6 +358,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/vim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + hemx8mmini) echo 'Writing hemx8mmini Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/hemx8mminiimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; kvim1|kvim2|kvim3|kvim3l) echo 'Writing VIM1 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} diff --git a/scripts/hemx8mminiconfig.sh b/scripts/hemx8mminiconfig.sh new file mode 100755 index 000000000..de701e27e --- /dev/null +++ b/scripts/hemx8mminiconfig.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# hemx8mmini fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Modifying uEnv.txt template" +sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/uEnv.txt +sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/uEnv.txt +sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/uEnv.txt +cat /boot/uEnv.txt + +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf + +echo "Alsa Card Ordering" +echo "# USB DACs will have device number 5 in whole Volumio device range +options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf + +echo "Installing additional packages" +apt-get update +apt-get -y install device-tree-compiler u-boot-tools + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +echo "Removing unused features" +rm /etc/xbindkeysrc +rm /etc/systemd/system/multi-user.target.wants/xbindkeysrc.service + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=list'" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +#echo "Removing unnecessary /boot files" +#rm /boot/volumio.initrd diff --git a/scripts/hemx8mminiimage.sh b/scripts/hemx8mminiimage.sh new file mode 100755 index 000000000..fcc092f7b --- /dev/null +++ b/scripts/hemx8mminiimage.sh @@ -0,0 +1,239 @@ +#!/bin/sh + +# Build Architecture Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-hemx8mmini.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "[INFO] Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "[INFO] Creating Image Bed" +LOOP_DEV=`losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat16 21 84 +parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` + +if [ ! -b "${BOOT_PART}" ] +then + echo "[ERR] ${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "[INFO] Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "[INFO] Preparing for the hemx8mmini kernel/ platform files" +if [ -d platform-variscite ] +then +# if you really want to re-clone from the repo, then delete the platform-hemx8mmini folder + # that will refresh all, see below + cd platform-variscite + if [ -f hemx8mmini.tar.xz ]; then + echo "[INFO] Found a new tarball, unpacking..." + [ -d hemx8mmini ] || rm -r hemx8mmini + tar xfJ hemx8mmini.tar.xz + rm hemx8mmini.tar.xz + fi + cd .. +else + echo "[INFO] Get hemx8mmini files from repo" + mkdir platform-variscite + cd platform-odroid + [ ! -f hemx8mmini.tar.xz ] || rm hemx8mmini.tar.xz + wget https://github.com/volumio/platform-variscite/raw/master/hemx8mmini.tar.xz + echo "[INFO] Unpacking the platform files" + tar xfJ hemx8mmini.tar.xz + rm hemx8mmini.tar.xz + cd .. +fi + +echo "[INFO] Copying the hemx8mmini bootloader" +sudo dd if=platform-variscite/hemx8mmini/uboot/imx-boot-sd.bin of=${LOOP_DEV} bs=1K seek=33 conv=fsync + +echo "[INFO] Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "[INFO] /mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "[INFO] Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "[INFO] Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "[INFO] Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "[INFO] Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs + +echo "[INFO] Copying hemx8mmini dtb and boot files" +cp platform-variscite/hemx8mmini/boot/* /mnt/volumio/rootfs/boot + +echo "[INFO] Compiling u-boot boot script" +mkimage -C none -A arm -T script -d platform-variscite/hemx8mmini/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr + +echo "[INFO] Copying kernel configuration file" +cp platform-variscite/hemx8mmini/boot/config* /mnt/volumio/rootfs/boot + +echo "[INFO] Copying kernel modules" +cp -pdR platform-variscite/hemx8mmini/lib/modules /mnt/volumio/rootfs/lib/ + +echo "[INFO] Copying ALSA defaults" +cp platform-variscite/hemx8mmini/usrshare/alsa/asound.state /mnt/volumio/rootfs/usr/share/alsa/ + +echo "[INFO] Copying the binary for updating from usb during initrd" +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +sync + +echo "[INFO] Preparing to run chroot for more hemx8mmini configuration " +cp scripts/hemx8mminiconfig.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs + +echo $PATCH > /mnt/volumio/rootfs/patch + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "[INFO] Configuring variant $UIVARIANT" + echo "[INFO] Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/ro + else + echo "[INFO] Starting config.js" + node config.js $PATCH + fi +fi + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/hemx8mminiconfig.sh +EOF + +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "[INFO] Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + +#cleanup +rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/hemx8mminiconfig.sh /mnt/volumio/rootfs/root/init + +echo "[INFO] Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "[INFO] ==> hemx8mmini device image installed" +sync + +echo "[INFO] Finalizing Rootfs creation" +sh scripts/finalize.sh + +echo "[INFO] Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "[INFO] Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "[INFO] Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "[INFO] Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "[INFO] Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "[INFO] Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "[INFO] Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "[INFO] Creating SquashFS, removing any previous one" +if [ -f Volumio.sqsh ]; then + rm -r Volumio.sqsh +fi +OS_VERSION_TARGET=$(cat /mnt/squash/etc/os-release | grep ^VERSION_ID | tr -d 'VERSION_ID="') +OS_VERSION_HOST=$(cat /etc/os-release | grep ^VERSION_ID | tr -d 'VERSION_ID="') +if [ ! "${OS_VERSION_TARGET}" = "8" ] && [ ! "${OS_VERSION_HOST}" = "8" ]; then + SQUASHFSOPTS="-comp zstd" +fi +mksquashfs /mnt/squash/* Volumio.sqsh $SQUASHFSOPTS + +echo "[INFO] Squash filesystem created" +echo "[INFO] Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "[INFO] Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync From 2bb446741de3a60048e2934b21282f12dfb28ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9?= Date: Thu, 26 Mar 2020 22:06:08 +0100 Subject: [PATCH 591/673] hemx8mmini: fix platform issue --- scripts/hemx8mminiimage.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/hemx8mminiimage.sh b/scripts/hemx8mminiimage.sh index fcc092f7b..29b02a55a 100755 --- a/scripts/hemx8mminiimage.sh +++ b/scripts/hemx8mminiimage.sh @@ -73,14 +73,9 @@ then cd .. else echo "[INFO] Get hemx8mmini files from repo" - mkdir platform-variscite - cd platform-odroid - [ ! -f hemx8mmini.tar.xz ] || rm hemx8mmini.tar.xz - wget https://github.com/volumio/platform-variscite/raw/master/hemx8mmini.tar.xz - echo "[INFO] Unpacking the platform files" - tar xfJ hemx8mmini.tar.xz - rm hemx8mmini.tar.xz - cd .. + git clone https://github.com/volumio/platform-hem-var-som-mx8m-mini platform-variscite --depth 1 + tyr xfJ hemx8mmini.tar.xz + rm hemx8mmini.tar.xz fi echo "[INFO] Copying the hemx8mmini bootloader" From 7071ad67e864f8912802452ac8011a245186064d Mon Sep 17 00:00:00 2001 From: balbuze Date: Sun, 29 Mar 2020 21:08:57 +0200 Subject: [PATCH 592/673] Update volumioconfig.sh add volumio user in the group "systemd-journal" in order to read journalctl from a plugin. --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 3c5f6ffe8..99bc078a9 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -62,7 +62,7 @@ echo "" #Adding Main user Volumio echo "Adding Volumio User" groupadd volumio -useradd -c volumio -d /home/volumio -m -g volumio -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lp -s /bin/bash -p '$6$tRtTtICB$Ki6z.DGyFRopSDJmLUcf3o2P2K8vr5QxRx5yk3lorDrWUhH64GKotIeYSNKefcniSVNcGHlFxZOqLM6xiDa.M.' volumio +useradd -c volumio -d /home/volumio -m -g volumio -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lp,systemd-journal -s /bin/bash -p '$6$tRtTtICB$Ki6z.DGyFRopSDJmLUcf3o2P2K8vr5QxRx5yk3lorDrWUhH64GKotIeYSNKefcniSVNcGHlFxZOqLM6xiDa.M.' volumio #Setting Root Password echo 'root:$1$JVNbxLRo$pNn5AmZxwRtWZ.xF.8xUq/' | chpasswd -e From c1d7f45e4757db48e5fc28e6bb716b346312850d Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 31 Mar 2020 16:51:12 +0000 Subject: [PATCH 593/673] Force hotspot --- volumio/bin/wireless.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 538315ab3..59daeb9f6 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -140,12 +140,21 @@ function startFlow() { var directhotspot = true; } - if (isWirelessDisabled()) { + try { + fs.accessSync('/tmp/forcehotspot', fs.F_OK); + var hotspotForce = true; + fs.unlinkSync('/tmp/forcehotspot') + } catch (e) { + var hotspotForce = false; + } + + if (hotspotForce) { + console.log('Wireless networking forced to hotspot mode'); + startHotspot(function () {}); + } else if (isWirelessDisabled()) { console.log('Wireless Networking DISABLED, not starting wireless flow'); } else if (directhotspot){ - startHotspot(function () { - - }); + startHotspot(function () {}); } else { console.log("Start wireless flow"); startAP(function () { From fd4e2dbc6bd2e24b3815c7ab5431ec25ef152685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9?= Date: Tue, 31 Mar 2020 20:55:58 +0200 Subject: [PATCH 594/673] HEM: improving build scripts --- scripts/hemx8mminiconfig.sh | 11 +++++++---- scripts/hemx8mminiimage.sh | 12 ++++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/scripts/hemx8mminiconfig.sh b/scripts/hemx8mminiconfig.sh index de701e27e..540fd9e41 100755 --- a/scripts/hemx8mminiconfig.sh +++ b/scripts/hemx8mminiconfig.sh @@ -23,7 +23,6 @@ echo "Modifying uEnv.txt template" sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/uEnv.txt sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/uEnv.txt sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/uEnv.txt -cat /boot/uEnv.txt echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf @@ -34,7 +33,11 @@ options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf echo "Installing additional packages" apt-get update -apt-get -y install device-tree-compiler u-boot-tools +apt-get -y install device-tree-compiler u-boot-tools bluez-firmware bluetooth bluez bluez-tools + +echo "Enabling hemx6mmini Bluetooth stack" +ln -sf /lib/firmware /etc/firmware +ln -s /lib/systemd/system/variscite-bt.service /etc/systemd/system/multi-user.target.wants/variscite-bt.service echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules @@ -92,5 +95,5 @@ mkinitramfs-custom.sh -o /tmp/initramfs-tmp echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd -#echo "Removing unnecessary /boot files" -#rm /boot/volumio.initrd +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/hemx8mminiimage.sh b/scripts/hemx8mminiimage.sh index 29b02a55a..b83319894 100755 --- a/scripts/hemx8mminiimage.sh +++ b/scripts/hemx8mminiimage.sh @@ -116,11 +116,19 @@ mkimage -C none -A arm -T script -d platform-variscite/hemx8mmini/boot/boot.cmd echo "[INFO] Copying kernel configuration file" cp platform-variscite/hemx8mmini/boot/config* /mnt/volumio/rootfs/boot -echo "[INFO] Copying kernel modules" +echo "[INFO] Copying kernel modules & firmware" cp -pdR platform-variscite/hemx8mmini/lib/modules /mnt/volumio/rootfs/lib/ +cp -pdR platform-variscite/hemx8mmini/firmware/* /mnt/volumio/rootfs/lib/firmware echo "[INFO] Copying ALSA defaults" -cp platform-variscite/hemx8mmini/usrshare/alsa/asound.state /mnt/volumio/rootfs/usr/share/alsa/ +cp platform-variscite/hemx8mmini/usr/share/alsa/asound.state /mnt/volumio/rootfs/usr/share/alsa/ +cp platform-variscite/hemx8mmini/etc/asound.conf /mnt/volumio/rootfs/etc + +echo "Copying WiFi and BT scripts and configs" +mkdir /mnt/volumio/rootfs/etc/wifi/ +cp platform-variscite/hemx8mmini/extras/variscite-wifi.conf /mnt/volumio/rootfs/etc/wifi/ +cp platform-variscite/hemx8mmini/extras/variscite-wifi-common.sh /mnt/volumio/rootfs/etc/wifi/ +cp platform-variscite/hemx8mmini/extras/*.service /mnt/volumio/rootfs/lib/systemd/system echo "[INFO] Copying the binary for updating from usb during initrd" wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater From 558f574b5ed148cb7ce32d8f0fb00ebb850f5eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 3 Apr 2020 17:56:42 +0200 Subject: [PATCH 595/673] Khadas: optimized boot paramter handling --- scripts/kvimsconfig.sh | 6 +++--- scripts/kvimsimage.sh | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index db891a630..71c8cbf15 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -18,9 +18,9 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab -sed -i "s/#imgpart=UUID=/imgpart=UUID=${UUID_IMG}/g" /boot/env.txt -sed -i "s/#bootpart=UUID=/bootpart=UUID=${UUID_BOOT}/g" /boot/env.txt -sed -i "s/#datapart=UUID=/datapart=UUID=${UUID_DATA}/g" /boot/env.txt +sed -i "s/#imgpart=UUID=/imgpart=UUID=${UUID_IMG}/g" /boot/env.system.txt +sed -i "s/#bootpart=UUID=/bootpart=UUID=${UUID_BOOT}/g" /boot/env.system.txt +sed -i "s/#datapart=UUID=/datapart=UUID=${UUID_DATA}/g" /boot/env.system.txt echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 482038711..e6287cbdd 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -136,9 +136,10 @@ echo "Copying boot files" cp platform-khadas/vims/boot/Image /mnt/volumio/rootfs/boot cp platform-khadas/vims/boot/config* /mnt/volumio/rootfs/boot cp platform-khadas/vims/boot/boot.ini /mnt/volumio/rootfs/boot +cp platform-khadas/vims/boot/env.system.txt /mnt/volumio/rootfs/boot cp platform-khadas/vims/boot/env.txt /mnt/volumio/rootfs/boot -cp platform-khadas/vims/boot/env.txt.header.tpl /mnt/volumio/rootfs/boot cp -r platform-khadas/vims/boot/dtb /mnt/volumio/rootfs/boot + echo "Keeping copies of u-boot files" cp -r platform-khadas/vims/uboot /mnt/volumio/rootfs/boot cp -r platform-khadas/vims/uboot-mainline /mnt/volumio/rootfs/boot From ee70764baf5e215ecc4fc61818508c30c115a14d Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 3 Apr 2020 19:42:28 +0200 Subject: [PATCH 596/673] Khadas: add missing VARIANT part --- scripts/kvimsimage.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index e6287cbdd..dd4f81f8b 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -223,6 +223,13 @@ rm /mnt/volumio/rootfs/kvimsconfig.sh rm /mnt/volumio/rootfs/root/init /mnt/volumio/rootfs/root/init.sh rm /mnt/volumio/rootfs/usr/local/sbin/mkinitramfs-custom.sh +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + echo "Unmounting chroot temp devices" umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc From 693868c556af081de950ae2e2ac064772520175a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9?= Date: Sat, 4 Apr 2020 15:40:36 +0200 Subject: [PATCH 597/673] hemx8m: fix typo --- scripts/hemx8mminiimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/hemx8mminiimage.sh b/scripts/hemx8mminiimage.sh index b83319894..c41654773 100755 --- a/scripts/hemx8mminiimage.sh +++ b/scripts/hemx8mminiimage.sh @@ -74,7 +74,7 @@ then else echo "[INFO] Get hemx8mmini files from repo" git clone https://github.com/volumio/platform-hem-var-som-mx8m-mini platform-variscite --depth 1 - tyr xfJ hemx8mmini.tar.xz + tar xfJ hemx8mmini.tar.xz rm hemx8mmini.tar.xz fi From b932dfa86bb2a8751f6a33e2d2c53a3d4f39440a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 13 Apr 2020 15:36:18 +0200 Subject: [PATCH 598/673] Khadas: optimize cpu frequency settings --- scripts/kvimsconfig.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index 71c8cbf15..60c5be4ec 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -29,6 +29,18 @@ echo "kernel.dmesg_restrict = 0" >> /etc/sysctl.conf echo "#!/bin/sh -e echo heartbeat > /sys/class/leds/sys_led/trigger +## fix cpu freq +## fix audio lags clicks + +C=/sys/devices/system/cpu/cpufreq +[ "$FREQ" ] || FREQ=1200000 + +echo "[i] set fix freq $FREQ">&2 + +for c in $C/policy*; do + echo $FREQ > $c/scaling_max_freq + echo $FREQ > $c/scaling_min_freq +done /usr/bin/amixer sset 'Audio hdmi-out mute' off /usr/bin/amixer sset 'Audio spdif mute' off exit 0" > /etc/rc.local From ee7b065ffd94cf81c2d7525c2248ed93d24e083a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 14 Apr 2020 09:06:28 +0200 Subject: [PATCH 599/673] Khadas: Optimized cpu frequency scaling with new rc.local script --- scripts/kvimsconfig.sh | 22 ---------------------- scripts/kvimsimage.sh | 3 +++ 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index 60c5be4ec..fcc2052ea 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -27,28 +27,6 @@ echo "abi.cp15_barrier=2" >> /etc/sysctl.conf echo "Remove default dmesg restriction" echo "kernel.dmesg_restrict = 0" >> /etc/sysctl.conf -echo "#!/bin/sh -e -echo heartbeat > /sys/class/leds/sys_led/trigger -## fix cpu freq -## fix audio lags clicks - -C=/sys/devices/system/cpu/cpufreq -[ "$FREQ" ] || FREQ=1200000 - -echo "[i] set fix freq $FREQ">&2 - -for c in $C/policy*; do - echo $FREQ > $c/scaling_max_freq - echo $FREQ > $c/scaling_min_freq -done -/usr/bin/amixer sset 'Audio hdmi-out mute' off -/usr/bin/amixer sset 'Audio spdif mute' off -exit 0" > /etc/rc.local - -#TODO: perhaps add fancontrol, though this is really "not done" for an audiophile device -# not really needed for VIM3L, -# .....but as the VIM3L HTPC kit already has one ....) - echo "Adding default wifi" echo "dhd " >> /etc/modules diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index dd4f81f8b..ffd78f5f9 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -160,6 +160,9 @@ cp -Rp platform-khadas/vims/usr/* /mnt/volumio/rootfs/usr echo "Adding specific wlan firmware" cp -r platform-khadas/vims/hwpacks/wlan-firmware/brcm/ /mnt/volumio/rootfs/lib/firmware +echo "Copying rc.local" +cp platform-khadas/vims/etc/rc.local /mnt/volumio/rootfs/etc + echo "Adding Meson video firmware" cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/video /mnt/volumio/rootfs/lib/firmware/ cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/meson /mnt/volumio/rootfs/lib/firmware/ From a58f3d3f3d794d5c052bb293b8f7e7438cce284c Mon Sep 17 00:00:00 2001 From: Volumio Date: Wed, 15 Apr 2020 13:47:37 +0000 Subject: [PATCH 600/673] Override disable hotspot when forcing it --- volumio/bin/wireless.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index 59daeb9f6..cfd32fdbe 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -95,6 +95,18 @@ function startHotspot() { }); } +function startHotspotForce() { + stopHotspot(function(err) { + console.log('Starting Force Hotspot') + launch(ifconfigHotspot, "confighotspot", true, function(err) { + logger("ifconfig " + err); + launch(starthostapd,"hotspot" , false, function() { + wstatus("hotspot"); + }); + }); + }); +} + function stopHotspot(callback) { launch(stophostapd, "stophotspot" , true, function(err) { launch(ifdeconfig, "ifdeconfig", true, callback); @@ -150,7 +162,7 @@ function startFlow() { if (hotspotForce) { console.log('Wireless networking forced to hotspot mode'); - startHotspot(function () {}); + startHotspotForce(function () {}); } else if (isWirelessDisabled()) { console.log('Wireless Networking DISABLED, not starting wireless flow'); } else if (directhotspot){ From ab07dc608e3a7ece96429ec80973025554885453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9?= Date: Wed, 15 Apr 2020 16:31:02 +0200 Subject: [PATCH 601/673] hemx8mmini: wireless and bluetooth addition --- scripts/hemx8mminiconfig.sh | 5 ++- scripts/hemx8mminiimage.sh | 66 ++++++++++++++++++++++++++----------- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/scripts/hemx8mminiconfig.sh b/scripts/hemx8mminiconfig.sh index 540fd9e41..e0e478661 100755 --- a/scripts/hemx8mminiconfig.sh +++ b/scripts/hemx8mminiconfig.sh @@ -35,10 +35,13 @@ echo "Installing additional packages" apt-get update apt-get -y install device-tree-compiler u-boot-tools bluez-firmware bluetooth bluez bluez-tools -echo "Enabling hemx6mmini Bluetooth stack" +echo "Enabling hemx8mmini Bluetooth stack" ln -sf /lib/firmware /etc/firmware ln -s /lib/systemd/system/variscite-bt.service /etc/systemd/system/multi-user.target.wants/variscite-bt.service +echo "Enabling hemx8mmini wireless stack" +ln -s /lib/systemd/system/variscite-wifi.service /etc/systemd/system/multi-user.target.wants/variscite-wifi.service + echo "Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules diff --git a/scripts/hemx8mminiimage.sh b/scripts/hemx8mminiimage.sh index c41654773..d9d7dd43e 100755 --- a/scripts/hemx8mminiimage.sh +++ b/scripts/hemx8mminiimage.sh @@ -63,19 +63,19 @@ if [ -d platform-variscite ] then # if you really want to re-clone from the repo, then delete the platform-hemx8mmini folder # that will refresh all, see below - cd platform-variscite - if [ -f hemx8mmini.tar.xz ]; then - echo "[INFO] Found a new tarball, unpacking..." - [ -d hemx8mmini ] || rm -r hemx8mmini - tar xfJ hemx8mmini.tar.xz - rm hemx8mmini.tar.xz - fi - cd .. + cd platform-variscite + if [ -f hemx8mmini.tar.xz ]; then + echo "[INFO] Found a new tarball, unpacking..." + [ -d hemx8mmini ] || rm -r hemx8mmini + tar xfJ hemx8mmini.tar.xz + rm hemx8mmini.tar.xz + fi + cd .. else - echo "[INFO] Get hemx8mmini files from repo" - git clone https://github.com/volumio/platform-hem-var-som-mx8m-mini platform-variscite --depth 1 - tar xfJ hemx8mmini.tar.xz - rm hemx8mmini.tar.xz + echo "[INFO] Get hemx8mmini files from repo" + git clone https://github.com/volumio/platform-hem-var-som-mx8m-mini platform-variscite --depth 1 + tar xfJ hemx8mmini.tar.xz + rm hemx8mmini.tar.xz fi echo "[INFO] Copying the hemx8mmini bootloader" @@ -110,6 +110,9 @@ cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "[INFO] Copying hemx8mmini dtb and boot files" cp platform-variscite/hemx8mmini/boot/* /mnt/volumio/rootfs/boot +echo "[INFO] Copying boot logo (to be customized)" +cp platform-variscite/hemx8mmini/variscite/splash.bmp /mnt/volumio/rootfs/boot + echo "[INFO] Compiling u-boot boot script" mkimage -C none -A arm -T script -d platform-variscite/hemx8mmini/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr @@ -118,17 +121,42 @@ cp platform-variscite/hemx8mmini/boot/config* /mnt/volumio/rootfs/boot echo "[INFO] Copying kernel modules & firmware" cp -pdR platform-variscite/hemx8mmini/lib/modules /mnt/volumio/rootfs/lib/ -cp -pdR platform-variscite/hemx8mmini/firmware/* /mnt/volumio/rootfs/lib/firmware +cp -pdR platform-variscite/hemx8mmini/variscite/firmware/* /mnt/volumio/rootfs/lib/firmware echo "[INFO] Copying ALSA defaults" -cp platform-variscite/hemx8mmini/usr/share/alsa/asound.state /mnt/volumio/rootfs/usr/share/alsa/ -cp platform-variscite/hemx8mmini/etc/asound.conf /mnt/volumio/rootfs/etc +cp platform-variscite/hemx8mmini/variscite/asound.state /mnt/volumio/rootfs/usr/share/alsa/ +cp platform-variscite/hemx8mmini/variscite/asound.conf /mnt/volumio/rootfs/etc + + + +echo "[INFO] Copying BT service, scripts and configs" +mkdir /mnt/volumio/rootfs/etc/bluetooth +cp platform-variscite/hemx8mmini/variscite/brcm_patchram_plus /mnt/volumio/rootfs/usr/bin +chmod +x /mnt/volumio/rootfs/usr/bin/brcm_patchram_plus +cp platform-variscite/hemx8mmini/variscite/imx8mm-var-dart/variscite-bt.conf /mnt/volumio/rootfs/etc/bluetooth +cp platform-variscite/hemx8mmini/variscite/variscite-bt /mnt/volumio/rootfs/etc/bluetooth +chmod +x /mnt/volumio/rootfs/etc/bluetooth/variscite-bt +cp platform-variscite/hemx8mmini/variscite/variscite-bt.common.sh /mnt/volumio/rootfs/etc/bluetooth +chmod +x /mnt/volumio/rootfs/etc/bluetooth/variscite-bt.common.sh +cp platform-variscite/hemx8mmini/variscite/variscite-bt.service /mnt/volumio/rootfs/lib/systemd/system + +echo "[INFO] Copying BT main config" +cp platform-variscite/hemx8mmini/variscite/mx8mm-var-dart/main.conf /mnt/volumio/rootfs/etc/bluetooth + +echo "[INFO] Install blacklist" +cp platform-variscite/hemx8mmini/variscite/imx8mm-var-dart/blacklist.conf /mnt/volumio/rootfs/etc/modprobe.d -echo "Copying WiFi and BT scripts and configs" +echo "[INFO] Copying WiFi service, scripts and configs" mkdir /mnt/volumio/rootfs/etc/wifi/ -cp platform-variscite/hemx8mmini/extras/variscite-wifi.conf /mnt/volumio/rootfs/etc/wifi/ -cp platform-variscite/hemx8mmini/extras/variscite-wifi-common.sh /mnt/volumio/rootfs/etc/wifi/ -cp platform-variscite/hemx8mmini/extras/*.service /mnt/volumio/rootfs/lib/systemd/system +cp platform-variscite/hemx8mmini/variscite/imx8mm-var-dart/variscite-wifi.conf /mnt/volumio/rootfs/etc/wifi/ +cp platform-variscite/hemx8mmini/variscite/imx8mm-var-dart/variscite-wifi-common.sh /mnt/volumio/rootfs/etc/wifi/ +chmod +x /mnt/volumio/rootfs/etc/wifi/variscite-wifi-common.sh +cp platform-variscite/hemx8mmini/variscite/variscite-wifi /mnt/volumio/rootfs/etc/wifi/ +chmod +x /mnt/volumio/rootfs/etc/wifi/variscite-wifi +cp platform-variscite/hemx8mmini/variscite/variscite-wifi.service /mnt/volumio/rootfs/lib/systemd/system + +echo "[INFO] Copying rc.local (set min_free_kbytes)" +cp platform-variscite/hemx8mmini/variscite/rc.local /mnt/volumio/rootfs/etc echo "[INFO] Copying the binary for updating from usb during initrd" wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater From c9e20fa3dbd6be82071d4f2ad46cc25547290532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9?= Date: Wed, 15 Apr 2020 20:58:12 +0200 Subject: [PATCH 602/673] hemx8mmini: fixed max cpufreq to avoid audio lag & clicks --- scripts/hemx8mminiconfig.sh | 38 ++++++++++++++++++------------------- scripts/hemx8mminiimage.sh | 12 +++++------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/scripts/hemx8mminiconfig.sh b/scripts/hemx8mminiconfig.sh index e0e478661..42055388b 100755 --- a/scripts/hemx8mminiconfig.sh +++ b/scripts/hemx8mminiconfig.sh @@ -4,10 +4,10 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. -echo "Initializing.." +echo "[INFO] Initializing.." . init.sh -echo "Creating \"fstab\"" +echo "[INFO] Creating \"fstab\"" echo "# hemx8mmini fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 @@ -19,54 +19,54 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab -echo "Modifying uEnv.txt template" +echo "[INFO] Modifying uEnv.txt template" sed -i "s/%%BOOTPART%%/${UUID_BOOT}/g" /boot/uEnv.txt sed -i "s/%%IMGPART%%/${UUID_IMG}/g" /boot/uEnv.txt sed -i "s/%%DATAPART%%/${UUID_DATA}/g" /boot/uEnv.txt -echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "[INFO] Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf -echo "Alsa Card Ordering" +echo "[INFO] Alsa Card Ordering" echo "# USB DACs will have device number 5 in whole Volumio device range options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf -echo "Installing additional packages" +echo "[INFO] Installing additional packages" apt-get update -apt-get -y install device-tree-compiler u-boot-tools bluez-firmware bluetooth bluez bluez-tools +apt-get -y install device-tree-compiler u-boot-tools bluez-firmware -echo "Enabling hemx8mmini Bluetooth stack" +echo "[INFO] Enabling hemx8mmini Bluetooth stack" ln -sf /lib/firmware /etc/firmware ln -s /lib/systemd/system/variscite-bt.service /etc/systemd/system/multi-user.target.wants/variscite-bt.service -echo "Enabling hemx8mmini wireless stack" +echo "[INFO] Enabling hemx8mmini wireless stack" ln -s /lib/systemd/system/variscite-wifi.service /etc/systemd/system/multi-user.target.wants/variscite-wifi.service -echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "[INFO] Adding custom modules overlayfs, squashfs and nls_cp437" echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules -echo "Copying volumio initramfs updater" +echo "[INFO] Copying volumio initramfs updater" cd /root/ mv volumio-init-updater /usr/local/sbin -echo "Removing unused features" +echo "[INFO] Removing unused features" rm /etc/xbindkeysrc rm /etc/systemd/system/multi-user.target.wants/xbindkeysrc.service #On The Fly Patch if [ "$PATCH" = "volumio" ]; then -echo "No Patch To Apply" +echo "[INFO] No Patch To Apply" else -echo "Applying Patch ${PATCH}" +echo "[INFO] Applying Patch ${PATCH}" PATCHPATH=/${PATCH} cd $PATCHPATH #Check the existence of patch script if [ -f "patch.sh" ]; then sh patch.sh else -echo "Cannot Find Patch File, aborting" +echo "[INFO] Cannot Find Patch File, aborting" fi if [ -f "install.sh" ]; then sh install.sh @@ -76,20 +76,20 @@ rm -rf ${PATCH} fi rm /patch -echo "Changing to 'modules=list'" +echo "[INFO] mkinitramfs: changing to 'modules=list'" sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf -echo "Installing winbind here, since it freezes networking" +echo "[INFO] Installing winbind here, since it freezes networking" apt-get update apt-get install -y winbind libnss-winbind -echo "Cleaning APT Cache and remove policy file" +echo "[INFO] Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean rm /usr/sbin/policy-rc.d #First Boot operations -echo "Signalling the init script to re-size the volumio data partition" +echo "[INFO] Signalling the init script to re-size the volumio data partition" touch /boot/resize-volumio-datapart echo "Creating initramfs 'volumio.initrd'" diff --git a/scripts/hemx8mminiimage.sh b/scripts/hemx8mminiimage.sh index d9d7dd43e..4e1bae078 100755 --- a/scripts/hemx8mminiimage.sh +++ b/scripts/hemx8mminiimage.sh @@ -74,8 +74,10 @@ then else echo "[INFO] Get hemx8mmini files from repo" git clone https://github.com/volumio/platform-hem-var-som-mx8m-mini platform-variscite --depth 1 + cd platform-variscite tar xfJ hemx8mmini.tar.xz rm hemx8mmini.tar.xz + cd .. fi echo "[INFO] Copying the hemx8mmini bootloader" @@ -127,22 +129,18 @@ echo "[INFO] Copying ALSA defaults" cp platform-variscite/hemx8mmini/variscite/asound.state /mnt/volumio/rootfs/usr/share/alsa/ cp platform-variscite/hemx8mmini/variscite/asound.conf /mnt/volumio/rootfs/etc - - echo "[INFO] Copying BT service, scripts and configs" mkdir /mnt/volumio/rootfs/etc/bluetooth cp platform-variscite/hemx8mmini/variscite/brcm_patchram_plus /mnt/volumio/rootfs/usr/bin chmod +x /mnt/volumio/rootfs/usr/bin/brcm_patchram_plus +cp platform-variscite/hemx8mmini/variscite/imx8mm-var-dart/main.conf /mnt/volumio/rootfs/etc/bluetooth cp platform-variscite/hemx8mmini/variscite/imx8mm-var-dart/variscite-bt.conf /mnt/volumio/rootfs/etc/bluetooth cp platform-variscite/hemx8mmini/variscite/variscite-bt /mnt/volumio/rootfs/etc/bluetooth chmod +x /mnt/volumio/rootfs/etc/bluetooth/variscite-bt -cp platform-variscite/hemx8mmini/variscite/variscite-bt.common.sh /mnt/volumio/rootfs/etc/bluetooth -chmod +x /mnt/volumio/rootfs/etc/bluetooth/variscite-bt.common.sh +cp platform-variscite/hemx8mmini/variscite/variscite-bt-common.sh /mnt/volumio/rootfs/etc/bluetooth +chmod +x /mnt/volumio/rootfs/etc/bluetooth/variscite-bt-common.sh cp platform-variscite/hemx8mmini/variscite/variscite-bt.service /mnt/volumio/rootfs/lib/systemd/system -echo "[INFO] Copying BT main config" -cp platform-variscite/hemx8mmini/variscite/mx8mm-var-dart/main.conf /mnt/volumio/rootfs/etc/bluetooth - echo "[INFO] Install blacklist" cp platform-variscite/hemx8mmini/variscite/imx8mm-var-dart/blacklist.conf /mnt/volumio/rootfs/etc/modprobe.d From ae50387207a51ded8448b0fe27a6f7f82d7e114d Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 16 Apr 2020 22:43:09 +0200 Subject: [PATCH 603/673] Update Shairport-Sync to 3.3.6 --- scripts/volumioconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 99bc078a9..327f276b1 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -260,9 +260,9 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then update-rc.d upmpdcli remove echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-arm.deb - dpkg -i shairport-sync_3.3.5-arm.deb - rm shairport-sync_3.3.5-arm.deb + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.6-arm.deb + dpkg -i shairport-sync_3.3.6-arm.deb + rm shairport-sync_3.3.6-arm.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz @@ -380,9 +380,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /libupnp6_1.6.20.jfd5-1_i386.deb echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-i386.deb - dpkg -i shairport-sync_3.3.5-i386.deb - rm shairport-sync_3.3.5-i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.6-i386.deb + dpkg -i shairport-sync_3.3.6-i386.deb + rm shairport-sync_3.3.6-i386.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz From 065ef81c71b20fa7e9ce88b2caf253a85e229962 Mon Sep 17 00:00:00 2001 From: macmpi Date: Fri, 17 Apr 2020 18:38:57 +0200 Subject: [PATCH 604/673] Pi: update brcm firmware & improve BT coexistence https://github.com/RPi-Distro/firmware-nonfree/issues/8#issuecomment-615339218 (need to get file from https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20190114-1+rpt6_all.deb ) --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 6cfb575e6..d01a9f52a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -168,9 +168,9 @@ echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 # Temporary brcm firmware fix solution until we use Buster -wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rpt2_all.deb -dpkg -i firmware-brcm80211_20190114-1+rpt2_all.deb -rm firmware-brcm80211_20190114-1+rpt2_all.deb +wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rpt6_all.deb +dpkg -i firmware-brcm80211_20190114-1+rpt6_all.deb +rm firmware-brcm80211_20190114-1+rpt6_all.deb if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" From 78acf40d00e00f7c06bbfc9ec9cfdb6eefd1432c Mon Sep 17 00:00:00 2001 From: Volumio Date: Sat, 18 Apr 2020 03:03:30 +0200 Subject: [PATCH 605/673] Pre-commit hooks --- build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.sh b/build.sh index f52128471..ae1c8644b 100755 --- a/build.sh +++ b/build.sh @@ -178,6 +178,10 @@ if [ -n "$BUILD" ]; then else git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio fi + echo "Pre-commit hooks" + echo '#!/bin/sh + # Pre-commit hook, uncomment when finished linting all codebase + #npm run lint-staged' > /volumio/.git/hooks/pre-commit echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" echo 'Cloning Volumio3 UI' From 99d26b7205a747d53af42ef93433d11919492d01 Mon Sep 17 00:00:00 2001 From: Markus Hansmair Date: Sat, 25 Apr 2020 11:10:08 +0200 Subject: [PATCH 606/673] moved 'rm -rf .git' after 'git rev-parse HEAD' --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index ae1c8644b..9ac73286b 100755 --- a/build.sh +++ b/build.sh @@ -186,8 +186,6 @@ if [ -n "$BUILD" ]; then git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" echo 'Cloning Volumio3 UI' git clone --depth 1 -b dist3 --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www3" - rm -rf build/$BUILD/root/volumio/http/www/.git - rm -rf build/$BUILD/root/volumio/http/www3/.git echo "Adding os-release infos" { echo "VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\"" @@ -195,6 +193,9 @@ if [ -n "$BUILD" ]; then echo "VOLUMIO_BE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/.git" rev-parse HEAD)\"" echo "VOLUMIO_ARCH=\"${BUILD}\"" } >> "build/$BUILD/root/etc/os-release" + rm -rf build/$BUILD/root/volumio/.git + rm -rf build/$BUILD/root/volumio/http/www/.git + rm -rf build/$BUILD/root/volumio/http/www3/.git if [ ! "$BUILD" = x86 ]; then chroot "build/$BUILD/root" /bin/bash -x <<'EOF' From 7316657c489e526008f05f12286b6a6d790b006a Mon Sep 17 00:00:00 2001 From: Markus Hansmair Date: Sat, 25 Apr 2020 13:57:03 +0200 Subject: [PATCH 607/673] preserved .git of backend code in image --- build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sh b/build.sh index 9ac73286b..31118c41c 100755 --- a/build.sh +++ b/build.sh @@ -193,7 +193,6 @@ if [ -n "$BUILD" ]; then echo "VOLUMIO_BE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/.git" rev-parse HEAD)\"" echo "VOLUMIO_ARCH=\"${BUILD}\"" } >> "build/$BUILD/root/etc/os-release" - rm -rf build/$BUILD/root/volumio/.git rm -rf build/$BUILD/root/volumio/http/www/.git rm -rf build/$BUILD/root/volumio/http/www3/.git From 8050438a2bd7232b97dd9943f2b7c54b0e6faefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sun, 26 Apr 2020 17:59:49 +0200 Subject: [PATCH 608/673] Khadas: Temporary fix for reboot crash/ enabling RC --- build.sh | 6 +++++- scripts/kvimsconfig.sh | 9 ++++++++- scripts/kvimsimage.sh | 22 +++++++++++++++++++--- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 31118c41c..3f81bf7fb 100755 --- a/build.sh +++ b/build.sh @@ -354,6 +354,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/motivoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + mp1) echo 'Writing Motivo Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} + ;; primo) echo 'Writing Primo Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/primoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 @@ -366,7 +370,7 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/hemx8mminiimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; - kvim1|kvim2|kvim3|kvim3l) echo 'Writing VIM1 Image File' + kvim1|kvim2|kvim3) echo 'Writing Khadas Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} diff --git a/scripts/kvimsconfig.sh b/scripts/kvimsconfig.sh index fcc2052ea..7ed8c3193 100755 --- a/scripts/kvimsconfig.sh +++ b/scripts/kvimsconfig.sh @@ -38,11 +38,18 @@ options snd-usb-audio index=5" >> /etc/modprobe.d/alsa-base.conf echo "Installing additional packages" apt-get update -apt-get -y install u-boot-tools mc abootimg fbset bluez-firmware bluetooth bluez bluez-tools device-tree-compiler linux-base +apt-get -y install u-boot-tools mc abootimg fbset bluez-firmware bluetooth bluez bluez-tools device-tree-compiler linux-base + +echo "Configure triggerhappy" +apt-get -y install triggerhappy +echo " +DAEMON_OPTS=\"--user root\" +" >> /etc/default/triggerhappy echo "Enabling KVIM Bluetooth stack" ln -sf /lib/firmware /etc/firmware ln -s /lib/systemd/system/bluetooth-khadas.service /etc/systemd/system/multi-user.target.wants/bluetooth-khadas.service + if [ ! "$MODEL" = kvim1 ]; then ln -s /lib/systemd/system/fan.service /etc/systemd/system/multi-user.target.wants/fan.service fi diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index ffd78f5f9..b58b788b3 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -97,7 +97,7 @@ case $MODEL in kvim3 ) BOARD=VIM3 ;; - kvim3l ) + mp1 ) BOARD=VIM3L ;; esac @@ -163,6 +163,22 @@ cp -r platform-khadas/vims/hwpacks/wlan-firmware/brcm/ /mnt/volumio/rootfs/lib/f echo "Copying rc.local" cp platform-khadas/vims/etc/rc.local /mnt/volumio/rootfs/etc +echo "Copying triggerhappy configuration" +cp -R platform-khadas/vims/etc/triggerhappy /mnt/volumio/rootfs/etc + +#TODO ===> remove when reboot for VIM3/MP1 resolved +echo "Adding temporary fix for reboot fix with VIM3 or MP1" +if [ "$MODEL" = kvim3 ] || [ "$MODEL" = mp1 ]; then + mv /mnt/volumio/rootfs/sbin/ifconfig /mnt/volumio/rootfs/opt + mv /mnt/volumio/rootfs/bin/ip /mnt/volumio/rootfs/opt + cp platform-khadas/vims/opt/ifconfig.fix /mnt/volumio/rootfs/sbin/ifconfig + cp platform-khadas/vims/opt/ip.fix /mnt/volumio/rootfs/bin/ip +fi + +echo "Copying khadas system halt service" +cp -R platform-khadas/vims/etc/systemd /mnt/volumio/rootfs/etc +cp platform-khadas/vims/opt/poweroff /mnt/volumio/rootfs/opt/poweroff + echo "Adding Meson video firmware" cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/video /mnt/volumio/rootfs/lib/firmware/ cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/meson /mnt/volumio/rootfs/lib/firmware/ @@ -170,8 +186,8 @@ cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/meson /mnt/volumio/roo echo "Adding Wifi & Bluetooth firmware and helpers" cp platform-khadas/vims/hwpacks/bluez/hciattach-armhf /mnt/volumio/rootfs/usr/local/bin/hciattach cp platform-khadas/vims/hwpacks/bluez/brcm_patchram_plus-armhf /mnt/volumio/rootfs/usr/local/bin/brcm_patchram_plus -if [ "$MODEL" = kvim3 ] || [ "$MODEL" = kvim3l ]; then - echo " fixing AP6359SA and AP6398S using the same chipid and rev for VIM3/VIM3L" +if [ "$MODEL" = kvim3 ] || [ "$MODEL" = mp1 ]; then + echo " fixing AP6359SA and AP6398S using the same chipid and rev for VIM3/MP1" mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_apsta_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_apsta.bin mv /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag_ap6398s.bin /mnt/volumio/rootfs/lib/firmware/brcm/fw_bcm4359c0_ag.bin mv /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6398s.txt /mnt/volumio/rootfs/lib/firmware/brcm/nvram_ap6359sa.txt From 56cef154543661b0b001242d86d6554d98079660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 27 Apr 2020 23:23:38 +0200 Subject: [PATCH 609/673] MP1: disable poweroff via mcu --- scripts/kvimsimage.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index b58b788b3..1cbd4bed7 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -175,9 +175,15 @@ if [ "$MODEL" = kvim3 ] || [ "$MODEL" = mp1 ]; then cp platform-khadas/vims/opt/ip.fix /mnt/volumio/rootfs/bin/ip fi -echo "Copying khadas system halt service" -cp -R platform-khadas/vims/etc/systemd /mnt/volumio/rootfs/etc -cp platform-khadas/vims/opt/poweroff /mnt/volumio/rootfs/opt/poweroff +#TODO: remove the mp1 restriction when reboot works +if [ ! "$MODEL" = mp1 ]; then + echo "Copying khadas system halt service" + cp -R platform-khadas/vims/etc/systemd /mnt/volumio/rootfs/etc + cp platform-khadas/vims/opt/poweroff /mnt/volumio/rootfs/opt/poweroff +else +#do not use the system-halt.service for mp1 yet + cp platform-khadas/vims/etc/rc.local.mp1 /mnt/volumio/rootfs/etc/rc.local +fi echo "Adding Meson video firmware" cp -r platform-khadas/vims/hwpacks/video-firmware/Amlogic/video /mnt/volumio/rootfs/lib/firmware/ From 4ea2d24f9a98aaa5ab56bf5ecbfbd6f3dc19bc05 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 28 Apr 2020 15:11:05 +0200 Subject: [PATCH 610/673] Revert "Update Shairport-Sync to 3.3.6" This reverts commit ae50387207a51ded8448b0fe27a6f7f82d7e114d. --- scripts/volumioconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 327f276b1..99bc078a9 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -260,9 +260,9 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then update-rc.d upmpdcli remove echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.6-arm.deb - dpkg -i shairport-sync_3.3.6-arm.deb - rm shairport-sync_3.3.6-arm.deb + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-arm.deb + dpkg -i shairport-sync_3.3.5-arm.deb + rm shairport-sync_3.3.5-arm.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz @@ -380,9 +380,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /libupnp6_1.6.20.jfd5-1_i386.deb echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.6-i386.deb - dpkg -i shairport-sync_3.3.6-i386.deb - rm shairport-sync_3.3.6-i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-i386.deb + dpkg -i shairport-sync_3.3.5-i386.deb + rm shairport-sync_3.3.5-i386.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz From bb6d6f463d29bf0e0f7646e6319fbb321382628f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 30 Apr 2020 20:56:33 +0200 Subject: [PATCH 611/673] Odroid N2: performance and remote control --- scripts/odroidn2config.sh | 7 +------ scripts/odroidn2image.sh | 13 +++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/odroidn2config.sh b/scripts/odroidn2config.sh index 74040da6c..a6c45c4f8 100755 --- a/scripts/odroidn2config.sh +++ b/scripts/odroidn2config.sh @@ -21,17 +21,12 @@ tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 echo "Creating boot.ini from template" sed -i "s/%%VOLUMIO-PARAMS%%/imgpart=UUID=${UUID_IMG} imgfile=\/volumio_current.sqsh hwdevice=Odroid-N2 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=boot.ini/g" /boot/boot.ini - echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf -echo "#!/bin/sh -e -#/usr/local/bin/n2-init.sh -exit 0" > /etc/rc.local - echo "Installing additional packages" apt-get update -apt-get -y install u-boot-tools liblircclient0 lirc fbset +apt-get -y install u-boot-tools lirc fbset echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* diff --git a/scripts/odroidn2image.sh b/scripts/odroidn2image.sh index e108e596f..c0036d401 100755 --- a/scripts/odroidn2image.sh +++ b/scripts/odroidn2image.sh @@ -120,7 +120,8 @@ cp platform-odroid/odroidn2/boot/Image* /mnt/volumio/rootfs/boot echo "Copying OdroidN2 modules and firmware" cp -pdR platform-odroid/odroidn2/lib/modules /mnt/volumio/rootfs/lib/ -sync +echo "Copying rc.local for performance tweaks" +cp platform-odroid/odroidn2/etc/rc.local /mnt/volumio/rootfs/etc echo "Preparing to run chroot for more Odroid-N2 configuration" cp scripts/odroidn2config.sh /mnt/volumio/rootfs @@ -166,6 +167,11 @@ if [ -f "${UIVARIANT_FILE}" ]; then rm $UIVARIANT_FILE fi +echo "Copying LIRC configuration files for HK stock remote" +cp platform-odroid/odroidn2/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc +cp platform-odroid/odroidn2/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc +cp platform-odroid/odroidn2/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc + echo "Cleaning up temp files" rm /mnt/volumio/rootfs/odroidn2config.sh /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/root/init @@ -174,11 +180,6 @@ umount -l /mnt/volumio/rootfs/dev umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys -echo "Copying LIRC configuration files for HK stock remote" -cp platform-odroid/odroidn2/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc -cp platform-odroid/odroidn2/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc -cp platform-odroid/odroidn2/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc - echo "==> Odroid-N2 device installed" #echo "Removing temporary platform files" From 9733a78990600533ac067e3bad4cc2dc06d68dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 30 Apr 2020 21:04:36 +0200 Subject: [PATCH 612/673] Odroid C4: initial support --- build.sh | 4 + scripts/odroidc4config.sh | 88 ++++++++++++++ scripts/odroidc4image.sh | 235 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 327 insertions(+) create mode 100755 scripts/odroidc4config.sh create mode 100755 scripts/odroidc4image.sh diff --git a/build.sh b/build.sh index 3f81bf7fb..25351c407 100755 --- a/build.sh +++ b/build.sh @@ -252,6 +252,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/odroidc2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + odroidc4) echo 'Writing Odroid-C4 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/odroidc4image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; odroidn2) echo 'Writing Odroid-N2 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/odroidn2image.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/scripts/odroidc4config.sh b/scripts/odroidc4config.sh new file mode 100755 index 000000000..777ebbd33 --- /dev/null +++ b/scripts/odroidc4config.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# Odroid C4 fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Editing boot.ini" +sed -i "s/%%VOLUMIO-PARAMS%%/imgpart=UUID=${UUID_IMG} imgfile=\/volumio_current.sqsh bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA}/g" /boot/boot.ini + +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf + +echo "Installing additional packages" +apt-get update +apt-get -y install u-boot-tools fbset lirc + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Limiting 'modules=most' to 'modules=list' to reduce uInitrd size" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/odroidc4image.sh b/scripts/odroidc4image.sh new file mode 100755 index 000000000..5ffc42526 --- /dev/null +++ b/scripts/odroidc4image.sh @@ -0,0 +1,235 @@ +#!/bin/sh + +# Default build for Debian 32bit (to be changed to armv8) +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-odroidc4.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "INFO Creating Image File ${IMG_FILE} with $DISTRO rootfs" +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "INFO Creating Image Bed" +LOOP_DEV=`losetup -f --show ${IMG_FILE}` + +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 1 64 +parted -s "${LOOP_DEV}" mkpart primary ext3 65 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` + +if [ ! -b "${BOOT_PART}" ] +then + echo "INFO ${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "INFO Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "INFO Preparing for the Odroid C4 kernel/ platform files" +if [ -d ./platform-odroid/odroidc4 ] +then + echo "INFO Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-odroid folder + # that will refresh all the odroid platforms, see below + cd platform-odroid + if [ -f odroidc4.tar.xz ]; then + echo "INFO Found a new tarball, unpacking..." + rm -r odroidc4 + tar xfJ odroidc4.tar.xz + rm odroidc4.tar.xz + fi + cd .. +else + echo "INFO Getting sthe Odroid C4 files from repo" + mkdir platform-odroid + cd platform-odroid + [ ! -f odroidc4.tar.xz ] || rm odroidc4.tar.xz + wget https://github.com/volumio/platform-odroid/raw/master/odroidc4.tar.xz + echo "INFO Unpacking the C4 platform files" + tar xfJ odroidc4.tar.xz + rm odroidc4.tar.xz + cd .. +fi + +echo "INFO Copying the bootloader" +dd if=platform-odroid/odroidc4/uboot/u-boot.bin of=${LOOP_DEV} conv=fsync,notrunc bs=512 seek=1 +sync + +echo "INFO Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "INFO /mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "INFO Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "INFO Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "INFO Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "INFO Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +echo "INFO Copying odroidc4 boot files" +cp platform-odroid/odroidc4/boot/*boot.ini /mnt/volumio/rootfs/boot +cp platform-odroid/odroidc4/boot/meson64_odroidc4.dtb /mnt/volumio/rootfs/boot +cp platform-odroid/odroidc4/boot/Image* /mnt/volumio/rootfs/boot + +echo "INFO Copying odroidc4 performance tweaking" +cp platform-odroid/odroidc4/etc/rc.local /mnt/volumio/rootfs/etc + +echo "INFO Copying odroidc4 modules and firmware" +cp -pdR platform-odroid/odroidc4/lib/modules /mnt/volumio/rootfs/lib/ + +sync + +echo "INFO Preparing to run chroot for more Odroid-C4 configuration" +cp scripts/odroidc4config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs + +echo $PATCH > /mnt/volumio/rootfs/patch + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "INFO Configuring variant $UIVARIANT" + echo "INFO Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "INFO Starting config.js" + node config.js $PATCH + fi +fi + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/odroidc4config.sh +EOF + +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "INFO Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + +echo "Copying LIRC configuration files for HK stock remote" +cp platform-odroid/odroidc4/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc +cp platform-odroid/odroidc4/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc +cp platform-odroid/odroidc4/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc +ls -l /mnt/volumio/rootfs/etc/lirc + +echo "INFO Cleaning up temp files" +rm /mnt/volumio/rootfs/odroidc4config.sh /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/root/init + +echo "INFO Unmounting temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "INFO ==> Odroid-C4 device installed" +sync + +echo "INFO Finalizing Rootfs creation" +sh scripts/finalize.sh + +echo "INFO Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "INFO Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "INFO Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "INFO Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "INFO Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "INFO Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "INFO Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "INFO Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "INFO Squash filesystem created" +echo "INFO Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "INFO Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" From b1bca506ec2c780c56506ef74fe004d0fe0a9eef Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 4 May 2020 10:38:14 +0200 Subject: [PATCH 613/673] Revert "Revert "Update Shairport-Sync to 3.3.6"" This reverts commit 4ea2d24f9a98aaa5ab56bf5ecbfbd6f3dc19bc05. --- scripts/volumioconfig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 99bc078a9..327f276b1 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -260,9 +260,9 @@ if [ $(uname -m) = armv7l ] || [ $(uname -m) = aarch64 ]; then update-rc.d upmpdcli remove echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-arm.deb - dpkg -i shairport-sync_3.3.5-arm.deb - rm shairport-sync_3.3.5-arm.deb + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.6-arm.deb + dpkg -i shairport-sync_3.3.6-arm.deb + rm shairport-sync_3.3.6-arm.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-arm.tar.gz @@ -380,9 +380,9 @@ elif [ $(uname -m) = i686 ] || [ $(uname -m) = x86 ] || [ $(uname -m) = x86_64 ] rm /libupnp6_1.6.20.jfd5-1_i386.deb echo "Installing Shairport-Sync" - wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.5-i386.deb - dpkg -i shairport-sync_3.3.5-i386.deb - rm shairport-sync_3.3.5-i386.deb + wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync_3.3.6-i386.deb + dpkg -i shairport-sync_3.3.6-i386.deb + rm shairport-sync_3.3.6-i386.deb echo "Installing Shairport-Sync Metadata Reader" wget http://repo.volumio.org/Volumio2/Binaries/shairport-sync-metadata-reader-i386.tar.gz From 7d928e39b1b04295acc04daccdfa85dbce8a2539 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 4 May 2020 20:22:30 +0200 Subject: [PATCH 614/673] Fix of baud rate issues for PI models < 1.3 --- scripts/raspberryconfig.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d01a9f52a..b43f3e6f6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -172,6 +172,10 @@ wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rp dpkg -i firmware-brcm80211_20190114-1+rpt6_all.deb rm firmware-brcm80211_20190114-1+rpt6_all.deb +# Fix of baud rate issues for PI models < 1.3 +# reference https://github.com/balena-os/balena-raspberrypi/issues/476 +sed -i -e 's/921600/460800/g' /usr/bin/btuart + if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/bcm2708-rpi-0-w.dtb From ac2a0afddd424ea15d982b8c75eeec3a8648a313 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 5 May 2020 18:00:35 +0200 Subject: [PATCH 615/673] Revert "Fix of baud rate issues for PI models < 1.3" This reverts commit 7d928e39b1b04295acc04daccdfa85dbce8a2539. --- scripts/raspberryconfig.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b43f3e6f6..d01a9f52a 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -172,10 +172,6 @@ wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rp dpkg -i firmware-brcm80211_20190114-1+rpt6_all.deb rm firmware-brcm80211_20190114-1+rpt6_all.deb -# Fix of baud rate issues for PI models < 1.3 -# reference https://github.com/balena-os/balena-raspberrypi/issues/476 -sed -i -e 's/921600/460800/g' /usr/bin/btuart - if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" wget -P /boot/. https://github.com/Hexxeh/rpi-firmware/raw/$FIRMWARE_COMMIT/bcm2708-rpi-0-w.dtb From dc48af46aea9758cff2205a114e386bfa1349b95 Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 12 May 2020 10:44:03 +0000 Subject: [PATCH 616/673] Align default mpd.conf --- volumio/etc/mpd.conf | 60 ++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/volumio/etc/mpd.conf b/volumio/etc/mpd.conf index fe1d1fefc..05d094d1c 100755 --- a/volumio/etc/mpd.conf +++ b/volumio/etc/mpd.conf @@ -1,24 +1,24 @@ # Volumio MPD Configuration File # Files and directories ####################################################### -music_directory "/var/lib/mpd/music" -playlist_directory "/var/lib/mpd/playlists" -db_file "/var/lib/mpd/tag_cache" -log_file "/var/log/mpd.log" -#pid_file "/var/run/mpd/pid" -#state_file "/var/lib/mpd/state" +music_directory "/var/lib/mpd/music" +playlist_directory "/var/lib/mpd/playlists" +db_file "/var/lib/mpd/tag_cache" +log_file "/var/log/mpd.log" +#pid_file "/var/run/mpd/pid" +#state_file "/var/lib/mpd/state" #sticker_file "/var/lib/mpd/sticker.sql" ############################################################################### # General music daemon options ################################################ -user "mpd" +user "mpd" group "audio" -bind_to_address "any" -#port "6600" -#log_level "default" -gapless_mp3_playback "no" -#save_absolute_paths_in_playlists "no" -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" +bind_to_address "any" +#port "6600" +#log_level "default" +gapless_mp3_playback "no" +#save_absolute_paths_in_playlists "no" +#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" auto_update "yes" #auto_update_depth "3" ############################################################################### @@ -38,23 +38,42 @@ input { # Decoder ################################################################ + + + ############################################################################### # Audio Output ################################################################ + +resampler { + plugin "soxr" + quality "high" + threads "1" +} + audio_output { - type "alsa" - name "alsa" - device "hw:0,0" + type "alsa" + name "alsa" + device "hw:0,0" + dop "no" + + + + } + + + + audio_output { type "fifo" enabled "no" name "multiroom" - path "/tmp/snapfifo" + path "/tmp/snapfifo" format "44100:16:2" -} +} #replaygain "album" #replaygain_preamp "0" @@ -62,8 +81,8 @@ volume_normalization "no" ############################################################################### # MPD Internal Buffering ###################################################### -audio_buffer_size "2048" -buffer_before_play "10%" +audio_buffer_size "2048" +buffer_before_play "10%" ############################################################################### @@ -79,4 +98,3 @@ max_output_buffer_size "81920" filesystem_charset "UTF-8" id3v1_encoding "UTF-8" ############################################################################### - From b9cd485c2d7861a79d18f42ff0fdb052338b2239 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 14 May 2020 11:25:22 +0200 Subject: [PATCH 617/673] Allow volumio user to access GPIOs --- volumio/etc/udev/rules.d/92-gpio.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/etc/udev/rules.d/92-gpio.rules b/volumio/etc/udev/rules.d/92-gpio.rules index 29cc6d8db..35644a7b1 100644 --- a/volumio/etc/udev/rules.d/92-gpio.rules +++ b/volumio/etc/udev/rules.d/92-gpio.rules @@ -1,2 +1,2 @@ -SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", -KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'" +SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", +KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'" From cde99dfb99cfbfe77ce5b0166824c2c1b440131d Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 11 Jun 2020 14:38:50 +0200 Subject: [PATCH 618/673] Add sync command to rebootfile mode --- scripts/initramfs/init.nextarm | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/initramfs/init.nextarm b/scripts/initramfs/init.nextarm index 65cf09134..f9c86b727 100755 --- a/scripts/initramfs/init.nextarm +++ b/scripts/initramfs/init.nextarm @@ -89,6 +89,7 @@ do_reboot() { mkdir /boot mount -t vfat ${BOOTPART} /boot echo "" > /boot/executereboot + sync umount /boot rm -r /boot ;; From 90c70fc439e249a628811f2cde9cff94a68bdedd Mon Sep 17 00:00:00 2001 From: gvolt <36240972+gvolt@users.noreply.github.com> Date: Wed, 17 Jun 2020 21:55:09 +0200 Subject: [PATCH 619/673] Repair 92-gpio.rules Corrected wrong line feeds causing 92-gpio.rules to fail with error message "invalid key/value pair in file /etc/udev/rules.d/92-gpio.rules on line 1,starting at character 226 (' ')" --- volumio/etc/udev/rules.d/92-gpio.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/etc/udev/rules.d/92-gpio.rules b/volumio/etc/udev/rules.d/92-gpio.rules index 35644a7b1..e1610014f 100644 --- a/volumio/etc/udev/rules.d/92-gpio.rules +++ b/volumio/etc/udev/rules.d/92-gpio.rules @@ -1,2 +1,2 @@ -SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", -KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'" +SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" +SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'" From 180de29954c53f9c847e9c8c362c9779876301fa Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 29 Jun 2020 22:12:31 +0200 Subject: [PATCH 620/673] PI kernel 5.4.49 --- scripts/raspberryconfig.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index d01a9f52a..83f65536e 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,7 +67,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="4.19.86" +KERNEL_VERSION="5.4.49" case $KERNEL_VERSION in "4.4.9") @@ -135,6 +135,12 @@ case $KERNEL_VERSION in KERNEL_COMMIT="b9ecbe8d0e3177afed08c54fc938938100a0b73f" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "5.4.49") + KERNEL_REV="1323" + KERNEL_COMMIT="da3752a358a86014cdcce5fc3be5b18d7ec074c4" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; + esac # using rpi-update relevant to defined kernel version From a1b0771d663e60c6d9c78ed9126402df186b4e4d Mon Sep 17 00:00:00 2001 From: Oliver Gassner Date: Thu, 9 Jul 2020 14:44:07 +0200 Subject: [PATCH 621/673] fix volumiologrotate if subfolders exist inside LOG_FOLDER. after installation of squeezeboxserver i got error in journalctl because your logrotate doesn't recognize subfolders like /var/log/squeezeboxserver in LOG_FOLDER (/var/log/). no idea if find is the best solution to only check files but it solves the error. --- volumio/bin/volumiologrotate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volumio/bin/volumiologrotate b/volumio/bin/volumiologrotate index ca176cd37..7115093f7 100755 --- a/volumio/bin/volumiologrotate +++ b/volumio/bin/volumiologrotate @@ -4,7 +4,7 @@ LOG_FOLDER=/var/log MAX_TOTAL_LOG_SIZE=18000000 function clearLogs { - for LOG_FILE in "$LOG_FOLDER"/* + for LOG_FILE in $(find $LOG_FOLDER -type f); do SIZE=`ls -la "$LOG_FILE" | cut -d' ' -f 5 ` if [[ ${SIZE} -gt 0 ]];then @@ -16,7 +16,7 @@ function clearLogs { function checkLogFilesTotalSize { TOTAL_LOG_SIZE=0 - for LOG_FILE in "$LOG_FOLDER"/* + for LOG_FILE in $(find $LOG_FOLDER -type f); do SIZE=`ls -la "$LOG_FILE" | cut -d' ' -f 5 ` if [[ ${SIZE} -gt 0 ]];then From 5a04086004748238fefd10bdb590242933f484b5 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 14 Jul 2020 18:17:57 +0200 Subject: [PATCH 622/673] PI 5.4.51 --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 83f65536e..c687cb080 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -135,9 +135,9 @@ case $KERNEL_VERSION in KERNEL_COMMIT="b9ecbe8d0e3177afed08c54fc938938100a0b73f" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - "5.4.49") - KERNEL_REV="1323" - KERNEL_COMMIT="da3752a358a86014cdcce5fc3be5b18d7ec074c4" + "5.4.51") + KERNEL_REV="1325" + KERNEL_COMMIT="8382ece2b30be0beb87cac7f3b36824f194d01e9" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; From bfebd742d4a42c3766d46110def677bf9f20725c Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 15 Jul 2020 14:04:18 +0200 Subject: [PATCH 623/673] PI Kernel 4.19.188 --- scripts/raspberryconfig.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index c687cb080..c5d2cbcc2 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -67,7 +67,7 @@ touch /boot/start.elf mkdir /lib/modules -KERNEL_VERSION="5.4.49" +KERNEL_VERSION="4.19.118" case $KERNEL_VERSION in "4.4.9") @@ -135,6 +135,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="b9ecbe8d0e3177afed08c54fc938938100a0b73f" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; + "4.19.118") + KERNEL_REV="1311" + KERNEL_COMMIT="e1050e94821a70b2e4c72b318d6c6c968552e9a2" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; "5.4.51") KERNEL_REV="1325" KERNEL_COMMIT="8382ece2b30be0beb87cac7f3b36824f194d01e9" @@ -208,7 +213,7 @@ hdmi_force_hotplug=1 include userconfig.txt" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0 snd-bcm2835.enable_compat_alsa=0" >> /boot/cmdline.txt echo "adding gpio & spi group and permissions" groupadd -f --system gpio From 859858f6eee0b4de0db7aa9e3dc878e08afe0fa3 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 16 Jul 2020 14:04:23 +0200 Subject: [PATCH 624/673] Triggerhappy instead of xbindkeys for media controls --- recipes/arm.conf | 2 +- recipes/armv7.conf | 2 +- recipes/x86.conf | 2 +- scripts/configure.sh | 2 ++ scripts/volumioconfig.sh | 21 ------------------- .../etc/triggerhappy/triggers.d/audio.conf | 20 ++++++++++++++++++ 6 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 volumio/etc/triggerhappy/triggers.d/audio.conf diff --git a/recipes/arm.conf b/recipes/arm.conf index 0a42cf246..2c18f57fb 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -55,7 +55,7 @@ components=main non-free suite=jessie [Accessories] -packages=autossh xbindkeys sg3-utils +packages=autossh sg3-utils triggerhappy source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/armv7.conf b/recipes/armv7.conf index 66fe66434..077ad214f 100644 --- a/recipes/armv7.conf +++ b/recipes/armv7.conf @@ -55,7 +55,7 @@ components=main non-free suite=jessie [Accessories] -packages=autossh xbindkeys +packages=autossh triggerhappy source=http://ftp.nl.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 015cfaa9f..7773f9cea 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -74,7 +74,7 @@ components=main non-free suite=jessie [Accessories] -packages=autossh xbindkeys sg3-utils +packages=autossh sg3-utils triggerhappy source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/scripts/configure.sh b/scripts/configure.sh index d2b39f59c..763191dbf 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -101,6 +101,8 @@ cp volumio/bin/volumio_cpu_tweak build/$BUILD/root/bin/volumio_cpu_tweak chmod a+x build/$BUILD/root/bin/volumio_cpu_tweak #LAN HOTPLUG cp volumio/etc/default/ifplugd build/$BUILD/root/etc/default/ifplugd +#TRIGGERHAPPY +cp -r volumio/etc/triggerhappy build/$BUILD/root/etc/triggerhappy echo 'Done Copying Custom Volumio System Files' diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 327f276b1..fb54e7bcf 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -583,24 +583,3 @@ rm /etc/avahi/services/udisks.service echo "Setting CPU governor to performance" echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils -##################### -#Multimedia Keys#----------------------------------------- -##################### - -echo "Configuring xbindkeys" - -echo '"/usr/local/bin/volumio toggle" - XF86AudioPlay -"/usr/local/bin/volumio previous" - XF86AudioPrev -"/usr/local/bin/volumio next" - XF86AudioNext -"/usr/local/bin/volumio volume toggle" - XF86AudioMute -"/usr/local/bin/volumio volume minus" - XF86AudioLowerVolume -"/usr/local/bin/volumio volume plus" - XF86AudioRaiseVolume' > /etc/xbindkeysrc - -echo "Enabling xbindkeys" -ln -s /lib/systemd/system/xbindkeysrc.service /etc/systemd/system/multi-user.target.wants/xbindkeysrc.service diff --git a/volumio/etc/triggerhappy/triggers.d/audio.conf b/volumio/etc/triggerhappy/triggers.d/audio.conf new file mode 100644 index 000000000..95aded33f --- /dev/null +++ b/volumio/etc/triggerhappy/triggers.d/audio.conf @@ -0,0 +1,20 @@ +#VOLUMIO TRIGGERHAPPY CONFIGURATION FILE + +#MUTE TOGGLE +KEY_MIN_INTERESTING 1 /usr/local/bin/volumio volume toggle + +#VOLUME UP +KEY_VOLUMEUP 1 /usr/local/bin/volumio volume plus + +#VOLUME DOWN +KEY_VOLUMEDOWN 1 /usr/local/bin/volumio volume minus + +#PLAY PAUSE TOGGLE +KEY_PLAYPAUSE 1 /usr/local/bin/volumio toggle + +#NEXT +KEY_NEXTSONG 1 /usr/local/bin/volumio next + +#PREVIOUS +KEY_PREVIOUSSONG 1 /usr/local/bin/volumio previous + From 79c2e7e29d04526018e922852ec460ffc0707dd1 Mon Sep 17 00:00:00 2001 From: Volumio Date: Thu, 16 Jul 2020 17:31:42 +0200 Subject: [PATCH 625/673] Update configure.sh --- scripts/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index 763191dbf..4b7140686 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -102,7 +102,7 @@ chmod a+x build/$BUILD/root/bin/volumio_cpu_tweak #LAN HOTPLUG cp volumio/etc/default/ifplugd build/$BUILD/root/etc/default/ifplugd #TRIGGERHAPPY -cp -r volumio/etc/triggerhappy build/$BUILD/root/etc/triggerhappy +cp -r volumio/etc/triggerhappy build/$BUILD/root/etc echo 'Done Copying Custom Volumio System Files' From cd7eeb153e7890304b393612205e7f6dd826df54 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 20 Jul 2020 21:08:10 +0000 Subject: [PATCH 626/673] Use wext only for nanopineo2 --- volumio/bin/wireless.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/volumio/bin/wireless.js b/volumio/bin/wireless.js index cfd32fdbe..9f7b4f7f3 100755 --- a/volumio/bin/wireless.js +++ b/volumio/bin/wireless.js @@ -20,10 +20,11 @@ var ifdeconfig = "sudo ip addr flush dev " + wlan + " && sudo ifconfig " + wlan var execSync = require('child_process').execSync; var ifconfig = require('/volumio/app/plugins/system_controller/network/lib/ifconfig.js'); var wirelessEstablishedOnceFlagFile = '/data/flagfiles/wirelessEstablishedOnce'; +var wirelessWPADriver = getWirelessWPADriverString(); if (debug) { - var wpasupp = "wpa_supplicant -d -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; + var wpasupp = "wpa_supplicant -d -s -B -D" + wirelessWPADriver + " -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; } else { - var wpasupp = "wpa_supplicant -s -B -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; + var wpasupp = "wpa_supplicant -s -B -D" + wirelessWPADriver + " -c/etc/wpa_supplicant/wpa_supplicant.conf -i" + wlan; } function kill(process, callback) { @@ -351,4 +352,19 @@ function hasWirelessConnectionBeenEstablishedOnce() { } catch(err) {} return wirelessEstablished +} + +function getWirelessWPADriverString() { + try { + var volumioHW = execSync("cat /etc/os-release | grep ^VOLUMIO_HARDWARE | tr -d 'VOLUMIO_HARDWARE=\"'", { uid: 1000, gid: 1000, encoding: 'utf8'}).replace('\n',''); + } catch(e) { + var volumioHW = 'none'; + } + var fullDriver = 'nl80211,wext'; + var onlyWextDriver = 'wext'; + if (volumioHW === 'nanopineo2') { + return onlyWextDriver + } else { + return fullDriver + } } \ No newline at end of file From 75c1353a593e665573ce8983ecbc50aa3b51114a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 21 Jul 2020 17:52:18 +0200 Subject: [PATCH 627/673] Build repo incl. board-configurable installer --- installer/README.md | 51 ++++ installer/board-config/motivo/board-functions | 26 ++ .../board-config/motivo/mkinstall_config.sh | 115 ++++++++ installer/board-config/mp1/board-functions | 28 ++ .../board-config/mp1/mkinstall_config.sh | 82 ++++++ installer/mkinitrd.sh | 25 ++ installer/mkinstaller.sh | 263 ++++++++++++++++++ installer/runtime-generic/gen-functions | 164 +++++++++++ installer/runtime-generic/init-script | 97 +++++++ scripts/initramfs/mkinitramfs-custom.sh | 9 +- 10 files changed, 858 insertions(+), 2 deletions(-) create mode 100644 installer/README.md create mode 100644 installer/board-config/motivo/board-functions create mode 100644 installer/board-config/motivo/mkinstall_config.sh create mode 100644 installer/board-config/mp1/board-functions create mode 100644 installer/board-config/mp1/mkinstall_config.sh create mode 100755 installer/mkinitrd.sh create mode 100755 installer/mkinstaller.sh create mode 100644 installer/runtime-generic/gen-functions create mode 100644 installer/runtime-generic/init-script diff --git a/installer/README.md b/installer/README.md new file mode 100644 index 000000000..e56f381ee --- /dev/null +++ b/installer/README.md @@ -0,0 +1,51 @@ +NOTE: The structure will likely need modification to fit in with the refactoring of the +build process when this has been completed. + +**Usage** + +~~~ +./mkinstaller.sh -d -v -f +~~~ + +where currently supported devices are **Volumio MP1** and **Volumio Motivo** + + +**Build Process** +It consists of 4 components: + +*mkinstaller.sh* +This is the main build script. +It creates an autoinstaller image with +- a kernel +- an initramfs (incl. scripts and config) +- the tarbal with the contents of the volumio image's boot partition +- the volumiocurrent.sqsh +- the bootloader files (u-boot) + +*mkinstaller_config.sh* +Device-specific mkinstaller configuration and script functions + +*mkinitrd.sh* +A build script running in chroot. +It creates the runtime, board-specific initramfs, which acts as the "autoinstaller" + +**Runtime Process** +The runtime autoinstaller is an image, which can be flashed to an SD card. +The image will load nothing more than a kernel and an initramfs, it does not have a rootfs. +The initramfs is board-specific and is made up of: + +*init_script* +This is the main init script within the initramfs. +It mounts the boot partiton of the autoinstaller, loads the necessary modules, checks whether UUID are used and checks whether the target device has been brought up. +It clears all existing partitions, creates the boot and imgpart partitions according to the config, and the data partiton taking the rest of the disk device. +It mounts the 3 partitions and unpacks the boot partiton tarbal and copies the .sqsh file to the image partition. When UUIDs are used in the boot configuration, they will be replaced by the ones from the newly created partitions. + +Process start and finish will be notified by the led functions (board-specific). + +*gen-functions* +These are generic script functions, used by the init script. +It is the same for each installer. + +*board-functions* +These are the board-specific function, used by the init scripts. +Example: write_device_bootloader, which is different for most boards. diff --git a/installer/board-config/motivo/board-functions b/installer/board-config/motivo/board-functions new file mode 100644 index 000000000..a814f38e0 --- /dev/null +++ b/installer/board-config/motivo/board-functions @@ -0,0 +1,26 @@ + +#mandatory function +write_device_bootloader() +{ + echo "[info] Flashing u-boot" + dd if=$BOOT/u-boot/sunxi-spl.bin of=$1 bs=8k seek=1 conv=fsync + dd if=$BOOT/u-boot/u-boot.itb of=$1 bs=8k seek=5 conv=fsync +} + +led_show_init_signal() +{ + : +} + +led_show_start_signal() +{ + /usr/bin/i2crw1 w 33 51 1 0 0 + /usr/bin/i2crw1 w 33 20 4 +} + +led_show_finish_signal() +{ + /usr/bin/i2crw1 w 33 51 0 1 0 + /usr/bin/i2crw1 w 33 21 1 +} + diff --git a/installer/board-config/motivo/mkinstall_config.sh b/installer/board-config/motivo/mkinstall_config.sh new file mode 100644 index 000000000..20350578d --- /dev/null +++ b/installer/board-config/motivo/mkinstall_config.sh @@ -0,0 +1,115 @@ +#!/bin/bash + +# Device Info +DEVICEBASE="motivo" +BOARDFAMILY=${DEVICE} +PLATFORMREPO="https://github.com/volumio/platform-motivo.git" +PATCHREPO="https://github.com/volumio/motivo-patch" +MOTIVOPATCH="motivo-patch" +BUILD="armv7" +NONSTANDARD_REPO=yes # yes requires "non_standard_repo() function in make.sh +LBLBOOT="BOOT" +LBLIMAGE="volumio" +LBLDATA="volumio_data" + + +# Partition Info +BOOT_TYPE=msdos # msdos or gpt +BOOT_START=21 +BOOT_END=64 +IMAGE_END=2500 +BOOT=/mnt/boot +BOOTDELAY= +BOOTDEV="mmcblk0" +BOOTPART=/dev/mmcblk0p1 + +BOOTCONFIG= +TARGETBOOT="/dev/mmcblk2p1" +TARGETDEV="/dev/mmcblk2" +TARGETDATA="/dev/mmcblk2p3" +TARGETIMAGE="/dev/mmcblk2p2" +HWDEVICE="SOPine64-Motivo" +USEKMSG="yes" +UUIDFMT= + + +# Modules to load (as a blank separated string array) +MODULES=("nls_cp437") + +# Additional packages to install (as a blank separated string array) +#PACKAGES=("") + +# initramfs type +RAMDISK_TYPE=image # image or gzip (ramdisk image = uInitrd, gzip compressed = volumio.initrd) + +non_standard_repo() +{ + HAS_PLTDIR=no + if [ -d ${PLTDIR} ]; then + pushd ${PLTDIR} + if [ -d ${BOARDFAMILY} ]; then + HAS_PLTDIR=yes + fi + popd + fi + if [ $HAS_PLTDIR == no ]; then + # This should normally not happen, just handle it for safety + if [ -d ${PLTDIR} ]; then + rm -r ${PLTDIR} + fi + echo "[info] Clone platform files from repo" + git clone $PLATFORMREPO + echo "[info] Unpacking the platform files" + pushd $PLTDIR + tar xfJ ${BOARDFAMILY}.tar.xz + rm $BOARDFAMILY.tar.xz + popd + fi + + + if [ ! -d ${SRC/$MOTIVOPATCH} ]; then + echo " [info] Clone motivo patches" + git clone $PATCHREPO + fi + +} + +write_device_files() +{ + mkdir /mnt/volumio/rootfs/boot/dtb + cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot + cp -R ${PLTDIR}/${BOARDFAMILY}/boot/dtb/* $ROOTFSMNT/boot/dtb + + echo "[info] Creating boot.scr image" + cp ${PLTDIR}/${BOARDFAMILY}/boot/boot.cmd /$ROOTFSMNT/boot + mkimage -C none -A arm -T script -d ${PLTDIR}/${BOARDFAMILY}/boot/boot.cmd $ROOTFSMNT/boot/boot.scr +} + +write_device_bootloader() +{ + dd if=${PLTDIR}/${BOARDFAMILY}/u-boot/sunxi-spl.bin of=${LOOP_DEV} conv=fsync bs=8k seek=1 + dd if=${PLTDIR}/${BOARDFAMILY}/u-boot/u-boot.itb of=${LOOP_DEV} conv=fsync bs=8k seek=5 +} + +write_boot_parameters() +{ + echo "console=serial +panel_model=feiyang +kernel_filename=Image +initrd_filename=uInitrd +fdtfile=allwinner/sun50i-a64-motivo-baseboard.dtb +bootpart-sd=rebootmode=normal +hwdevice=hwdevice=SOPine64-Motivo +overlay_prefix=sun50i-a64 +" > /mnt/volumio/rootfs/boot/uEnv.txt + +} + +copy_device_bootloader_files() +{ +mkdir /mnt/volumio/rootfs/boot/u-boot +cp ${PLTDIR}/${BOARDFAMILY}/u-boot/sunxi-spl.bin $ROOTFSMNT/boot/u-boot +cp ${PLTDIR}/${BOARDFAMILY}/u-boot/u-boot.itb $ROOTFSMNT/boot/u-boot +} + + diff --git a/installer/board-config/mp1/board-functions b/installer/board-config/mp1/board-functions new file mode 100644 index 000000000..fd989e34d --- /dev/null +++ b/installer/board-config/mp1/board-functions @@ -0,0 +1,28 @@ + +#mandatory function +write_device_bootloader() +{ + echo "[info] Flashing u-boot" + dd if=$BOOT/u-boot/u-boot.VIM3L.sd.bin of=$1 bs=444 count=1 conv=fsync + dd if=$BOOT/u-boot/u-boot.VIM3L.sd.bin of=$1 bs=512 skip=1 seek=1 conv=fsync +} + +led_show_init_signal() +{ + echo heartbeat > /sys/class/leds/sys_led/trigger +} + +led_show_start_signal() +{ + echo none > /sys/class/leds/sys_led/trigger + echo heartbeat > /sys/class/leds/sys_led/trigger + sleep 0.5 + echo heartbeat > /sys/class/leds/red_red/trigger +} + +led_show_finish_signal() +{ + echo none > /sys/class/leds/red_red/trigger + echo default-on > /sys/class/leds/sys_led/trigger +} + diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh new file mode 100644 index 000000000..c6d245a76 --- /dev/null +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +# Device Info +DEVICEBASE="khadas" +BOARDFAMILY="vims" +PLATFORMREPO="https://github.com/volumio/platform-khadas.git" +BUILD="armv7" +NONSTANDARD_REPO=no # yes requires "non_standard_repo() function in make.sh +LBLBOOT="VBOOT" +LBLIMAGE="VIMAGE" +LBLDATA="VDATA" + +# Partition Info +BOOT_TYPE=msdos # msdos or gpt +BOOT_START=16 +BOOT_END=80 +IMAGE_END=2580 +BOOT=/mnt/boot +BOOTDELAY=1 +BOOTDEV="mmcblk1" +BOOTPART=/dev/mmcblk1p1 +BOOTCONFIG=env.system.txt + +TARGETBOOT="/dev/mmcblk0p1" +TARGETDEV="/dev/mmcblk0" +TARGETDATA="/dev/mmcblk0p3" +TARGETIMAGE="/dev/mmcblk0p2" +HWDEVICE= +USEKMSG="yes" +UUIDFMT="yes" # yes|no (actually, anything non-blank) + + +# Modules to load (as a blank separated string array) +MODULES=("nls_cp437") + +# Additional packages to install (as a blank separated string array) +#PACKAGES=("") + +# initramfs type +RAMDISK_TYPE=image # image or gzip (ramdisk image = uInitrd, gzip compressed = volumio.initrd) + +non_standard_repo() +{ + : +} + +write_device_files() +{ + cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot + cp ${PLTDIR}/${BOARDFAMILY}/boot/boot.ini $ROOTFSMNT/boot + cp ${PLTDIR}/${BOARDFAMILY}/boot/env.txt $ROOTFSMNT/boot + + mkdir /mnt/volumio/rootfs/boot/dtb + cp -R ${PLTDIR}/${BOARDFAMILY}/boot/dtb/* $ROOTFSMNT/boot/dtb +} + +write_device_bootloader() +{ + dd if=${PLTDIR}/${BOARDFAMILY}/uboot/u-boot.VIM3L.sd.bin of=${LOOP_DEV} bs=444 count=1 conv=fsync + dd if=${PLTDIR}/${BOARDFAMILY}/uboot/u-boot.VIM3L.sd.bin of=${LOOP_DEV} bs=512 skip=1 seek=1 conv=fsync + +} + +copy_device_bootloader_files() +{ + mkdir /mnt/volumio/rootfs/boot/u-boot + cp ${PLTDIR}/${BOARDFAMILY}/uboot/u-boot.VIM3L.sd.bin $ROOTFSMNT/boot/u-boot +} + +write_boot_parameters() +{ + echo " +BOOTARGS_USER=loglevel=0 quiet splash bootdelay=1 +bootpart=/dev/mmcblk1p1 +imgpart=/dev/mmcblk1p2 +datapart=/dev/mmcblk1p3 +" > $ROOTFSMNT/boot/env.system.txt +} + + + + diff --git a/installer/mkinitrd.sh b/installer/mkinitrd.sh new file mode 100755 index 000000000..c085e4c49 --- /dev/null +++ b/installer/mkinitrd.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +source /config.sh + +if [ ! "x${PACKAGES}" == "x" ]; then + echo "[info] Adding board-specific packages" + apt-get update + apt-get install -y "${PACKAGES[@]}" +fi + +echo "[info] Adding custom modules" +mod_list=$(printf "%s\n" "${MODULES[@]}") +cat <<-EOF >> /etc/initramfs-tools/modules +# Volumio modules +${mod_list} +EOF + +echo "[info] Changing to 'modules=list'" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + + + diff --git a/installer/mkinstaller.sh b/installer/mkinstaller.sh new file mode 100755 index 000000000..c8f021894 --- /dev/null +++ b/installer/mkinstaller.sh @@ -0,0 +1,263 @@ +#!/bin/bash + +SRC="$(pwd)" + +while getopts ":d:v:f:" opt; do + case $opt in + d) + DEVICE=$OPTARG + ;; + v) + VERSION=$OPTARG + ;; + f) + if [ ! -f $OPTARG ]; then + echo "[err] Volumio image $OPTARG does not exist, aborting..." + exit 1 + else + FILENAME=$(basename "$OPTARG" ".zip") + VOLUMIOIMAGE=$(dirname "$VOLUMIOIMAGE")/$(basename "$OPTARG" ".zip") + if [ ! -f $VOLUMIOIMAGE ]; then + unzip $OPTARG + echo "[err] Volumio image $VOLUMIOIMAGE does not exist, aborting..." + exit + fi + fi + ;; + esac +done + +if [ "x${DEVICE}" == "x" ]; then + echo "[err] No device specified, aborting..." + exit 1 +fi + +if [ "x${VOLUMIOIMAGE}" == "x" ]; then + echo "[err] No Volumio image supplied, aborting..." + exit 1 +fi + +if [ "x${VERSION}" == "x" ]; then + echo "[warn] Warning: no flash image version supplied, continuing..." +fi + +source "${SRC}/installer/board-config/${DEVICE}/mkinstall_config.sh" + +PLTDIR="$SRC/platform-${DEVICEBASE}" +if [ -d "$SRC/build/$BUILD" ]; then + if [ ! -d "${PLTDIR}" ]; then + echo "No platform folder present, please build a volumio device image first" + exit 1 + fi +else + echo "No ${BUILD} rootfs present, please build an image first" + exit 1 +fi + +BUILDDATE=$(date -I) +IMG_FILE="AutoFlash${VERSION}-${BUILDDATE}-${DEVICE}.img" +VOLMNT=/mnt/volumio + +echo "[Stage 1] Creating AutoFlash Image File ${IMG_FILE}" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=1000 + +echo "[info] Creating Image Bed" +LOOP_DEV=`losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware +parted -s "${LOOP_DEV}" mklabel ${BOOT_TYPE} +parted -s "${LOOP_DEV}" mkpart primary fat16 21 100% +parted -s "${LOOP_DEV}" set 1 boot on +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +FLASH_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +if [ ! -b "${FLASH_PART}" ] +then + echo "[err] ${FLASH_PART} doesn't exist" + exit 1 +fi + +echo "[info] Creating boot and rootfs filesystem" +mkfs -t vfat -n BOOT "${FLASH_PART}" + +echo "[info] Preparing for the kernel/ platform files" +if [ ! "x$NONSTANDARD_REPO" == "x" ]; then + non_standard_repo +else + HAS_PLTDIR=no + if [ -d ${PLTDIR} ]; then + pushd ${PLTDIR} + # it should not happen that the + if [ -d ${BOARDFAMILY} ]; then + HAS_PLTDIR=yes + fi + popd + fi + if [ $HAS_PLTDIR == no ]; then + # This should normally not happen, just handle it for safety + if [ -d ${PLTDIR} ]; then + rm -r ${PLTDIR} + fi + echo "[info] Clone platform files from repo" + git clone $PLATFORMREPO + echo "[info] Unpacking the platform files" + pushd $PLTDIR + tar xfJ ${BOARDFAMILY}.tar.xz + rm ${BOARDFAMILY}.tar.xz + popd + fi +fi + +echo "[info] Writing the bootloader" +write_device_bootloader + +sync + +echo "[info] Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "[info] /mount folder exist" +else + mkdir /mnt +fi +if [ -d $VOLMNT ] +then + echo "[info] Volumio Temp Directory Exists - Cleaning it" + rm -rf $VOLMNT/* +else + echo "[info] Creating Volumio Temp Directory" + mkdir $VOLMNT +fi + +echo "[info] Creating mount points" +ROOTFSMNT=$VOLMNT/rootfs +mkdir $ROOTFSMNT +mkdir $ROOTFSMNT/boot +mount -t vfat "${FLASH_PART}" $ROOTFSMNT/boot + +echo "[info] Copying RootFs" +cp -pdR ${SRC}/build/$BUILD/root/* $ROOTFSMNT +mkdir $ROOTFSMNT/root/scripts + +echo "[info] Copying initrd config" +echo "BOOT_TYPE=${BOOT_TYPE} +BOOT_START=${BOOT_START} +BOOT_END=${BOOT_END} +IMAGE_END=${IMAGE_END} +BOOT=${BOOT} +BOOTDELAY=${BOOTDELAY} +BOOTDEV=${BOOTDEV} +BOOTPART=${BOOTPART} +BOOTCONFIG=${BOOTCONFIG} +TARGETBOOT=${TARGETBOOT} +TARGETDEV=${TARGETDEV} +TARGETDATA=${TARGETDATA} +TARGETIMAGE=${TARGETIMAGE} +HWDEVICE=${HWDEVICE} +USEKMSG=${USEKMSG} +UUIDFMT=${UUIDFMT} +LBLBOOT=${LBLBOOT} +LBLIMAGE=${LBLIMAGE} +LBLDATA=${LBLDATA} +" > $ROOTFSMNT/root/scripts/initconfig.sh + +echo "[info] Copying initrd scripts" +cp ${SRC}/installer/board-config/${DEVICE}/board-functions $ROOTFSMNT/root/scripts +cp ${SRC}/installer/runtime-generic/gen-functions $ROOTFSMNT/root/scripts +cp ${SRC}/installer/runtime-generic/init-script $ROOTFSMNT/root/init +cp ${SRC}/installer/mkinitrd.sh $ROOTFSMNT + +echo "[info] Copying kernel modules" +cp -pdR ${PLTDIR}/$BOARDFAMILY/lib/modules $ROOTFSMNT/lib/ + +echo "[info] writing board-specific files" +write_device_files + +echo "[info] Writing board-specific boot parameters" +write_boot_parameters + +sync + +echo "[Stage 2] Run chroot to create an initramfs" +cp scripts/initramfs/mkinitramfs-custom.sh $ROOTFSMNT/usr/local/sbin + +echo " +RAMDISK_TYPE=${RAMDISK_TYPE} +MODULES=($(printf '\"%s\" ' "${MODULES[@]}")) +PACKAGES=($(printf '\"%s\" ' "${PACKAGES[@]}")) +" > $ROOTFSMNT/config.sh + + +mount /dev $ROOTFSMNT/dev -o bind +mount /proc $ROOTFSMNT/proc -t proc +mount /sys $ROOTFSMNT/sys -t sysfs + +chroot $ROOTFSMNT /bin/bash -x <<'EOF' +su - +/mkinitrd.sh +EOF + +if [ "x${RAMDISK_TYPE}" == "ximage" ]; then + echo "Creating uInitrd from 'volumio.initrd'" + mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d $ROOTFSMNT/boot/volumio.initrd $ROOTFSMNT/boot/uInitrd + rm $ROOTFSMNT/boot/volumio.initrd +fi + +#cleanup +rm -r $ROOTFSMNT/mkinitrd.sh $ROOTFSMNT/config.sh $ROOTFSMNT/root/init $ROOTFSMNT/root/scripts + +echo "[Stage 3] Creating Volumio boot & image data folder" +mkdir -p $ROOTFSMNT/boot/data/boot +mkdir -p $ROOTFSMNT/boot/data/image + +if [ -d /mnt/volumioimage ] +then + echo "[info] Volumio Image mountpoint exists - Cleaning it" + rm -rf /mnt/volumioimage/* +else + echo "[info] Creating Volumio Image mountpoint" + mkdir /mnt/volumioimage +fi + +echo "[info] Create loopdevice for mounting volumio image" +LOOP_DEV1=$(losetup -f) +losetup -P ${LOOP_DEV1} ${VOLUMIOIMAGE} +BOOT_PART=${LOOP_DEV1}p1 +IMAGE_PART=${LOOP_DEV1}p2 + +echo "[info] Mount volumio image partitions" +mkdir -p /mnt/volumioimage/boot +mkdir -p /mnt/volumioimage/image +mount -t vfat "${BOOT_PART}" /mnt/volumioimage/boot +mount -t ext4 "${IMAGE_PART}" /mnt/volumioimage/image + +copy_device_bootloader_files + +echo "[info] Copying 'raw' boot & image data" +#cd /mnt/volumioimage/boot +tar cfJ $ROOTFSMNT/boot/data/boot/kernel_current.tar.xz --exclude='resize-volumio-datapart' -C /mnt/volumioimage/boot . + +cp /mnt/volumioimage/image/* /mnt/volumio/rootfs/boot/data/image + +umount -l /mnt/volumioimage/boot +umount -l /mnt/volumioimage/image +rm -r /mnt/volumioimage + +echo "[info] Unmounting Temp devices" +umount -l $ROOTFSMNT/dev +umount -l $ROOTFSMNT/proc +umount -l $ROOTFSMNT/sys +umount -l $ROOTFSMNT/boot + +echo "[info] Removing Rootfs" +rm -r $ROOTFSMNT/* + +sync + +dmsetup remove_all +losetup -d ${LOOP_DEV1} +losetup -d ${LOOP_DEV} +echo "[info] Done..." +#rm $VOLUMIOIMAGE +sync diff --git a/installer/runtime-generic/gen-functions b/installer/runtime-generic/gen-functions new file mode 100644 index 000000000..17784ece8 --- /dev/null +++ b/installer/runtime-generic/gen-functions @@ -0,0 +1,164 @@ +#!/bin/sh + +# There are all mandatory, generic functions and form the center core of the autoflasher. +# (Board-specific functions belong in "board-functions". +# Generic functions should normally not change as this will impact other autoflashers. +# In case a modification of generic script is needed, the modified copy of the function +# should be added "board-functions" instead.- +# TODO: test it + + +parse_disk() +{ + if [ "$(echo $1|cut -c -5)" = "UUID=" ]; then + # $1 is a UUID + echo $(findfs $1) + elif [ "$(echo $1|cut -c -6)" = "LABEL=" ]; then + # $1 is a LABEL + echo $(findfs $1) + elif [ "$(echo $1|cut -c -5)" = "/dev/" ]; then + # $1 is a device name + echo $1 + else + # $1 is unrecognized. + echo "unknown-disk" + fi +} + +parse_cmdline() +{ + export CMDLINE="$(cat /proc/cmdline)" + for p in ${CMDLINE}; + do + key=${p%%=*} + value=${p#*=} + case $key in + bootdelay) + BOOTDELAY=$value + ;; + hwdevice) + HWDEVICE=$value + ;; + use_kmsg) + USEKMSG=$value + ;; + esac + done + + echo "[info] Starting AutoFlasher for ${HWDEVICE}" + echo "[info] BOOTDEV=${BOOTDEV}" + echo "[info] BOOTPART=${BOOTPART}" + echo "[info] BOOTCONFIG=${BOOTCONFIG}" + echo "[info] BOOTDELAY=${BOOTDELAY}" + echo "[info] HWDEVICE=${HWDEVICE}" + echo "[info] TARGETDEV=${TARGETDEV}" + echo "[info] TARGETBOOT=${TARGETBOOT}" + echo "[info] TARGETIMAGE=${TARGETIMAGE}" + echo "[info] TARGETDATA=${TARGETDATA}" + echo "[info] USEKMSG=${USEKMSG}" +} + +# Load custom modules +load_modules() +{ + echo "[info] Loading modules" + if [ -e /conf/modules ]; then + while read -r m; do + # Skip empty lines + if [ -z "$m" ]; then + continue + fi + # Skip comments + com=$(printf "%.1s" "${m}") + if [ "$com" = "#" ]; then + continue + fi + # shellcheck disable=SC2086 + modprobe $m + done < /conf/modules + fi +} + +# check if UUIDs are used for disk parsing +check_uuids() +{ + if [ ! "x${UUIDFMT}" == "x" ]; then + if [ $BOOTCONFIG == empty ]; then + echo "[error] when using UUIDs for disk parsing, you MUST also add the bootconfig parameter (eg. bootconfig=/extlinux/extlinux.conf)" + exec sh + exit 0 + fi + fi +} + +# make sure, uuids of boot, image and data partition match the boot script +swap_uuids() +{ + echo "[info] Extracting target partition UUIDs" + export UUID_BOOT=$(blkid -s UUID -o value ${TARGETBOOT}) + export UUID_IMAGE=$(blkid -s UUID -o value ${TARGETIMAGE}) + export UUID_DATA=$(blkid -s UUID -o value ${TARGETDATA}) + cp $BOOT/temp/boot/$BOOTCONFIG $BOOT/temp/boot/$BOOTCONFIG.old + sed -i "s/imgpart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/imgpart=UUID=${UUID_IMAGE}/g" $BOOT/temp/boot/${BOOTCONFIG} + sed -i "s/datapart=UUID=[a-fA-F0-9]\{8\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{4\}-[A-Fa-f0-9]\{12\}/datapart=UUID=${UUID_DATA}/g" $BOOT/temp/boot/${BOOTCONFIG} + sed -i "s/bootpart=UUID=[a-fA-F0-9]\{4\}-[a-fA-F0-9]\{4\}/bootpart=UUID=${UUID_BOOT}/g" $BOOT/temp/boot/${BOOTCONFIG} + sync +} + +mount_target_boot() +{ + echo "[info] Mounting boot and image partition" + mkdir -p $BOOT/temp/boot + mkdir -p $BOOT/temp/image + mount -t vfat ${TARGETBOOT} $BOOT/temp/boot + mount -t ext4 ${TARGETIMAGE} $BOOT/temp/image +} + +search_target_device() +{ +echo "[info] Checking if target device is up" +# Retry mdev -s 6 times before throwing the towel +for i in 1 2 3 4 5 6 + do + if [ ! -b "${TARGETDEV}" ]; then + echo "[info] ${TARGETDEV} not detected,retrying mdev in 0.5 seconds" + sleep 0.5 + mdev -s + else + break + fi + done + if [ ! -b "${TARGETDEV}" ]; then + print_msg "Device ${TARGETDEV} failed" + exec sh + fi +} + +clear_target_device() +{ + echo "[info] Removing existing partitions from target device" + partlist=$(parted -s ${TARGETDEV} print | awk 'f;/^Number/{f=1}' | awk '{print $1}' | grep -v '^$') + for partno in $partlist + do + echo "[....] removing partition ${partno}" + parted -s ${TARGETDEV} rm $partno + done + sync +} + +create_volumio_partitions() +{ + parted -s ${TARGETDEV} mklabel msdos + parted -s ${TARGETDEV} mkpart primary fat16 ${BOOT_START} ${BOOT_END} + parted -s ${TARGETDEV} mkpart primary ext3 ${BOOT_END} ${IMAGE_END} + parted -s ${TARGETDEV} mkpart primary ext3 ${IMAGE_END} 100% + parted -s ${TARGETDEV} set 1 boot on + partprobe ${TARGETDEV} + sync + + echo "[info] Creating partition filesystems" + mkfs.vfat -n $LBLBOOT ${TARGETBOOT} + mkfs.ext4 -F -L $LBLIMAGE ${TARGETIMAGE} + mkfs.ext4 -F -L $LBLDATA ${TARGETDATA} + sync +} diff --git a/installer/runtime-generic/init-script b/installer/runtime-generic/init-script new file mode 100644 index 000000000..e430fb3f0 --- /dev/null +++ b/installer/runtime-generic/init-script @@ -0,0 +1,97 @@ +#!/bin/sh + +# Default PATH differs between shells, and is not automatically exported +# by klibc dash. Make it consistent. +export PATH=/sbin:/usr/sbin:/bin:/usr/bin +export BOOT=/mnt/boot +export BOOTDELAY= +export BOOTDEV= +export BOOTCONFIG= +export TARGETBOOT= +export TARGETDEV= +export TARGETDATA= +export TARGETIMAGE= +export HWDEVICE= +export USE_KMSG="yes" +export UUIDFMT= + +[ -d /proc ] || mkdir /proc +mount -t proc none /proc +[ -d /sys ] || mkdir /sys +mount -t sysfs none /sys + +mknod /dev/null c 1 3 +mknod /dev/tty c 5 0 +[ -e /dev/console ] || mknod /dev/console c 5 1 + +mdev -s + +echo "[info] Including config script functions" +. /scripts/initconfig.sh +. /scripts/gen-functions +. /scripts/board-functions + +led_show_init_signal + +parse_cmdline + +load_modules + +check_uuids + +if [ ! -z "${BOOTDELAY}" ]; then + echo "[info] Boot delay (except first time) will be ${BOOTDELAY} seconds" +fi + +#Check if target device already up +search_target_device + +# Initialisation finished, start processing +led_show_start_signal + +[ -d /mnt ] || mkdir /mnt +mkdir ${BOOT} +mount -t vfat ${BOOTPART} ${BOOT} + +clear_target_device +create_volumio_partitions +write_device_bootloader ${TARGETDEV} +mount_target_boot + +echo "[info] Copying current image partition files" +cp $BOOT/data/image/* $BOOT/temp/image + +echo "[info] Copying volumio boot partition files (image, dtb, boot files etc.)" +#TODO tar xfJ $BOOT/data/boot/kernel_current.tar.xz -C $BOOT/temp/boot +tar xvfJ $BOOT/data/boot/kernel_current.tar.xz -C $BOOT/temp/boot +sync + + +if [ ! "x${UUIDFMT}" == "x" ]; then + echo "[info] Correcting UUID in boot configs" + swap_uuids +fi + +echo "[info] Syncing..." +sync +echo "[info] Remove temp folders" +umount $BOOT/temp/boot +umount $BOOT/temp/image +umount $BOOT +rm -r $BOOT +sync + + +#============================================================== +led_show_finish_signal + +umount /proc +umount /sys + +echo "[info] Installer program finished, please manually power off the unit and remove the SD card." +sh +while true +do +sleep 1 +done + diff --git a/scripts/initramfs/mkinitramfs-custom.sh b/scripts/initramfs/mkinitramfs-custom.sh index 38de9de43..cd3d8223b 100755 --- a/scripts/initramfs/mkinitramfs-custom.sh +++ b/scripts/initramfs/mkinitramfs-custom.sh @@ -413,10 +413,11 @@ fi DESTDIR=${DESTDIR_REAL} -echo "Adding findfs/ parted/ mkfs.ext4/ e2fsck to initramfs" +echo "Adding findfs/ parted/ mkfs.ext4/ mkfs.vfat/ e2fsck to initramfs" cp /sbin/parted "${DESTDIR}/sbin" cp /sbin/partprobe "${DESTDIR}/sbin" cp /sbin/mkfs.ext4 "${DESTDIR}/sbin" +cp /sbin/mkfs.vfat "${DESTDIR}/sbin" cp /sbin/e2fsck "${DESTDIR}/sbin" cp /sbin/resize2fs "${DESTDIR}/sbin" cp /sbin/findfs "${DESTDIR}/sbin" @@ -447,7 +448,11 @@ chmod +x /usr/local/sbin/volumio-init-updater cp /usr/local/sbin/volumio-init-updater "${DESTDIR}/sbin" #Manage the destdir folder removing the auto-generated scripts -rm -rf "${DESTDIR}/scripts" +rm -rf "${DESTDIR}/scripts/" +if [ -d /root/scripts ]; then + mkdir "${DESTDIR}/scripts" + cp /root/scripts/* "${DESTDIR}/scripts/" +fi cp /root/init "${DESTDIR}" #Creation of the initrd image From 4132bdb7962e3d6c56c68c0b3398d502a029ce41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 23 Jul 2020 11:26:57 +0200 Subject: [PATCH 628/673] Autoinstaller improvements --- .../board-config/motivo/mkinstall_config.sh | 5 ++- .../board-config/mp1/mkinstall_config.sh | 7 ++-- installer/mkinitrd.sh | 12 +++--- installer/mkinstaller.sh | 37 ++++++++----------- installer/runtime-generic/gen-functions | 2 +- installer/runtime-generic/init-script | 9 ++++- 6 files changed, 37 insertions(+), 35 deletions(-) diff --git a/installer/board-config/motivo/mkinstall_config.sh b/installer/board-config/motivo/mkinstall_config.sh index 20350578d..39f539958 100644 --- a/installer/board-config/motivo/mkinstall_config.sh +++ b/installer/board-config/motivo/mkinstall_config.sh @@ -31,13 +31,14 @@ TARGETIMAGE="/dev/mmcblk2p2" HWDEVICE="SOPine64-Motivo" USEKMSG="yes" UUIDFMT= +FACTORYCOPY="yes" # Modules to load (as a blank separated string array) -MODULES=("nls_cp437") +MODULES="nls_cp437" # Additional packages to install (as a blank separated string array) -#PACKAGES=("") +#PACKAGES="" # initramfs type RAMDISK_TYPE=image # image or gzip (ramdisk image = uInitrd, gzip compressed = volumio.initrd) diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh index c6d245a76..932d7f821 100644 --- a/installer/board-config/mp1/mkinstall_config.sh +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -28,13 +28,14 @@ TARGETIMAGE="/dev/mmcblk0p2" HWDEVICE= USEKMSG="yes" UUIDFMT="yes" # yes|no (actually, anything non-blank) +FACTORYCOPY="yes" # Modules to load (as a blank separated string array) -MODULES=("nls_cp437") +MODULES="nls_cp437" -# Additional packages to install (as a blank separated string array) -#PACKAGES=("") +# Additional packages to install (as a blank separated string) +#PACKAGES="" # initramfs type RAMDISK_TYPE=image # image or gzip (ramdisk image = uInitrd, gzip compressed = volumio.initrd) diff --git a/installer/mkinitrd.sh b/installer/mkinitrd.sh index c085e4c49..f940f7123 100755 --- a/installer/mkinitrd.sh +++ b/installer/mkinitrd.sh @@ -5,15 +5,15 @@ source /config.sh if [ ! "x${PACKAGES}" == "x" ]; then echo "[info] Adding board-specific packages" apt-get update - apt-get install -y "${PACKAGES[@]}" + apt-get install -y "${PACKAGES}" fi echo "[info] Adding custom modules" -mod_list=$(printf "%s\n" "${MODULES[@]}") -cat <<-EOF >> /etc/initramfs-tools/modules -# Volumio modules -${mod_list} -EOF +echo "" > /etc/initramfs-tools/modules +for module in ${MODULES} +do + echo $module >> /etc/initramfs-tools/modules +done echo "[info] Changing to 'modules=list'" sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf diff --git a/installer/mkinstaller.sh b/installer/mkinstaller.sh index c8f021894..ba8c14332 100755 --- a/installer/mkinstaller.sh +++ b/installer/mkinstaller.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh SRC="$(pwd)" @@ -15,42 +15,36 @@ while getopts ":d:v:f:" opt; do echo "[err] Volumio image $OPTARG does not exist, aborting..." exit 1 else - FILENAME=$(basename "$OPTARG" ".zip") - VOLUMIOIMAGE=$(dirname "$VOLUMIOIMAGE")/$(basename "$OPTARG" ".zip") - if [ ! -f $VOLUMIOIMAGE ]; then - unzip $OPTARG - echo "[err] Volumio image $VOLUMIOIMAGE does not exist, aborting..." - exit - fi + VOLUMIOIMAGE=$OPTARG fi ;; esac done -if [ "x${DEVICE}" == "x" ]; then +if [ -z ${DEVICE} ]; then echo "[err] No device specified, aborting..." exit 1 fi -if [ "x${VOLUMIOIMAGE}" == "x" ]; then +if [ -z ${VOLUMIOIMAGE} ]; then echo "[err] No Volumio image supplied, aborting..." exit 1 fi -if [ "x${VERSION}" == "x" ]; then +if [ -z ${VERSION} ]; then echo "[warn] Warning: no flash image version supplied, continuing..." fi -source "${SRC}/installer/board-config/${DEVICE}/mkinstall_config.sh" +. ${SRC}/installer/board-config/${DEVICE}/mkinstall_config.sh -PLTDIR="$SRC/platform-${DEVICEBASE}" -if [ -d "$SRC/build/$BUILD" ]; then +PLTDIR="${SRC}/platform-${DEVICEBASE}" +if [ -d "${SRC}/build/$BUILD" ]; then if [ ! -d "${PLTDIR}" ]; then - echo "No platform folder present, please build a volumio device image first" + echo "No platform folder ${PLTDIR} present, please build a volumio device image first" exit 1 fi else - echo "No ${BUILD} rootfs present, please build an image first" + echo "No ${SRC}/build/${BUILD} rootfs present, please build a volumio device image first" exit 1 fi @@ -82,7 +76,7 @@ echo "[info] Creating boot and rootfs filesystem" mkfs -t vfat -n BOOT "${FLASH_PART}" echo "[info] Preparing for the kernel/ platform files" -if [ ! "x$NONSTANDARD_REPO" == "x" ]; then +if [ ! -z $NONSTANDARD_REPO ]; then non_standard_repo else HAS_PLTDIR=no @@ -184,11 +178,10 @@ cp scripts/initramfs/mkinitramfs-custom.sh $ROOTFSMNT/usr/local/sbin echo " RAMDISK_TYPE=${RAMDISK_TYPE} -MODULES=($(printf '\"%s\" ' "${MODULES[@]}")) -PACKAGES=($(printf '\"%s\" ' "${PACKAGES[@]}")) +MODULES=\"${MODULES}\" +PACKAGES=\"${PACKAGES}\" " > $ROOTFSMNT/config.sh - mount /dev $ROOTFSMNT/dev -o bind mount /proc $ROOTFSMNT/proc -t proc mount /sys $ROOTFSMNT/sys -t sysfs @@ -198,7 +191,7 @@ su - /mkinitrd.sh EOF -if [ "x${RAMDISK_TYPE}" == "ximage" ]; then +if [ ${RAMDISK_TYPE} = image ]; then echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d $ROOTFSMNT/boot/volumio.initrd $ROOTFSMNT/boot/uInitrd rm $ROOTFSMNT/boot/volumio.initrd @@ -236,7 +229,7 @@ copy_device_bootloader_files echo "[info] Copying 'raw' boot & image data" #cd /mnt/volumioimage/boot -tar cfJ $ROOTFSMNT/boot/data/boot/kernel_current.tar.xz --exclude='resize-volumio-datapart' -C /mnt/volumioimage/boot . +tar cf $ROOTFSMNT/boot/data/image/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/volumioimage/boot . cp /mnt/volumioimage/image/* /mnt/volumio/rootfs/boot/data/image diff --git a/installer/runtime-generic/gen-functions b/installer/runtime-generic/gen-functions index 17784ece8..779d071c1 100644 --- a/installer/runtime-generic/gen-functions +++ b/installer/runtime-generic/gen-functions @@ -82,7 +82,7 @@ load_modules() # check if UUIDs are used for disk parsing check_uuids() { - if [ ! "x${UUIDFMT}" == "x" ]; then + if [ ! -z ${UUIDFMT} ]; then if [ $BOOTCONFIG == empty ]; then echo "[error] when using UUIDs for disk parsing, you MUST also add the bootconfig parameter (eg. bootconfig=/extlinux/extlinux.conf)" exec sh diff --git a/installer/runtime-generic/init-script b/installer/runtime-generic/init-script index e430fb3f0..52895090c 100644 --- a/installer/runtime-generic/init-script +++ b/installer/runtime-generic/init-script @@ -63,7 +63,14 @@ cp $BOOT/data/image/* $BOOT/temp/image echo "[info] Copying volumio boot partition files (image, dtb, boot files etc.)" #TODO tar xfJ $BOOT/data/boot/kernel_current.tar.xz -C $BOOT/temp/boot -tar xvfJ $BOOT/data/boot/kernel_current.tar.xz -C $BOOT/temp/boot +tar xf $BOOT/data/image/kernel_current.tar -C $BOOT/temp/boot + +if [ ! -z ${FACTORYCOPY} ]; then + echo "[info] Continue with creating factory copies" + cp $BOOT/data/image/kernel_current.tar $BOOT/data/image/kernel_factory.tar + cp $BOOT/data/image/volumio_current.sqsh $BOOT/data/image/volumio_factory.tar +fi + sync From ef2ed7c36f458d76a3223248ed6ef11199d99230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 23 Jul 2020 13:09:19 +0200 Subject: [PATCH 629/673] AUtoinstaller: modified mkinstaller.sh syntax --- .../board-config/motivo/mkinstall_config.sh | 2 +- installer/mkinstaller.sh | 59 +++++++++++-------- 2 files changed, 37 insertions(+), 24 deletions(-) diff --git a/installer/board-config/motivo/mkinstall_config.sh b/installer/board-config/motivo/mkinstall_config.sh index 39f539958..872ae50c0 100644 --- a/installer/board-config/motivo/mkinstall_config.sh +++ b/installer/board-config/motivo/mkinstall_config.sh @@ -2,7 +2,7 @@ # Device Info DEVICEBASE="motivo" -BOARDFAMILY=${DEVICE} +BOARDFAMILY=${PLAYER} PLATFORMREPO="https://github.com/volumio/platform-motivo.git" PATCHREPO="https://github.com/volumio/motivo-patch" MOTIVOPATCH="motivo-patch" diff --git a/installer/mkinstaller.sh b/installer/mkinstaller.sh index ba8c14332..af3f8dd0c 100755 --- a/installer/mkinstaller.sh +++ b/installer/mkinstaller.sh @@ -2,40 +2,50 @@ SRC="$(pwd)" -while getopts ":d:v:f:" opt; do +while getopts ":i:" opt; do case $opt in - d) - DEVICE=$OPTARG - ;; - v) - VERSION=$OPTARG - ;; - f) - if [ ! -f $OPTARG ]; then + + i) + if [ ! -e $OPTARG ]; then echo "[err] Volumio image $OPTARG does not exist, aborting..." exit 1 - else - VOLUMIOIMAGE=$OPTARG fi + + VOLUMIOIMAGE=$OPTARG + # split the image name in elements and parse + IMAGEPATH=$(echo $VOLUMIOIMAGE | awk 'BEGIN{FS=OFS="/"}NF--') + IMAGENAME=$(echo $VOLUMIOIMAGE | awk -F "/" '{print $NF}') + + # get variant from image file name + VARIANT=$(echo $(echo $IMAGENAME | awk -F "-" '{print $1}') | awk -F "/" '{print $NF}') + + # get version and build date from image name + BUILDVER=$(echo $IMAGENAME | awk -F "-" '{print $2}') + BUILDDATE=$(echo $IMAGENAME | awk -F "-" '{print $3"-"$4"-"$5}') + + # get player and file extension + PLAYER=$(echo $(echo $IMAGENAME | awk -F "-" '{print $6}') | awk -F "." '{print $1}') ;; esac done -if [ -z ${DEVICE} ]; then - echo "[err] No device specified, aborting..." - exit 1 -fi +echo "+------EXTRA STEP: Building Auto Installer " +echo " Variant: $VARIANT" +echo " Version: $BUILDVER" +echo " Build date: $BUILDDATE" +echo " Player: $PLAYER" +echo "" + +echo $VOLUMIOIMAGE +echo $IMAGEPATH +echo $IMAGENAME if [ -z ${VOLUMIOIMAGE} ]; then echo "[err] No Volumio image supplied, aborting..." exit 1 fi -if [ -z ${VERSION} ]; then - echo "[warn] Warning: no flash image version supplied, continuing..." -fi - -. ${SRC}/installer/board-config/${DEVICE}/mkinstall_config.sh +. ${SRC}/installer/board-config/${PLAYER}/mkinstall_config.sh PLTDIR="${SRC}/platform-${DEVICEBASE}" if [ -d "${SRC}/build/$BUILD" ]; then @@ -48,8 +58,7 @@ else exit 1 fi -BUILDDATE=$(date -I) -IMG_FILE="AutoFlash${VERSION}-${BUILDDATE}-${DEVICE}.img" +IMG_FILE=$SRC/"Autoinstaller-$VARIANT-${BUILDVER}-${BUILDDATE}-${PLAYER}.img" VOLMNT=/mnt/volumio echo "[Stage 1] Creating AutoFlash Image File ${IMG_FILE}" @@ -157,7 +166,7 @@ LBLDATA=${LBLDATA} " > $ROOTFSMNT/root/scripts/initconfig.sh echo "[info] Copying initrd scripts" -cp ${SRC}/installer/board-config/${DEVICE}/board-functions $ROOTFSMNT/root/scripts +cp ${SRC}/installer/board-config/${PLAYER}/board-functions $ROOTFSMNT/root/scripts cp ${SRC}/installer/runtime-generic/gen-functions $ROOTFSMNT/root/scripts cp ${SRC}/installer/runtime-generic/init-script $ROOTFSMNT/root/init cp ${SRC}/installer/mkinitrd.sh $ROOTFSMNT @@ -251,6 +260,10 @@ sync dmsetup remove_all losetup -d ${LOOP_DEV1} losetup -d ${LOOP_DEV} + +zip -j ${IMG_FILE}.zip ${IMG_FILE} +#TODO cp $IMG_FILE.zip to its proper place + echo "[info] Done..." #rm $VOLUMIOIMAGE sync From 40efdd1698744733fabab89e698c55b88b134d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 23 Jul 2020 13:13:24 +0200 Subject: [PATCH 630/673] Autoinstaller: remove debug code --- installer/mkinstaller.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/installer/mkinstaller.sh b/installer/mkinstaller.sh index af3f8dd0c..9f136b713 100755 --- a/installer/mkinstaller.sh +++ b/installer/mkinstaller.sh @@ -36,10 +36,6 @@ echo " Build date: $BUILDDATE" echo " Player: $PLAYER" echo "" -echo $VOLUMIOIMAGE -echo $IMAGEPATH -echo $IMAGENAME - if [ -z ${VOLUMIOIMAGE} ]; then echo "[err] No Volumio image supplied, aborting..." exit 1 From 15b38bac67ab79be421108315b962c6903ea012f Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 24 Jul 2020 09:41:48 +0200 Subject: [PATCH 631/673] State that PI jack should be enabled --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index c5d2cbcc2..b7759ece6 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -213,7 +213,7 @@ hdmi_force_hotplug=1 include userconfig.txt" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0 snd-bcm2835.enable_compat_alsa=0" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0 snd-bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_headphones=1" >> /boot/cmdline.txt echo "adding gpio & spi group and permissions" groupadd -f --system gpio From a1641fa897ca1578098c53099f5787e2294b8ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 24 Jul 2020 18:48:15 +0200 Subject: [PATCH 632/673] Odroid: add support for Odroid N2+ --- scripts/odroidn2config.sh | 2 +- scripts/odroidn2image.sh | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/odroidn2config.sh b/scripts/odroidn2config.sh index a6c45c4f8..a26269a41 100755 --- a/scripts/odroidn2config.sh +++ b/scripts/odroidn2config.sh @@ -19,7 +19,7 @@ tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab echo "Creating boot.ini from template" -sed -i "s/%%VOLUMIO-PARAMS%%/imgpart=UUID=${UUID_IMG} imgfile=\/volumio_current.sqsh hwdevice=Odroid-N2 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=boot.ini/g" /boot/boot.ini +sed -i "s/%%VOLUMIO-PARAMS%%/imgpart=UUID=${UUID_IMG} imgfile=\/volumio_current.sqsh hwdevice=Odroid-N2 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=boot.ini loglevel=0/g" /boot/boot.ini echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf diff --git a/scripts/odroidn2image.sh b/scripts/odroidn2image.sh index c0036d401..c892e6462 100755 --- a/scripts/odroidn2image.sh +++ b/scripts/odroidn2image.sh @@ -107,15 +107,13 @@ echo "Creating mount point for the images partition" mkdir /mnt/volumio/images mount -t ext4 "${SYS_PART}" /mnt/volumio/images mkdir /mnt/volumio/rootfs -mkdir /mnt/volumio/rootfs/boot +mkdir -p /mnt/volumio/rootfs/boot/amlogic mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "Copying OdroidN2 boot files" -cp platform-odroid/odroidn2/boot/boot.ini* /mnt/volumio/rootfs/boot -cp platform-odroid/odroidn2/boot/meson64_odroidn2.dtb /mnt/volumio/rootfs/boot -cp platform-odroid/odroidn2/boot/Image* /mnt/volumio/rootfs/boot +cp -dR platform-odroid/odroidn2/boot/* /mnt/volumio/rootfs/boot echo "Copying OdroidN2 modules and firmware" cp -pdR platform-odroid/odroidn2/lib/modules /mnt/volumio/rootfs/lib/ @@ -181,10 +179,6 @@ umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys echo "==> Odroid-N2 device installed" - -#echo "Removing temporary platform files" -#echo "(you can keep it safely as long as you're sure of no changes)" -#rm -r platform-odroid sync echo "Finalizing Rootfs creation" From a213e77040a20ec4a15c8947294ff776a6eb9037 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 28 Jul 2020 20:51:29 +0200 Subject: [PATCH 633/673] Enable compat for consistent i2s numbering --- scripts/raspberryconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index b7759ece6..ed6dd767e 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -213,7 +213,7 @@ hdmi_force_hotplug=1 include userconfig.txt" >> /boot/config.txt echo "Writing cmdline.txt file" -echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0 snd-bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_headphones=1" >> /boot/cmdline.txt +echo "splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200 kgdboc=serial0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0 snd-bcm2835.enable_compat_alsa=1 snd_bcm2835.enable_headphones=1" >> /boot/cmdline.txt echo "adding gpio & spi group and permissions" groupadd -f --system gpio From 493b3f2063c664b52681092d76718ef5fb070910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 30 Jul 2020 01:43:56 +0200 Subject: [PATCH 634/673] AUtoinstaller: enable install from usb stick (mp1), support Odroid N2) --- .../board-config/mp1/mkinstall_config.sh | 7 ++ .../board-config/odroidn2/board-functions | 27 +++++++ .../board-config/odroidn2/mkinstall_config.sh | 80 +++++++++++++++++++ installer/mkinstaller.sh | 1 + installer/runtime-generic/gen-functions | 21 +++++ installer/runtime-generic/init-script | 7 +- 6 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 installer/board-config/odroidn2/board-functions create mode 100644 installer/board-config/odroidn2/mkinstall_config.sh diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh index 932d7f821..e5fd98212 100644 --- a/installer/board-config/mp1/mkinstall_config.sh +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -45,6 +45,13 @@ non_standard_repo() : } +fetch_bootpart_uuid() +{ +echo "[info] replace BOOTPART device by ${FLASH_PART} UUID value" +UUIDBOOT=$(blkid -s UUID -o value ${FLASH_PART}) +BOOTPART="UUID=${UUIDBOOT}" +} + write_device_files() { cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot diff --git a/installer/board-config/odroidn2/board-functions b/installer/board-config/odroidn2/board-functions new file mode 100644 index 000000000..16e065973 --- /dev/null +++ b/installer/board-config/odroidn2/board-functions @@ -0,0 +1,27 @@ + +# Board functions Odroid N2/N2+ +write_device_bootloader() +{ + echo "[info] Flashing u-boot" + dd if=$BOOT/u-boot/u-boot.bin of=$1 conv=fsync bs=512 seek=1 +} + +led_show_init_signal() +{ + echo default-on > /sys/class/leds/blue\:heartbeat/trigger +} + +led_show_start_signal() +{ + echo none > /sys/class/leds/blue\:heartbeat/trigger + sleep 1 + echo default-on > /sys/class/leds/blue\:heartbeat/trigger + sleep 1 + echo heartbeat > /sys/class/leds/blue\:heartbeat/trigger +} + +led_show_finish_signal() +{ + echo default-on > /sys/class/leds/blue\:heartbeat/trigger +} + diff --git a/installer/board-config/odroidn2/mkinstall_config.sh b/installer/board-config/odroidn2/mkinstall_config.sh new file mode 100644 index 000000000..e8aabf5b6 --- /dev/null +++ b/installer/board-config/odroidn2/mkinstall_config.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# Device Info Odroid N2/N2+ +DEVICEBASE="odroid" +BOARDFAMILY="odroidn2" +PLATFORMREPO="https://github.com/volumio/platform-khadas.git" +BUILD="armv7" +NONSTANDARD_REPO=no # yes requires "non_standard_repo() function in make.sh +LBLBOOT="VBOOT" +LBLIMAGE="VIMAGE" +LBLDATA="VDATA" + +# Partition Info +BOOT_TYPE=msdos # msdos or gpt +BOOT_START=1 +BOOT_END=64 +IMAGE_END=2500 +BOOT=/mnt/boot +BOOTDELAY=1 +BOOTDEV="mmcblk1" +BOOTPART=/dev/mmcblk1p1 +BOOTCONFIG=boot.ini + +TARGETBOOT="/dev/mmcblk0p1" +TARGETDEV="/dev/mmcblk0" +TARGETDATA="/dev/mmcblk0p3" +TARGETIMAGE="/dev/mmcblk0p2" +HWDEVICE= +USEKMSG="yes" +UUIDFMT="yes" # yes|no (actually, anything non-blank) +FACTORYCOPY="yes" + + +# Modules to load (as a blank separated string array) +MODULES="nls_cp437" + +# Additional packages to install (as a blank separated string) +#PACKAGES="" + +# initramfs type +RAMDISK_TYPE=image # image or gzip (ramdisk image = uInitrd, gzip compressed = volumio.initrd) + +non_standard_repo() +{ + : +} + +fetch_bootpart_uuid() +{ + : +} +write_device_files() +{ + cp ${PLTDIR}/${BOARDFAMILY}/boot/Image.gz $ROOTFSMNT/boot + cp ${PLTDIR}/${BOARDFAMILY}/boot/boot.ini $ROOTFSMNT/boot + cp ${PLTDIR}/${BOARDFAMILY}/boot/config.ini $ROOTFSMNT/boot + + mkdir /mnt/volumio/rootfs/boot/amlogic + cp -R ${PLTDIR}/${BOARDFAMILY}/boot/amlogic/* $ROOTFSMNT/boot/amlogic +} + +write_device_bootloader() +{ + dd if=${PLTDIR}/${BOARDFAMILY}/uboot/u-boot.bin of=${LOOP_DEV} conv=fsync bs=512 seek=1 +} + +copy_device_bootloader_files() +{ + mkdir /mnt/volumio/rootfs/boot/u-boot + cp ${PLTDIR}/${BOARDFAMILY}/uboot/u-boot.bin $ROOTFSMNT/boot/u-boot +} + +write_boot_parameters() +{ + sed -i "s/%%VOLUMIO-PARAMS%%/loglevel=0/g" $ROOTFSMNT/boot/boot.ini +} + + + + diff --git a/installer/mkinstaller.sh b/installer/mkinstaller.sh index 9f136b713..1878d75ae 100755 --- a/installer/mkinstaller.sh +++ b/installer/mkinstaller.sh @@ -79,6 +79,7 @@ fi echo "[info] Creating boot and rootfs filesystem" mkfs -t vfat -n BOOT "${FLASH_PART}" +fetch_bootpart_uuid echo "[info] Preparing for the kernel/ platform files" if [ ! -z $NONSTANDARD_REPO ]; then diff --git a/installer/runtime-generic/gen-functions b/installer/runtime-generic/gen-functions index 779d071c1..965cbf26a 100644 --- a/installer/runtime-generic/gen-functions +++ b/installer/runtime-generic/gen-functions @@ -114,6 +114,27 @@ mount_target_boot() mount -t ext4 ${TARGETIMAGE} $BOOT/temp/image } +search_boot_device() +{ + echo "[info] Waiting for boot device" + for i in 1 2 3 4 5 6 7 8 9 10 + do + BOOTPARTDEV=`parse_disk ${BOOTPART}` + if [ ! -b "${BOOTPARTDEV}" ]; then + echo "[info] Boot partition not ready, retrying mdev in 0.5 seconds" + sleep 0.5 + mdev -s + else + break + fi + done + if [ ! -b "${BOOTPARTDEV}" ]; then + print_msg "Boot device ${BOOTPART} failed" + exec sh + fi +} + + search_target_device() { echo "[info] Checking if target device is up" diff --git a/installer/runtime-generic/init-script b/installer/runtime-generic/init-script index 52895090c..22acf92fa 100644 --- a/installer/runtime-generic/init-script +++ b/installer/runtime-generic/init-script @@ -40,9 +40,13 @@ load_modules check_uuids if [ ! -z "${BOOTDELAY}" ]; then - echo "[info] Boot delay (except first time) will be ${BOOTDELAY} seconds" + echo "[info] Boot delay will be ${BOOTDELAY} seconds" + sleep ${BOOTDELAY} fi +#Check if boot device is up +search_boot_device + #Check if target device already up search_target_device @@ -62,7 +66,6 @@ echo "[info] Copying current image partition files" cp $BOOT/data/image/* $BOOT/temp/image echo "[info] Copying volumio boot partition files (image, dtb, boot files etc.)" -#TODO tar xfJ $BOOT/data/boot/kernel_current.tar.xz -C $BOOT/temp/boot tar xf $BOOT/data/image/kernel_current.tar -C $BOOT/temp/boot if [ ! -z ${FACTORYCOPY} ]; then From 99dc1ae0fca67ec420c2184d8ea83dfb87ef7b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Sat, 8 Aug 2020 18:53:06 +0200 Subject: [PATCH 635/673] Volumio installer + kvimsimage.sh: use original partition labels --- installer/board-config/mp1/mkinstall_config.sh | 6 +++--- installer/board-config/odroidn2/mkinstall_config.sh | 6 +++--- scripts/kvimsimage.sh | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh index e5fd98212..5b9a0523b 100644 --- a/installer/board-config/mp1/mkinstall_config.sh +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -6,9 +6,9 @@ BOARDFAMILY="vims" PLATFORMREPO="https://github.com/volumio/platform-khadas.git" BUILD="armv7" NONSTANDARD_REPO=no # yes requires "non_standard_repo() function in make.sh -LBLBOOT="VBOOT" -LBLIMAGE="VIMAGE" -LBLDATA="VDATA" +LBLBOOT="BOOT" +LBLIMAGE="volumio" +LBLDATA="volumio_data" # Partition Info BOOT_TYPE=msdos # msdos or gpt diff --git a/installer/board-config/odroidn2/mkinstall_config.sh b/installer/board-config/odroidn2/mkinstall_config.sh index e8aabf5b6..d33aa89de 100644 --- a/installer/board-config/odroidn2/mkinstall_config.sh +++ b/installer/board-config/odroidn2/mkinstall_config.sh @@ -6,9 +6,9 @@ BOARDFAMILY="odroidn2" PLATFORMREPO="https://github.com/volumio/platform-khadas.git" BUILD="armv7" NONSTANDARD_REPO=no # yes requires "non_standard_repo() function in make.sh -LBLBOOT="VBOOT" -LBLIMAGE="VIMAGE" -LBLDATA="VDATA" +LBLBOOT="BOOT" +LBLIMAGE="volumio" +LBLDATA="volumio_data" # Partition Info BOOT_TYPE=msdos # msdos or gpt diff --git a/scripts/kvimsimage.sh b/scripts/kvimsimage.sh index 1cbd4bed7..a117c4dea 100755 --- a/scripts/kvimsimage.sh +++ b/scripts/kvimsimage.sh @@ -57,9 +57,9 @@ then fi echo "Creating boot and rootfs filesystems" -mkfs -t vfat -n VBOOT "${BOOT_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L VIMAGE "${SYS_PART}" || mkfs -F -t ext4 -L VIMAGE "${SYS_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L VDATA "${DATA_PART}" || mkfs -F -t ext4 -L VDATA "${DATA_PART}" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync echo "Preparing for the vims kernel/ platform files" From bc3ec893cbae7f176bffbf178f827c6a1ceae57f Mon Sep 17 00:00:00 2001 From: Darmur Date: Sun, 23 Aug 2020 17:08:24 +0200 Subject: [PATCH 636/673] include Module and Overlay for BassOwl-HAT --- scripts/raspberryconfig.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index ed6dd767e..7501fae40 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -338,6 +338,13 @@ tar --strip-components 1 --exclude *.hash -xf rpi-volumio-"$KERNEL_VERSION"-taud rm rpi-volumio-"$KERNEL_VERSION"-taudac-modules.tar.gz echo "TauDAC Modules and overlay installed" +echo "Getting BassOwl-HAT Module and overlay" +wget -N https://github.com/Darmur/bassowl-hat/raw/master/driver/archives/modules-rpi-"$KERNEL_VERSION"-bassowl.tar.gz +echo "Extracting BassOwl-HAT Module and overlay" +tar --strip-components 1 --no-same-owner -xvf modules-rpi-"$KERNEL_VERSION"-bassowl.tar.gz +rm modules-rpi-"$KERNEL_VERSION"-bassowl.tar.gz +echo "BassOwl-HAT Module and overlay installed" + echo "Getting Volumio driver" wget http://repo.volumio.org/Volumio2/Firmwares/ess-volumio/ess-volumio-$KERNEL_VERSION-v7+.tar.gz tar xf ess-volumio-$KERNEL_VERSION-v7+.tar.gz --no-same-owner From 2cc88ba155ba0e0a522536bb5e87db9aedd789e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 7 Sep 2020 12:24:33 +0200 Subject: [PATCH 637/673] Initial support for NanoPi Neo3 --- build.sh | 4 + scripts/nanopineo3config.sh | 94 +++++++++++++++ scripts/nanopineo3image.sh | 230 ++++++++++++++++++++++++++++++++++++ 3 files changed, 328 insertions(+) create mode 100755 scripts/nanopineo3config.sh create mode 100755 scripts/nanopineo3image.sh diff --git a/build.sh b/build.sh index 25351c407..901e46672 100755 --- a/build.sh +++ b/build.sh @@ -350,6 +350,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopineo2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + nanopineo3) echo 'Writing NanoPi-NEO3 armv7 Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/nanopineo3image.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; nanopineo) echo 'Writing NanoPi-NEO (Air) Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopineoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/scripts/nanopineo3config.sh b/scripts/nanopineo3config.sh new file mode 100755 index 000000000..fccf58835 --- /dev/null +++ b/scripts/nanopineo3config.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# NanoPI Neo3 fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" >> /etc/fstab + +echo "Creating boot config" +echo "label kernel-5.4 + kernel /Image + fdt /rk3328-nanopi-neo3-rev00.dtb + initrd /uInitrd + append earlycon=uart8250,mmio32,0xff130000 console=ttyS2,1500000 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh hwdevice=nanopineo3 bootdev=mmcblk0 +"> /boot/extlinux/extlinux.conf + +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf + +echo "Installing additional packages" +apt-get update +apt-get -y install device-tree-compiler u-boot-tools + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlay, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=dep'" +echo "(otherwise neo3 may not boot due to uInitrd 4MB limit)" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uImage from 'volumio.initrd'" +mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + +echo "Removing unnecessary /boot files" +rm /boot/volumio.initrd diff --git a/scripts/nanopineo3image.sh b/scripts/nanopineo3image.sh new file mode 100755 index 000000000..f28b732b5 --- /dev/null +++ b/scripts/nanopineo3image.sh @@ -0,0 +1,230 @@ +#!/bin/sh + +# Build Architecture Debian 32bit +ARCH="armv7" + +while getopts ":v:p:a:" opt; do + case $opt in + v) + VERSION=$OPTARG + ;; + p) + PATCH=$OPTARG + ;; + a) + ARCH=$OPTARG + ;; + esac +done + +BUILDDATE=$(date -I) +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-nanopineo3.img" + +if [ "$ARCH" = arm ]; then + DISTRO="Raspbian" +else + DISTRO="Debian 32bit" +fi + +echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" + +dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 + +echo "Creating Image Bed" +LOOP_DEV=`losetup -f --show ${IMG_FILE}` +# Note: leave the first 20Mb free for the firmware (effectively needs ~16Mb) +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 20 84 +parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" + +BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` +SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` +DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` +echo "Using: " ${BOOT_PART} +echo "Using: " ${SYS_PART} +echo "Using: " ${DATA_PART} +if [ ! -b "${BOOT_PART}" ] +then + echo "${BOOT_PART} doesn't exist" + exit 1 +fi + +echo "Creating boot and rootfs filesystems" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +sync + +echo "Preparing for the nanopi-neo3 kernel/ platform files" +if [ -d platform-nanopi/nanopi-neo3 ] +then + echo "Platform folder already exists - keeping it" + # if you really want to re-clone from the repo, then delete the platform-nanopi folder + # that will refresh the platform files, see below + cd platform-nanopi + if [ -f nanopi-neo3.tar.xz ]; then + echo "Found a new tarball, unpacking..." + rm -r nanopi-neo3 + tar xfJ nanopi-neo3.tar.xz + rm nanopi-neo3.tar.xz + fi + cd .. +else + if [ ! -d platform-nanopi ]; then + mkdir platform-nanopi + fi + cd platform-nanopi + [ ! -f nanopi-neo3.tar.xz ] || rm nanopi-neo3.tar.xz + wget https://github.com/volumio/platform-nanopi/raw/master/nanopi-neo3.tar.xz + echo "Unpacking the Neo3 platform files" + tar xfJ nanopi-neo3.tar.xz + rm nanopi-neo3.tar.xz + cd .. +fi + +echo "Copying the bootloader" +dd if=platform-nanopi/nanopi-neo3/u-boot/idbloader.bin of=${LOOP_DEV} seek=64 conv=notrunc +dd if=platform-nanopi/nanopi-neo3/u-boot/uboot.img of=${LOOP_DEV} seek=16384 conv=notrunc +dd if=platform-nanopi/nanopi-neo3/u-boot/trust.bin of=${LOOP_DEV} seek=24576 conv=notrunc +sync + +echo "Preparing for Volumio rootfs" +if [ -d /mnt ] +then + echo "/mount folder exist" +else + mkdir /mnt +fi +if [ -d /mnt/volumio ] +then + echo "Volumio Temp Directory Exists - Cleaning it" + rm -rf /mnt/volumio/* +else + echo "Creating Volumio Temp Directory" + mkdir /mnt/volumio +fi + +echo "Creating mount point for the images partition" +mkdir /mnt/volumio/images +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot + +echo "Copying Volumio RootFs" +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs + +echo "Copying nanopineo3 boot files" +cp -R platform-nanopi/nanopi-neo3/boot/* /mnt/volumio/rootfs/boot + +echo "Copying nanopineo3 modules and firmware" +cp -pdR platform-nanopi/nanopi-neo3/lib/modules /mnt/volumio/rootfs/lib/ +cp -R platform-nanopi/nanopi-neo3/firmware/* /mnt/volumio/rootfs/lib/firmware + +echo "Preparing to run chroot for more nanopineo3 configuration" +cp scripts/nanopineo3config.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init +cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin +#copy the scripts for updating from usb +wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater + +mount /dev /mnt/volumio/rootfs/dev -o bind +mount /proc /mnt/volumio/rootfs/proc -t proc +mount /sys /mnt/volumio/rootfs/sys -t sysfs +echo $PATCH > /mnt/volumio/rootfs/patch + +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + +if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then + if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then + UIVARIANT=$(cat "UIVARIANT") + echo "Configuring variant $UIVARIANT" + echo "Starting config.js for variant $UIVARIANT" + node config.js $PATCH $UIVARIANT + echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT + else + echo "Starting config.js" + node config.js $PATCH + fi +fi + +chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' +su - +/nanopineo3config.sh +EOF + +UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT +if [ -f "${UIVARIANT_FILE}" ]; then + echo "Starting variant.js" + node variant.js + rm $UIVARIANT_FILE +fi + +#cleanup +rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/nanopineo3config.sh /mnt/volumio/rootfs/root/init + +echo "Unmounting Temp devices" +umount -l /mnt/volumio/rootfs/dev +umount -l /mnt/volumio/rootfs/proc +umount -l /mnt/volumio/rootfs/sys + +echo "==> nanopineo3 device installed" + +sync + +echo "Finalizing Rootfs creation" +sh scripts/finalize.sh + +echo "Preparing rootfs base for SquashFS" + +if [ -d /mnt/squash ]; then + echo "Volumio SquashFS Temp Dir Exists - Cleaning it" + rm -rf /mnt/squash/* +else + echo "Creating Volumio SquashFS Temp Dir" + mkdir /mnt/squash +fi + +echo "Copying Volumio rootfs to Temp Dir" +cp -rp /mnt/volumio/rootfs/* /mnt/squash/ + +if [ -e /mnt/kernel_current.tar ]; then + echo "Volumio Kernel Partition Archive exists - Cleaning it" + rm -rf /mnt/kernel_current.tar +fi + +echo "Creating Kernel Partition Archive" +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . + +echo "Removing the Kernel" +rm -rf /mnt/squash/boot/* + +echo "Creating SquashFS, removing any previous one" +rm -r Volumio.sqsh +mksquashfs /mnt/squash/* Volumio.sqsh + +echo "Squash filesystem created" +echo "Cleaning squash environment" +rm -rf /mnt/squash + +#copy the squash image inside the boot partition +cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh +sync +echo "Unmounting Temp Devices" +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot + +dmsetup remove_all +losetup -d ${LOOP_DEV} +sync + +md5sum "$IMG_FILE" > "${IMG_FILE}.md5" From 507333c9dacd89a1cb9ddfa3dbb8d7c56b2a59c4 Mon Sep 17 00:00:00 2001 From: volumio Date: Mon, 7 Sep 2020 15:04:34 +0200 Subject: [PATCH 638/673] Adding i2cset to sudoers file --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index fb54e7bcf..163b43436 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -120,7 +120,7 @@ echo 'Adding Safe Sudoers NoPassw permissions' cat > ${SUDOERS_FILE} << EOF # Add permissions for volumio user volumio ALL=(ALL) ALL -volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd,/opt/vc/bin/tvservice,/usr/bin/renice,/bin/rm,/bin/kill +volumio ALL=(ALL) NOPASSWD: /sbin/poweroff,/sbin/shutdown,/sbin/reboot,/sbin/halt,/bin/systemctl,/usr/bin/apt-get,/usr/sbin/update-rc.d,/usr/bin/gpio,/bin/mount,/bin/umount,/sbin/iwconfig,/sbin/iwlist,/sbin/ifconfig,/usr/bin/killall,/bin/ip,/usr/sbin/service,/etc/init.d/netplug,/bin/journalctl,/bin/chmod,/sbin/ethtool,/usr/sbin/alsactl,/bin/tar,/usr/bin/dtoverlay,/sbin/dhclient,/usr/sbin/i2cdetect,/sbin/dhcpcd,/usr/bin/alsactl,/bin/mv,/sbin/iw,/bin/hostname,/sbin/modprobe,/sbin/iwgetid,/bin/ln,/usr/bin/unlink,/bin/dd,/usr/bin/dcfldd,/opt/vc/bin/vcgencmd,/opt/vc/bin/tvservice,/usr/bin/renice,/bin/rm,/bin/kill,/usr/sbin/i2cset volumio ALL=(ALL) NOPASSWD: /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/kernelsource.sh, /bin/sh /volumio/app/plugins/system_controller/volumio_command_line_client/commands/pull.sh EOF chmod 0440 ${SUDOERS_FILE} From 4b3acb4ed8e54c247ce606edac68c782a4d4720d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 7 Sep 2020 16:07:49 +0200 Subject: [PATCH 639/673] boot config: switch dtb --- scripts/nanopineo3config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nanopineo3config.sh b/scripts/nanopineo3config.sh index fccf58835..9760209ff 100755 --- a/scripts/nanopineo3config.sh +++ b/scripts/nanopineo3config.sh @@ -21,7 +21,7 @@ tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 echo "Creating boot config" echo "label kernel-5.4 kernel /Image - fdt /rk3328-nanopi-neo3-rev00.dtb + fdt /rk3328-nanopi-neo3-rev02.dtb initrd /uInitrd append earlycon=uart8250,mmio32,0xff130000 console=ttyS2,1500000 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh hwdevice=nanopineo3 bootdev=mmcblk0 "> /boot/extlinux/extlinux.conf From 44894475f7d86f721daace9e05fa8964bb8e8273 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 17 Sep 2020 17:38:39 +0200 Subject: [PATCH 640/673] fix location of pre-commit hooks Fixes 78acf40d00e00f7c06bbfc9ec9cfdb6eefd1432c to use the correct directory Signed-off-by: Bernhard Reutner-Fischer --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 901e46672..4020996c1 100755 --- a/build.sh +++ b/build.sh @@ -181,7 +181,7 @@ if [ -n "$BUILD" ]; then echo "Pre-commit hooks" echo '#!/bin/sh # Pre-commit hook, uncomment when finished linting all codebase - #npm run lint-staged' > /volumio/.git/hooks/pre-commit + #npm run lint-staged' > "build/$BUILD/root/volumio/.git/hooks/pre-commit" echo 'Cloning Volumio UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" echo 'Cloning Volumio3 UI' From ac03a76e9499ddb11aa6f8b8304fab588e174b95 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 17 Sep 2020 19:55:51 +0200 Subject: [PATCH 641/673] remove redundant mkdir git clone ... newdir does mkdir the newdir on it's own Signed-off-by: Bernhard Reutner-Fischer --- build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sh b/build.sh index 4020996c1..4bdad184f 100755 --- a/build.sh +++ b/build.sh @@ -171,7 +171,6 @@ if [ -n "$BUILD" ]; then mount /sys "build/$BUILD/root/sys" -t sysfs echo 'Cloning Volumio Node Backend' - mkdir "build/$BUILD/root/volumio" if [ -n "$PATCH" ]; then echo "Cloning Volumio with all its history" git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumio From 20ee3ba886c21703ef17d791892dd2e3f2a25d58 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 17 Sep 2020 20:48:15 +0200 Subject: [PATCH 642/673] Remove duplicate x86 recipe package debian-archive-keyring was listed twice Signed-off-by: Bernhard Reutner-Fischer --- recipes/x86-dev.conf | 2 +- recipes/x86.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/x86-dev.conf b/recipes/x86-dev.conf index 700f0c1d2..3fe743d25 100644 --- a/recipes/x86-dev.conf +++ b/recipes/x86-dev.conf @@ -12,7 +12,7 @@ addimportant=false omitrequired=false [Base] -packages=acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl adduser base-files base-passwd bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils gcc-4.8-base gcc-4.9-base grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo5 libudev1 libustr-1.0-1 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common sudo dbus syslinux syslinux-common xorg openbox chromium grub-common grub-efi-amd64 os-prober +packages=acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl adduser base-files base-passwd bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils gcc-4.8-base gcc-4.9-base grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo5 libudev1 libustr-1.0-1 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common sudo dbus syslinux syslinux-common xorg openbox chromium grub-common grub-efi-amd64 os-prober source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie diff --git a/recipes/x86.conf b/recipes/x86.conf index 7773f9cea..47c53926a 100644 --- a/recipes/x86.conf +++ b/recipes/x86.conf @@ -12,7 +12,7 @@ addimportant=false omitrequired=false [Base] -packages=acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl adduser base-files base-passwd bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo5 libudev1 libustr-1.0-1 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common sudo dbus syslinux syslinux-common xorg openbox chromium grub-common os-prober unclutter +packages=acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 systemd libsystemd0 libudev1 libustr-1.0-1 procps udev debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common acl adduser base-files base-passwd bash bsdutils coreutils debconf debconf-i18n debianutils diffutils dmsetup dpkg e2fslibs e2fsprogs findutils grep gzip hostname init initscripts insserv libacl1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap2 libcap2-bin libcomerr2 libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcc1 libgcrypt20 libgpg-error0 libkmod2 liblocale-gettext-perl liblzma5 libmount1 libncurses5 libncursesw5 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3 libprocps3 libselinux1 libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libss2 libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libtinfo5 libudev1 libustr-1.0-1 libuuid1 login lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd perl-base procps sed startpar tar tzdata udev util-linux zlib1g apt apt-transport-https gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 readline-common sudo dbus syslinux syslinux-common xorg openbox chromium grub-common os-prober unclutter source=http://httpredir.debian.org/debian keyring=debian-archive-keyring suite=jessie From 052473b3680e073b1bfc51681287563245a8e169 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 17 Sep 2020 22:24:22 +0200 Subject: [PATCH 643/673] fix typo in status message /Environmant/s/mant/ment/ Signed-off-by: Bernhard Reutner-Fischer --- scripts/finalize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/finalize.sh b/scripts/finalize.sh index c03196e0e..0505c85e4 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -35,7 +35,7 @@ find $BASEDIR/usr/sbin -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/usr/local/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' else - echo "X86 Environmant detected, not cleaning" + echo "X86 Environment detected, not cleaning" find $BASEDIR/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/usr/sbin -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/usr/local/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' From 50b94080a84e2afc2c84d626efff6b01c16e0350 Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 29 Sep 2020 13:26:41 +0200 Subject: [PATCH 644/673] Add Firmware firmware-zd1211 --- recipes/arm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/arm.conf b/recipes/arm.conf index 2c18f57fb..f2bca75c5 100644 --- a/recipes/arm.conf +++ b/recipes/arm.conf @@ -48,7 +48,7 @@ keyring=debian-archive-keyring suite=jessie [Firmware] -packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free +packages=firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 firmware-linux-free firmware-zd1211 source=http://archive.volumio.org/raspbian keyring=debian-archive-keyring components=main non-free From 0d22521dbbb9752f9a0d4aed4833c8ac65384b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 12 Oct 2020 18:17:22 +0200 Subject: [PATCH 645/673] Correct mp1 installer to boot from android uboot --- installer/README.md | 2 +- installer/board-config/mp1/mkinstall_config.sh | 4 +++- installer/runtime-generic/gen-functions | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/installer/README.md b/installer/README.md index e56f381ee..f8f16b889 100644 --- a/installer/README.md +++ b/installer/README.md @@ -4,7 +4,7 @@ build process when this has been completed. **Usage** ~~~ -./mkinstaller.sh -d -v -f +./mkinstaller.sh -i ~~~ where currently supported devices are **Volumio MP1** and **Volumio Motivo** diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh index 5b9a0523b..afc545dc1 100644 --- a/installer/board-config/mp1/mkinstall_config.sh +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -56,10 +56,11 @@ write_device_files() { cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot cp ${PLTDIR}/${BOARDFAMILY}/boot/boot.ini $ROOTFSMNT/boot + mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n "aml_autoscript" -d ${PLTDIR}/${BOARDFAMILY}/boot/aml_autoscript.cmd $ROOTFSMNT/boot/aml_autoscript cp ${PLTDIR}/${BOARDFAMILY}/boot/env.txt $ROOTFSMNT/boot mkdir /mnt/volumio/rootfs/boot/dtb - cp -R ${PLTDIR}/${BOARDFAMILY}/boot/dtb/* $ROOTFSMNT/boot/dtb + cp -R ${PLTDIR}/${BOARDFAMILY}/boot/dtb/kvim3l_linux.dtb $ROOTFSMNT/boot/dtb } write_device_bootloader() @@ -82,6 +83,7 @@ BOOTARGS_USER=loglevel=0 quiet splash bootdelay=1 bootpart=/dev/mmcblk1p1 imgpart=/dev/mmcblk1p2 datapart=/dev/mmcblk1p3 +DTB=dtb/kvim3l_linux.dtb " > $ROOTFSMNT/boot/env.system.txt } diff --git a/installer/runtime-generic/gen-functions b/installer/runtime-generic/gen-functions index 965cbf26a..c2da49e9e 100644 --- a/installer/runtime-generic/gen-functions +++ b/installer/runtime-generic/gen-functions @@ -176,6 +176,8 @@ create_volumio_partitions() parted -s ${TARGETDEV} set 1 boot on partprobe ${TARGETDEV} sync + mdev -s + sleep 0.5 echo "[info] Creating partition filesystems" mkfs.vfat -n $LBLBOOT ${TARGETBOOT} From 13c723d98523acfdb1d282b7aa95a6b74d33cad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Mon, 12 Oct 2020 18:17:58 +0200 Subject: [PATCH 646/673] Rock64: add serial output --- scripts/rock64config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rock64config.sh b/scripts/rock64config.sh index 1f7ee255b..1cf2b8ab1 100755 --- a/scripts/rock64config.sh +++ b/scripts/rock64config.sh @@ -23,7 +23,7 @@ echo "label kernel-4.4 kernel /Image fdt /rk3328-rock64.dtb initrd /uInitrd - append earlycon=uart8250,mmio32,0xff130000 imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh hwdevice=Rock64 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf + append earlycon=uart8250,mmio32,0xff130000 console=tty1 imgpart=UUID=${UUID_IMG} imgfile=/volumio_current.sqsh hwdevice=Rock64 bootpart=UUID=${UUID_BOOT} datapart=UUID=${UUID_DATA} bootconfig=/extlinux/extlinux.conf "> /boot/extlinux/extlinux.conf echo "#!/bin/sh From 91cf4c8d4f148eddb50c87cfccac8f39e53dcdcf Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 20 Oct 2020 19:06:38 +0200 Subject: [PATCH 647/673] Update Raspberry PI Firmware --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 7501fae40..c5bb919ed 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -179,9 +179,9 @@ echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 # Temporary brcm firmware fix solution until we use Buster -wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rpt6_all.deb -dpkg -i firmware-brcm80211_20190114-1+rpt6_all.deb -rm firmware-brcm80211_20190114-1+rpt6_all.deb +wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rpt9_all.deb +dpkg -i firmware-brcm80211_20190114-1+rpt9_all.deb +rm firmware-brcm80211_20190114-1+rpt9_all.deb if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" From ace4d52096baac14960f0f388bbcd29a8083a188 Mon Sep 17 00:00:00 2001 From: volumio Date: Wed, 21 Oct 2020 15:19:50 +0200 Subject: [PATCH 648/673] Adding 5.4.72 kernel option for PI --- scripts/raspberryconfig.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index c5bb919ed..4dc304037 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -145,7 +145,11 @@ case $KERNEL_VERSION in KERNEL_COMMIT="8382ece2b30be0beb87cac7f3b36824f194d01e9" FIRMWARE_COMMIT=$KERNEL_COMMIT ;; - + "5.4.72") + KERNEL_REV="1354" + KERNEL_COMMIT="b3b238cf1e64d0cc272732e77ae6002c75184495" + FIRMWARE_COMMIT=$KERNEL_COMMIT + ;; esac # using rpi-update relevant to defined kernel version From 5cefd47686761f0d23a39df35e28ba8ceb6110a2 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 23 Oct 2020 15:25:57 +0200 Subject: [PATCH 649/673] Revert "Update Raspberry PI Firmware" This reverts commit 91cf4c8d4f148eddb50c87cfccac8f39e53dcdcf. --- scripts/raspberryconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/raspberryconfig.sh b/scripts/raspberryconfig.sh index 4dc304037..fb8d9189c 100755 --- a/scripts/raspberryconfig.sh +++ b/scripts/raspberryconfig.sh @@ -183,9 +183,9 @@ echo "Adding PI3 & PiZero W Wireless, PI WIFI Wireless dongle, ralink mt7601u & apt-get install -y --only-upgrade firmware-atheros firmware-ralink firmware-realtek firmware-brcm80211 # Temporary brcm firmware fix solution until we use Buster -wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rpt9_all.deb -dpkg -i firmware-brcm80211_20190114-1+rpt9_all.deb -rm firmware-brcm80211_20190114-1+rpt9_all.deb +wget http://repo.volumio.org/Volumio2/Firmwares/firmware-brcm80211_20190114-1+rpt6_all.deb +dpkg -i firmware-brcm80211_20190114-1+rpt6_all.deb +rm firmware-brcm80211_20190114-1+rpt6_all.deb if [ "$KERNEL_VERSION" = "4.4.9" ]; then # probably won't be necessary in future kernels echo "Adding initial support for PiZero W wireless on 4.4.9 kernel" From 16166921e6c866d1121f96461378f5504000ade0 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 1 Nov 2020 00:04:48 +0100 Subject: [PATCH 650/673] Do not show HDMI Selector for Motivo --- installer/board-config/motivo/board-functions | 2 +- scripts/install-kiosk.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/installer/board-config/motivo/board-functions b/installer/board-config/motivo/board-functions index a814f38e0..076361d3e 100644 --- a/installer/board-config/motivo/board-functions +++ b/installer/board-config/motivo/board-functions @@ -9,7 +9,7 @@ write_device_bootloader() led_show_init_signal() { - : + echo "Init" } led_show_start_signal() diff --git a/scripts/install-kiosk.sh b/scripts/install-kiosk.sh index 1a51c095a..3493e1952 100755 --- a/scripts/install-kiosk.sh +++ b/scripts/install-kiosk.sh @@ -1,4 +1,5 @@ #!/bin/sh +HARDWARE=$(cat /etc/os-release | grep HARDWARE | tr -d 'VOLUMIO_HARDWARE="') echo "Installing Volumio local UI" @@ -73,12 +74,15 @@ echo " Allowing volumio to start an xsession" echo "Enabling kiosk" /bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service -echo "Enabling UI for HDMI output selection" -echo '[{"value": false,"id":"section_hdmi_settings","attribute_name": "hidden"}]' > /volumio/app/plugins/system_controller/system/override.json +if [ "$HARDWARE" != "motivo" ]; then -echo "Setting HDMI UI enabled by default" -/usr/bin/jq '.hdmi_enabled.value = true' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json -/usr/bin/jq '.hdmi_enabled.type = "boolean"' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json + echo "Enabling UI for HDMI output selection" + echo '[{"value": false,"id":"section_hdmi_settings","attribute_name": "hidden"}]' > /volumio/app/plugins/system_controller/system/override.json + + echo "Setting HDMI UI enabled by default" + /usr/bin/jq '.hdmi_enabled.value = true' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json + /usr/bin/jq '.hdmi_enabled.type = "boolean"' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json +fi echo "Setting localhost" echo '{"localhost": "http://127.0.0.1:3000"}' > /volumio/http/www/app/local-config.json From 2e8692808583a037d1606e0857e7d0241c3f2e50 Mon Sep 17 00:00:00 2001 From: volumio Date: Sun, 1 Nov 2020 00:07:51 +0100 Subject: [PATCH 651/673] Tweaks to Motivo Config --- installer/board-config/motivo/mkinstall_config.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/installer/board-config/motivo/mkinstall_config.sh b/installer/board-config/motivo/mkinstall_config.sh index 872ae50c0..4985586b2 100644 --- a/installer/board-config/motivo/mkinstall_config.sh +++ b/installer/board-config/motivo/mkinstall_config.sh @@ -4,8 +4,6 @@ DEVICEBASE="motivo" BOARDFAMILY=${PLAYER} PLATFORMREPO="https://github.com/volumio/platform-motivo.git" -PATCHREPO="https://github.com/volumio/motivo-patch" -MOTIVOPATCH="motivo-patch" BUILD="armv7" NONSTANDARD_REPO=yes # yes requires "non_standard_repo() function in make.sh LBLBOOT="BOOT" @@ -16,8 +14,8 @@ LBLDATA="volumio_data" # Partition Info BOOT_TYPE=msdos # msdos or gpt BOOT_START=21 -BOOT_END=64 -IMAGE_END=2500 +BOOT_END=84 +IMAGE_END=3500 BOOT=/mnt/boot BOOTDELAY= BOOTDEV="mmcblk0" @@ -95,7 +93,7 @@ write_device_bootloader() write_boot_parameters() { echo "console=serial -panel_model=feiyang +panel_model=motivo kernel_filename=Image initrd_filename=uInitrd fdtfile=allwinner/sun50i-a64-motivo-baseboard.dtb From efd805979a38b4810826889753baad44157d643d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 10 Nov 2020 13:41:35 +0100 Subject: [PATCH 652/673] Finish motivo installer --- installer/board-config/motivo/board-functions | 8 ++-- .../board-config/motivo/mkinstall_config.sh | 40 ++++++------------- .../board-config/mp1/mkinstall_config.sh | 5 +++ .../board-config/odroidn2/mkinstall_config.sh | 8 +++- installer/mkinstaller.sh | 28 +++++++++---- installer/runtime-generic/init-script | 2 +- 6 files changed, 49 insertions(+), 42 deletions(-) diff --git a/installer/board-config/motivo/board-functions b/installer/board-config/motivo/board-functions index 076361d3e..bd08151a0 100644 --- a/installer/board-config/motivo/board-functions +++ b/installer/board-config/motivo/board-functions @@ -14,13 +14,13 @@ led_show_init_signal() led_show_start_signal() { - /usr/bin/i2crw1 w 33 51 1 0 0 - /usr/bin/i2crw1 w 33 20 4 + /bin/i2crw1 w 33 51 1 0 0 + /bin/i2crw1 w 33 20 4 } led_show_finish_signal() { - /usr/bin/i2crw1 w 33 51 0 1 0 - /usr/bin/i2crw1 w 33 21 1 + /bin/i2crw1 w 33 51 0 1 0 + /bin/i2crw1 w 33 21 1 } diff --git a/installer/board-config/motivo/mkinstall_config.sh b/installer/board-config/motivo/mkinstall_config.sh index 4985586b2..e34bf3379 100644 --- a/installer/board-config/motivo/mkinstall_config.sh +++ b/installer/board-config/motivo/mkinstall_config.sh @@ -5,7 +5,7 @@ DEVICEBASE="motivo" BOARDFAMILY=${PLAYER} PLATFORMREPO="https://github.com/volumio/platform-motivo.git" BUILD="armv7" -NONSTANDARD_REPO=yes # yes requires "non_standard_repo() function in make.sh +NONSTANDARD_REPO=no # yes requires "non_standard_repo() function in make.sh LBLBOOT="BOOT" LBLIMAGE="volumio" LBLDATA="volumio_data" @@ -43,34 +43,17 @@ RAMDISK_TYPE=image # image or gzip (ramdisk image = uInitrd, gzip compressed = non_standard_repo() { - HAS_PLTDIR=no - if [ -d ${PLTDIR} ]; then - pushd ${PLTDIR} - if [ -d ${BOARDFAMILY} ]; then - HAS_PLTDIR=yes - fi - popd - fi - if [ $HAS_PLTDIR == no ]; then - # This should normally not happen, just handle it for safety - if [ -d ${PLTDIR} ]; then - rm -r ${PLTDIR} - fi - echo "[info] Clone platform files from repo" - git clone $PLATFORMREPO - echo "[info] Unpacking the platform files" - pushd $PLTDIR - tar xfJ ${BOARDFAMILY}.tar.xz - rm $BOARDFAMILY.tar.xz - popd - fi - - - if [ ! -d ${SRC/$MOTIVOPATCH} ]; then - echo " [info] Clone motivo patches" - git clone $PATCHREPO - fi + : +} +fetch_bootpart_uuid() +{ + : +} + +is_dataquality_ok() +{ + return 0 } write_device_files() @@ -78,6 +61,7 @@ write_device_files() mkdir /mnt/volumio/rootfs/boot/dtb cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot cp -R ${PLTDIR}/${BOARDFAMILY}/boot/dtb/* $ROOTFSMNT/boot/dtb + cp ${PLTDIR}/${BOARDFAMILY}/usr/bin/i2crw1 $ROOTFSMNT/usr/bin echo "[info] Creating boot.scr image" cp ${PLTDIR}/${BOARDFAMILY}/boot/boot.cmd /$ROOTFSMNT/boot diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh index afc545dc1..8cfca1495 100644 --- a/installer/board-config/mp1/mkinstall_config.sh +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -52,6 +52,11 @@ UUIDBOOT=$(blkid -s UUID -o value ${FLASH_PART}) BOOTPART="UUID=${UUIDBOOT}" } +is_dataquality_ok() +{ + return 0 +} + write_device_files() { cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot diff --git a/installer/board-config/odroidn2/mkinstall_config.sh b/installer/board-config/odroidn2/mkinstall_config.sh index d33aa89de..d6cd6c4f9 100644 --- a/installer/board-config/odroidn2/mkinstall_config.sh +++ b/installer/board-config/odroidn2/mkinstall_config.sh @@ -3,7 +3,7 @@ # Device Info Odroid N2/N2+ DEVICEBASE="odroid" BOARDFAMILY="odroidn2" -PLATFORMREPO="https://github.com/volumio/platform-khadas.git" +PLATFORMREPO="https://github.com/volumio/platform-odroid.git" BUILD="armv7" NONSTANDARD_REPO=no # yes requires "non_standard_repo() function in make.sh LBLBOOT="BOOT" @@ -49,6 +49,12 @@ fetch_bootpart_uuid() { : } + +is_dataquality_ok() +{ + return 0 +} + write_device_files() { cp ${PLTDIR}/${BOARDFAMILY}/boot/Image.gz $ROOTFSMNT/boot diff --git a/installer/mkinstaller.sh b/installer/mkinstaller.sh index 1878d75ae..ff38da131 100755 --- a/installer/mkinstaller.sh +++ b/installer/mkinstaller.sh @@ -1,6 +1,7 @@ #!/bin/sh SRC="$(pwd)" +FAILED=0 while getopts ":i:" opt; do case $opt in @@ -160,6 +161,7 @@ UUIDFMT=${UUIDFMT} LBLBOOT=${LBLBOOT} LBLIMAGE=${LBLIMAGE} LBLDATA=${LBLDATA} +FACTORYCOPY=${FACTORYCOPY} " > $ROOTFSMNT/root/scripts/initconfig.sh echo "[info] Copying initrd scripts" @@ -231,13 +233,21 @@ mkdir -p /mnt/volumioimage/image mount -t vfat "${BOOT_PART}" /mnt/volumioimage/boot mount -t ext4 "${IMAGE_PART}" /mnt/volumioimage/image -copy_device_bootloader_files +echo "[info] Do quality check prior to copying files" +is_dataquality_ok +if [ $? -ne 0 ]; then + echo "[ERROR] Quality check failed, aborting..." + FAILED=1 +else + echo "[info] Copy bootloader files" + copy_device_bootloader_files -echo "[info] Copying 'raw' boot & image data" -#cd /mnt/volumioimage/boot -tar cf $ROOTFSMNT/boot/data/image/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/volumioimage/boot . + echo "[info] Copying 'raw' boot & image data" + #cd /mnt/volumioimage/boot + tar cf $ROOTFSMNT/boot/data/image/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/volumioimage/boot . -cp /mnt/volumioimage/image/* /mnt/volumio/rootfs/boot/data/image + cp /mnt/volumioimage/image/* /mnt/volumio/rootfs/boot/data/image +fi umount -l /mnt/volumioimage/boot umount -l /mnt/volumioimage/image @@ -258,9 +268,11 @@ dmsetup remove_all losetup -d ${LOOP_DEV1} losetup -d ${LOOP_DEV} -zip -j ${IMG_FILE}.zip ${IMG_FILE} -#TODO cp $IMG_FILE.zip to its proper place +if [ $FAILED -eq 0 ]; then + zip -j ${IMG_FILE}.zip ${IMG_FILE} +else + rm ${IMG_FILE} +fi echo "[info] Done..." -#rm $VOLUMIOIMAGE sync diff --git a/installer/runtime-generic/init-script b/installer/runtime-generic/init-script index 22acf92fa..4317c0e19 100644 --- a/installer/runtime-generic/init-script +++ b/installer/runtime-generic/init-script @@ -71,7 +71,7 @@ tar xf $BOOT/data/image/kernel_current.tar -C $BOOT/temp/boot if [ ! -z ${FACTORYCOPY} ]; then echo "[info] Continue with creating factory copies" cp $BOOT/data/image/kernel_current.tar $BOOT/data/image/kernel_factory.tar - cp $BOOT/data/image/volumio_current.sqsh $BOOT/data/image/volumio_factory.tar + cp $BOOT/data/image/volumio_current.sqsh $BOOT/data/image/volumio_factory.sqsh fi sync From 8b69195df27475145eb94a9bd827d39128170e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 10 Nov 2020 18:20:19 +0100 Subject: [PATCH 653/673] Installer motivo: ensure i2crw1 is executable --- installer/board-config/motivo/mkinstall_config.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/board-config/motivo/mkinstall_config.sh b/installer/board-config/motivo/mkinstall_config.sh index e34bf3379..b1d4ecd90 100644 --- a/installer/board-config/motivo/mkinstall_config.sh +++ b/installer/board-config/motivo/mkinstall_config.sh @@ -62,6 +62,8 @@ write_device_files() cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot cp -R ${PLTDIR}/${BOARDFAMILY}/boot/dtb/* $ROOTFSMNT/boot/dtb cp ${PLTDIR}/${BOARDFAMILY}/usr/bin/i2crw1 $ROOTFSMNT/usr/bin +# just to make sure it is executable + chmod +x $ROOTFSMNT/usr/bin echo "[info] Creating boot.scr image" cp ${PLTDIR}/${BOARDFAMILY}/boot/boot.cmd /$ROOTFSMNT/boot From 2c20ceacdd8365d3bd2fdff070d8c78700ff2903 Mon Sep 17 00:00:00 2001 From: volumio Date: Thu, 12 Nov 2020 18:41:05 +0100 Subject: [PATCH 654/673] Fix i2crw1 --- installer/board-config/motivo/board-functions | 8 ++++---- installer/board-config/motivo/mkinstall_config.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/installer/board-config/motivo/board-functions b/installer/board-config/motivo/board-functions index bd08151a0..076361d3e 100644 --- a/installer/board-config/motivo/board-functions +++ b/installer/board-config/motivo/board-functions @@ -14,13 +14,13 @@ led_show_init_signal() led_show_start_signal() { - /bin/i2crw1 w 33 51 1 0 0 - /bin/i2crw1 w 33 20 4 + /usr/bin/i2crw1 w 33 51 1 0 0 + /usr/bin/i2crw1 w 33 20 4 } led_show_finish_signal() { - /bin/i2crw1 w 33 51 0 1 0 - /bin/i2crw1 w 33 21 1 + /usr/bin/i2crw1 w 33 51 0 1 0 + /usr/bin/i2crw1 w 33 21 1 } diff --git a/installer/board-config/motivo/mkinstall_config.sh b/installer/board-config/motivo/mkinstall_config.sh index b1d4ecd90..7a11c6bac 100644 --- a/installer/board-config/motivo/mkinstall_config.sh +++ b/installer/board-config/motivo/mkinstall_config.sh @@ -61,9 +61,9 @@ write_device_files() mkdir /mnt/volumio/rootfs/boot/dtb cp ${PLTDIR}/${BOARDFAMILY}/boot/Image $ROOTFSMNT/boot cp -R ${PLTDIR}/${BOARDFAMILY}/boot/dtb/* $ROOTFSMNT/boot/dtb - cp ${PLTDIR}/${BOARDFAMILY}/usr/bin/i2crw1 $ROOTFSMNT/usr/bin + cp ${PLTDIR}/${BOARDFAMILY}/usr/bin/i2crw1 $ROOTFSMNT/usr/bin/i2crw1 # just to make sure it is executable - chmod +x $ROOTFSMNT/usr/bin + chmod a+x $ROOTFSMNT/usr/bin/i2crw1 echo "[info] Creating boot.scr image" cp ${PLTDIR}/${BOARDFAMILY}/boot/boot.cmd /$ROOTFSMNT/boot From d6b7e89cd60a0fdd2ad26fefc6a4db3b7306b92d Mon Sep 17 00:00:00 2001 From: macmpi Date: Sat, 14 Nov 2020 19:04:52 +0100 Subject: [PATCH 655/673] fix dynswap.sh /data is part of overlay, and can not be used for swap. swapon: /data/swapfile: swapon failed: Invalid argument Mount partition into new /swap, and enable swapfile as before --- volumio/bin/dynswap.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/volumio/bin/dynswap.sh b/volumio/bin/dynswap.sh index 0c0de3b8d..7eabdf05a 100755 --- a/volumio/bin/dynswap.sh +++ b/volumio/bin/dynswap.sh @@ -5,18 +5,20 @@ SWAPDEVS=`cat /proc/swaps | wc -l` if [ ${RAMSIZE} -le 512844 -a ${SWAPDEVS} -le 1 ]; then echo "512 MB or less RAM Detected, need to enable swap" - if [ ! -e /data/swapfile ]; then + [ -d /swap ] || mkdir -m 700 /swap + mount -L volumio_data /swap + if [ ! -e /swap/swapfile ]; then echo "No Swapfile present, creating it..." - fallocate -l 512M /data/swapfile + fallocate -l 512M /swap/swapfile echo "Securing Swap permissions" - chown root:root /data/swapfile - chmod 0600 /data/swapfile + chown root:root /swap/swapfile + chmod 0600 /swap/swapfile echo "Preparing SwapFile" - mkswap /data/swapfile + mkswap /swap/swapfile fi echo "Enabling Swap" - swapon /data/swapfile + swapon /swap/swapfile echo "Setting swappiness to 40" sysctl vm.swappiness=40 fi From 021f5e9116ec67046e3dafb10c7ed02f71d4255b Mon Sep 17 00:00:00 2001 From: Volumio Date: Tue, 24 Nov 2020 12:41:18 +0100 Subject: [PATCH 656/673] Updated X86 Kernel sources --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5b04ff6f..7bb74c180 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Example: Build the architecture for x86 first and the image version MyVersion in Kernel Sources * [Raspberry PI](https://github.com/volumio/raspberrypi-linux) -* [X86](https://github.com/volumio/linux) +* [X86](https://github.com/volumio/platform-x86) * [Odroid C1, branch odroidc-3.10.y](https://github.com/hardkernel/linux.git) * [Odroid C2, branch odroidc2-3.14.y](https://github.com/hardkernel/linux.git) * [Odroid X2](https://github.com/volumio/linux-odroid-public) From fb12ff09503aa5529231f1b30249733fc4f88c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 3 Dec 2020 22:09:59 +0100 Subject: [PATCH 657/673] soPine64, motivo inheritance: move to kernel 5.7.y --- scripts/sopine64image.sh | 119 ++++++++++++++++++++--------------- scripts/sopine64ltsconfig.sh | 96 ++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 51 deletions(-) create mode 100755 scripts/sopine64ltsconfig.sh diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index 7a8ab61b3..d55b3ab94 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -31,16 +31,16 @@ echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" -LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +LOOP_DEV=`losetup -f --show ${IMG_FILE}` # Note: leave the first 20Mb free for the firmware -sudo parted -s "${LOOP_DEV}" mklabel msdos -sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% -sudo parted -s "${LOOP_DEV}" set 1 boot on -sudo parted -s "${LOOP_DEV}" print -sudo partprobe "${LOOP_DEV}" -sudo kpartx -s -a "${LOOP_DEV}" +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 +parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` @@ -55,9 +55,9 @@ then fi echo "Creating boot and rootfs filesystems" -sudo mkfs -t vfat -n BOOT "${BOOT_PART}" -sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" -sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync echo "Preparing for the (so)Pine64(LTS) kernel/ platform files" @@ -66,18 +66,26 @@ then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-pine64 folder # that will refresh all the odroid platforms, see below + cd platform-pine64 + if [ -f sopine64lts.tar.xz ]; then + echo "Found a new tarball, unpacking..." + [ -d sopine64lts ] || rm -r sopine64lts + tar xfJ sopine64lts.tar.xz + rm sopine64lts.tar.xz + fi + cd .. else echo "Clone (so)Pine64(LTS) files from repo" - git clone --depth 1 https://github.com/volumio/platform-pine64.git platform-pine64 - echo "Unpack the (so)Pine64(LTS) platform files" + wget https://github.com/volumio/platform-pine64/raw/master/sopine64lts.tar.xz + echo "Unpacking the platform files"echo "Unpack the (so)Pine64(LTS) platform files" cd platform-pine64 tar xfJ sopine64lts.tar.xz cd .. fi -echo "Copying the soPine64 (and Pine64LTS) bootloader" -sudo dd if=platform-pine64/sopine64/u-boot/boot0-pine64-sopine.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 -sudo dd if=platform-pine64/sopine64/u-boot/u-boot-pine64-sopine.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +#mainline u-boot +dd if=platform-pine64/sopine64lts/u-boot/sunxi-spl.bin of=${LOOP_DEV} conv=fsync bs=8k seek=1 +dd if=platform-pine64/sopine64lts/u-boot/u-boot.itb of=${LOOP_DEV} conv=fsync bs=8k seek=5 sync echo "Preparing for Volumio rootfs" @@ -85,7 +93,7 @@ if [ -d /mnt ] then echo "/mount folder exist" else - sudo mkdir /mnt + mkdir /mnt fi if [ -d /mnt/volumio ] then @@ -93,38 +101,45 @@ then rm -rf /mnt/volumio/* else echo "Creating Volumio Temp Directory" - sudo mkdir /mnt/volumio + mkdir /mnt/volumio fi echo "Creating mount point for the images partition" mkdir /mnt/volumio/images -sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images -sudo mkdir /mnt/volumio/rootfs -sudo mkdir /mnt/volumio/rootfs/boot -sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" -sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs + echo "Copying (so)Pine64(LTS) boot files" -mkdir /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/sopine64/boot/pine64/Image /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/sopine64/boot/pine64/*.dtb /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/sopine64/boot/uEnv.txt /mnt/volumio/rootfs/boot -sudo cp platform-pine64/sopine64/boot/Image.version /mnt/volumio/rootfs/boot -sudo cp platform-pine64/sopine64/boot/config* /mnt/volumio/rootfs/boot +mkdir /mnt/volumio/rootfs/boot/dtb +cp platform-pine64/sopine64lts/boot/Image /mnt/volumio/rootfs/boot +cp -R platform-pine64/sopine64lts/boot/dtb/* /mnt/volumio/rootfs/boot/dtb +cp platform-pine64/sopine64lts/boot/uEnv.txt.sopine64 /mnt/volumio/rootfs/boot/uEnv.txt +cp platform-pine64/sopine64lts/boot/boot.cmd /mnt/volumio/rootfs/boot + +echo "Compiling boot script" +mkimage -C none -A arm -T script -d platform-pine64/sopine64lts/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr -echo "Copying (so)Pine64(LTS) modules and firmware" -sudo cp -pdR platform-pine64/sopine64/lib/modules /mnt/volumio/rootfs/lib/ -sudo cp -pdR platform-pine64/sopine64/lib/firmware /mnt/volumio/rootfs/lib/ +echo "Copying kernel configuration file" +cp platform-pine64/sopine64lts/boot/config* /mnt/volumio/rootfs/boot + +echo "Copying (so)Pine64(LTS) kernel modules" +cp -pdR platform-pine64/sopine64lts/lib/modules /mnt/volumio/rootfs/lib/ echo "Confguring ALSA with sane defaults" -sudo cp platform-pine64/sopine64/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +#cp platform-pine64/sopine64lts/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +echo "Copying firmware" +cp -R platform-pine64/sopine64lts/firmware/* /mnt/volumio/rootfs/lib/firmware sync -echo "Preparing to run chroot for more SOPINE A64 configuration (equals pine64)" -cp scripts/pine64config.sh /mnt/volumio/rootfs -cp scripts/initramfs/init /mnt/volumio/rootfs/root +echo "Preparing to run chroot for more so(PINE64)lts configuration)" +cp scripts/sopine64ltsconfig.sh /mnt/volumio/rootfs +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater @@ -135,6 +150,12 @@ mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then UIVARIANT=$(cat "UIVARIANT") @@ -150,7 +171,7 @@ fi chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' su - -/pine64config.sh +/sopine64ltsconfig.sh EOF UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT @@ -161,7 +182,7 @@ if [ -f "${UIVARIANT_FILE}" ]; then fi #cleanup -rm /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/sopine64ltsconfig.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev @@ -169,15 +190,11 @@ umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" -#sudo cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc -#sudo cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc -#sudo cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc +#cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc +#cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc +#cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc echo "==> soPine64/ Pine64 LTS device installed" - -#echo "Removing temporary platform files" -#echo "(you can keep it safely as long as you're sure of no changes)" -#sudo rm -r platform-pine64 sync echo "Finalizing Rootfs creation" @@ -190,7 +207,7 @@ if [ -d /mnt/squash ]; then rm -rf /mnt/squash/* else echo "Creating Volumio SquashFS Temp Dir" - sudo mkdir /mnt/squash + mkdir /mnt/squash fi echo "Copying Volumio rootfs to Temp Dir" @@ -219,11 +236,11 @@ rm -rf /mnt/squash cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh sync echo "Unmounting Temp Devices" -sudo umount -l /mnt/volumio/images -sudo umount -l /mnt/volumio/rootfs/boot +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot -sudo dmsetup remove_all -sudo losetup -d ${LOOP_DEV} +dmsetup remove_all +losetup -d ${LOOP_DEV} sync md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/sopine64ltsconfig.sh b/scripts/sopine64ltsconfig.sh new file mode 100755 index 000000000..c8b3afd35 --- /dev/null +++ b/scripts/sopine64ltsconfig.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +PATCH=$(cat /patch) + +# This script will be run in chroot under qemu. + +echo "Initializing.." +. init.sh + +echo "Creating \"fstab\"" +echo "# (so)Pine64(lts) fstab" > /etc/fstab +echo "" >> /etc/fstab +echo "proc /proc proc defaults 0 0 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 +tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 +tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 +" > /etc/fstab + +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf + +#echo "Adding default sound modules and wifi" +#echo "sunxi_codec +#sunxi_i2s +#sunxi_sndcodec +#8723bs +#" >> /etc/modules + +echo "Installing additonal packages" +apt-get update +apt-get -y install u-boot-tools liblircclient0 lirc libcdio-dev libcdparanoia-dev bluez-firmware bluetooth bluez bluez-tools + +echo "Enabling Bluetooth Adapter auto-poweron" +echo "[Policy] +AutoEnable=true" >> /etc/bluetooth/main.conf + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean + +echo "Adding custom modules overlayfs, squashfs and nls_cp437" +echo "overlay" >> /etc/initramfs-tools/modules +echo "squashfs" >> /etc/initramfs-tools/modules +echo "nls_cp437" >> /etc/initramfs-tools/modules + +echo "Copying volumio initramfs updater" +cd /root/ +mv volumio-init-updater /usr/local/sbin + +#On The Fly Patch +if [ "$PATCH" = "volumio" ]; then +echo "No Patch To Apply" +else +echo "Applying Patch ${PATCH}" +PATCHPATH=/${PATCH} +cd $PATCHPATH +#Check the existence of patch script +if [ -f "patch.sh" ]; then +sh patch.sh +else +echo "Cannot Find Patch File, aborting" +fi +if [ -f "install.sh" ]; then +sh install.sh +fi +cd / +rm -rf ${PATCH} +fi +rm /patch + +echo "Changing to 'modules=list'" +echo "(reduce uInitrd size)" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf + +echo "Installing winbind here, since it freezes networking" +apt-get update +apt-get install -y winbind libnss-winbind + +echo "Cleaning APT Cache and remove policy file" +rm -f /var/lib/apt/lists/*archive* +apt-get clean +rm /usr/sbin/policy-rc.d + +#First Boot operations +echo "Signalling the init script to re-size the volumio data partition" +touch /boot/resize-volumio-datapart + +echo "Creating initramfs 'volumio.initrd'" +mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd + From 7c5af46d8c8b21ca953cdfd3042189dbd16b315b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Thu, 3 Dec 2020 22:38:43 +0100 Subject: [PATCH 658/673] soPine64: fix a typo --- scripts/sopine64image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index d55b3ab94..71ad52a03 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -118,7 +118,7 @@ echo "Copying (so)Pine64(LTS) boot files" mkdir /mnt/volumio/rootfs/boot/dtb cp platform-pine64/sopine64lts/boot/Image /mnt/volumio/rootfs/boot cp -R platform-pine64/sopine64lts/boot/dtb/* /mnt/volumio/rootfs/boot/dtb -cp platform-pine64/sopine64lts/boot/uEnv.txt.sopine64 /mnt/volumio/rootfs/boot/uEnv.txt +cp platform-pine64/sopine64lts/boot/uEnv.txt.sopine64lts /mnt/volumio/rootfs/boot/uEnv.txt cp platform-pine64/sopine64lts/boot/boot.cmd /mnt/volumio/rootfs/boot echo "Compiling boot script" From 0a2e04e952f2b101854e1c87d8b2d5148420eca7 Mon Sep 17 00:00:00 2001 From: Volumio Date: Mon, 7 Dec 2020 12:10:38 +0100 Subject: [PATCH 659/673] Better naming for UIs --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 4bdad184f..55a6189d4 100755 --- a/build.sh +++ b/build.sh @@ -181,9 +181,9 @@ if [ -n "$BUILD" ]; then echo '#!/bin/sh # Pre-commit hook, uncomment when finished linting all codebase #npm run lint-staged' > "build/$BUILD/root/volumio/.git/hooks/pre-commit" - echo 'Cloning Volumio UI' + echo 'Cloning Volumio Classic UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www" - echo 'Cloning Volumio3 UI' + echo 'Cloning Volumio Contemporary UI' git clone --depth 1 -b dist3 --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www3" echo "Adding os-release infos" { From 98a90b84dee9bfca4668ccc77fd16c02c98ae4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 8 Dec 2020 17:25:09 +0100 Subject: [PATCH 660/673] soPine64(LTS): add WiFi for Pine64 module (rtl8723bs) --- scripts/sopine64image.sh | 2 +- scripts/sopine64ltsconfig.sh | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh index 71ad52a03..aa9d0099b 100755 --- a/scripts/sopine64image.sh +++ b/scripts/sopine64image.sh @@ -131,7 +131,7 @@ echo "Copying (so)Pine64(LTS) kernel modules" cp -pdR platform-pine64/sopine64lts/lib/modules /mnt/volumio/rootfs/lib/ echo "Confguring ALSA with sane defaults" -#cp platform-pine64/sopine64lts/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +cp platform-pine64/sopine64lts/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa echo "Copying firmware" cp -R platform-pine64/sopine64lts/firmware/* /mnt/volumio/rootfs/lib/firmware diff --git a/scripts/sopine64ltsconfig.sh b/scripts/sopine64ltsconfig.sh index c8b3afd35..dd9247ca5 100755 --- a/scripts/sopine64ltsconfig.sh +++ b/scripts/sopine64ltsconfig.sh @@ -22,12 +22,20 @@ tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" echo "abi.cp15_barrier=2" >> /etc/sysctl.conf -#echo "Adding default sound modules and wifi" -#echo "sunxi_codec -#sunxi_i2s -#sunxi_sndcodec -#8723bs -#" >> /etc/modules +echo "Adding 'unmute headphone' script" +echo "#!/bin/bash +CARD=\`aplay -l | grep \"Headphone Out\" | awk -F'[^0-9]*' '{print \$2}'\` +STATE=\`amixer -c $CARD cget numid=13 | grep \": values=\" | awk -F'[=]' '{print \$2}'\` + +if [ $STATE == off,off ]; then + amixer -c $CARD cset numid=13 on + amixer -c $CARD sget 'AIF1 Slot 0 Digital DAC' +else + echo \"Already enabled\" +fi + +exit 0 +"> /etc/rc.local echo "Installing additonal packages" apt-get update @@ -93,4 +101,5 @@ mkinitramfs-custom.sh -o /tmp/initramfs-tmp echo "Creating uInitrd from 'volumio.initrd'" mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd +rm /boot/volumio.initrd From 4c21a5da2dd20b98e17ceb09ee467c0f6effdf6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 8 Dec 2020 21:36:01 +0100 Subject: [PATCH 661/673] Pine64 boards: kernel 5.7.y, restructure and cleanup --- build.sh | 11 +- scripts/pine64config.sh | 50 ++++--- scripts/pine64image.sh | 165 +++++++++++++---------- scripts/sopine64image.sh | 246 ----------------------------------- scripts/sopine64ltsconfig.sh | 105 --------------- 5 files changed, 137 insertions(+), 440 deletions(-) delete mode 100755 scripts/sopine64image.sh delete mode 100755 scripts/sopine64ltsconfig.sh diff --git a/build.sh b/build.sh index 55a6189d4..ee20a88bd 100755 --- a/build.sh +++ b/build.sh @@ -283,12 +283,11 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/udooqdlimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; - pine64) echo 'Writing Pine64 Image File' + pine64plus|pine64solts) echo 'Writing Pine64 Model Image File' check_os_release "armv7" "$VERSION" "$DEVICE" -# this will be changed to armv8 once the volumio packges have been re-compiled for aarch64 - sh scripts/pine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 + sh scripts/pine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} ;; - nanopi64) echo 'Writing NanoPI A64 Image File' + nanopi64) echo 'Writing NanoPI A64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/nanopi64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; @@ -313,10 +312,6 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/primoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; - sopine64) echo 'Writing Sopine64 Image File' - check_os_release "armv7" "$VERSION" "$DEVICE" - sh scripts/sopine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 - ;; rock64) echo 'Writing Rock64 Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/rock64image.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/scripts/pine64config.sh b/scripts/pine64config.sh index 3b3a396a8..dd9247ca5 100755 --- a/scripts/pine64config.sh +++ b/scripts/pine64config.sh @@ -4,11 +4,14 @@ PATCH=$(cat /patch) # This script will be run in chroot under qemu. +echo "Initializing.." +. init.sh + echo "Creating \"fstab\"" -echo "# Odroid C2 fstab" > /etc/fstab +echo "# (so)Pine64(lts) fstab" > /etc/fstab echo "" >> /etc/fstab echo "proc /proc proc defaults 0 0 -/dev/mmcblk0p1 /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 +UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 @@ -16,26 +19,38 @@ tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 " > /etc/fstab -echo "Adding default sound modules and wifi" -echo "sunxi_codec -sunxi_i2s -sunxi_sndcodec -8723bs -" >> /etc/modules +echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" +echo "abi.cp15_barrier=2" >> /etc/sysctl.conf + +echo "Adding 'unmute headphone' script" +echo "#!/bin/bash +CARD=\`aplay -l | grep \"Headphone Out\" | awk -F'[^0-9]*' '{print \$2}'\` +STATE=\`amixer -c $CARD cget numid=13 | grep \": values=\" | awk -F'[=]' '{print \$2}'\` + +if [ $STATE == off,off ]; then + amixer -c $CARD cset numid=13 on + amixer -c $CARD sget 'AIF1 Slot 0 Digital DAC' +else + echo \"Already enabled\" +fi -echo "Blacklisting 8723bs_vq0" -echo "blacklist 8723bs_vq0" >> /etc/modprobe.d/blacklist-pine64.conf +exit 0 +"> /etc/rc.local echo "Installing additonal packages" apt-get update -apt-get -y install u-boot-tools liblircclient0 lirc +apt-get -y install u-boot-tools liblircclient0 lirc libcdio-dev libcdparanoia-dev bluez-firmware bluetooth bluez bluez-tools + +echo "Enabling Bluetooth Adapter auto-poweron" +echo "[Policy] +AutoEnable=true" >> /etc/bluetooth/main.conf echo "Cleaning APT Cache and remove policy file" rm -f /var/lib/apt/lists/*archive* apt-get clean echo "Adding custom modules overlayfs, squashfs and nls_cp437" -echo "overlayfs" >> /etc/initramfs-tools/modules +echo "overlay" >> /etc/initramfs-tools/modules echo "squashfs" >> /etc/initramfs-tools/modules echo "nls_cp437" >> /etc/initramfs-tools/modules @@ -64,9 +79,9 @@ rm -rf ${PATCH} fi rm /patch -echo "Changing to 'modules=dep'" -echo "(otherwise Odroid won't boot due to uInitrd 4MB limit)" -sed -i "s/MODULES=most/MODULES=dep/g" /etc/initramfs-tools/initramfs.conf +echo "Changing to 'modules=list'" +echo "(reduce uInitrd size)" +sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf echo "Installing winbind here, since it freezes networking" apt-get update @@ -83,3 +98,8 @@ touch /boot/resize-volumio-datapart echo "Creating initramfs 'volumio.initrd'" mkinitramfs-custom.sh -o /tmp/initramfs-tmp + +echo "Creating uInitrd from 'volumio.initrd'" +mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd +rm /boot/volumio.initrd + diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 973781a19..484528810 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -3,7 +3,7 @@ # Build Architecture Debian 32bit (to be changed to armv8) ARCH="armv7" -while getopts ":v:p:a:" opt; do +while getopts ":v:p:a:m:" opt; do case $opt in v) VERSION=$OPTARG @@ -14,11 +14,14 @@ while getopts ":v:p:a:" opt; do a) ARCH=$OPTARG ;; + m) + MODEL=$OPTARG + ;; esac done BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-pine64.img" +IMG_FILE="Volumio${VERSION}-${BUILDDATE}-${MODEL}.img" if [ "$ARCH" = arm ]; then DISTRO="Raspbian" @@ -31,16 +34,16 @@ echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 echo "Creating Image Bed" -LOOP_DEV=`sudo losetup -f --show ${IMG_FILE}` +LOOP_DEV=`losetup -f --show ${IMG_FILE}` # Note: leave the first 20Mb free for the firmware -sudo parted -s "${LOOP_DEV}" mklabel msdos -sudo parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 -sudo parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% -sudo parted -s "${LOOP_DEV}" set 1 boot on -sudo parted -s "${LOOP_DEV}" print -sudo partprobe "${LOOP_DEV}" -sudo kpartx -s -a "${LOOP_DEV}" +parted -s "${LOOP_DEV}" mklabel msdos +parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 +parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 +parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% +parted -s "${LOOP_DEV}" set 1 boot on +parted -s "${LOOP_DEV}" print +partprobe "${LOOP_DEV}" +kpartx -s -a "${LOOP_DEV}" BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` @@ -55,29 +58,46 @@ then fi echo "Creating boot and rootfs filesystems" -sudo mkfs -t vfat -n BOOT "${BOOT_PART}" -sudo mkfs -F -t ext4 -L volumio "${SYS_PART}" -sudo mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -t vfat -n BOOT "${BOOT_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync -echo "Preparing for the (so)Pine64(LTS) kernel/ platform files" +echo "Preparing for the ${MODEL} kernel/ platform files" if [ -d platform-pine64 ] then echo "Platform folder already exists - keeping it" # if you really want to re-clone from the repo, then delete the platform-pine64 folder # that will refresh all the odroid platforms, see below + cd platform-pine64 + if [ -f pine64-all.tar.xz ]; then + echo "Found a new tarball, unpacking..." + [ -d pine64-all ] || rm -r pine64-all + tar xfJ pine64-all.tar.xz + rm pine64-all.tar.xz + fi + cd .. else - echo "Clone (so)Pine64(LTS) files from repo" - git clone --depth 1 https://github.com/volumio/platform-pine64.git platform-pine64 - echo "Unpack the platform files" + echo "Clone ${MODEL} files from repo" + wget https://github.com/volumio/platform-pine64/raw/master/pine64-all.tar.xz + echo "Unpacking the platform files"echo "Unpack the (so)Pine64(LTS) platform files" cd platform-pine64 - tar xfJ sopine64lts.tar.xz + tar xfJ pine64-all.tar.xz cd .. fi -echo "Copying the Pine64 bootloader" -sudo dd if=platform-pine64/sopine64/u-boot/boot0.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=8 -sudo dd if=platform-pine64/sopine64/u-boot/u-boot-with-dtb.bin of=${LOOP_DEV} conv=notrunc bs=1k seek=19096 +#mainline u-boot +case $MODEL in + pine64|pine64plus ) + FAMILY=pine64-plus + ;; + pine64solts ) + FAMILY=pine64-so-lts + ;; +esac + +dd if=platform-pine64/pine64-all/u-boot/${FAMILY}/sunxi-spl.bin of=${LOOP_DEV} conv=fsync bs=8k seek=1 +dd if=platform-pine64/pine64-all/u-boot/${FAMILY}/u-boot.itb of=${LOOP_DEV} conv=fsync bs=8k seek=5 sync echo "Preparing for Volumio rootfs" @@ -85,7 +105,7 @@ if [ -d /mnt ] then echo "/mount folder exist" else - sudo mkdir /mnt + mkdir /mnt fi if [ -d /mnt/volumio ] then @@ -93,38 +113,54 @@ then rm -rf /mnt/volumio/* else echo "Creating Volumio Temp Directory" - sudo mkdir /mnt/volumio + mkdir /mnt/volumio fi echo "Creating mount point for the images partition" mkdir /mnt/volumio/images -sudo mount -t ext4 "${SYS_PART}" /mnt/volumio/images -sudo mkdir /mnt/volumio/rootfs -sudo mkdir /mnt/volumio/rootfs/boot -sudo mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot +mount -t ext4 "${SYS_PART}" /mnt/volumio/images +mkdir /mnt/volumio/rootfs +mkdir /mnt/volumio/rootfs/boot +mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot echo "Copying Volumio RootFs" -sudo cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs -echo "Copying (so)Pine64(LTS) boot files" -mkdir /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/sopine64/boot/pine64/Image /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/sopine64/boot/pine64/*.dtb /mnt/volumio/rootfs/boot/pine64 -sudo cp platform-pine64/sopine64/boot/uEnv.txt /mnt/volumio/rootfs/boot -sudo cp platform-pine64/sopine64/boot/Image.version /mnt/volumio/rootfs/boot -sudo cp platform-pine64/sopine64/boot/config* /mnt/volumio/rootfs/boot - -echo "Copying (so)Pine64(LTS) modules and firmware" -sudo cp -pdR platform-pine64/sopine64/lib/modules /mnt/volumio/rootfs/lib/ -sudo cp -pdR platform-pine64/sopine64/lib/firmware /mnt/volumio/rootfs/lib/ +cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs + +echo "Copying boot files" +mkdir /mnt/volumio/rootfs/boot/dtb +cp platform-pine64/pine64-all/boot/Image /mnt/volumio/rootfs/boot +cp -R platform-pine64/pine64-all/boot/dtb/* /mnt/volumio/rootfs/boot/dtb + +case $FAM in + pine64|pine64plus ) + cp platform-pine64/pine64-all/boot/uEnv.txt.pine64 /mnt/volumio/rootfs/boot/uEnv.txt + ;; + pine64solts ) + cp platform-pine64/pine64-all/boot/uEnv.txt.pine64-so-lts /mnt/volumio/rootfs/boot/uEnv.txt + ;; +esac + +cp platform-pine64/pine64-all/boot/boot.cmd /mnt/volumio/rootfs/boot + +echo "Compiling boot script" +mkimage -C none -A arm -T script -d platform-pine64/pine64-all/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr + +echo "Copying kernel configuration file" +cp platform-pine64/pine64-all/boot/config* /mnt/volumio/rootfs/boot + +echo "Copying kernel modules" +cp -pdR platform-pine64/pine64-all/lib/modules /mnt/volumio/rootfs/lib/ echo "Confguring ALSA with sane defaults" -sudo cp platform-pine64/sopine64/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +cp platform-pine64/pine64-all/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa +echo "Copying firmware" +cp -R platform-pine64/pine64-all/firmware/* /mnt/volumio/rootfs/lib/firmware sync -echo "Preparing to run chroot for more pine64 configuration" +echo "Preparing to run chroot for more ${MODEL} configuration)" cp scripts/pine64config.sh /mnt/volumio/rootfs -cp scripts/initramfs/init /mnt/volumio/rootfs/root +cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin #copy the scripts for updating from usb wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater @@ -135,6 +171,12 @@ mount /sys /mnt/volumio/rootfs/sys -t sysfs echo $PATCH > /mnt/volumio/rootfs/patch +echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) +UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) +UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) +MODEL=${MODEL}" > /mnt/volumio/rootfs/root/init.sh +chmod +x /mnt/volumio/rootfs/root/init.sh + if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then UIVARIANT=$(cat "UIVARIANT") @@ -161,7 +203,7 @@ if [ -f "${UIVARIANT_FILE}" ]; then fi #cleanup -rm /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init +rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/pine64config.sh /mnt/volumio/rootfs/root/init echo "Unmounting Temp devices" umount -l /mnt/volumio/rootfs/dev @@ -169,15 +211,11 @@ umount -l /mnt/volumio/rootfs/proc umount -l /mnt/volumio/rootfs/sys #echo "Copying LIRC configuration files" -#sudo cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc -#sudo cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc -#sudo cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc - -echo "==> Pine64 device installed" +#cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc +#cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc +#cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc -#echo "Removing temporary platform files" -#echo "(you can keep it safely as long as you're sure of no changes)" -#sudo rm -r platform-pine64 +echo "==> ${MODEL} device installed" sync echo "Finalizing Rootfs creation" @@ -190,30 +228,25 @@ if [ -d /mnt/squash ]; then rm -rf /mnt/squash/* else echo "Creating Volumio SquashFS Temp Dir" - sudo mkdir /mnt/squash + mkdir /mnt/squash fi echo "Copying Volumio rootfs to Temp Dir" cp -rp /mnt/volumio/rootfs/* /mnt/squash/ -if [ -e /mnt/kernel_current.tar.gz ]; then +if [ -e /mnt/kernel_current.tar ]; then echo "Volumio Kernel Partition Archive exists - Cleaning it" - rm -rf /mnt/kernel_current.tar.gz + rm -rf /mnt/kernel_current.tar fi echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar.gz --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . +tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . echo "Removing the Kernel" rm -rf /mnt/squash/boot/* echo "Creating SquashFS, removing any previous one" -if [ -e Volumio.sqsh ]; then - echo "Volumio Kernel Partition Archive exists - Cleaning it" - rm -r Volumio.sqsh -fi - -echo "Creating SquashFS" +rm -r Volumio.sqsh mksquashfs /mnt/squash/* Volumio.sqsh echo "Squash filesystem created" @@ -224,11 +257,11 @@ rm -rf /mnt/squash cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh sync echo "Unmounting Temp Devices" -sudo umount -l /mnt/volumio/images -sudo umount -l /mnt/volumio/rootfs/boot +umount -l /mnt/volumio/images +umount -l /mnt/volumio/rootfs/boot -sudo dmsetup remove_all -sudo losetup -d ${LOOP_DEV} +dmsetup remove_all +losetup -d ${LOOP_DEV} sync md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/sopine64image.sh b/scripts/sopine64image.sh deleted file mode 100755 index aa9d0099b..000000000 --- a/scripts/sopine64image.sh +++ /dev/null @@ -1,246 +0,0 @@ -#!/bin/sh - -# Build Architecture Debian 32bit (to be changed to armv8) -ARCH="armv7" - -while getopts ":v:p:a:" opt; do - case $opt in - v) - VERSION=$OPTARG - ;; - p) - PATCH=$OPTARG - ;; - a) - ARCH=$OPTARG - ;; - esac -done - -BUILDDATE=$(date -I) -IMG_FILE="Volumio${VERSION}-${BUILDDATE}-sopine64.img" - -if [ "$ARCH" = arm ]; then - DISTRO="Raspbian" -else - DISTRO="Debian 32bit" -fi - -echo "Creating Image File ${IMG_FILE} with ${DISTRO} rootfs" - -dd if=/dev/zero of=${IMG_FILE} bs=1M count=2800 - -echo "Creating Image Bed" -LOOP_DEV=`losetup -f --show ${IMG_FILE}` -# Note: leave the first 20Mb free for the firmware -parted -s "${LOOP_DEV}" mklabel msdos -parted -s "${LOOP_DEV}" mkpart primary fat32 21 84 -parted -s "${LOOP_DEV}" mkpart primary ext3 84 2500 -parted -s "${LOOP_DEV}" mkpart primary ext3 2500 100% -parted -s "${LOOP_DEV}" set 1 boot on -parted -s "${LOOP_DEV}" print -partprobe "${LOOP_DEV}" -kpartx -s -a "${LOOP_DEV}" - -BOOT_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p1` -SYS_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p2` -DATA_PART=`echo /dev/mapper/"$( echo ${LOOP_DEV} | sed -e 's/.*\/\(\w*\)/\1/' )"p3` -echo "Using: " ${BOOT_PART} -echo "Using: " ${SYS_PART} -echo "Using: " ${DATA_PART} -if [ ! -b "${BOOT_PART}" ] -then - echo "${BOOT_PART} doesn't exist" - exit 1 -fi - -echo "Creating boot and rootfs filesystems" -mkfs -t vfat -n BOOT "${BOOT_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" -sync - -echo "Preparing for the (so)Pine64(LTS) kernel/ platform files" -if [ -d platform-pine64 ] -then - echo "Platform folder already exists - keeping it" - # if you really want to re-clone from the repo, then delete the platform-pine64 folder - # that will refresh all the odroid platforms, see below - cd platform-pine64 - if [ -f sopine64lts.tar.xz ]; then - echo "Found a new tarball, unpacking..." - [ -d sopine64lts ] || rm -r sopine64lts - tar xfJ sopine64lts.tar.xz - rm sopine64lts.tar.xz - fi - cd .. -else - echo "Clone (so)Pine64(LTS) files from repo" - wget https://github.com/volumio/platform-pine64/raw/master/sopine64lts.tar.xz - echo "Unpacking the platform files"echo "Unpack the (so)Pine64(LTS) platform files" - cd platform-pine64 - tar xfJ sopine64lts.tar.xz - cd .. -fi - -#mainline u-boot -dd if=platform-pine64/sopine64lts/u-boot/sunxi-spl.bin of=${LOOP_DEV} conv=fsync bs=8k seek=1 -dd if=platform-pine64/sopine64lts/u-boot/u-boot.itb of=${LOOP_DEV} conv=fsync bs=8k seek=5 -sync - -echo "Preparing for Volumio rootfs" -if [ -d /mnt ] -then - echo "/mount folder exist" -else - mkdir /mnt -fi -if [ -d /mnt/volumio ] -then - echo "Volumio Temp Directory Exists - Cleaning it" - rm -rf /mnt/volumio/* -else - echo "Creating Volumio Temp Directory" - mkdir /mnt/volumio -fi - -echo "Creating mount point for the images partition" -mkdir /mnt/volumio/images -mount -t ext4 "${SYS_PART}" /mnt/volumio/images -mkdir /mnt/volumio/rootfs -mkdir /mnt/volumio/rootfs/boot -mount -t vfat "${BOOT_PART}" /mnt/volumio/rootfs/boot - -echo "Copying Volumio RootFs" -cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs - -echo "Copying (so)Pine64(LTS) boot files" -mkdir /mnt/volumio/rootfs/boot/dtb -cp platform-pine64/sopine64lts/boot/Image /mnt/volumio/rootfs/boot -cp -R platform-pine64/sopine64lts/boot/dtb/* /mnt/volumio/rootfs/boot/dtb -cp platform-pine64/sopine64lts/boot/uEnv.txt.sopine64lts /mnt/volumio/rootfs/boot/uEnv.txt -cp platform-pine64/sopine64lts/boot/boot.cmd /mnt/volumio/rootfs/boot - -echo "Compiling boot script" -mkimage -C none -A arm -T script -d platform-pine64/sopine64lts/boot/boot.cmd /mnt/volumio/rootfs/boot/boot.scr - -echo "Copying kernel configuration file" -cp platform-pine64/sopine64lts/boot/config* /mnt/volumio/rootfs/boot - -echo "Copying (so)Pine64(LTS) kernel modules" -cp -pdR platform-pine64/sopine64lts/lib/modules /mnt/volumio/rootfs/lib/ - -echo "Confguring ALSA with sane defaults" -cp platform-pine64/sopine64lts/var/lib/alsa/* /mnt/volumio/rootfs/var/lib/alsa - -echo "Copying firmware" -cp -R platform-pine64/sopine64lts/firmware/* /mnt/volumio/rootfs/lib/firmware -sync - -echo "Preparing to run chroot for more so(PINE64)lts configuration)" -cp scripts/sopine64ltsconfig.sh /mnt/volumio/rootfs -cp scripts/initramfs/init.nextarm /mnt/volumio/rootfs/root/init -cp scripts/initramfs/mkinitramfs-custom.sh /mnt/volumio/rootfs/usr/local/sbin -#copy the scripts for updating from usb -wget -P /mnt/volumio/rootfs/root http://repo.volumio.org/Volumio2/Binaries/volumio-init-updater - -mount /dev /mnt/volumio/rootfs/dev -o bind -mount /proc /mnt/volumio/rootfs/proc -t proc -mount /sys /mnt/volumio/rootfs/sys -t sysfs - -echo $PATCH > /mnt/volumio/rootfs/patch - -echo "UUID_DATA=$(blkid -s UUID -o value ${DATA_PART}) -UUID_IMG=$(blkid -s UUID -o value ${SYS_PART}) -UUID_BOOT=$(blkid -s UUID -o value ${BOOT_PART}) -" > /mnt/volumio/rootfs/root/init.sh -chmod +x /mnt/volumio/rootfs/root/init.sh - -if [ -f "/mnt/volumio/rootfs/$PATCH/patch.sh" ] && [ -f "config.js" ]; then - if [ -f "UIVARIANT" ] && [ -f "variant.js" ]; then - UIVARIANT=$(cat "UIVARIANT") - echo "Configuring variant $UIVARIANT" - echo "Starting config.js for variant $UIVARIANT" - node config.js $PATCH $UIVARIANT - echo $UIVARIANT > /mnt/volumio/rootfs/UIVARIANT - else - echo "Starting config.js" - node config.js $PATCH - fi -fi - -chroot /mnt/volumio/rootfs /bin/bash -x <<'EOF' -su - -/sopine64ltsconfig.sh -EOF - -UIVARIANT_FILE=/mnt/volumio/rootfs/UIVARIANT -if [ -f "${UIVARIANT_FILE}" ]; then - echo "Starting variant.js" - node variant.js - rm $UIVARIANT_FILE -fi - -#cleanup -rm /mnt/volumio/rootfs/root/init.sh /mnt/volumio/rootfs/sopine64ltsconfig.sh /mnt/volumio/rootfs/root/init - -echo "Unmounting Temp devices" -umount -l /mnt/volumio/rootfs/dev -umount -l /mnt/volumio/rootfs/proc -umount -l /mnt/volumio/rootfs/sys - -#echo "Copying LIRC configuration files" -#cp platform-pine64/pine64/etc/lirc/lircd.conf /mnt/volumio/rootfs/etc/lirc -#cp platform-pine64/pine64/etc/lirc/hardware.conf /mnt/volumio/rootfs/etc/lirc -#cp platform-pine64/pine64/etc/lirc/lircrc /mnt/volumio/rootfs/etc/lirc - -echo "==> soPine64/ Pine64 LTS device installed" -sync - -echo "Finalizing Rootfs creation" -sh scripts/finalize.sh - -echo "Preparing rootfs base for SquashFS" - -if [ -d /mnt/squash ]; then - echo "Volumio SquashFS Temp Dir Exists - Cleaning it" - rm -rf /mnt/squash/* -else - echo "Creating Volumio SquashFS Temp Dir" - mkdir /mnt/squash -fi - -echo "Copying Volumio rootfs to Temp Dir" -cp -rp /mnt/volumio/rootfs/* /mnt/squash/ - -if [ -e /mnt/kernel_current.tar ]; then - echo "Volumio Kernel Partition Archive exists - Cleaning it" - rm -rf /mnt/kernel_current.tar -fi - -echo "Creating Kernel Partition Archive" -tar cf /mnt/kernel_current.tar --exclude='resize-volumio-datapart' -C /mnt/squash/boot/ . - -echo "Removing the Kernel" -rm -rf /mnt/squash/boot/* - -echo "Creating SquashFS, removing any previous one" -rm -r Volumio.sqsh -mksquashfs /mnt/squash/* Volumio.sqsh - -echo "Squash filesystem created" -echo "Cleaning squash environment" -rm -rf /mnt/squash - -#copy the squash image inside the boot partition -cp Volumio.sqsh /mnt/volumio/images/volumio_current.sqsh -sync -echo "Unmounting Temp Devices" -umount -l /mnt/volumio/images -umount -l /mnt/volumio/rootfs/boot - -dmsetup remove_all -losetup -d ${LOOP_DEV} -sync - -md5sum "$IMG_FILE" > "${IMG_FILE}.md5" diff --git a/scripts/sopine64ltsconfig.sh b/scripts/sopine64ltsconfig.sh deleted file mode 100755 index dd9247ca5..000000000 --- a/scripts/sopine64ltsconfig.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash - -PATCH=$(cat /patch) - -# This script will be run in chroot under qemu. - -echo "Initializing.." -. init.sh - -echo "Creating \"fstab\"" -echo "# (so)Pine64(lts) fstab" > /etc/fstab -echo "" >> /etc/fstab -echo "proc /proc proc defaults 0 0 -UUID=${UUID_BOOT} /boot vfat defaults,utf8,user,rw,umask=111,dmask=000 0 1 -tmpfs /var/log tmpfs size=20M,nodev,uid=1000,mode=0777,gid=4, 0 0 -tmpfs /var/spool/cups tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /var/spool/cups/tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /tmp tmpfs defaults,noatime,mode=0755 0 0 -tmpfs /dev/shm tmpfs defaults,nosuid,noexec,nodev 0 0 -" > /etc/fstab - -echo "Fixing armv8 deprecated instruction emulation with armv7 rootfs" -echo "abi.cp15_barrier=2" >> /etc/sysctl.conf - -echo "Adding 'unmute headphone' script" -echo "#!/bin/bash -CARD=\`aplay -l | grep \"Headphone Out\" | awk -F'[^0-9]*' '{print \$2}'\` -STATE=\`amixer -c $CARD cget numid=13 | grep \": values=\" | awk -F'[=]' '{print \$2}'\` - -if [ $STATE == off,off ]; then - amixer -c $CARD cset numid=13 on - amixer -c $CARD sget 'AIF1 Slot 0 Digital DAC' -else - echo \"Already enabled\" -fi - -exit 0 -"> /etc/rc.local - -echo "Installing additonal packages" -apt-get update -apt-get -y install u-boot-tools liblircclient0 lirc libcdio-dev libcdparanoia-dev bluez-firmware bluetooth bluez bluez-tools - -echo "Enabling Bluetooth Adapter auto-poweron" -echo "[Policy] -AutoEnable=true" >> /etc/bluetooth/main.conf - -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean - -echo "Adding custom modules overlayfs, squashfs and nls_cp437" -echo "overlay" >> /etc/initramfs-tools/modules -echo "squashfs" >> /etc/initramfs-tools/modules -echo "nls_cp437" >> /etc/initramfs-tools/modules - -echo "Copying volumio initramfs updater" -cd /root/ -mv volumio-init-updater /usr/local/sbin - -#On The Fly Patch -if [ "$PATCH" = "volumio" ]; then -echo "No Patch To Apply" -else -echo "Applying Patch ${PATCH}" -PATCHPATH=/${PATCH} -cd $PATCHPATH -#Check the existence of patch script -if [ -f "patch.sh" ]; then -sh patch.sh -else -echo "Cannot Find Patch File, aborting" -fi -if [ -f "install.sh" ]; then -sh install.sh -fi -cd / -rm -rf ${PATCH} -fi -rm /patch - -echo "Changing to 'modules=list'" -echo "(reduce uInitrd size)" -sed -i "s/MODULES=most/MODULES=list/g" /etc/initramfs-tools/initramfs.conf - -echo "Installing winbind here, since it freezes networking" -apt-get update -apt-get install -y winbind libnss-winbind - -echo "Cleaning APT Cache and remove policy file" -rm -f /var/lib/apt/lists/*archive* -apt-get clean -rm /usr/sbin/policy-rc.d - -#First Boot operations -echo "Signalling the init script to re-size the volumio data partition" -touch /boot/resize-volumio-datapart - -echo "Creating initramfs 'volumio.initrd'" -mkinitramfs-custom.sh -o /tmp/initramfs-tmp - -echo "Creating uInitrd from 'volumio.initrd'" -mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/volumio.initrd /boot/uInitrd -rm /boot/volumio.initrd - From 168ba7444df98cd868db72f24faec0b6346489cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Wed, 9 Dec 2020 16:57:48 +0100 Subject: [PATCH 662/673] pine64 boards: fix build issue --- scripts/pine64image.sh | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/scripts/pine64image.sh b/scripts/pine64image.sh index 484528810..f6586f093 100755 --- a/scripts/pine64image.sh +++ b/scripts/pine64image.sh @@ -86,20 +86,6 @@ else cd .. fi -#mainline u-boot -case $MODEL in - pine64|pine64plus ) - FAMILY=pine64-plus - ;; - pine64solts ) - FAMILY=pine64-so-lts - ;; -esac - -dd if=platform-pine64/pine64-all/u-boot/${FAMILY}/sunxi-spl.bin of=${LOOP_DEV} conv=fsync bs=8k seek=1 -dd if=platform-pine64/pine64-all/u-boot/${FAMILY}/u-boot.itb of=${LOOP_DEV} conv=fsync bs=8k seek=5 -sync - echo "Preparing for Volumio rootfs" if [ -d /mnt ] then @@ -131,11 +117,18 @@ mkdir /mnt/volumio/rootfs/boot/dtb cp platform-pine64/pine64-all/boot/Image /mnt/volumio/rootfs/boot cp -R platform-pine64/pine64-all/boot/dtb/* /mnt/volumio/rootfs/boot/dtb -case $FAM in +case $MODEL in pine64|pine64plus ) + echo "Copying specific (u)boot files for pine64/pine64plus" + dd if=platform-pine64/pine64-all/u-boot/pine64-plus/sunxi-spl.bin of=${LOOP_DEV} conv=fsync bs=8k seek=1 + dd if=platform-pine64/pine64-all/u-boot/pine64-plus/u-boot.itb of=${LOOP_DEV} conv=fsync bs=8k seek=5 cp platform-pine64/pine64-all/boot/uEnv.txt.pine64 /mnt/volumio/rootfs/boot/uEnv.txt ;; + pine64solts ) + echo "Copying specific (u)boot files for sopine64/ pine64lts" + dd if=platform-pine64/pine64-all/u-boot/pine64-so-lts/sunxi-spl.bin of=${LOOP_DEV} conv=fsync bs=8k seek=1 + dd if=platform-pine64/pine64-all/u-boot/pine64-so-lts/u-boot.itb of=${LOOP_DEV} conv=fsync bs=8k seek=5 cp platform-pine64/pine64-all/boot/uEnv.txt.pine64-so-lts /mnt/volumio/rootfs/boot/uEnv.txt ;; esac From 673880f1b1fb7cdbd957167570e0bc11f33c6cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Tue, 9 Feb 2021 20:07:57 +0100 Subject: [PATCH 663/673] Update odroidc4image.sh fix for platform changes because of buster migration --- scripts/odroidc4image.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/odroidc4image.sh b/scripts/odroidc4image.sh index 5ffc42526..62e96f255 100755 --- a/scripts/odroidc4image.sh +++ b/scripts/odroidc4image.sh @@ -114,8 +114,10 @@ echo "INFO Copying Volumio RootFs" cp -pdR build/$ARCH/root/* /mnt/volumio/rootfs echo "INFO Copying odroidc4 boot files" cp platform-odroid/odroidc4/boot/*boot.ini /mnt/volumio/rootfs/boot -cp platform-odroid/odroidc4/boot/meson64_odroidc4.dtb /mnt/volumio/rootfs/boot +cp -dR platform-odroid/odroidc4/boot/amlogic /mnt/volumio/rootfs/boot +cp platform-odroid/odroidc4/boot/config-* /mnt/volumio/rootfs/boot cp platform-odroid/odroidc4/boot/Image* /mnt/volumio/rootfs/boot +cp -pdR platform-odroid/odroidc4/lib/firmware /mnt/volumio/rootfs/boot/lib echo "INFO Copying odroidc4 performance tweaking" cp platform-odroid/odroidc4/etc/rc.local /mnt/volumio/rootfs/etc From a3ed097bbb47a473798ffcf099aed5e16d642bbf Mon Sep 17 00:00:00 2001 From: gkkpch Date: Thu, 18 Feb 2021 18:24:40 +0100 Subject: [PATCH 664/673] nanopineo2: fix for building jessie image on buster host --- scripts/nanopineo2image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 27989978e..ba16f4cc9 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -56,8 +56,8 @@ fi echo "Creating boot and rootfs filesystems" mkfs -t vfat -n BOOT "${BOOT_PART}" -mkfs -F -t ext4 -L volumio "${SYS_PART}" -mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync GETNEO2=yes From 118df47e018a218cfa8438b1a5f988a130e05a71 Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 2 Mar 2021 10:57:06 +0100 Subject: [PATCH 665/673] Revert "nanopineo2: fix for building jessie image on buster host" This reverts commit a3ed097bbb47a473798ffcf099aed5e16d642bbf. --- scripts/nanopineo2image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index ba16f4cc9..27989978e 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -56,8 +56,8 @@ fi echo "Creating boot and rootfs filesystems" mkfs -t vfat -n BOOT "${BOOT_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" -mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync GETNEO2=yes From f86279665b7090a9dca10ddf43abac410ebed4af Mon Sep 17 00:00:00 2001 From: volumio Date: Tue, 2 Mar 2021 13:30:23 +0100 Subject: [PATCH 666/673] Revert "Revert "nanopineo2: fix for building jessie image on buster host"" This reverts commit 118df47e018a218cfa8438b1a5f988a130e05a71. --- scripts/nanopineo2image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nanopineo2image.sh b/scripts/nanopineo2image.sh index 27989978e..ba16f4cc9 100755 --- a/scripts/nanopineo2image.sh +++ b/scripts/nanopineo2image.sh @@ -56,8 +56,8 @@ fi echo "Creating boot and rootfs filesystems" mkfs -t vfat -n BOOT "${BOOT_PART}" -mkfs -F -t ext4 -L volumio "${SYS_PART}" -mkfs -F -t ext4 -L volumio_data "${DATA_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio "${SYS_PART}" || mkfs -F -t ext4 -L volumio "${SYS_PART}" +mkfs -F -t ext4 -O ^metadata_csum,^64bit -L volumio_data "${DATA_PART}" || mkfs -F -t ext4 -L volumio_data "${DATA_PART}" sync GETNEO2=yes From 22a97be366c744da950814a3ee929b16a50014b3 Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 26 Mar 2021 19:03:12 +0100 Subject: [PATCH 667/673] Prevent empty file issue with overlayfs --- build.sh | 4 ++++ scripts/finalize.sh | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index ee20a88bd..b16467185 100755 --- a/build.sh +++ b/build.sh @@ -243,6 +243,10 @@ case "$DEVICE" in check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/cuboxiimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; + cuboxp) echo 'Writing Cubox Pulse Image File' + check_os_release "armv7" "$VERSION" "$DEVICE" + sh scripts/cuboxpimage.sh -v "$VERSION" -p "$PATCH" -a armv7 + ;; odroidc1) echo 'Writing Odroid-C1/C1+ Image File' check_os_release "armv7" "$VERSION" "$DEVICE" sh scripts/odroidc1image.sh -v "$VERSION" -p "$PATCH" -a armv7 diff --git a/scripts/finalize.sh b/scripts/finalize.sh index 0505c85e4..5aa3e329f 100755 --- a/scripts/finalize.sh +++ b/scripts/finalize.sh @@ -2,6 +2,7 @@ HARDWARE=`/bin/cat /mnt/volumio/rootfs/etc/os-release | grep "VOLUMIO_HARDWARE" | cut -d \\" -f2 | tr -d "\n"` BASEDIR=/mnt/volumio/rootfs + echo "Computing Volumio folder Hash Checksum" HASH=`/usr/bin/md5deep -r -l -s -q /mnt/volumio/rootfs/volumio | sort | md5sum | tr -d "-" | tr -d " \t\n\r"` echo "VOLUMIO_HASH=\"${HASH}\"" >> /mnt/volumio/rootfs/etc/os-release @@ -12,6 +13,10 @@ echo "Cleaning docs" find /mnt/volumio/rootfs/usr/share/doc -depth -type f ! -name copyright|xargs rm || true find /mnt/volumio/rootfs/usr/share/doc -empty|xargs rmdir || true +# We need to have a non-empty /etc/resolv.conf file otherwise we trigger a bug in overlayfs which blocks the system" +echo "Writing resolv.conf" +echo "###" > /mnt/volumio/rootfs/etc/resolv.conf + if [ $HARDWARE != "x86" ]; then echo "Cleaning man and caches" @@ -39,6 +44,4 @@ else find $BASEDIR/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/usr/sbin -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' find $BASEDIR/usr/local/bin/ -type f -exec strip --strip-all > /dev/null 2>&1 {} ';' - - fi From 14acf028cf46278bd3fd3dd02523424a9bc825bf Mon Sep 17 00:00:00 2001 From: volumio Date: Fri, 9 Apr 2021 12:10:29 +0200 Subject: [PATCH 668/673] Install Vivaldi --- scripts/install-kiosk-vivaldi.sh | 99 ++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100755 scripts/install-kiosk-vivaldi.sh diff --git a/scripts/install-kiosk-vivaldi.sh b/scripts/install-kiosk-vivaldi.sh new file mode 100755 index 000000000..eea9d128b --- /dev/null +++ b/scripts/install-kiosk-vivaldi.sh @@ -0,0 +1,99 @@ +#!/bin/sh +HARDWARE=$(cat /etc/os-release | grep HARDWARE | tr -d 'VOLUMIO_HARDWARE="') + +echo "Installing Volumio local UI" + +export DEBIAN_FRONTEND=noninteractive + +echo "Fixing keyboard input issue" +apt-get update +apt-get install -y keyboard-configuration --no-install-recommends + +echo "Installing Vivaldi Dependencies" +sudo apt-get update +sudo apt-get -y install + +echo "Installing Graphical environment" +sudo apt-get install -y xinit xorg openbox libexif12 unclutter --no-install-recommends + +echo "Download Vivaldi" +cd /home/volumio/ +wget https://repo.volumio.org/Volumio2/Vivaldi/vivaldi-stable_2.7.1628.33-1_armhf.deb + +echo "Install Vivaldi" +sudo dpkg -i /home/volumio/vivaldi-*.deb +sudo apt-get install -y -f --no-install-recommends +sudo dpkg -i /home/volumio/vivaldi-*.deb + +rm /home/volumio/vivaldi-*.deb + +echo "Cleaning Vivaldi Apt Sources" +rm /etc/apt/sources.list.d/vivaldi.list + +echo "Installing Japanese, Korean, Chinese and Taiwanese fonts" +apt-get -y install fonts-arphic-ukai fonts-arphic-gbsn00lp fonts-unfonts-core + +echo "Dependencies installed" + +echo "Creating Kiosk Data dir" +mkdir /data/volumiokiosk + +echo " Creating Vivaldi kiosk start script" + +echo "#!/bin/bash + +mkdir -p /data/volumiokiosk +export DISPLAY=:0 + +xset s off -dpms +rm -rf /data/volumiokiosk/Singleton* + +sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /data/volumiokiosk/Default/Preferences +sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' /data/volumiokiosk/Default/Preferences + +openbox-session & +sleep 4 + +/usr/bin/vivaldi --kiosk --no-sandbox --disable-background-networking --disable-remote-extensions --disable-pinch --ignore-gpu-blacklist --use-gl=egl --disable-gpu-compositing --enable-gpu-rasterization --enable-zero-copy --disable-smooth-scrolling --enable-scroll-prediction --max-tiles-for-interest-area=512 --num-raster-threads=4 --enable-low-res-tiling --user-agent="volumiokiosk-memorysave-touch" --touch-events --user-data-dir='/data/volumiokiosk' --force-device-scale-factor=1.2 --app=http://localhost:3000 " > /opt/volumiokiosk.sh + +/bin/chmod +x /opt/volumiokiosk.sh + +echo "Creating Systemd Unit for Kiosk" +echo "[Unit] +Description=Start Volumio Kiosk +Wants=volumio.service +After=volumio.service +[Service] +Type=simple +User=root +Group=root +ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh -- -keeptty +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 +[Install] +WantedBy=multi-user.target +" > /lib/systemd/system/volumio-kiosk.service +/bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service + +echo " Allowing volumio to start an xsession" +/bin/sed -i "s/allowed_users=console/allowed_users=anybody/" /etc/X11/Xwrapper.config + + +echo "Enabling kiosk" +/bin/ln -s /lib/systemd/system/volumio-kiosk.service /etc/systemd/system/multi-user.target.wants/volumio-kiosk.service + +if [ "$HARDWARE" != "motivo" ]; then + + echo "Enabling UI for HDMI output selection" + echo '[{"value": false,"id":"section_hdmi_settings","attribute_name": "hidden"}]' > /volumio/app/plugins/system_controller/system/override.json + + echo "Setting HDMI UI enabled by default" + /usr/bin/jq '.hdmi_enabled.value = true' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json + /usr/bin/jq '.hdmi_enabled.type = "boolean"' /volumio/app/plugins/system_controller/system/config.json > /hdmi && mv /hdmi /volumio/app/plugins/system_controller/system/config.json +fi + +echo "Setting localhost" +echo '{"localhost": "http://127.0.0.1:3000"}' > /volumio/http/www/app/local-config.json +if [ -d "/volumio/http/www3" ]; then + echo '{"localhost": "http://127.0.0.1:3000"}' > /volumio/http/www3/app/local-config.json +fi From b4b5b94702fd6ae0c327fd82f6001e596bcd8757 Mon Sep 17 00:00:00 2001 From: mikelangeloz Date: Tue, 11 May 2021 19:18:17 +0200 Subject: [PATCH 669/673] Enlarge MP1 Partition on installer --- installer/board-config/mp1/mkinstall_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh index 8cfca1495..a3afdd8e1 100644 --- a/installer/board-config/mp1/mkinstall_config.sh +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -14,7 +14,7 @@ LBLDATA="volumio_data" BOOT_TYPE=msdos # msdos or gpt BOOT_START=16 BOOT_END=80 -IMAGE_END=2580 +IMAGE_END=3800 BOOT=/mnt/boot BOOTDELAY=1 BOOTDEV="mmcblk1" From 7394eeea20915eeae8ac2afd199fe2c368a561c2 Mon Sep 17 00:00:00 2001 From: mikelangeloz Date: Mon, 17 May 2021 20:19:43 +0200 Subject: [PATCH 670/673] Increase boot partition size for N2 --- installer/board-config/odroidn2/mkinstall_config.sh | 2 +- scripts/configure.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/installer/board-config/odroidn2/mkinstall_config.sh b/installer/board-config/odroidn2/mkinstall_config.sh index d6cd6c4f9..bd622cad9 100644 --- a/installer/board-config/odroidn2/mkinstall_config.sh +++ b/installer/board-config/odroidn2/mkinstall_config.sh @@ -14,7 +14,7 @@ LBLDATA="volumio_data" BOOT_TYPE=msdos # msdos or gpt BOOT_START=1 BOOT_END=64 -IMAGE_END=2500 +IMAGE_END=3800 BOOT=/mnt/boot BOOTDELAY=1 BOOTDEV="mmcblk1" diff --git a/scripts/configure.sh b/scripts/configure.sh index 4b7140686..edab7e843 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -103,6 +103,8 @@ chmod a+x build/$BUILD/root/bin/volumio_cpu_tweak cp volumio/etc/default/ifplugd build/$BUILD/root/etc/default/ifplugd #TRIGGERHAPPY cp -r volumio/etc/triggerhappy build/$BUILD/root/etc +#ORIGIN +[ -f origin ] && cp origin build/$BUILD/etc/origin echo 'Done Copying Custom Volumio System Files' From cd11dc738d0d82822d0aa776d0729686b82e3758 Mon Sep 17 00:00:00 2001 From: mikelangeloz Date: Mon, 17 May 2021 21:33:21 +0200 Subject: [PATCH 671/673] Further increase partition size on MP1 --- installer/board-config/mp1/mkinstall_config.sh | 2 +- scripts/configure.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/board-config/mp1/mkinstall_config.sh b/installer/board-config/mp1/mkinstall_config.sh index a3afdd8e1..0f0e24a1a 100644 --- a/installer/board-config/mp1/mkinstall_config.sh +++ b/installer/board-config/mp1/mkinstall_config.sh @@ -14,7 +14,7 @@ LBLDATA="volumio_data" BOOT_TYPE=msdos # msdos or gpt BOOT_START=16 BOOT_END=80 -IMAGE_END=3800 +IMAGE_END=3900 BOOT=/mnt/boot BOOTDELAY=1 BOOTDEV="mmcblk1" diff --git a/scripts/configure.sh b/scripts/configure.sh index edab7e843..3cc301b8d 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -104,7 +104,7 @@ cp volumio/etc/default/ifplugd build/$BUILD/root/etc/default/ifplugd #TRIGGERHAPPY cp -r volumio/etc/triggerhappy build/$BUILD/root/etc #ORIGIN -[ -f origin ] && cp origin build/$BUILD/etc/origin +[ -f origin ] && cp origin build/$BUILD/root/etc/origin echo 'Done Copying Custom Volumio System Files' From a534b298b6dd60d6cd4c8fd739ac29390afd411f Mon Sep 17 00:00:00 2001 From: Volumio Date: Fri, 10 Sep 2021 15:09:34 +0200 Subject: [PATCH 672/673] Adding volumio to input group --- scripts/volumioconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/volumioconfig.sh b/scripts/volumioconfig.sh index 163b43436..03f993e3e 100755 --- a/scripts/volumioconfig.sh +++ b/scripts/volumioconfig.sh @@ -62,7 +62,7 @@ echo "" #Adding Main user Volumio echo "Adding Volumio User" groupadd volumio -useradd -c volumio -d /home/volumio -m -g volumio -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lp,systemd-journal -s /bin/bash -p '$6$tRtTtICB$Ki6z.DGyFRopSDJmLUcf3o2P2K8vr5QxRx5yk3lorDrWUhH64GKotIeYSNKefcniSVNcGHlFxZOqLM6xiDa.M.' volumio +useradd -c volumio -d /home/volumio -m -g volumio -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lp,systemd-journal,input -s /bin/bash -p '$6$tRtTtICB$Ki6z.DGyFRopSDJmLUcf3o2P2K8vr5QxRx5yk3lorDrWUhH64GKotIeYSNKefcniSVNcGHlFxZOqLM6xiDa.M.' volumio #Setting Root Password echo 'root:$1$JVNbxLRo$pNn5AmZxwRtWZ.xF.8xUq/' | chpasswd -e From dd2a4339faaeb892c7f467e7dc8d424aefb0bd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20Koerkamp?= Date: Fri, 24 Sep 2021 13:37:41 +0200 Subject: [PATCH 673/673] Installer: fixed an error in creating factory copies --- installer/runtime-generic/init-script | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/installer/runtime-generic/init-script b/installer/runtime-generic/init-script index 4317c0e19..f985d55c5 100644 --- a/installer/runtime-generic/init-script +++ b/installer/runtime-generic/init-script @@ -5,13 +5,13 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bin export BOOT=/mnt/boot export BOOTDELAY= -export BOOTDEV= +export BOOTDEV= export BOOTCONFIG= -export TARGETBOOT= -export TARGETDEV= -export TARGETDATA= -export TARGETIMAGE= -export HWDEVICE= +export TARGETBOOT= +export TARGETDEV= +export TARGETDATA= +export TARGETIMAGE= +export HWDEVICE= export USE_KMSG="yes" export UUIDFMT= @@ -59,19 +59,19 @@ mount -t vfat ${BOOTPART} ${BOOT} clear_target_device create_volumio_partitions -write_device_bootloader ${TARGETDEV} +write_device_bootloader ${TARGETDEV} mount_target_boot echo "[info] Copying current image partition files" cp $BOOT/data/image/* $BOOT/temp/image - + echo "[info] Copying volumio boot partition files (image, dtb, boot files etc.)" tar xf $BOOT/data/image/kernel_current.tar -C $BOOT/temp/boot if [ ! -z ${FACTORYCOPY} ]; then echo "[info] Continue with creating factory copies" - cp $BOOT/data/image/kernel_current.tar $BOOT/data/image/kernel_factory.tar - cp $BOOT/data/image/volumio_current.sqsh $BOOT/data/image/volumio_factory.sqsh + cp $BOOT/data/image/kernel_current.tar $BOOT/temp/image/kernel_factory.tar + cp $BOOT/data/image/volumio_current.sqsh $BOOT/temp/image/volumio_factory.sqsh fi sync