cioby23
(Cioby23)
April 10, 2020, 7:04am
81
Yes you are right I change it back to ttyS2 and managed to boot it successfully but now I’m back to that issue that after booting I cannot see the console prompt.
I guess that is because I need to change also tty1 with ttyS0 also as you mentioned in the below post
As i said above…you need to swap tty1 (hdmi) and ttyS0 (serial)
console=ttyS0,115200 console=tty1 fbcon=map:0
In your uEnv.txt (BPI-BOOT/bananapi/bpi-r2/linux/uEnv.txt
frank-w
(Frank W.)
April 10, 2020, 7:19am
82
No,this swaps only serial console and hdmi…
You need to set console var as i wrote above…best way should be uenv.txt else you need to set it on every boot
Or you swap uart like i do in my kernels…put uart2 first in mt7623.dtsi
cioby23
(Cioby23)
April 10, 2020, 8:03am
83
So when looking at this line in uEnv.txt
setenv console "earlyprintk console=ttyS2,115200 console=tty1 fbcon=map:0"
First console entry should be ttyS2 which is good but the second should be tty1 ? or should be other tty like 0 or 2 ?
frank-w
(Frank W.)
April 10, 2020, 8:05am
84
tty1 (without S) is right as this is hdmi-console…there is no 0.
Does serial console work now?
cioby23
(Cioby23)
April 10, 2020, 8:22am
85
Serial console works up to where the kernel messages finish with no prompt being displayed
[ 13.673373] mt7530 mdio-bus:00 wan: Link is Up - 1Gbps/Full - flow control rx/tx
[ 13.680794] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
[ 32.472893] vusb: disabling
[ 32.475706] vmc: disabling
[ 32.478411] vmch: disabling
[ 32.481205] vgp1: disabling
[ 32.484050] vcamaf: disabling
^C
frank-w
(Frank W.)
April 10, 2020, 8:33am
86
Was os loaded? Which one do you try (openwrt,debian,…)?
cioby23
(Cioby23)
April 10, 2020, 8:49am
87
It’s OpenWRT trunk kernel 5.4.31
frank-w
(Frank W.)
April 10, 2020, 8:51am
88
In openwrt you have to put ttyS2 first and no setenv in uenv.txt…see my post above for uenv-format…
console=ttyS2,115200 ....
cioby23
(Cioby23)
April 10, 2020, 9:48am
89
I do not have setenv configured in my uEnv.txt file. I have uploaded it here
uEnv-default.txt (4.5 KB)
I also attached the full serial console boot log
openwrt-serial-console-boot-log.txt (32.4 KB)
I managed to connect to OpenWRT using ssh and default IP/credentials, but the CLI prompt on the serial console still cannot be accessed.
frank-w
(Frank W.)
April 10, 2020, 10:33am
90
Have you tried pressing enter? Bootlog looks good so far…
Btw. If you use my uboot you do not need full environment in uenv.txt…only parts that you want to change
cioby23
(Cioby23)
April 10, 2020, 10:54am
91
Ok I have managed to fix the serial console issue. I had a look at @lexa2 OpenWRT fork and he has a patch to fix the serial console access
I applied it to my repo and change it to ttyS2 and then it worked fine.
1 Like
frank-w
(Frank W.)
April 10, 2020, 11:12am
92
I wondering why i do not run into this issue while booting my kernel with actual openwrt rootfs
have tested the rootfs-method on r64 too got working console
looked in my /etc/inittab and have only the first 3 entries (sysinit,shutdown,askconsole) (on r64)
LeXa2
(Alexey Loukianov)
May 5, 2020, 2:43am
93
It remains a kind-a-mistery for me too, check my commit message that @cioby23 refferenced. “::askconsole” is expected to work out of the box providing login on the /dev/console but for some unknown reason it wasn’t working for me in OpenWRT 18.06 fork. As my time working on that was really limited I preferred not to waste it investigating what’s the deal and simply implemented a workaround by adding an explicit line into inittab.