summaryrefslogtreecommitdiffstats
path: root/board/raspberrypi/post-image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'board/raspberrypi/post-image.sh')
-rwxr-xr-xboard/raspberrypi/post-image.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
index 73ffd658e7..c00975288c 100755
--- a/board/raspberrypi/post-image.sh
+++ b/board/raspberrypi/post-image.sh
@@ -5,6 +5,19 @@ BOARD_NAME="$(basename ${BOARD_DIR})"
GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+case "${2}" in
+ --add-pi3-miniuart-bt-overlay)
+ if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
+ echo "Adding 'dtoverlay=pi3-miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
+ cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
+
+# fixes rpi3 ttyAMA0 serial console
+dtoverlay=pi3-miniuart-bt
+__EOF__
+ fi
+ ;;
+esac
+
# Mark the kernel as DT-enabled
mkdir -p "${BINARIES_DIR}/kernel-marked"
${HOST_DIR}/usr/bin/mkknlimg "${BINARIES_DIR}/zImage" \
OpenPOWER on IntegriCloud