0

I'm currently trying to build my own custom Linux OS for my Raspberry Pi 3 and am experiencing some trouble.

I'm using buildroot v2018_2.

I configured the system using make raspberrypi3_defconfig

Then just changed the following options :

  • C library : use glibc instead of uClibc-ng
  • Increased filesystem size from 60M to 100M
  • Add password root to root user under [*] Enable root login with password

After compiling, flashing the generated sdcard.img and booting, I can see kernel logs on the HDMI connected screen.

However after booting, the OS doesn't propose any prompt on the HDMI screen and I'm stuck here.

I know that the system is not freezed because I can see kernel logs if I plug/unplug my keyboard.

I suppose that the console is connected to the UART and only kernel logs are sent to HDMI port.

However I can't find how to force console prompt on HDMI.

Here are my config.txt and cmdline :


$ cat config.txt
# Please note that this is only a sample, we recommend you to change it to fit
# your needs.
# You should override this file using a post-build script.
# See http://buildroot.org/manual.html#rootfs-custom
# and http://elinux.org/RPiconfig for a description of config.txt syntax

kernel=zImage

# To use an external initramfs file
#initramfs rootfs.cpio.gz

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
disable_overscan=1

# How much memory in MB to assign to the GPU on Pi models having
# 256, 512 or 1024 MB total memory
gpu_mem_256=100
gpu_mem_512=100
gpu_mem_1024=100

# fixes rpi3 ttyAMA0 serial console
dtoverlay=pi3-miniuart-bt

$ cat cmdline
root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200

I didn't change any configuration in kernel and I'm using the one from raspberry-pi github repository.

Does someone know how I could get a prompt on the HDMI screen ?

0

Add a line as follows to your /etc/inittab:

1:2345:respawn:/sbin/getty 38400 tty1

but perhaps your speed should be 115200 iso 38400

  • Tried but still the same result. I already had a line for HDMI console in my inittab tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console – Arkaik Apr 7 '18 at 18:59
  • /etc/inittab is part of the deprecated SysV init boot system. I don't know what you have compiled but Raspbian comes since years (Jessie) with 'Systemd' init system. There isn't anymore a /etc/inittab in official images. You should really consider to use systemd and check its services for output on consoles. – Ingo Apr 7 '18 at 19:36
  • No systemd on my systems, I stick to Devuan, I prefer to know what's going on. – Gerard H. Pille Apr 7 '18 at 20:31
  • @GerardH.Pille, do you mean Debian? – jsotola Apr 8 '18 at 2:16
  • @jsotola, no, D e v u a n. Only older people like me are allowed to use it. en.wikipedia.org/wiki/Devuan VUA = veteran unix administrators. – Gerard H. Pille Apr 8 '18 at 3:24
0

Thanks to @Gerard H. Pille and his clue about /etc/inittab file, I could find a solution which is described here

Seems that for having HDMI console, two tricks have to be done:

  • console=tty1 shall be after console=ttyAMA0,115200 in cmdline.txt
  • In /etc/inittab only one console in enabled.

There may have a better solution which allow to have several getty into /etc/inittab but this solution is sufficient for me right now.

  • I only have console=tty1 in my cmdline.txt, never understood why one would have two of them. Isn't it always the last one that counts? In /etc/inittab I've got 6 consoles - 7 is for X - and I can login on all of them. – Gerard H. Pille Apr 7 '18 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.