Boot fails with self-build u-boot

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

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

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 ?

tty1 (without S) is right as this is hdmi-console…there is no 0.

Does serial console work now?

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

Was os loaded? Which one do you try (openwrt,debian,…)?

It’s OpenWRT trunk kernel 5.4.31

In openwrt you have to put ttyS2 first and no setenv in uenv.txt…see my post above for uenv-format…

console=ttyS2,115200 ....

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.

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

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

I wondering why i do not run into this issue while booting my kernel with actual openwrt rootfs :thinking:

have tested the rootfs-method on r64 too :wink: got working console

looked in my /etc/inittab and have only the first 3 entries (sysinit,shutdown,askconsole) (on r64)

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.