From 337b37be2b7c37b5fa51cc394f6c8eab0436b0dc Mon Sep 17 00:00:00 2001 From: jmcneill Date: Mon, 31 Jul 2017 16:34:22 +0000 Subject: [PATCH] Create a config.txt for RPI and set 'enable_uart=1' and 'force_turbo=0'. This config gives us a stable core_freq clock that is used to drive the SD HOST and AUX UART devices. More information on config.txt settings for the UART can be found here: https://www.raspberrypi.org/documentation/configuration/uart.md --- distrib/utils/embedded/conf/armv7.conf | 8 +++++++- distrib/utils/embedded/conf/rpi.conf | 9 ++++++++- distrib/utils/embedded/conf/rpi_inst.conf | 9 ++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/distrib/utils/embedded/conf/armv7.conf b/distrib/utils/embedded/conf/armv7.conf index 6d1282da9cae..eeccc6df5633 100644 --- a/distrib/utils/embedded/conf/armv7.conf +++ b/distrib/utils/embedded/conf/armv7.conf @@ -1,4 +1,4 @@ -# $NetBSD: armv7.conf,v 1.15 2017/07/09 10:41:40 jmcneill Exp $ +# $NetBSD: armv7.conf,v 1.16 2017/07/31 16:34:22 jmcneill Exp $ # ARMv7 customization script used by mkimage # board=armv7 @@ -63,6 +63,12 @@ populate_rpi() { root=ld0a console=${console} #fb=1280x1024 # to select a mode, otherwise try EDID #fb=disable # to disable fb completely +EOF + + cat > ${mnt}/boot/config.txt << EOF +# UART settings, see https://www.raspberrypi.org/documentation/configuration/uart.md +enable_uart=1 +force_turbo=0 EOF echo "${bar} installing firmware files ${bar}" diff --git a/distrib/utils/embedded/conf/rpi.conf b/distrib/utils/embedded/conf/rpi.conf index df25388bcf9a..79ceedd023a5 100644 --- a/distrib/utils/embedded/conf/rpi.conf +++ b/distrib/utils/embedded/conf/rpi.conf @@ -1,4 +1,4 @@ -# $NetBSD: rpi.conf,v 1.29 2015/04/19 18:28:31 hubertf Exp $ +# $NetBSD: rpi.conf,v 1.30 2017/07/31 16:34:22 jmcneill Exp $ # Raspberry Pi customization script used by mkimage # @@ -52,6 +52,13 @@ root=ld0a console=fb #fb=1280x1024 # to select a mode, otherwise try EDID #fb=disable # to disable fb completely EOF + + cat > ${mnt}/boot/config.txt << EOF +# UART settings, see https://www.raspberrypi.org/documentation/configuration/uart.md +enable_uart=1 +force_turbo=0 +EOF + if [ ! -f ${kernel} ]; then echo ${PROG}: Missing ${kernel} 1>&2 exit 1 diff --git a/distrib/utils/embedded/conf/rpi_inst.conf b/distrib/utils/embedded/conf/rpi_inst.conf index f87487fa9ec9..df0160881f06 100644 --- a/distrib/utils/embedded/conf/rpi_inst.conf +++ b/distrib/utils/embedded/conf/rpi_inst.conf @@ -1,4 +1,4 @@ -# $NetBSD: rpi_inst.conf,v 1.8 2015/04/19 18:53:33 hubertf Exp $ +# $NetBSD: rpi_inst.conf,v 1.9 2017/07/31 16:34:22 jmcneill Exp $ # Raspberry Pi customization script used by mkimage # @@ -82,6 +82,13 @@ root=ld0a console=fb #fb=1280x1024 # to select a mode, otherwise try EDID #fb=disable # to disable fb completely EOF + + cat > ${mnt}/boot/config.txt << EOF +# UART settings, see https://www.raspberrypi.org/documentation/configuration/uart.md +enable_uart=1 +force_turbo=0 +EOF + if [ ! -f ${kernel} ]; then echo ${PROG}: Missing ${kernel} 1>&2 exit 1