1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-06-05 22:19:21 +02:00

Feature/rpi3 (#98)

* Add rpi3-64 defconfig file

* Work on getting RPI3 into shape

* Merge latest rpi3 changes into rpi4 config
This commit is contained in:
Peter Steenbergen
2022-01-19 15:50:19 +01:00
committed by GitHub
parent 85d7c15c03
commit b074f08076
330 changed files with 17488 additions and 176 deletions

View File

@@ -1 +1 @@
dwc_otg.lpm_enable=0 root=PARTUUID=c0932a41-44cf-463b-8152-d43188553ed4 rootfstype=ext4 fsck.repair=yes zram.enabled=1 zram.num_devices=4 console=ttyAMA0,115200 consoleblank=0 loglevel=0 vt.global_cursor_default=0 logo.nologo systemd.show_status=0 rootwait quiet splash
dwc_otg.lpm_enable=0 root=PARTUUID=c0932a41-44cf-463b-8152-d43188553ed4 rootfstype=ext4 fsck.repair=yes zram.enabled=1 zram.num_devices=4 console=tty1 consoleblank=0 loglevel=0 vt.global_cursor_default=0 logo.nologo systemd.show_status=0 rootwait quiet splash

View File

@@ -8,7 +8,7 @@
start_file=start.elf
fixup_file=fixup.dat
kernel=zImage
kernel=Image
# To use an external initramfs file
# initramfs rootfs.cpio.gz
@@ -46,10 +46,12 @@ dtparam=i2s=on
dtparam=spi=on
# Disable GPIO IRQ
# dtoverlay=gpio-no-irq
dtoverlay=gpio-no-irq
#[pi3]
#dtoverlay=vc4-kms-v3d
#[pi4]
#dtoverlay=vc4-kms-v3d-pi4
#dtoverlay=disable-wifi

View File

@@ -13,21 +13,26 @@ image boot.vfat {
"Image"
}
}
size = 32M
size = 96M
}
image sdcard.img {
hdimage {
disk-signature = 0xOVOS
gpt = "true"
}
partition boot {
partition boot1 {
partition-type = 0xC
partition-uuid = 9262aee5-2d23-4e09-baac-280591e2e834
partition-type-uuid = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
bootable = "true"
image = "boot.vfat"
}
partition rootfs {
partition-type = 0x83
partition rootfs1 {
partition-uuid = c0932a41-44cf-463b-8152-d43188553ed4
partition-type-uuid = b921b045-1df0-41c3-af44-4c6f280d3fae
image = "rootfs.ext4"
}
}

View File

@@ -5,12 +5,29 @@ set -e
BOARD_DIR="$(dirname $0)"
# Add a console on tty1
#if [ -e ${TARGET_DIR}/etc/inittab ]; then
# grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \
# sed -i '/GENERIC_SERIAL/a\
#tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
#fi
. "${BR2_EXTERNAL_OPENVOICEOS_PATH}/meta"
. "${BOARD_DIR}/meta"
# Write os-release
{
echo "NAME=\"${OVOS_NAME}\""
echo "VERSION=\"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD} ${BOARD_NAME}\""
echo "ID=${OVOS_ID}"
echo "VERSION_ID=${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}"
echo "PRETTY_NAME=\"${OVOS_NAME} ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD} ${BOARD_NAME}\""
echo "CPE_NAME=cpe:2.3:o:openvoiceos:${OVOS_ID}:${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}:*:${DEPLOYMENT}:*:*:*:${BOARD_ID}:*"
echo "HOME_URL=https://github.com/OpenVoiceOS/OpenVoiceOS"
echo "DOCUMENTATION_URL=https://github.com/OpenVoiceOS/OpenVoiceOS/tree/develop/documentation"
echo "SUPPORT_URL=https://github.com/OpenVoiceOS/OpenVoiceOS/issues"
echo "VARIANT=\"${OVOS_NAME} - Mycroft Edition\""
echo "VARIANT_ID=${OVOS_ID}-${BOARD_ID}-mycroft"
} > "${TARGET_DIR}/usr/lib/os-release"
# Write machine-info
{
echo "CHASSIS=${CHASSIS}"
echo "DEPLOYMENT=${DEPLOYMENT}"
} > "${TARGET_DIR}/etc/machine-info"
cp -f ../buildroot-external/board/raspberrypi/config.txt ${BINARIES_DIR}/rpi-firmware/config.txt
cp -f ../buildroot-external/board/raspberrypi/cmdline.txt ${BINARIES_DIR}/rpi-firmware/cmdline.txt

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,112 @@
#!/bin/bash
##########################################################################
# ovos-i2csound
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##########################################################################
# Set default configurations
PULSE_SYSTEM=/etc/pulse/pulseaudio-system.pa
PULSE_DAEMON=/etc/pulse/pulseaudio-daemon.conf
# Scanning the I2C bus for know addresses
is_1a=$(i2cdetect -y 1 0x1a 0x1a | egrep "(1a|UU)" | awk '{print $2}') # ReSpeaker 2-mic / WM8960
if [ "${is_1a}" == "1a" ] || [ "${is_1a}" == "UU" ] ; then
RESPEAKER2=found
echo "ReSpeaker 2-mic $RESPEAKER2"
fi
is_35=$(i2cdetect -y 1 0x35 0x35 | egrep "(35|UU)" | awk '{print $2}') # ReSpeaker 4-mic squared
if [ "${is_35}" == "35" ] || [ "${is_35}" == "UU" ] ; then
RESPEAKER4=found
echo "ReSpeaker 4-mic $RESPEAKER4"
fi
is_3b=$(i2cdetect -y 1 0x3b 0x3b | egrep "(3b|UU)" | awk '{print $2}') # ReSpeaker 4-mic lineair / 6-mic
if [ "${is_3b}" == "3b" ] || [ "${is_3b}" == "UU" ] ; then
RESPEAKER6=found
echo "ReSpeaker 6-mic $RESPEAKER6"
fi
is_4b=$(i2cdetect -y 1 0x4b 0x4b | egrep "(4b|UU)" | awk '{print $2}') # Adafruit
if [ "${is_4b}" == "4b" ] || [ "${is_4b}" == "UU" ] ; then
ADAFRUIT=found
echo "Adafruit $ADAFRUIT"
fi
is_2f=$(i2cdetect -y 1 0x2f 0x2f | egrep "(2f|UU)" | awk '{print $2}') # TAS5806
if [ "${is_2f}" == "2f" ] || [ "${is_2f}" == "UU" ] ; then
TAS5806=found
echo "Texas Instruments 5806 $TAS5806"
fi
is_04=$(i2cdetect -y -a 1 0x04 0x04 | egrep "(04|UU)" | awk '{print $2}') # SJ201 Led Ring
if [ "${is_04}" == "04" ] || [ "${is_04}" == "UU" ] ; then
SJ201LED=found
echo "Mark2 SJ201 Leds $SJ201LED"
fi
# Remove old configurations
if [ -f /etc/pulse/system.pa ] ; then
rm /etc/pulse/system.pa
fi
if [ -f /etc/pulse/daemon.conf ] ; then
rm /etc/pulse/daemon.conf
fi
if [ "$RESPEAKER2" == "found" ] && [ "$RESPEAKER4" != "found" ] ; then
echo "Installing and configuring ReSpeaker 2-mic"
dtoverlay seeed-2mic-voicecard
fi
if [ "${RESPEAKER6}" == "found" ] && [ "${RESPEAKER4}" != "found" ] ; then
echo "Installing and configuring ReSpeaker 4-mic"
dtoverlay seeed-4mic-voicecard
PULSE_SYSTEM=/etc/pulse/seeed-voicecard-4mic-default.pa
PULSE_DAEMON=/etc/pulse/seeed-voicecard-4mic-daemon.conf
fi
if [ "{$RESPEAKER6}" == "found" ] && [ "${RESPEAKER4}" == "found" ] ; then
echo "Installing and configuring ReSpeaker 6mic"
dtoverlay seeed-8mic-voicecard
PULSE_SYSTEM=/etc/pulse/seeed-voicecard-8mic-default.pa
PULSE_DAEMON=/etc/pulse/seeed-voicecard-8mic-daemon.conf
fi
if [ "$ADAFRUIT" ] ; then
echo "Installing and configuring Adafruit"
/usr/sbin/i2cset -y 1 0x4b 30 # Set maximum volume to 30
fi
if [ "$TAS5806" ] && [ "$SJ201LED" ]; then
echo "Installing and configuring SJ201"
# Initializing XMOS xvf3510
dtoverlay xvf3510
xvf3510-flash --direct "/usr/lib/firmware/xvf3510/app_xvf3510_int_spi_boot_v4_1_0.bin"
# Initializing Texas Instruments 5806 Amplifier
/usr/bin/tas5806-init
# Initializing and resetting LED ring
/usr/bin/sj201-reset-led
# Reset FAN to low speed
/usr/sbin/i2cset -a -y 1 0x04 101 30 i
PULSE_SYSTEM=/etc/pulse/mycroft-sj201-default.pa
PULSE_DAEMON=/etc/pulse/mycroft-sj201-daemon.conf
fi
# Install pulseaudio files
echo "create pulse system file"
ln -s $PULSE_SYSTEM /etc/pulse/system.pa
echo "create pulse daemon file"
ln -s $PULSE_DAEMON /etc/pulse/daemon.conf