diff options
author | Peter Seiderer <ps.report@gmx.net> | 2016-05-02 22:25:44 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-09-18 19:21:18 +0200 |
commit | 1e03cc2290f98fc7434254d2abd9afd504de8360 (patch) | |
tree | 8f28d8b5917e7ea05a304a69fe4e00d69513b374 /board | |
parent | a2f8d497274badaca510a8160aa0da06be1f94c1 (diff) | |
download | buildroot-1e03cc2290f98fc7434254d2abd9afd504de8360.tar.gz buildroot-1e03cc2290f98fc7434254d2abd9afd504de8360.zip |
raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
- enable BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS in raspberrypi3_defconfig
- add copy of rpi-firmware/overlays directory to boot partition in genimage-raspberrypi3.cfg
- enhance post-image.sh script to add 'dtoverlay=pi3-miniuart-bt' on request
- add BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay" in raspberrypi3_defconfig
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/raspberrypi/genimage-raspberrypi3.cfg | 1 | ||||
-rwxr-xr-x | board/raspberrypi/post-image.sh | 13 | ||||
-rw-r--r-- | board/raspberrypi/readme.txt | 8 |
3 files changed, 21 insertions, 1 deletions
diff --git a/board/raspberrypi/genimage-raspberrypi3.cfg b/board/raspberrypi/genimage-raspberrypi3.cfg index 7ba89c5548..baab0c4cc1 100644 --- a/board/raspberrypi/genimage-raspberrypi3.cfg +++ b/board/raspberrypi/genimage-raspberrypi3.cfg @@ -7,6 +7,7 @@ image boot.vfat { "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", + "rpi-firmware/overlays", "kernel-marked/zImage" } } 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" \ diff --git a/board/raspberrypi/readme.txt b/board/raspberrypi/readme.txt index a170f8f91c..03178ff95f 100644 --- a/board/raspberrypi/readme.txt +++ b/board/raspberrypi/readme.txt @@ -60,7 +60,8 @@ After building, you should obtain this tree: | +-- cmdline.txt | +-- config.txt | +-- fixup.dat - | `-- start.elf + | +-- start.elf + | `-- overlays/ [3] +-- sdcard.img `-- zImage @@ -69,6 +70,11 @@ After building, you should obtain this tree: [2] This is the mkknlimg DT-marked kernel. +[3] Only for the Raspberry Pi 3 Model (overlay pi3-miniuart-bt is needed + to enable the RPi3 serial console otherwise occupied by the bluetooth + chip). Alternative would be to disable the serial console in cmdline.txt + and /etc/inittab. + How to write the SD card ======================== |