Skip to contentSkip to conversation

Enable UART on raspberry pi zero

PATCH New luke 3 participants 7 messages Mar 18, 2017 – Mar 20, 2017

lore
Share & tools
lore

luke

author
#0 lore raw

PATCH 1/1 Enable UART on raspberry pi zero

#1 lore raw

PATCH 1/1 Enable UART on raspberry pi zero

Luke, All,

On 2017-03-18 18:22 +0000, luke spake thusly:

Quoted 16 lines

From 9c77dfd825bebbf02e3b2837dacb9ae4873c9ec8 Mon Sep 17 00:00:00 2001
From: Luke <[email protected]>
Date: Sat, 18 Mar 2017 18:17:24 +0000
Subject: [PATCH 1/1] Modify post-build.sh for raspberry pi zero so that it
activates the UART serial console in config.txt

---
 board/raspberrypi/post-build.sh | 3 +++
 1 file changed, 3 insertions(+)
board/raspberrypi/post-build.sh +0 -0
index 5e5eb71..6d2f0d1 100755

board/raspberrypi/post-build.sh if [ -e ${TARGET_DIR}/etc/inittab ]; then · line 14

Quoted 6 lines
board/raspberrypi/post-build.sh +3 -0
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
 	sed -i '/GENERIC_SERIAL/a\
 tty1::respawn:/sbin/getty -L  tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
 fi
+
+# Activate the console
+echo "enable_uart=1" | cat >> config.txt

I have a rpi-0 here, and I do not need that config option to get the UART working.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
author
#2 lore raw

PATCH 1/1 Enable UART on raspberry pi zero

Maybe my message wasn't clear.

This is for the raspberry PI Zero W.

The UART is taken over by the wifi chip, so the software UART is now used for the TX/RX GPIO pin. But to be reliable, the CPU freq is supposed to be limited in some way.

It's all here: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=141195

Pi3 UART stopped working? Read this. - Raspberry Pi<https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=141195>
www.raspberrypi.org
I have followed this post and others related to the issue and am still stumped by the serial corruption issue. I have a pi 3 flashed with 2016-03-18-raspbian-jessie.

JD

________________________________
De : Yann E. MORIN <[email protected]> de la part de Yann E. MORIN <[email protected]> Envoy? : dimanche 19 mars 2017 13:27
? : luke
Cc : buildroot at busybox.net
Objet : Re: [Buildroot] [PATCH] Enable UART on raspberry pi zero

Luke, All,

On 2017-03-18 18:22 +0000, luke spake thusly:

Quoted 16 lines

From 9c77dfd825bebbf02e3b2837dacb9ae4873c9ec8 Mon Sep 17 00:00:00 2001
From: Luke <[email protected]>
Date: Sat, 18 Mar 2017 18:17:24 +0000
Subject: [PATCH 1/1] Modify post-build.sh for raspberry pi zero so that it
activates the UART serial console in config.txt

---
 board/raspberrypi/post-build.sh | 3 +++
 1 file changed, 3 insertions(+)
board/raspberrypi/post-build.sh +0 -0
index 5e5eb71..6d2f0d1 100755

board/raspberrypi/post-build.sh if [ -e ${TARGET_DIR}/etc/inittab ]; then · line 14

Quoted 6 lines
board/raspberrypi/post-build.sh +3 -0
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
       sed -i '/GENERIC_SERIAL/a\
 tty1::respawn:/sbin/getty -L  tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
 fi
+
+# Activate the console
+echo "enable_uart=1" | cat >> config.txt

I have a rpi-0 here, and I do not need that config option to get the UART working.

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------' -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170320/c6bfb648/attachment.html>

#3 lore raw

PATCH 1/1 Enable UART on raspberry pi zero

Luke, All,

On 2017-03-20 12:36 +0000, luke spake thusly:

Quoted 5 lines

Maybe my message wasn't clear.
This is for the raspberry PI Zero W.

The UART is taken over by the wifi chip, so the software UART is now used for the TX/RX GPIO pin.

Then please look at how we're already doing it for the rpi3:

https://git.buildroot.org/buildroot/tree/configs/raspberrypi3_defconfig

See the following option:

    BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"

Since the thread you pointed to is about rpi3, not rpi0-w, I gues the workiaround we have will also work for rip0-w.

Can you please check that?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/1 Enable UART on raspberry pi zero

Luke, All,

On 2017-03-20 12:41 +0000, luke spake thusly:

Quoted 8 lines

Sorry, made a mistake in the original patch.

Quoted 1 line

From 9c77dfd825bebbf02e3b2837dacb9ae4873c9ec8 Mon Sep 17 00:00:00 2001

From: Luke <[email protected]>
Date: Sat, 18 Mar 2017 18:17:24 +0000
Subject: [PATCH 1/1] Modify post-build.sh for raspberry pi zero so that it
activates the UART serial console in config.txt

Please send you patches using 'git send-email'. Your current submissions are not appropriately formatted.

Quoted 10 lines
---
 board/raspberrypi/post-build.sh | 3 +++
 1 file changed, 3 insertions(+)
board/raspberrypi/post-build.sh +0 -0
index 5e5eb71..6d2f0d1 100755

board/raspberrypi/post-build.sh if [ -e ${TARGET_DIR}/etc/inittab ]; then · line 14

Quoted 6 lines
board/raspberrypi/post-build.sh +3 -0
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
 	sed -i '/GENERIC_SERIAL/a\
 tty1::respawn:/sbin/getty -L  tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
 fi
+
+# Activate the console
+echo "enable_uart=1" | cat >> ${TARGET_DIR}/../images/rpi-firmware/config.txt

Two things about this one:

- what you wanted to use was $(BINARIES_DIR)/rpi-firmware/config.txt,

- as I already replied to you earlier, please look at how it is done for the rpi3, and try to see if the same trick applies to the rpi0-w.

Thanks!

Regards,
Yann E. MORIN.

Quoted 60 lines
Signature · 12 lines
2.7.4


De : Yann E. MORIN <[email protected]> de la part de Yann E. MORIN <[email protected]>
Envoy? : dimanche 19 mars 2017 13:27
? : luke
Cc?: buildroot at busybox.net
Objet : Re: [Buildroot] [PATCH] Enable UART on raspberry pi zero
?   
Luke, All,

On 2017-03-18 18:22 +0000, luke spake thusly:
Quoted 19 lines

From 9c77dfd825bebbf02e3b2837dacb9ae4873c9ec8 Mon Sep 17 00:00:00 2001
From: Luke <[email protected]>
Date: Sat, 18 Mar 2017 18:17:24 +0000
Subject: [PATCH 1/1] Modify post-build.sh for raspberry pi zero so that it ? activates the UART serial console in config.txt

---
? board/raspberrypi/post-build.sh | 3 +++
? 1 file changed, 3 insertions(+)

board/raspberrypi/post-build.sh +0 -0
index 5e5eb71..6d2f0d1 100755
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
 ??????? sed -i '/GENERIC_SERIAL/a\

? tty1::respawn:/sbin/getty -L? tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab ? fi

board/raspberrypi/post-build.sh

Quoted 3 lines
board/raspberrypi/post-build.sh +3 -0
+
+# Activate the console
+echo "enable_uart=1" | cat >> config.txt

I have a rpi-0 here, and I do not need that config option to get the UART working.

Regards,
Yann E. MORIN.

Signature · 17 lines
.-----------------.--------------------.------------------.--------------------.
|? Yann E. MORIN? | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software? Designer | \ / CAMPAIGN???? |? ___?????????????? |
| +33 223 225 172 `------------.-------:? X? AGAINST????? |? \e/? There is no? |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL??? |?? v?? conspiracy.? |


start [BZH_lan]
ymorin.is-a-geek.org
The guys from SimpleMachines have been kind enough to give me a Sim.One SBC. I'll be able to use that board to test Maverick Crunch, suport for which I will add to ...

'------------------------------^-------^------------------^--------------------'
    
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 1/1 Enable UART on raspberry pi zero

Hello Luke, Yann,

Quoted 34 lines · Yann E. MORIN

Luke, All,

On 2017-03-20 12:41 +0000, luke spake thusly:

Quoted 8 lines

Sorry, made a mistake in the original patch.

Quoted 1 line

From 9c77dfd825bebbf02e3b2837dacb9ae4873c9ec8 Mon Sep 17 00:00:00 2001

From: Luke <[email protected]>
Date: Sat, 18 Mar 2017 18:17:24 +0000
Subject: [PATCH 1/1] Modify post-build.sh for raspberry pi zero so that it
activates the UART serial console in config.txt

Please send you patches using 'git send-email'. Your current submissions are not appropriately formatted.

Quoted 10 lines
---
 board/raspberrypi/post-build.sh | 3 +++
 1 file changed, 3 insertions(+)
board/raspberrypi/post-build.sh +0 -0
index 5e5eb71..6d2f0d1 100755

board/raspberrypi/post-build.sh if [ -e ${TARGET_DIR}/etc/inittab ]; then · line 14

Quoted 6 lines
board/raspberrypi/post-build.sh +3 -0
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
 	sed -i '/GENERIC_SERIAL/a\
 tty1::respawn:/sbin/getty -L  tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
 fi
+
+# Activate the console
+echo "enable_uart=1" | cat >> ${TARGET_DIR}/../images/rpi-firmware/config.txt

Two things about this one:

Quoted 6 lines

- what you wanted to use was $(BINARIES_DIR)/rpi-firmware/config.txt,

- as I already replied to you earlier, please look at how it is done for the rpi3, and try to see if the same trick applies to the rpi0-w.

In case the rpi3 fix works for rpi0-w take a look at this patch:

	https://patchwork.ozlabs.org/patch/741230/

adding a new config/raspberrypi0w_defconfig, same as for rpi0 adding additional 'dtoverlay=pi3-miniuart-bt' (and adding the overlay directory to the sdcard image)...

Regards,
Peter

Quoted 66 lines

Thanks!

Regards,
Yann E. MORIN.

Quoted 60 lines
Signature · 12 lines
2.7.4


De : Yann E. MORIN <[email protected]> de la part de Yann E. MORIN <[email protected]>
Envoy? : dimanche 19 mars 2017 13:27
? : luke
Cc?: buildroot at busybox.net
Objet : Re: [Buildroot] [PATCH] Enable UART on raspberry pi zero
?   
Luke, All,

On 2017-03-18 18:22 +0000, luke spake thusly:
Quoted 19 lines

From 9c77dfd825bebbf02e3b2837dacb9ae4873c9ec8 Mon Sep 17 00:00:00 2001
From: Luke <[email protected]>
Date: Sat, 18 Mar 2017 18:17:24 +0000
Subject: [PATCH 1/1] Modify post-build.sh for raspberry pi zero so that it ? activates the UART serial console in config.txt

---
? board/raspberrypi/post-build.sh | 3 +++
? 1 file changed, 3 insertions(+)

board/raspberrypi/post-build.sh +0 -0
index 5e5eb71..6d2f0d1 100755
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
 ??????? sed -i '/GENERIC_SERIAL/a\

? tty1::respawn:/sbin/getty -L? tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab ? fi

board/raspberrypi/post-build.sh

Quoted 3 lines
board/raspberrypi/post-build.sh +3 -0
+
+# Activate the console
+echo "enable_uart=1" | cat >> config.txt

I have a rpi-0 here, and I do not need that config option to get the UART working.

Regards,
Yann E. MORIN.

Signature · 17 lines
.-----------------.--------------------.------------------.--------------------.
|? Yann E. MORIN? | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software? Designer | \ / CAMPAIGN???? |? ___?????????????? |
| +33 223 225 172 `------------.-------:? X? AGAINST????? |? \e/? There is no? |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL??? |?? v?? conspiracy.? |


start [BZH_lan]
ymorin.is-a-geek.org
The guys from SimpleMachines have been kind enough to give me a Sim.One SBC. I'll be able to use that board to test Maverick Crunch, suport for which I will add to ...

'------------------------------^-------^------------------^--------------------'
    
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot