From 7e10f11dac4d564458912e1cf9290bb4f17ac8b3 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Fri, 27 Mar 2020 20:23:13 +0000 Subject: [PATCH 01/10] Added ZIP dependency, added a script to revert to previous release --- buildroot/package/hifiberry-tools/Config.in | 1 + .../hifiberry-updater/hifiberry-updater.mk | 2 ++ .../reactivate-previous-release | 23 +++++++++++++++++++ configs/hifiberryos | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 buildroot/package/hifiberry-updater/reactivate-previous-release diff --git a/buildroot/package/hifiberry-tools/Config.in b/buildroot/package/hifiberry-tools/Config.in index cf81211a..426a23b0 100644 --- a/buildroot/package/hifiberry-tools/Config.in +++ b/buildroot/package/hifiberry-tools/Config.in @@ -11,6 +11,7 @@ config BR2_PACKAGE_HIFIBERRY_TOOLS select BR2_PACKAGE_LINUX_TOOLS_PERF_TUI select BR2_PACKAGE_JQ select BR2_PACKAGE_RNG_TOOL + select BR2_PACKAGE_ZIP config BR2_PACKAGE_HIFIBERRY_TOOLS_AUDIO_LITE bool "audio lite mode (for Pi 0)" diff --git a/buildroot/package/hifiberry-updater/hifiberry-updater.mk b/buildroot/package/hifiberry-updater/hifiberry-updater.mk index 6ef59578..ee562ae1 100644 --- a/buildroot/package/hifiberry-updater/hifiberry-updater.mk +++ b/buildroot/package/hifiberry-updater/hifiberry-updater.mk @@ -13,6 +13,8 @@ define HIFIBERRY_UPDATER_INSTALL_TARGET_CMDS $(TARGET_DIR)/opt/hifiberry/bin $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/partitions \ $(TARGET_DIR)/opt/hifiberry/bin + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/rectivate-previous-release \ + $(TARGET_DIR)/opt/hifiberry/bin $(INSTALL) -D -m 0444 $(BR2_EXTERNAL_HIFIBERRY_PATH)/VERSION \ $(TARGET_DIR)/etc/hifiberry.version $(INSTALL) -D -m 0444 $(BR2_EXTERNAL_HIFIBERRY_PATH)/PIVERSION \ diff --git a/buildroot/package/hifiberry-updater/reactivate-previous-release b/buildroot/package/hifiberry-updater/reactivate-previous-release new file mode 100644 index 00000000..2b114ea9 --- /dev/null +++ b/buildroot/package/hifiberry-updater/reactivate-previous-release @@ -0,0 +1,23 @@ +#!/bin/bash +PART=`/opt/hifiberry/bin/partitions | awk '{print $2}'` +if [ "-f /boot/zImage.bak" ]; then + echo "No previous release found, aborting..." + exit 1 +fi +mount -o remount,rw /boot +if [ "$PART" == "/dev/mmcblk0p3" ]; then + echo "root=/dev/mmcblk0p3 rootwait console=tty5 systemd.show_status=0 quiet splash" + mv /boot/zImage.bak /boot/zImage + sync + reboot +fi +if [ "$PART" == "/dev/mmcblk0p2" ]; then + echo "root=/dev/mmcblk0p2 rootwait console=tty5 systemd.show_status=0 quiet splash" + mv /boot/zImage.bak /boot/zImage + sync + reboot +fi + +echo "Unknown backup partition $PART" + + diff --git a/configs/hifiberryos b/configs/hifiberryos index b0c02c06..3546b94a 100644 --- a/configs/hifiberryos +++ b/configs/hifiberryos @@ -944,7 +944,7 @@ BR2_PACKAGE_BZIP2=y # BR2_PACKAGE_UNRAR is not set # BR2_PACKAGE_UNZIP is not set # BR2_PACKAGE_XZ is not set -# BR2_PACKAGE_ZIP is not set +BR2_PACKAGE_ZIP=y # BR2_PACKAGE_ZSTD is not set # From 55f25dc92ae9be845cd8f493918847e91fe9d606 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Fri, 27 Mar 2020 21:00:33 +0000 Subject: [PATCH 02/10] Revert script bugfixes --- .../hifiberry-updater/hifiberry-updater.mk | 2 +- .../reactivate-previous-release | 34 +++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/buildroot/package/hifiberry-updater/hifiberry-updater.mk b/buildroot/package/hifiberry-updater/hifiberry-updater.mk index ee562ae1..b26cef74 100644 --- a/buildroot/package/hifiberry-updater/hifiberry-updater.mk +++ b/buildroot/package/hifiberry-updater/hifiberry-updater.mk @@ -13,7 +13,7 @@ define HIFIBERRY_UPDATER_INSTALL_TARGET_CMDS $(TARGET_DIR)/opt/hifiberry/bin $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/partitions \ $(TARGET_DIR)/opt/hifiberry/bin - $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/rectivate-previous-release \ + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/reactivate-previous-release \ $(TARGET_DIR)/opt/hifiberry/bin $(INSTALL) -D -m 0444 $(BR2_EXTERNAL_HIFIBERRY_PATH)/VERSION \ $(TARGET_DIR)/etc/hifiberry.version diff --git a/buildroot/package/hifiberry-updater/reactivate-previous-release b/buildroot/package/hifiberry-updater/reactivate-previous-release index 2b114ea9..a4ffff1f 100644 --- a/buildroot/package/hifiberry-updater/reactivate-previous-release +++ b/buildroot/package/hifiberry-updater/reactivate-previous-release @@ -1,23 +1,35 @@ #!/bin/bash PART=`/opt/hifiberry/bin/partitions | awk '{print $2}'` -if [ "-f /boot/zImage.bak" ]; then +if [ ! -f /boot/zImage.bak ]; then echo "No previous release found, aborting..." exit 1 fi -mount -o remount,rw /boot if [ "$PART" == "/dev/mmcblk0p3" ]; then - echo "root=/dev/mmcblk0p3 rootwait console=tty5 systemd.show_status=0 quiet splash" - mv /boot/zImage.bak /boot/zImage - sync - reboot + P=$PART fi if [ "$PART" == "/dev/mmcblk0p2" ]; then - echo "root=/dev/mmcblk0p2 rootwait console=tty5 systemd.show_status=0 quiet splash" - mv /boot/zImage.bak /boot/zImage - sync - reboot + P=$PART +fi + +if [ "$P" == "" ]; then + echo "Unknown backup partition $PART, aborting..." + exit 1 +fi + +mount -o remount,rw /boot +echo "activating $P" +echo "root=$P rootwait console=tty5 systemd.show_status=0 quiet splash" > /boot/cmdline.txt +mv /boot/zImage.bak /boot/zImage +umount /newroot 2>/dev/null +if [ ! -d /oldroot ]; then + mkdir /oldroot fi +mount $P /oldroot +# Disable automatic updates +echo > /etc/updater.release +umount /oldroot -echo "Unknown backup partition $PART" +sync +reboot From 857d1e6d51eeddca1606f60d7c442868551b498f Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Sat, 28 Mar 2020 14:42:05 +0000 Subject: [PATCH 03/10] Digi+ softvol volume control fix --- buildroot/package/raat/configure-raat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/package/raat/configure-raat b/buildroot/package/raat/configure-raat index 7b9fbd63..66894ecd 100644 --- a/buildroot/package/raat/configure-raat +++ b/buildroot/package/raat/configure-raat @@ -44,7 +44,7 @@ elif [ "$CARD" == "Digi+" ]; then if [ "$DIGIFIXED" == "1" ]; then VOLCTL="" else - VOLCTL='"volume": { "type": "alsa", "name": "softvol", "device": "default" },' + VOLCTL='"volume": { "type": "alsa", "optional": "false", "device":"default", "index":0, "name":"Softvol" },' fi # DOP not supported on HiFiBerryOS DSD="" From c6f9594ba25dbe6437381e2251cb7ec0e38f5d4a Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Sat, 28 Mar 2020 14:42:40 +0000 Subject: [PATCH 04/10] Bugfix: rngtools typo --- buildroot/package/hifiberry-tools/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/package/hifiberry-tools/Config.in b/buildroot/package/hifiberry-tools/Config.in index 426a23b0..d418a518 100644 --- a/buildroot/package/hifiberry-tools/Config.in +++ b/buildroot/package/hifiberry-tools/Config.in @@ -10,7 +10,7 @@ config BR2_PACKAGE_HIFIBERRY_TOOLS select BR2_PACKAGE_LINUX_TOOLS_PERF select BR2_PACKAGE_LINUX_TOOLS_PERF_TUI select BR2_PACKAGE_JQ - select BR2_PACKAGE_RNG_TOOL + select BR2_PACKAGE_RNG_TOOLS select BR2_PACKAGE_ZIP config BR2_PACKAGE_HIFIBERRY_TOOLS_AUDIO_LITE From 7cb96a05d35e7798c537792c449b4b60f83745e6 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Sat, 28 Mar 2020 14:44:22 +0000 Subject: [PATCH 05/10] Added missing RNGTOOLS --- configs/hifiberryos | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/hifiberryos b/configs/hifiberryos index 3546b94a..d31eec05 100644 --- a/configs/hifiberryos +++ b/configs/hifiberryos @@ -1375,7 +1375,7 @@ BR2_PACKAGE_PARTED=y # BR2_PACKAGE_PRU_SOFTWARE_SUPPORT is not set # BR2_PACKAGE_RASPI_GPIO is not set # BR2_PACKAGE_READ_EDID is not set -# BR2_PACKAGE_RNG_TOOLS is not set +BR2_PACKAGE_RNG_TOOLS=y # BR2_PACKAGE_RPI_USERLAND is not set # BR2_PACKAGE_RS485CONF is not set # BR2_PACKAGE_RTC_TOOLS is not set @@ -2024,7 +2024,7 @@ BR2_PACKAGE_LIBCONFIG=y # BR2_PACKAGE_LIBFUSE is not set BR2_PACKAGE_LIBLOCKFILE=y # BR2_PACKAGE_LIBNFS is not set -# BR2_PACKAGE_LIBSYSFS is not set +BR2_PACKAGE_LIBSYSFS=y # BR2_PACKAGE_LOCKDEV is not set # BR2_PACKAGE_PHYSFS is not set @@ -2199,7 +2199,7 @@ BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS=y # BR2_PACKAGE_GNU_EFI is not set # BR2_PACKAGE_HACKRF is not set # BR2_PACKAGE_HIDAPI is not set -# BR2_PACKAGE_JITTERENTROPY_LIBRARY is not set +BR2_PACKAGE_JITTERENTROPY_LIBRARY=y # BR2_PACKAGE_LCDAPI is not set # BR2_PACKAGE_LET_ME_CREATE is not set # BR2_PACKAGE_LIBAIO is not set @@ -4214,7 +4214,7 @@ BR2_PACKAGE_HIFIBERRY_TOOLS=y BR2_PACKAGE_HIFIBERRY_UPDATER=y BR2_PACKAGE_ALSA_PLUGINS=y BR2_PACKAGE_CONFIGTXT=y -BR2_PACKAGE_CONFIGTXT_QUIET=y +# BR2_PACKAGE_CONFIGTXT_QUIET is not set BR2_PACKAGE_RASPI_WIFI=y BR2_PACKAGE_HIFIBERRY_SYSTEMD=y BR2_PACKAGE_WATCHDOG=y From 31aff15c6ea5cf6c2907f9b221deaaabbdb2abef Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Mon, 30 Mar 2020 11:15:11 +0000 Subject: [PATCH 06/10] Added a script that updates firmware files --- buildroot/buildroot-dev.patch | 11 +++++++ buildroot/package/hifiberry-updater/Config.in | 1 + .../hifiberry-updater/hifiberry-updater.mk | 31 +++++++++++++++++++ .../package/hifiberry-updater/update-firmware | 5 +++ configs/hifiberryos | 31 ++++++++++--------- 5 files changed, 64 insertions(+), 15 deletions(-) create mode 100644 buildroot/package/hifiberry-updater/update-firmware diff --git a/buildroot/buildroot-dev.patch b/buildroot/buildroot-dev.patch index 50c37e9d..cdf4aad0 100644 --- a/buildroot/buildroot-dev.patch +++ b/buildroot/buildroot-dev.patch @@ -130,3 +130,14 @@ diff -urb buildroot-dev/utils/scanpypi brdev-working/utils/scanpypi """ Utility for building Buildroot packages for existing PyPI packages +--- buildroot-dev/package/rpi-firmware/rpi-firmware.mk 2020-03-30 08:34:17.762664308 +0000 ++++ buildroot-dev/package/rpi-firmware/rpi-firmware.mk 2020-03-30 09:07:44.410958163 +0000 +@@ -4,7 +4,7 @@ + # + ################################################################################ + +-RPI_FIRMWARE_VERSION = 01ecfd2ba2b7cf3a2f4aa75ada895ee4a3e729f5 ++RPI_FIRMWARE_VERSION = 5574077183389cd4c65077ba18b59144ed6ccd6d + RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION)) + RPI_FIRMWARE_LICENSE = BSD-3-Clause + RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom diff --git a/buildroot/package/hifiberry-updater/Config.in b/buildroot/package/hifiberry-updater/Config.in index 19b36e0a..cfeaf0b3 100644 --- a/buildroot/package/hifiberry-updater/Config.in +++ b/buildroot/package/hifiberry-updater/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_HIFIBERRY_UPDATER bool "hifiberry-updater" help "Update tools for HiFiBerryOS" + depends on BR2_PACKAGE_RPI_FIRMWARE select BR2_PACKAGE_E2FSPROGS select BR2_PACKAGE_E2FSPROGS_RESIZE2FS select BR2_PACKAGE_LIBCURL diff --git a/buildroot/package/hifiberry-updater/hifiberry-updater.mk b/buildroot/package/hifiberry-updater/hifiberry-updater.mk index b26cef74..9e0e1da2 100644 --- a/buildroot/package/hifiberry-updater/hifiberry-updater.mk +++ b/buildroot/package/hifiberry-updater/hifiberry-updater.mk @@ -11,6 +11,8 @@ define HIFIBERRY_UPDATER_INSTALL_TARGET_CMDS $(TARGET_DIR)/opt/hifiberry/bin $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/extract-update \ $(TARGET_DIR)/opt/hifiberry/bin + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/update-firmware \ + $(TARGET_DIR)/opt/hifiberry/bin $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/partitions \ $(TARGET_DIR)/opt/hifiberry/bin $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-updater/reactivate-previous-release \ @@ -35,4 +37,33 @@ endef define HIFIBERRY_UPDATER_INSTALL_INIT_SYSTEMD endef +### +### Add more functions to RPI firmware +### +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4),y) +define RPI_INSTALL_FIRMWARE + echo "Pi 4" + $(INSTALL) -D -m 0644 $(@D)/boot/start4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(TARGET_DIR)/usr/lib/firmware/rpi/start4.elf + $(INSTALL) -D -m 0644 $(@D)/boot/fixup4$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(TARGET_DIR)/usr/lib/firmware/rpi/fixup4.dat + +endef +else +define RPI_INSTALL_FIRMWARE + echo "Pi < 4" + $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(TARGET_DIR)/usr/lib/firmware/rpi/start.elf + $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(TARGET_DIR)/usr/lib/firmware/rpi/fixup.dat + +endef +endif + +define RPI_INSTALL_OVERLAYS + echo "Installing overlays" + for ovldtb in $(@D)/boot/overlays/*.dtbo; do \ + $(INSTALL) -D -m 0644 $${ovldtb} $(TARGET_DIR)/usr/lib/firmware/rpi/overlays/$${ovldtb##*/} || exit 1; \ + done +endef + +RPI_FIRMWARE_INSTALL_TARGET_CMDS += $(RPI_INSTALL_FIRMWARE) +RPI_FIRMWARE_INSTALL_TARGET_CMDS += $(RPI_INSTALL_OVERLAYS) + $(eval $(generic-package)) diff --git a/buildroot/package/hifiberry-updater/update-firmware b/buildroot/package/hifiberry-updater/update-firmware new file mode 100644 index 00000000..14474532 --- /dev/null +++ b/buildroot/package/hifiberry-updater/update-firmware @@ -0,0 +1,5 @@ +#!/bin/bash +mount -o remount,rw /boot +cp -rv /usr/lib/firmware/rpi/* /boot +sync +reboot diff --git a/configs/hifiberryos b/configs/hifiberryos index d31eec05..50ec0767 100644 --- a/configs/hifiberryos +++ b/configs/hifiberryos @@ -42,10 +42,13 @@ BR2_arm=y # BR2_x86_64 is not set # BR2_xtensa is not set BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y +BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8=y +BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9=y +BR2_ARCH_NEEDS_GCC_AT_LEAST_5=y BR2_ARCH="arm" BR2_ENDIAN="LITTLE" BR2_GCC_TARGET_ABI="aapcs-linux" -BR2_GCC_TARGET_CPU="cortex-a53" +BR2_GCC_TARGET_CPU="cortex-a72" BR2_GCC_TARGET_FPU="neon-vfpv4" BR2_GCC_TARGET_FLOAT_ABI="hard" BR2_GCC_TARGET_MODE="arm" @@ -112,10 +115,10 @@ BR2_ARM_CPU_ARMV8A=y # # BR2_cortex_a32 is not set # BR2_cortex_a35 is not set -BR2_cortex_a53=y +# BR2_cortex_a53 is not set # BR2_cortex_a57 is not set # BR2_cortex_a57_a53 is not set -# BR2_cortex_a72 is not set +BR2_cortex_a72=y # BR2_cortex_a72_a53 is not set # BR2_cortex_a73 is not set # BR2_cortex_a73_a35 is not set @@ -171,7 +174,7 @@ BR2_BZCAT="bzcat" BR2_XZCAT="xzcat" BR2_LZCAT="lzip -d -c" BR2_TAR_OPTIONS="" -BR2_DEFCONFIG="/home/matuschd/buildroot-2019.08-rc3/configs/raspberrypi3_defconfig" +BR2_DEFCONFIG="/home/matuschd/buildroot-2019.08-rc3/configs/raspberrypi4_defconfig" BR2_DL_DIR="$(TOPDIR)/dl" BR2_HOST_DIR="$(BASE_DIR)/host" @@ -479,9 +482,9 @@ BR2_TARGET_TZ_ZONELIST="default" BR2_TARGET_LOCALTIME="Etc/UTC" BR2_ROOTFS_USERS_TABLES="" BR2_ROOTFS_OVERLAY="../hifiberry-os/buildroot/board/raspberrypi3/overlay/" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4/post-build.sh" BR2_ROOTFS_POST_FAKEROOT_SCRIPT="" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay" # @@ -496,13 +499,13 @@ BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # BR2_LINUX_KERNEL_CUSTOM_GIT is not set # BR2_LINUX_KERNEL_CUSTOM_HG is not set # BR2_LINUX_KERNEL_CUSTOM_SVN is not set -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,64d0a9870ac14d5eb5253f67d984ae348eec1393)/linux-64d0a9870ac14d5eb5253f67d984ae348eec1393.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,64d0a9870ac14d5eb5253f67d984ae348eec1393)/64d0a9870ac14d5eb5253f67d984ae348eec1393.tar.gz" BR2_LINUX_KERNEL_VERSION="custom" BR2_LINUX_KERNEL_PATCH="" BR2_LINUX_KERNEL_USE_DEFCONFIG=y # BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG is not set # BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG is not set -BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="" BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH="" # BR2_LINUX_KERNEL_UIMAGE is not set @@ -518,7 +521,7 @@ BR2_LINUX_KERNEL_GZIP=y # BR2_LINUX_KERNEL_XZ is not set BR2_LINUX_KERNEL_DTS_SUPPORT=y # BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT is not set -BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2711-rpi-4-b" BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="" # BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT is not set # BR2_LINUX_KERNEL_INSTALL_TARGET is not set @@ -1257,8 +1260,8 @@ BR2_PACKAGE_QT5_JSCORE_AVAILABLE=y # BR2_PACKAGE_MURATA_CYW_FW is not set BR2_PACKAGE_RPI_BT_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE=y -BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y -# BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4 is not set +# BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI is not set +BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y BR2_PACKAGE_RPI_FIRMWARE_DEFAULT=y # BR2_PACKAGE_RPI_FIRMWARE_X is not set # BR2_PACKAGE_RPI_FIRMWARE_CD is not set @@ -1286,8 +1289,6 @@ BR2_PACKAGE_RPI_WIFI_FIRMWARE=y # BR2_PACKAGE_CBOOTIMAGE is not set # BR2_PACKAGE_CC_TOOL is not set # BR2_PACKAGE_CDRKIT is not set -BR2_PACKAGE_CPUBURN_ARM_ARCH_SUPPORTS=y -# BR2_PACKAGE_CPUBURN_ARM is not set # BR2_PACKAGE_CRYPTSETUP is not set # BR2_PACKAGE_CWIID is not set # BR2_PACKAGE_DAHDI_LINUX is not set @@ -1373,7 +1374,7 @@ BR2_PACKAGE_PARTED=y # BR2_PACKAGE_POWERTOP is not set # BR2_PACKAGE_PPS_TOOLS is not set # BR2_PACKAGE_PRU_SOFTWARE_SUPPORT is not set -# BR2_PACKAGE_RASPI_GPIO is not set +BR2_PACKAGE_RASPI_GPIO=y # BR2_PACKAGE_READ_EDID is not set BR2_PACKAGE_RNG_TOOLS=y # BR2_PACKAGE_RPI_USERLAND is not set @@ -4214,7 +4215,7 @@ BR2_PACKAGE_HIFIBERRY_TOOLS=y BR2_PACKAGE_HIFIBERRY_UPDATER=y BR2_PACKAGE_ALSA_PLUGINS=y BR2_PACKAGE_CONFIGTXT=y -# BR2_PACKAGE_CONFIGTXT_QUIET is not set +BR2_PACKAGE_CONFIGTXT_QUIET=y BR2_PACKAGE_RASPI_WIFI=y BR2_PACKAGE_HIFIBERRY_SYSTEMD=y BR2_PACKAGE_WATCHDOG=y From 5b80ff6844d59292cbb442ddaf9cea19598a6592 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Mon, 30 Mar 2020 19:00:45 +0000 Subject: [PATCH 07/10] Correct detection of Digi+ --- buildroot/package/hifiberry-tools/reconfigure-players | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot/package/hifiberry-tools/reconfigure-players b/buildroot/package/hifiberry-tools/reconfigure-players index 5e345b3b..ba9239ba 100755 --- a/buildroot/package/hifiberry-tools/reconfigure-players +++ b/buildroot/package/hifiberry-tools/reconfigure-players @@ -215,13 +215,13 @@ guess_card() { return fi - DIGIPRO=`aplay -l | grep Digi+ | grep Pro` + DIGIPRO=`aplay -l | grep Digi | grep Pro` if [ "$DIGIPRO" != "" ]; then CARD="Digi+ Pro" return fi - DIGI=`aplay -l | grep Digi+` + DIGI=`aplay -l | grep Digi` if [ "$DIGI" != "" ]; then CARD="Digi+" return From b66262d7f993510611a9f828c0c1c0304ad98adb Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Mon, 30 Mar 2020 19:01:19 +0000 Subject: [PATCH 08/10] Add missing config setting --- configs/hifiberryos | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/hifiberryos b/configs/hifiberryos index 50ec0767..1bc9eb30 100644 --- a/configs/hifiberryos +++ b/configs/hifiberryos @@ -4310,3 +4310,4 @@ HIFIBERRY_TEST_NONE=y # HIFIBERRY_TEST_DACADCPRO is not set # HIFIBERRY_TEST_DSPDACADC is not set # HIFIBERRY_TEST_USB is not set +# BR2_PACKAGE_CPUBURN_ARM is not set From af6c04d5935a0dd2ef353000f757dc735d1665e7 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Mon, 30 Mar 2020 19:01:53 +0000 Subject: [PATCH 09/10] Added force_eeprom_read=0 to make sure sound cards are working This is a workaround as cards that are I2S clock master don't seem to work if they are configured from EEPROM during initial boot. The setting will be removed after the initial boot. --- buildroot/package/configtxt/configtxt.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildroot/package/configtxt/configtxt.mk b/buildroot/package/configtxt/configtxt.mk index 3af8cc6c..19b61496 100644 --- a/buildroot/package/configtxt/configtxt.mk +++ b/buildroot/package/configtxt/configtxt.mk @@ -8,6 +8,8 @@ define CONFIGTXT_INSTALL_TARGET_CMDS echo "# Enable I2C and SPI" >> $(BINARIES_DIR)/rpi-firmware/config.txt echo "dtparam=i2c=on" >> $(BINARIES_DIR)/rpi-firmware/config.txt echo "dtparam=spi=on" >> $(BINARIES_DIR)/rpi-firmware/config.txt + echo "# Workaround force_eeprom_read" >> $(BINARIES_DIR)/rpi-firmware/config.txt + echo "force_eeprom_read=0" >> $(BINARIES_DIR)/rpi-firmware/config.txt endef define CONFIGTXT_QUIET_INSTALL_TARGET_CMDS From a7f5b095ae9c0a0adb232dea353f18456b110fc7 Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Mon, 30 Mar 2020 19:03:36 +0000 Subject: [PATCH 10/10] Remove forece_eeprom_read workaround after initial boot --- buildroot/package/hifiberry-tools/detect-hifiberry | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/buildroot/package/hifiberry-tools/detect-hifiberry b/buildroot/package/hifiberry-tools/detect-hifiberry index 07505418..40ac23a3 100755 --- a/buildroot/package/hifiberry-tools/detect-hifiberry +++ b/buildroot/package/hifiberry-tools/detect-hifiberry @@ -70,12 +70,21 @@ if [ "$FOUND" == "" ]; then echo "No HiFiBerry card configured, try to probe using I2C" >> /var/log/hifiberry.log echo "Mounting /boot" - mount /boot + mount -o remount,rw /boot if [ ! -f /boot/config.txt ]; then echo "couldn't mount FAT file system, aborting card detection" >> /var/log/hifiberry.log exit 1 fi + echo "Detecting force_eeprom_read" + FORCEEEPROM=`cat /boot/config.txt | grep force_eeprom_read` + if [ "$FORCEEEPROM" != "" ]; then + cat /boot/config.txt | grep -v force_eeprom_read > /tmp/config.txt + cp /boot/config.txt /boot/config.txt.bak + cp /tmp/config.txt /boot/config.txt + sync + fi + echo "Detecting using I2C" check_i2c card=$(detect_card)