From 8bcef6257c5b9d8c846c313a7d9288b79e40d4ff Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 28 Jul 2020 10:24:10 +0000 Subject: [PATCH 01/12] Bugfix: Ignore "normal" lines that include the string "20" --- buildroot/package/hifiberry-automount/list-smb-servers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/package/hifiberry-automount/list-smb-servers b/buildroot/package/hifiberry-automount/list-smb-servers index b0705aca..4a451808 100644 --- a/buildroot/package/hifiberry-automount/list-smb-servers +++ b/buildroot/package/hifiberry-automount/list-smb-servers @@ -1,6 +1,6 @@ #!/bin/bash -for host in `nmblookup -s /dev/null -S workgroup | grep "20" | awk '{print $1}'`; do +for host in `nmblookup -s /dev/null -S workgroup | grep "<20>" | awk '{print $1}'`; do IPS="" for ip in `nmblookup -s /dev/null $host | awk '{print $1}'`; do IPS="$IPS $ip" From 0162a65c671bea32f045686f6f8a8a8091b1873d Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 28 Jul 2020 10:25:04 +0000 Subject: [PATCH 02/12] Remove dependeny to mpd --- buildroot/package/hifiberry-ympd/ympd.service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buildroot/package/hifiberry-ympd/ympd.service b/buildroot/package/hifiberry-ympd/ympd.service index e05eb6e9..a38c623a 100644 --- a/buildroot/package/hifiberry-ympd/ympd.service +++ b/buildroot/package/hifiberry-ympd/ympd.service @@ -1,7 +1,5 @@ [Unit] Description=ympd MPD web interface -Requires=mpd.service -After=mpd.service [Service] Type=simple @@ -13,3 +11,4 @@ RestartSec=5 [Install] WantedBy=multi-user.target + From 39f0410c2fa85eefae0c0fcae8da0cbda7a4c702 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Thu, 30 Jul 2020 13:35:18 +0000 Subject: [PATCH 03/12] -n seems to work better --- buildroot/package/hifiberry-psplash/psplash-start.vc4.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/package/hifiberry-psplash/psplash-start.vc4.service b/buildroot/package/hifiberry-psplash/psplash-start.vc4.service index 977d401e..f802fd90 100644 --- a/buildroot/package/hifiberry-psplash/psplash-start.vc4.service +++ b/buildroot/package/hifiberry-psplash/psplash-start.vc4.service @@ -7,7 +7,7 @@ ConditionPathExists=!/boot/nosplash [Service] Type=oneshot -ExecStart=/usr/bin/psplash -n +ExecStart=/usr/bin/psplash RemainAfterExit=yes [Install] From bd1bcded0991756a335e870a28adb6996ec2896d Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Thu, 30 Jul 2020 13:58:34 +0000 Subject: [PATCH 04/12] Bugfix in runlevel name --- buildroot/package/hifiberry-localbrowser/weston.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/package/hifiberry-localbrowser/weston.service b/buildroot/package/hifiberry-localbrowser/weston.service index 6e4c1dc5..cfccc754 100644 --- a/buildroot/package/hifiberry-localbrowser/weston.service +++ b/buildroot/package/hifiberry-localbrowser/weston.service @@ -41,5 +41,5 @@ User=root StandardInput=tty-fail [Install] -WantedBy=multiuser.target +WantedBy=multi-user.target From dd53e10b5374bb748843abc16a3999b813bedca8 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Thu, 30 Jul 2020 13:58:54 +0000 Subject: [PATCH 05/12] Always send a quit, don't depend on start --- buildroot/package/hifiberry-psplash/psplash-quit.service | 2 -- 1 file changed, 2 deletions(-) diff --git a/buildroot/package/hifiberry-psplash/psplash-quit.service b/buildroot/package/hifiberry-psplash/psplash-quit.service index 7530b022..dacb7d62 100644 --- a/buildroot/package/hifiberry-psplash/psplash-quit.service +++ b/buildroot/package/hifiberry-psplash/psplash-quit.service @@ -1,7 +1,5 @@ [Unit] Description=Terminate Psplash Boot Screen -After=psplash-start.service -ConditionPathExists=!/boot/nosplash [Service] Type=oneshot From bc56ed4342cd773e27c2217ce92db45ee7a48814 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 4 Aug 2020 07:36:48 +0000 Subject: [PATCH 06/12] Display weston, cog --- buildroot/package/hifiberry-tools/check-system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/package/hifiberry-tools/check-system b/buildroot/package/hifiberry-tools/check-system index ece527a1..b889e8d5 100755 --- a/buildroot/package/hifiberry-tools/check-system +++ b/buildroot/package/hifiberry-tools/check-system @@ -47,6 +47,6 @@ done echo $DEV | sed s/,\$// # Daemons -for i in audiocontrol2 beocreate2 bluetooth bluealsa bluealsa-aplay dlnampris mpd mpd-mpris pigpiod raat shairport-sync sigmatcp snapcastmpris spotify squeezelite sshd ympd ; do +for i in audiocontrol2 beocreate2 bluetooth bluealsa bluealsa-aplay dlnampris mpd mpd-mpris pigpiod raat shairport-sync sigmatcp snapcastmpris spotify squeezelite sshd ympd weston cog; do check_systemd $i $i.service done From 63b0a425f2d55f0224c65259a7ec56595b79dff2 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 4 Aug 2020 07:37:05 +0000 Subject: [PATCH 07/12] Save status of cog and weston --- buildroot/package/hifiberry-updater/services | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildroot/package/hifiberry-updater/services b/buildroot/package/hifiberry-updater/services index 7f4d2bad..13f8d459 100644 --- a/buildroot/package/hifiberry-updater/services +++ b/buildroot/package/hifiberry-updater/services @@ -15,4 +15,6 @@ snapcastmpris.service watchdog.service dlnampris.service alsaloop.service +weston.service +cog.service From 6bf6c8b79e25f096aa313e08e7acbd364696deb5 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 4 Aug 2020 13:52:33 +0000 Subject: [PATCH 08/12] Fixes for test images --- buildroot/package/dsptoolkit/Config.in | 1 + buildroot/package/dsptoolkit/S90sigmatcp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/buildroot/package/dsptoolkit/Config.in b/buildroot/package/dsptoolkit/Config.in index 334abdf0..dcb5323f 100644 --- a/buildroot/package/dsptoolkit/Config.in +++ b/buildroot/package/dsptoolkit/Config.in @@ -9,6 +9,7 @@ config BR2_PACKAGE_DSPTOOLKIT select BR2_PACKAGE_PYTHON_SPIDEV select BR2_PACKAGE_PYTHON_ZEROCONF select BR2_PACKAGE_PYTHON_ALSAAUDIO + select BR2_PACKAGE_PYTHON_REQUESTS select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_PYTHON3_SSL select BR2_PACKAGE_CA_CERTIFICATES diff --git a/buildroot/package/dsptoolkit/S90sigmatcp b/buildroot/package/dsptoolkit/S90sigmatcp index 0327cf01..c7af72da 100644 --- a/buildroot/package/dsptoolkit/S90sigmatcp +++ b/buildroot/package/dsptoolkit/S90sigmatcp @@ -1,7 +1,7 @@ #! /bin/sh # Additional options that are passed to SigmaTCP server -OPTIONS="--alsa" +#OPTIONS="--alsa" case "$1" in start) From f4839614c3b1786adfec8f5197687ae62e8de798 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 4 Aug 2020 14:11:24 +0000 Subject: [PATCH 09/12] Added testing for DSP add-on, improved DAC2HD testing --- buildroot/package/hifiberry-test/Config.in | 2 ++ .../package/hifiberry-test/S99testdac2hd | 18 ++++++++++--- .../package/hifiberry-test/eeprom/eepflash.sh | 11 ++++++++ .../hifiberry-test/{eeprom => }/hbflash.sh | 12 +++++++++ .../package/hifiberry-test/hifiberry-test.mk | 27 +++++++++++++++++-- 5 files changed, 64 insertions(+), 6 deletions(-) mode change 100644 => 100755 buildroot/package/hifiberry-test/S99testdac2hd rename buildroot/package/hifiberry-test/{eeprom => }/hbflash.sh (85%) diff --git a/buildroot/package/hifiberry-test/Config.in b/buildroot/package/hifiberry-test/Config.in index 14904b9a..9d99fd06 100644 --- a/buildroot/package/hifiberry-test/Config.in +++ b/buildroot/package/hifiberry-test/Config.in @@ -13,6 +13,8 @@ choice bool "None - just copy flash tools" config HIFIBERRY_TEST_DAC2HD bool "DAC2 HD" + config HIFIBERRY_TEST_DSPADDON + bool "DSP add-on board" config HIFIBERRY_TEST_AMP2 bool "Amp2" config HIFIBERRY_TEST_DACRTC diff --git a/buildroot/package/hifiberry-test/S99testdac2hd b/buildroot/package/hifiberry-test/S99testdac2hd old mode 100644 new mode 100755 index 4386717c..dc76f2d3 --- a/buildroot/package/hifiberry-test/S99testdac2hd +++ b/buildroot/package/hifiberry-test/S99testdac2hd @@ -22,10 +22,20 @@ case "$1" in # Program EEPROM PATH=$PATH:/opt/hifiberry/contrib export PATH - /opt/hifiberry/contrib/hbflash.sh -w -f=/opt/hifiberry/contrib/dac2hd.eep -t=24c32 - - amixer sset DAC 100% - play -n synth 60 sine 1000 & + /opt/hifiberry/contrib/hbflash.sh --writeread -f=/opt/hifiberry/contrib/dac2hd.eep -t=24c32 + if [ "$?" != "0" ]; then + echo + echo + echo + echo "EEPROM write FAIL, data not correct" + echo "aborting..." + echo + echo + echo + else + amixer sset DAC 100% + play -n synth 60 sine 1000 & + fi ;; stop) diff --git a/buildroot/package/hifiberry-test/eeprom/eepflash.sh b/buildroot/package/hifiberry-test/eeprom/eepflash.sh index c76f2b58..3aa08156 100755 --- a/buildroot/package/hifiberry-test/eeprom/eepflash.sh +++ b/buildroot/package/hifiberry-test/eeprom/eepflash.sh @@ -51,6 +51,9 @@ while [ "$1" != "" ]; do -w | --write) MODE="write" ;; + --writeread) + MODE="writeread" + ;; -t | --type) if [ "$VALUE" = "24c32" ] || [ "$VALUE" = "24c64" ] || [ "$VALUE" = "24c128" ] || [ "$VALUE" = "24c256" ] || [ "$VALUE" = "24c512" ] || [ "$VALUE" = "24c1024" ]; then @@ -158,7 +161,15 @@ elif [ "$MODE" = "read" ] echo "Reading..." dd if=$SYS/$BUS-00$ADDR/eeprom of=$FILE status=$DD_STATUS rc=$? +elif [ "$MODE" = "writeread" ] + then + echo "Writing..." + dd if=$FILE of=$SYS/$BUS-00$ADDR/eeprom status=$DD_STATUS + dd if=$SYS/$BUS-00$ADDR/eeprom of=/tmp/eeprom.$$ status=$DD_STATUS + diff $FILE /tmp/eeprom.$$ + rc =$? fi + echo "Closing EEPROM Device." echo "0x$ADDR" > $SYS/delete_device diff --git a/buildroot/package/hifiberry-test/eeprom/hbflash.sh b/buildroot/package/hifiberry-test/hbflash.sh similarity index 85% rename from buildroot/package/hifiberry-test/eeprom/hbflash.sh rename to buildroot/package/hifiberry-test/hbflash.sh index 5542808b..c2965406 100755 --- a/buildroot/package/hifiberry-test/eeprom/hbflash.sh +++ b/buildroot/package/hifiberry-test/hbflash.sh @@ -43,6 +43,9 @@ while [ "$1" != "" ]; do -w | --write) MODE="write" ;; + --writeread) + MODE="writeread" + ;; -t | --type) if [ "$VALUE" = "24c32" ] || [ "$VALUE" = "24c64" ] || [ "$VALUE" = "24c128" ] || [ "$VALUE" = "24c256" ] || [ "$VALUE" = "24c512" ] || [ "$VALUE" = "24c1024" ]; then @@ -116,6 +119,15 @@ elif [ "$MODE" = "read" ] echo "Reading..." dd if=/sys/class/i2c-adapter/i2c-$DEVID/$DEVID-0050/eeprom of=$FILE rc=$? +elif [ "$MODE" = "writeread" ] + then + echo "Writing..." + dd if=$FILE of=/sys/class/i2c-adapter/i2c-$DEVID/$DEVID-0050/eeprom + dd if=/sys/class/i2c-adapter/i2c-$DEVID/$DEVID-0050/eeprom of=/tmp/eeprom.$$ + SIZEORIG=`wc -c $FILE | awk '{print $1}'` + truncate -s $SIZEORIG /tmp/eeprom.$$ + diff $FILE /tmp/eeprom.$$ + rc=$? fi if [ $rc != 0 ]; then diff --git a/buildroot/package/hifiberry-test/hifiberry-test.mk b/buildroot/package/hifiberry-test/hifiberry-test.mk index 3c122893..c9d3903b 100644 --- a/buildroot/package/hifiberry-test/hifiberry-test.mk +++ b/buildroot/package/hifiberry-test/hifiberry-test.mk @@ -7,12 +7,12 @@ define HIFIBERRY_TEST_INSTALL_TARGET_CMDS echo "HiFiBerry Test" [ -d $(TARGET_DIR)/opt/hifiberry/contrib ] || mkdir -p $(TARGET_DIR)/opt/hifiberry/contrib + $(INSTALL) -D -m 0700 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/hbflash.sh \ + $(TARGET_DIR)/opt/hifiberry/contrib $(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/dspdac.xml \ $(TARGET_DIR)/opt/hifiberry/contrib $(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/dacadcaddon-test.xml \ $(TARGET_DIR)/opt/hifiberry/contrib - $(INSTALL) -D -m 0700 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/eeprom/hbflash.sh \ - $(TARGET_DIR)/opt/hifiberry/contrib $(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/eeprom/dacplusadcpro.eep \ $(TARGET_DIR)/opt/hifiberry/contrib $(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/eeprom/dacplus.eep \ @@ -46,8 +46,27 @@ define HIFIBERRY_TEST_INSTALL_INIT_SYSV_DAC2HD echo "Adding drivers to config.txt" echo "dtoverlay=hifiberry-dacplushd" >> $(BINARIES_DIR)/rpi-firmware/config.txt + echo "dtoverlay=i2c-gpio" >> $(BINARIES_DIR)/rpi-firmware/config.txt + echo "dtparam=i2c_gpio_sda=0" >> $(BINARIES_DIR)/rpi-firmware/config.txt + echo "dtparam=i2c_gpio_scl=1" >> $(BINARIES_DIR)/rpi-firmware/config.txt + echo "" >> $(BINARIES_DIR)/rpi-firmware/config.txt endef +define HIFIBERRY_TEST_INSTALL_INIT_SYSV_DSPADDON + echo "Installing DSP Add-on test script" + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/S99testdspaddon \ + $(TARGET_DIR)/etc/init.d/S99testdspaddon + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/dspprofiles/dsp-addon-96-11.xml \ + $(TARGET_DIR)/opt/hifiberry/contrib/dspaddon.xml + + echo "Adding drivers to config.txt" + + sed -i s/.*hifiberry.*//g $(BINARIES_DIR)/rpi-firmware/config.txt + echo "dtparam=spi=on" >> $(BINARIES_DIR)/rpi-firmware/config.txt + echo "dtoverlay=hifiberry-dacplus" >> $(BINARIES_DIR)/rpi-firmware/config.txt +endef + + define HIFIBERRY_TEST_INSTALL_INIT_SYSV_DSPDAC echo "Installing DAC+ DSP test script" $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/S99testdacdsp \ @@ -123,6 +142,10 @@ ifdef HIFIBERRY_TEST_DAC2HD HIFIBERRY_TEST_POST_INSTALL_TARGET_HOOKS += HIFIBERRY_TEST_INSTALL_INIT_SYSV_DAC2HD endif +ifdef HIFIBERRY_TEST_DSPADDON +HIFIBERRY_TEST_POST_INSTALL_TARGET_HOOKS += HIFIBERRY_TEST_INSTALL_INIT_SYSV_DSPADDON +endif + ifdef HIFIBERRY_TEST_AMP2 HIFIBERRY_TEST_POST_INSTALL_TARGET_HOOKS += HIFIBERRY_TEST_INSTALL_INIT_SYSV_AMP2 endif From 8359cdffe2e092991ec52868de7fbaaf95177dbe Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 4 Aug 2020 14:12:05 +0000 Subject: [PATCH 10/12] Simple script to update the timestamp on builds --- update-ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 update-ts diff --git a/update-ts b/update-ts new file mode 100755 index 00000000..4c83e961 --- /dev/null +++ b/update-ts @@ -0,0 +1,11 @@ +#!/bin/bash + +cd `dirname $0` +pwd +TS=`date +%Y%m%d` +for i in 0w 2 3 4; do + chmod u+w ../buildroot-$i/target/etc/hifiberry.version + echo $TS > ../buildroot-$i/target/etc/hifiberry.version + chmod u-w ../buildroot-$i/target/etc/hifiberry.version + ./compile $i +done From d715b2c17b2f276b0197832e102009d76a0ad6ca Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 4 Aug 2020 14:12:37 +0000 Subject: [PATCH 11/12] DSP add-on board test script --- .../package/hifiberry-test/S99testdspaddon | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 buildroot/package/hifiberry-test/S99testdspaddon diff --git a/buildroot/package/hifiberry-test/S99testdspaddon b/buildroot/package/hifiberry-test/S99testdspaddon new file mode 100644 index 00000000..af13a12f --- /dev/null +++ b/buildroot/package/hifiberry-test/S99testdspaddon @@ -0,0 +1,28 @@ +#! /bin/sh + +# Write profile to DSP DAC and play a test tone + +OUT=/dev/tty1 + +case "$1" in + start) + echo "Programming DSP profile" > $OUT + dsptoolkit install-profile /opt/hifiberry/contrib/dspaddon.xml > $OUT + echo "Testing EEPROM programming" > $OUT + dsptoolkit check-eeprom > $OUT + echo "Playing test tone" > $OUT + play -n synth 30 sine 1000 > $OUT + echo "Done" > $OUT + ;; + stop) + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + From f43362a0a57ddddb0dc63c3e1b0fd668a309d8d4 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Tue, 4 Aug 2020 14:15:05 +0000 Subject: [PATCH 12/12] Integrate latest bugfixes --- buildroot/package/beocreate/beocreate.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildroot/package/beocreate/beocreate.mk b/buildroot/package/beocreate/beocreate.mk index 6c389909..f7f928c5 100644 --- a/buildroot/package/beocreate/beocreate.mk +++ b/buildroot/package/beocreate/beocreate.mk @@ -4,11 +4,11 @@ # ################################################################################ -BEOCREATE_VERSION = 155c255d30591e436295b0d5bbdaf8519741a68f +BEOCREATE_VERSION = 493bafa71e4d9df9ae4609e72a448eec87129018 BEOCREATE_SITE = $(call github,bang-olufsen,create,$(BEOCREATE_VERSION)) -BEOCREATE_VERSION = c5708c23c9649fc8e387d061ca5cea3a16588355 -BEOCREATE_SITE = $(call github,hifiberry,create,$(BEOCREATE_VERSION)) +#BEOCREATE_VERSION = c5708c23c9649fc8e387d061ca5cea3a16588355 +#BEOCREATE_SITE = $(call github,hifiberry,create,$(BEOCREATE_VERSION)) BEOCREATE_DEPENDENCIES += nodejs