raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
PATCH v2 1/1 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
---
Changes v1 --> v2:
- use pi3-miniuart-bt instead of pi3-disable-bt
- fix post-image.sh to add overlay lines only once
- add overlay description (and alternative solution) to readme.txt
--- board/raspberrypi/genimage-raspberrypi3.cfg | 1 + board/raspberrypi/post-image.sh | 13 +++++++++++++ board/raspberrypi/readme.txt | 8 +++++++- configs/raspberrypi3_defconfig | 3 ++- 4 files changed, 23 insertions(+), 2 deletions(-)
board/raspberrypi/genimage-raspberrypi3.cfg +1 -0
@@ -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" } }
board/raspberrypi/post-image.sh +13 -0
@@ -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" \
board/raspberrypi/readme.txt +7 -1
@@ -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 ========================
configs/raspberrypi3_defconfig +2 -1
@@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b" BR2_PACKAGE_RPI_FIRMWARE=y -# BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set +BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y
@@ -34,3 +34,4 @@ BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
Signature · 1 line
2.8.1
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Hi Peter Seiderer,
What's the difference between enabling pi3-miniuart-bt instead of pi3-disable-bt?
With pi3-disable-bt enables it works fine the serial console on (14 [TxD] & 15 [RxD] pins).
Best regards.
Oscar Gomez Fuente.
Quoted 109 lines · Peter Seiderer
- enable
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYSinraspberrypi3_defconfig
- add copy of rpi-firmware/overlays directory to boot partition in genimage-raspberrypi3.cfg
- enhancepost-image.shscript to add 'dtoverlay=pi3-miniuart-bt' on request
- add BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay" inraspberrypi3_defconfigSigned-off-by Peter Seiderer <[email protected]>---
Changes v1 --> v2:
- use pi3-miniuart-bt instead of pi3-disable-bt
- fixpost-image.shto add overlay lines only once
- add overlay description (and alternative solution) to readme.txt--- board/raspberrypi/genimage-raspberrypi3.cfg | 1 + board/raspberrypi/post-image.sh | 13 +++++++++++++ board/raspberrypi/readme.txt | 8 +++++++- configs/raspberrypi3_defconfig | 3 ++- 4 files changed, 23 insertions(+), 2 deletions(-)board/raspberrypi/genimage-raspberrypi3.cfg +1
-0@@ -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" } }board/raspberrypi/post-image.sh +3
-0@@ -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)."board/raspberrypi/post-image.sh +9
-0+ 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" \board/raspberrypi/readme.txt +5
-1@@ -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 incmdline.txt
board/raspberrypi/readme.txt +2
-0+ and /etc/inittab. + How to write the SD card ========================configs/raspberrypi3_defconfig +2
-2@@ -21,7 +21,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b" BR2_PACKAGE_RPI_FIRMWARE=y -# BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set +BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y # Required tools to create the SD image BR2_PACKAGE_HOST_DOSFSTOOLS=y@@ -34,3 +34,4 @@ BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay" --
Quoted 3 lines
2.8.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160503/1ca24628/attachment.html>
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Oscar" == Oscar Gomez Fuente <[email protected]> writes:
Hi Peter Seiderer,
What's the difference between enabling pi3-miniuart-bt instead of pi3-disable-bt?With pi3-disable-bt enables it works fine the serial console on (14 [TxD] & 15 [RxD] pins).
From the names I would guess it is the difference between completely disabling access to the bluetooth module and providing access to it though the secondary (mini) uart.
The miniuart has some limitations, but I guess basic bluetooth stuff should work with it.
Signature · 2 lines
Venlig hilsen, Peter Korsgaard
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
All,
Quoted 9 lines · Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Oscar" == Oscar Gomez Fuente <[email protected]> writes:
Hi Peter Seiderer,
What's the difference between enabling pi3-miniuart-bt instead of pi3-disable-bt?With pi3-disable-bt enables it works fine the serial console on (14 [TxD] & 15 [RxD] pins).
Quoted 6 lines
From the names I would guess it is the difference between completely disabling access to the bluetooth module and providing access to it though the secondary (mini) uart.
The miniuart has some limitations, but I guess basic bluetooth stuff should work with it.
I've got a bit lost in the rpi3 serial console issues but as i understand the current situation all you need to do is set enable_uart=1 in config.txt. See
https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644.
I've not tested this.
I think you also need to change cmdline.txt to use console=serial0 as
the pi3-miniuart-bt will replace it with the correct serial device
(ttyAMA0 or ttyS0) depending if it's enabled or not. See the comments
in https://github.com/raspberrypi/linux/blob/rpi-4.1.y/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts.
Thanks
Martin
Quoted 8 lines
--
Venlig hilsen,
Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Hello Martin,
Quoted 25 lines · Martin Bark
All,
Quoted 9 lines · Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Oscar" == Oscar Gomez Fuente <[email protected]> writes:
Hi Peter Seiderer,
What's the difference between enabling pi3-miniuart-bt instead of pi3-disable-bt?With pi3-disable-bt enables it works fine the serial console on (14 [TxD] & 15 [RxD] pins).
Quoted 6 lines
From the names I would guess it is the difference between completely disabling access to the bluetooth module and providing access to it though the secondary (mini) uart.
The miniuart has some limitations, but I guess basic bluetooth stuff should work with it.
I've got a bit lost in the rpi3 serial console issues but as i understand the current situation all you need to do is set enable_uart=1 in config.txt. See
https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644.
I've not tested this.
Quoted 5 lines
I think you also need to change cmdline.txt to use console=serial0 as
the pi3-miniuart-bt will replace it with the correct serial device
(ttyAMA0 or ttyS0) depending if it's enabled or not. See the comments
in https://github.com/raspberrypi/linux/blob/rpi-4.1.y/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts.
This works too, not sure whats the better solution, explicit via device tree overlay or some firmware magic....
- pi3-miniuart-bt 'dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200 [ 0.001320] console [tty1] enabled [ 0.318181] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550 [ 2.008162] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [ 3.296233] console [ttyAMA0] enabled
- enable-uart=1, serial0 dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyS0,115200 [ 0.001318] console [tty1] enabled [ 0.318270] console [ttyS0] disabled [ 0.318389] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550 [ 1.042714] console [ttyS0] enabled [ 3.020277] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
Regards,
Peter
Quoted 12 lines
Thanks
Martin
Quoted 8 lines
--
Venlig hilsen,
Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Peter,
Quoted 45 lines · Peter Seiderer
Hello Martin,
Quoted 25 lines · Martin Bark
All,
Quoted 9 lines · Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Oscar" == Oscar Gomez Fuente <[email protected]> writes:
Hi Peter Seiderer,
What's the difference between enabling pi3-miniuart-bt instead of pi3-disable-bt?With pi3-disable-bt enables it works fine the serial console on (14 [TxD] & 15 [RxD] pins).
Quoted 6 lines
From the names I would guess it is the difference between completely disabling access to the bluetooth module and providing access to it though the secondary (mini) uart.
The miniuart has some limitations, but I guess basic bluetooth stuff should work with it.
I've got a bit lost in the rpi3 serial console issues but as i understand the current situation all you need to do is set enable_uart=1 in config.txt. See
https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644.
I've not tested this.Quoted 5 lines
I think you also need to change cmdline.txt to use console=serial0 as
the pi3-miniuart-bt will replace it with the correct serial device
(ttyAMA0 or ttyS0) depending if it's enabled or not. See the comments
in https://github.com/raspberrypi/linux/blob/rpi-4.1.y/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts.This works too, not sure whats the better solution, explicit via device tree overlay or some firmware magic....
- pi3-miniuart-bt 'dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200 [ 0.001320] console [tty1] enabled [ 0.318181] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550 [ 2.008162] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [ 3.296233] console [ttyAMA0] enabled
Quoted 8 lines
- enable-uart=1, serial0 dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyS0,115200 [ 0.001318] console [tty1] enabled [ 0.318270] console [ttyS0] disabled [ 0.318389] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550 [ 1.042714] console [ttyS0] enabled [ 3.020277] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
I wonder if the solution is to just document the situation in board/raspberrypi/readme.txt. The documentation could just detail the available choices for Bluetooth and serial console on the rpi3 and how to configure each manually. A summary of the available choices is:
1) Default setup - Serial console does not work, Bluetooth works
2) Add enable-uart=1 - Serial console works but the core frequency is fixed. Serial console max baud rate is less than the rpi2. Bluetooth works.
3) Use pi3-miniuart-bt - Serial console works the same as the rpi2 but Bluetooth runs slow.
4) Use pi3-disable-bt - Serial console works the same as the rpi2 but Bluetooth is disabled.
What do you think?
Thanks
Martin
Quoted 17 lines
Regards,
PeterQuoted 12 lines
Thanks
Martin
Quoted 8 lines
--
Venlig hilsen,
Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Hello Martin,
Quoted 71 lines · Martin Bark
Peter,
Quoted 45 lines · Peter Seiderer
Hello Martin,
Quoted 25 lines · Martin Bark
All,
Quoted 9 lines · Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Oscar" == Oscar Gomez Fuente <[email protected]> writes:
Hi Peter Seiderer,
What's the difference between enabling pi3-miniuart-bt instead of pi3-disable-bt?With pi3-disable-bt enables it works fine the serial console on (14 [TxD] & 15 [RxD] pins).
Quoted 6 lines
From the names I would guess it is the difference between completely disabling access to the bluetooth module and providing access to it though the secondary (mini) uart.
The miniuart has some limitations, but I guess basic bluetooth stuff should work with it.
I've got a bit lost in the rpi3 serial console issues but as i understand the current situation all you need to do is set enable_uart=1 in config.txt. See
https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644.
I've not tested this.Quoted 5 lines
I think you also need to change cmdline.txt to use console=serial0 as
the pi3-miniuart-bt will replace it with the correct serial device
(ttyAMA0 or ttyS0) depending if it's enabled or not. See the comments
in https://github.com/raspberrypi/linux/blob/rpi-4.1.y/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts.This works too, not sure whats the better solution, explicit via device tree overlay or some firmware magic....
- pi3-miniuart-bt 'dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200 [ 0.001320] console [tty1] enabled [ 0.318181] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550 [ 2.008162] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [ 3.296233] console [ttyAMA0] enabledQuoted 8 lines
- enable-uart=1, serial0 dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyS0,115200 [ 0.001318] console [tty1] enabled [ 0.318270] console [ttyS0] disabled [ 0.318389] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550 [ 1.042714] console [ttyS0] enabled [ 3.020277] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2I wonder if the solution is to just document the situation in
board/raspberrypi/readme.txt. The documentation could just detail the available choices for Bluetooth and serial console on the rpi3 and how to configure each manually. A summary of the available choices is:1) Default setup - Serial console does not work, Bluetooth works
2) Add enable-uart=1 - Serial console works but the core frequency is fixed. Serial console max baud rate is less than the rpi2. Bluetooth works.
3) Use pi3-miniuart-bt - Serial console works the same as the rpi2 but Bluetooth runs slow.
4) Use pi3-disable-bt - Serial console works the same as the rpi2 but Bluetooth is disabled.
Quoted 1 line
What do you think?
Agreed, with bias to 3) as the default (or one of the other solutions with serial console enabled)...
Regards,
Peter
Quoted 22 lines
Thanks
Martin
Quoted 17 lines
Regards,
PeterQuoted 12 lines
Thanks
Martin
Quoted 8 lines
--
Venlig hilsen,
Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Hello,
Quoted 14 lines · Peter Seiderer
Quoted 14 lines
I wonder if the solution is to just document the situation in
board/raspberrypi/readme.txt. The documentation could just detail the available choices for Bluetooth and serial console on the rpi3 and how to configure each manually. A summary of the available choices is:1) Default setup - Serial console does not work, Bluetooth works
2) Add enable-uart=1 - Serial console works but the core frequency is fixed. Serial console max baud rate is less than the rpi2. Bluetooth works.
3) Use pi3-miniuart-bt - Serial console works the same as the rpi2 but Bluetooth runs slow.
4) Use pi3-disable-bt - Serial console works the same as the rpi2 but Bluetooth is disabled.
Quoted 4 lines
Quoted 1 line
What do you think?
Agreed, with bias to 3) as the default (or one of the other solutions with serial console enabled)...
Yes, sounds like a good idea.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
In reply to Peter SeidererHello,
Quoted 10 lines · Peter Seiderer
This works too, not sure whats the better solution, explicit via device tree overlay or some firmware magic....
- pi3-miniuart-bt 'dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200 [ 0.001320] console [tty1] enabled [ 0.318181] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550 [ 2.008162] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [ 3.296233] console [ttyAMA0] enabled
Quoted 7 lines
- enable-uart=1, serial0 dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyS0,115200 [ 0.001318] console [tty1] enabled [ 0.318270] console [ttyS0] disabled [ 0.318389] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550 [ 1.042714] console [ttyS0] enabled [ 3.020277] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
For the Buildroot defconfig, I believe passing enable-uart=1 in config.txt would be the easiest solution. Could you send a patch that does this instead of messing with the overlays ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Hello Thomas,
Quoted 22 lines · Thomas Petazzoni
Hello,
Quoted 10 lines · Peter Seiderer
This works too, not sure whats the better solution, explicit via device tree overlay or some firmware magic....
- pi3-miniuart-bt 'dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200 [ 0.001320] console [tty1] enabled [ 0.318181] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550 [ 2.008162] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [ 3.296233] console [ttyAMA0] enabledQuoted 7 lines
- enable-uart=1, serial0 dmesg | grep tty':
[ 0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyS0,115200 [ 0.001318] console [tty1] enabled [ 0.318270] console [ttyS0] disabled [ 0.318389] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550 [ 1.042714] console [ttyS0] enabled [ 3.020277] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
Quoted 3 lines
For the Buildroot defconfig, I believe passing enable-uart=1 in config.txt would be the easiest solution. Could you send a patch that does this instead of messing with the overlays ?
Sorry for the delay, I tried the 'enable-uart=1' solution some time ago and it did not work (I think I messed something up), retried today and it worked, patch will follow...
Regards,
Peter
Quoted 4 lines
Thanks!
Thomas
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
In reply to Peter SeidererHello,
Quoted 11 lines · Peter Seiderer
- enable
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYSinraspberrypi3_defconfig
- add copy of rpi-firmware/overlays directory to boot partition in genimage-raspberrypi3.cfg
- enhancepost-image.shscript to add 'dtoverlay=pi3-miniuart-bt' on request
- add BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay" inraspberrypi3_defconfigSigned-off-by Peter Seiderer <[email protected]>---
Changes v1 --> v2:
- use pi3-miniuart-bt instead of pi3-disable-bt
- fixpost-image.shto add overlay lines only once
- add overlay description (and alternative solution) to readme.txt
Quoted 6 lines
--- board/raspberrypi/genimage-raspberrypi3.cfg | 1 + board/raspberrypi/post-image.sh | 13 +++++++++++++ board/raspberrypi/readme.txt | 8 +++++++- configs/raspberrypi3_defconfig | 3 ++- 4 files changed, 23 insertions(+), 2 deletions(-)
What I understood from the discussions on your new patch "raspberrypi3:
fix serial console (add enable_uart=1", this older proposal is actually what is preferred. It is a bit more complicated than just passing enable_uart=1, but it allows to have the UART *and* run the CPU as its normal frequency.
So, I've applied this patch, and marked the newer one (enable_uart=1) as rejected.
It would be good if you could rebuild the raspberrypi3_defconfig, and check that it works for you. While you're at it, it would be useful if you could look at the bug report
https://bugs.busybox.net/show_bug.cgi?id=9196 and see if you can reproduce the issue and/or help solve the problem.
Thanks a lot for your contribution!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Hello Thomas,
Quoted 27 lines · Thomas Petazzoni
Hello,
Quoted 11 lines · Peter Seiderer
- enable
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYSinraspberrypi3_defconfig
- add copy of rpi-firmware/overlays directory to boot partition in genimage-raspberrypi3.cfg
- enhancepost-image.shscript to add 'dtoverlay=pi3-miniuart-bt' on request
- add BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay" inraspberrypi3_defconfigSigned-off-by Peter Seiderer <[email protected]>---
Changes v1 --> v2:
- use pi3-miniuart-bt instead of pi3-disable-bt
- fixpost-image.shto add overlay lines only once
- add overlay description (and alternative solution) to readme.txtQuoted 6 lines
--- board/raspberrypi/genimage-raspberrypi3.cfg | 1 + board/raspberrypi/post-image.sh | 13 +++++++++++++ board/raspberrypi/readme.txt | 8 +++++++- configs/raspberrypi3_defconfig | 3 ++- 4 files changed, 23 insertions(+), 2 deletions(-)What I understood from the discussions on your new patch "raspberrypi3:
fix serial console (add enable_uart=1", this older proposal is actually what is preferred. It is a bit more complicated than just passing enable_uart=1, but it allows to have the UART *and* run the CPU as its normal frequency.
Quoted 5 lines
So, I've applied this patch, and marked the newer one (enable_uart=1) as rejected.
It would be good if you could rebuild the
raspberrypi3_defconfig, and check that it works for you. While you're at it, it would be useful if
Still works as expected for me, tested with buildroot git d4db4277ffbd1fae478ba748c626eddc7c220e67, login via serial and login via hdmi/usb-keyboard possible...
Quoted 3 lines
you could look at the bug report
https://bugs.busybox.net/show_bug.cgi?id=9196 and see if you can reproduce the issue and/or help solve the problem.
Will check the systemd case tomorrow...
Regards,
Peter
Quoted 4 lines
Thanks a lot for your contribution!
Thomas