0

I am trying to automatically run a custom python application after OS boot with a Buildroot 2023.05 Linux image running on a Beaglebone Black(BBB) Rev C. I can already interact with the system through Serial using the screen command as follows:

sudo screen /dev/ttyUSB0 115200

What I want to do now is to display the console output on the monitor and accept input from the keyboard connected to the BBB as the whole system will finally be integrated into a standalone unit and used similar to a common PC. I have edited my uEnv.txt file to:

bootpart=0:1
devtype=mmc
bootdir=
bootfile=zImage
bootpartition=mmcblk0p2
console=ttyS0,115200n8
loadaddr=0x82000000
fdtaddr=0x88000000
set_mmc1=if test $board_name = A33515BB; then setenv bootpartition mmcblk1p2; fi
set_bootargs=setenv bootargs console=${console} root=/dev/${bootpartition} rw rootfstype=ext4 rootwait video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24
uenvcmd=run set_mmc1; run set_bootargs;run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${ is fdtaddr}

But this does not change anything. The output to the monitor is still a white blinking horizontal cursor(underscore type) on a black screen. I am very new to this(~4 days using Buildroot) so I am grateful for any guidance. Please ask for any other information if required.

sawdust
  • 16,103
  • 3
  • 40
  • 50
atf
  • 59
  • 7
  • "Buildroot" is a development tool (typically) for a host PC, and it's not an OS nor runtime environment for the target board. Apparently you used Buildroot to build some unspecified version of the Linux kernel, a root filesystem, and maybe a boot program (e.g. U-Boot) for your target system. "*I have edited my uEnv.txt file*" -- That seems to reference a file only used by U-Boot. That has absolutely nothing to do with a Python program that would execute much later as an application program under Linux. – sawdust Jul 05 '23 at 23:58
  • "*I can already interact with the system through Serial using the screen command as follows: ..*" -- You're doing a poor job of separating the development tools used on a host PC versus what is happening on the target. You seem to have a Linux system configuration issue that really has nothing to do with "Buildroot" (other than that was the build tool). – sawdust Jul 06 '23 at 00:06
  • 1
    "*The output to the monitor is still ...*" -- If you never send anything to a display, why would you expect to see anything? Did you try displaying a boot logo in U-Boot or the kernel? Your Linux kernel is setup to use a serial port as the only console (for kernel messages). What have you done to setup any other console or terminal for logging in? – sawdust Jul 06 '23 at 00:16
  • I thank you for the replies Sawdust. And you are right about this: "You're doing a poor job of separating the development tools used on a host PC versus what is happening on the target". I have solved the problem now and am posting an answer. – atf Jul 06 '23 at 08:12

1 Answers1

1

Your Linux kernel is setup to use a serial port as the only console (for kernel messages)

This is what gave me the idea for the solution. What we have to do is look at all the devices inside the /dev folder. They had a series starting with ttyS0 to ttyS5(for the Serial console) and tty to ttyN(N is some number). I just changed my extlinux.conf file and the uEnv.txt file to use the "tty" instead of "ttyS0,115200n8". So the solution is changing append console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait to append console=tty root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait in the extlinux.conf file and changing console=ttyS0,115200n8 to console=tty

Now the keyboard is the default input device and the monitor is the default output.

atf
  • 59
  • 7