On 2025-02-27, Christoph Buck wrote:
> I made some progress porting Guix to an i.MX6 ARM32 board. After some
> minor roadblocks, I can finally boot into an image. However, I have some
> problems logging into the system due to strange behavior with agetty. The
> system is connected to my PC via UART, and agetty is used to prompt for a
> login. It looks like the input keys are not sent correctly. A log of a
> session looks like this (line breaks correspond to the actual session
> output):
...
>> Login incorrect
>> jupiter login: root
>> This is the GNU operating system, welcome!
>
>> root@jupiter ~# ip addr
>> -bash: pip: command not found
>> root@jupiter ~# ip addr
>> -bash: iarpd: command not found
>> root@jupiter ~# ip addr
>> -bash: i: command not found
>> root@jupiter ~# i
>> root@jupiter ~# i
>> -bash: pdri: command not found
>> root@jupiter ~# ls
>> -bash: il: command not found
>> root@jupiter ~# ls
>> root@jupiter ~# ls
>> -bash: slsls: command not found
>
> I try to log in as root with a blank default password. As you can see,
> the login keeps failing for some time, and I am repeatedly asked for my
> credentials. Then, after some more attemps and repeatedly hitting the
> enter key, I am greeted with the shell prompt, only to be logged out
> again. Repeating this several times, I eventually manage to get a bash
> shell, but issuing commands fails because, as you can see from the bash
> output, some keys are not received correctly.
>
> Here is my image definition:
>
> --8<---------------cut here---------------start------------->8---
> (define grimbard-os
> (operating-system
...
> (kernel-arguments (cons* "console=ttymxc1,115200"
> %default-kernel-arguments))
...
> ;; mingetty does not work on serial lines.
> ;; Use agetty with board-specific serial
> parameters.
> (service agetty-service-type
> (agetty-configuration
> (extra-options '("-L"))
> (baud-rate "115200")
> (term "vt100")
> (tty "ttymxc1"))))
> %base-services))))My hunch is guix is setting up a getty on the default console /dev/console (specified on the kernel commandline as console=ttymxc1,115200), and it is also defined in your agetty-service-type as /dev/ttymxc1 ... and the two gettys do not realize they are effectively talking to the same device and get in each other's way. To test if that is the case, try disabling the agetty-service-type (or not defining the console in kernel-arguments, but then you would miss kernel messages)... and if you still get a working console, yay? :) live well, vagrant
signature.asc
Description: PGP signature
