Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23
Hi, I have managed to build the kernel for my project with support for a frame buffer driver. When the kernel is booting I see several messages in the console ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    39

    Problems with frame buffer diver with MCS8144


    Hi,

    I have managed to build the kernel for my project with support for a frame buffer driver. When the kernel is booting I see several messages in the console indicating the driver is loading and I can briefly the linux penguin is shown on the VDU when "mcs8142_vga_probe: platform register", then it disappears shortly after this message is shown, "mcs8142_vga_probe: EXIT, returning 0"
    I cannot work out from which point the driver is loaded and where the parameters for a display of 1600x1050 are passed. Can someone please enlighten me on that. If I do an ls /dev/ I cannot see a reference to fb0, but if I compile and run the example app from here Enabling the Linux Framebuffer the application says that The frame buffer device was opened successfully. The application fails when it tries to read fixed information from the driver, so no image is displayed.

    How do I enable the display when the kernel has finished booting? In the make menu I have enabled the Framebuffer Console support, and Map the console to the primary display device.

    Kind regards
    Andrew

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Have you tried passing a video mode to the frame buffer at kernel boot time? It is briefly mentioned in that article you linked (vga=791). If your frame buffer supports it, you should have your virtual terminals (Ctrl+Alt+F1, Ctl+Alt+F2), etc. running in the frame buffer at the resolution you select.

    See this document for tips on how to pass the proper video mode:

    http://www.kernel.org/doc/Documentation/fb/vesafb.txt

    If you enter a mode (either in grub.conf or at the grub prompt at boot time) that is not supported, you should get an error.

    Note: newer kernels have changed how this all works, and I haven't tried to play around w/it yet, but that doesn't stop you from giving it a go.

  3. #3
    Just Joined!
    Join Date
    Aug 2012
    Posts
    39
    Hi,

    After some further digging around I have found that athe application note I have for my system mentions xorg.conf and x. Neither of those are present with the distribution. The Linux distribution I've been using is 2.6.24 and I cannot find X as part of the distribution.

    I have asked Moschip several times about this issue, but I get no answer from them. Do you know where I can get a suitable copy of X from which I can add to my linux build? I have typed the question into google and not found a satisfactory answer. At some point I want to move to a newer kernel, but that will be no small task because I will need to add the necessary patches to enable it to work with an MCS8144

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by AJEllisuk View Post
    Hi,

    After some further digging around I have found that athe application note I have for my system mentions xorg.conf and x. Neither of those are present with the distribution. The Linux distribution I've been using is 2.6.24 and I cannot find X as part of the distribution.

    I have asked Moschip several times about this issue, but I get no answer from them. Do you know where I can get a suitable copy of X from which I can add to my linux build? I have typed the question into google and not found a satisfactory answer. At some point I want to move to a newer kernel, but that will be no small task because I will need to add the necessary patches to enable it to work with an MCS8144
    What is your base Linux distro? Or are you attempting to roll your own from scratch (as in LinuxFromScratch)? Most distros come w/the X windowing system and you just need to issue a command using the installer software to install it, e.g.:

    yum groupinstall "X Window System"
    apt-get install x-window-system

    etc.

    You can compile X from source, but that can take a while and has lots of dependencies and even when you are done, it is not nicely integrated w/your system.

    See here for the X source:

    X.Org Wiki - Home


    However, you do not need X to use the frame buffer in a virtual terminal. X is for graphical desktops and such. Or maybe I do not understand what you are trying to do.

  5. #5
    Just Joined!
    Join Date
    Aug 2012
    Posts
    39
    My Linux distro is 2.6.24 for an ARM device. After reading you last post and talking with a colleague, I think the X window system was a red herring.

    I modified my boot args to:
    bootargs=root=/dev/mtdblock3 rootfstype=jffs2 rw console=tty0 mem=64M@0x0 panic=4 VGA=314

    Before the console=ttyMCS ie serial port. On startup I now see the penguin logo, and several lines of text as the kernel boots (This text previously appeared in Putty on my development PC) However the boot process gets so far, then the Linux system reverts back to using the serial port to output the console rather than the screen.

    It has been suggested that I modify /etc/inittab, but I cannot found out how to set it up, the file currently reads:
    ::sysinit:/etc/init.d/rcS
    ttyMCS::askfirst:-/bin/sh
    #::askfirst:/bin/sh
    #::respawn:/sbin/getty -L ttyMCS 115200 vt100


    I tried changing the second line to tty0, but that didn't change anything.

    Does anyone have any suggestion for what I need to change to make this work please?

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    so there are two parts here:

    1) sending kernel output to the serial port and to the console while the kernel is booting

    2) getting a login prompt over either the serial port or via the console

    For the first one, you can use the console command multiple times (i.e., send output over both), but the last one listed is treated as the input device also. see this document for a better explanation than I could give:

    http://tldp.org/HOWTO/Remote-Serial-...re-kernel.html

    For the second part, if you want to log in via the console, you need to edit inittab so that it spawns a login program listening on the proper device. For example, you might have something like this:

    Code:
    # Run gettys in standard runlevels
    1:2345:respawn:/sbin/mingetty tty1
    2:2345:respawn:/sbin/mingetty tty2
    that will start mingetty logins listening on two virtual terminals attached to the console. play around with that.

  7. #7
    Just Joined!
    Join Date
    Aug 2012
    Posts
    39
    I probably didn't word my last post very well.

    I want to output the console onto a display rather than via the serial port.

    Using your above link I changed the boot process so that the console output is shown on the display and the serial port. the problem I now have is that when the kernel finishes booting the display is turned off and the console output is only sent to the serial port.

    My question is how do I set up the kernel so that once it has finished booting it continues to sent all output to the display (tty0 in this case) and not ttyS0?

  8. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by AJEllisuk View Post
    I probably didn't word my last post very well.

    I want to output the console onto a display rather than via the serial port.

    Using your above link I changed the boot process so that the console output is shown on the display and the serial port. the problem I now have is that when the kernel finishes booting the display is turned off and the console output is only sent to the serial port.

    My question is how do I set up the kernel so that once it has finished booting it continues to sent all output to the display (tty0 in this case) and not ttyS0?
    i thought i understood you...i thought you wanted to output to both console and serial, and then when the kernel is done booting, allow login on the console.

    in your kernel boot parameters, do you have console=tty0 listed after all other console= arguments?

    does your /etc/inittab have your login program (getty, etc.) listening on a ttyN (which is what you want) or on your serial port device (which is not what you want, but could also have)?

  9. #9
    Just Joined!
    Join Date
    Aug 2012
    Posts
    39
    My inittab file reads:

    ::sysinit:/etc/init.d/rcS
    tty0::askfirst:-/bin/sh
    ttyMCS::askfirst:-/bin/sh
    #::askfirst:/bin/sh
    #::respawn:/sbin/getty -L ttyMCS 115200 vt100


    and my command line reads:
    root=/dev/mtdblock3 rootfstype=jffs2 rw console=tty0 console=ttyMCS mem=64M@0x0 panic=4 MCS8142VGA=792

    My problem is that I cannot get anything displayed on the screen. When the kernel boots, I can see the Linux penguin logo, and the console text appears whilst booting. Then the screen is disabled and the screen shows "no signal". My question is: when linux has finished booting, how do I enable the screen and get the console to appear on the screen?

    I know the keyboard is working, ctrl-alt-del causes the system to reset. fb0 is present in /dev/ I know the dsiplay hardware is working as I can see activity on the screen as the system boots.

    Edit:

    I have found in /sys/class/graphics/ 2 modules:
    fb0 and fbcon.

    After some searching around I have found that fbcon will give me a console output on the fb driver. I'm not sure how to load it. The is no node for it in /dev/, but it is present in sys/class/graphics/. How do I load the fbcon and create a node for it?
    Last edited by AJEllisuk; 09-28-2012 at 02:52 PM.

  10. #10
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by AJEllisuk View Post
    and my command line reads:
    root=/dev/mtdblock3 rootfstype=jffs2 rw console=tty0 console=ttyMCS mem=64M@0x0 panic=4 MCS8142VGA=792
    I think you want to flip flop your console statements, e.g.:
    Code:
    root=/dev/mtdblock3 rootfstype=jffs2 rw console=ttyMCS console=tty0 mem=64M@0x0 panic=4 MCS8142VGA=792
    i'm not sure about your inittab, it looks like it is just starting a shell (/bin/sh) on tty0 and your serial device. Maybe try commenting out the serial(ttyMCS) one temporarily.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •