All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] board/raspberrypi: Make it possible to pass "enable_uart=1"
@ 2019-10-27  2:25 Rostislav Lisovy
  2019-10-27 11:48 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Rostislav Lisovy @ 2019-10-27  2:25 UTC (permalink / raw)
  To: buildroot

Use "--enable-uart" in BR2_ROOTFS_POST_SCRIPT_ARGS to enable
the "miniuart". This makes sense in case the
"--add-pi3-miniuart-bt-overlay" is not used, thus the PL011
is being used for the BT/BLE module and the miniuart for console.

Signed-off-by: Rostislav Lisovy <rostislav.lisovy@r7-engineering.com>
---
 board/raspberrypi/post-image.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-
image.sh
index 70447cd48b..e2efd46d3b 100755
--- a/board/raspberrypi/post-image.sh
+++ b/board/raspberrypi/post-image.sh
@@ -45,6 +45,16 @@ __EOF__
 		gpu_mem="${arg:2}"
 		sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i
"${BINARIES_DIR}/rpi-firmware/config.txt"
 		;;
+		--enable-uart)
+		# Enable uart console
+		if ! grep -qE '^enable_uart=1' "${BINARIES_DIR}/rpi-
firmware/config.txt"; then
+			cat << __EOF__ >> "${BINARIES_DIR}/rpi-
firmware/config.txt"
+
+# enable rpi3 ttyS0 serial console
+enable_uart=1
+__EOF__
+		fi
+		;;
 	esac
 
 done

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] board/raspberrypi: Make it possible to pass "enable_uart=1"
  2019-10-27  2:25 [Buildroot] [PATCH] board/raspberrypi: Make it possible to pass "enable_uart=1" Rostislav Lisovy
@ 2019-10-27 11:48 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2019-10-27 11:48 UTC (permalink / raw)
  To: buildroot

 Hi Rostislav,

On 27/10/2019 03:25, Rostislav Lisovy wrote:
> Use "--enable-uart" in BR2_ROOTFS_POST_SCRIPT_ARGS to enable
> the "miniuart". This makes sense in case the
> "--add-pi3-miniuart-bt-overlay" is not used, thus the PL011
> is being used for the BT/BLE module and the miniuart for console.

 Thank you for this patch. However, the post-image.sh and post-build.sh scripts
provided in the board directory are not meant to be used for customisation.
Instead, you should use a config.txt file that you maintain yourself, and simply
copy it to the right location in your own post-image.sh script.

 Regards,
 Arnout


> 
> Signed-off-by: Rostislav Lisovy <rostislav.lisovy@r7-engineering.com>
> ---
>  board/raspberrypi/post-image.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-
> image.sh
> index 70447cd48b..e2efd46d3b 100755
> --- a/board/raspberrypi/post-image.sh
> +++ b/board/raspberrypi/post-image.sh
> @@ -45,6 +45,16 @@ __EOF__
>  		gpu_mem="${arg:2}"
>  		sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i
> "${BINARIES_DIR}/rpi-firmware/config.txt"
>  		;;
> +		--enable-uart)
> +		# Enable uart console
> +		if ! grep -qE '^enable_uart=1' "${BINARIES_DIR}/rpi-
> firmware/config.txt"; then
> +			cat << __EOF__ >> "${BINARIES_DIR}/rpi-
> firmware/config.txt"
> +
> +# enable rpi3 ttyS0 serial console
> +enable_uart=1
> +__EOF__
> +		fi
> +		;;
>  	esac
>  
>  done
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-27 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27  2:25 [Buildroot] [PATCH] board/raspberrypi: Make it possible to pass "enable_uart=1" Rostislav Lisovy
2019-10-27 11:48 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.