Find the answer to your Linux question:
Results 1 to 3 of 3
hi all, first a big hello to all, maybe someone can help me. second: sorry for my poor english, I'm german. What I had done: Im working on Puppy-Linux, want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    3

    please kernel do not reset vga at boot


    hi all,

    first a big hello to all, maybe someone can help me.
    second: sorry for my poor english, I'm german.

    What I had done:
    Im working on Puppy-Linux, want to build a german version of it
    and also, with additional Features/Changes in it.

    One of these additional change should be a simple, optical change:
    - Booting Puppy-Linux from CD or HDD, shows the usual messages on
    the Screen (Console) with the hardware-font of the vgacard and in
    colors white on black,
    --== i want, that the complete booting (Grub, Kernel, Puppy) should show
    all messages in (optical) one list, with background colour brown
    and selfmade Font..

    OK, Puppy is changed (init-ramdisk and the boot-scripts after changeroot)

    Also, I had download Grub sources (0.97...) edited some files, so that
    after chosing an menuline and hit return, the stage2-console starts with
    brown background and a selfmade font.
    The new colours and new Font gets loadet in VGA-Card,
    by int-calls. All goes well.

    The Problem now is the Kernel (2.6.25.16)
    The sources are downloaded, the outputs about 'extract kernel (lzma)'
    and 'booting Kernel' now comes in german language, that's fine.

    I did sucess in changing the colours in the kernelsources, but the very first
    infos from kernelboot on the screen are white on black.
    Thats why I reeditet grub sources. activate the additional option
    on the VGA-Card, 'do not reset the colours when reset the card'.
    This works now, and is ok, the very first infos of Kernel-load/boot now
    are also shown on brown background.

    But i did not found a way, to keep or set again the wanted font !!

    At the moment, it looks like:
    power on PC, grub comes up, shows the graphical menu with entries of
    all the bootable partitions.
    I chose the Entry with Puppy-Linux.
    Grub clears screen (the graphical menu dissappears), change to brown
    background, and with the new selfmade font grub writes all his Infos.
    After that, grub gives the command to the Kernelbootup.
    The Kernel writes below the grub infos, 'loading kernel' and
    'unlzma kernel' in a very short time. While this both messages are
    printed, also the new selfmade font dissapears, the whole screeninfos
    are changed back to the hardware-vga-font.

    I assume, that somewhere in
    ..arch/x86/boot/head.S
    ..arch/x86/boot/compress/head.S
    ..arch/x86/boot/compress/misc.c
    ..arch/x86/kernel/head.S
    ..arch/x86/drivers/console....
    the vgacard gets reseted. I dont know where
    Maybe, its in an other file.

    Please, can someone help me?
    1) is it a good way and possible, to change the kernel to
    not setup/reset the VGA-Card (maybe in condition, only if
    the found graphiccard is VGA and is in mode 3 80x25 16cols)?

    2) in which source-file should the changes be made?

    3) In the Kernelsources in the comments there are some hints
    with BSS, I assume, the console/screen is ment. Is that right?
    (for example, I had remt out code-lines with the comment 'clear BSS',
    so that the infos of grub didn't get cleared)

    thanks a lot

    in hope of helping answers

    Eastler

  2. #2
    Just Joined!
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    3
    Hi again,

    after some time I got a new idea.
    First thought was, to build in a 'wait until keypress' in different
    places of the sources, to detect, where screen gets reseted.
    But when insert the keydetect, the kernel doesn't boot, so this
    was a wrong way to check.

    But build in a enless-loop/programm-stopp also helps to find
    the position, where screen gets reseted.
    In this way and after a lot of different Kernelkompiles
    I now can say, the reset happens in
    /usr/linux/arch/x86/boot/video.c set_video().
    First /usr/linux/arch/x86/boot/header.S gets started
    from there /usr/linux/arch/x86/boot/main.c main() is called.
    in main() /usr/linux/arch/x86/boot/video.c-set_video() gets called.


    The source of set_video() looks like:
    Code:
        void set_video(void)
         {
    	u16 mode = boot_params.hdr.vid_mode;
    	RESET_HEAP();
    	store_mode_params();
    	save_screen();
    	probe_cards(0);
    	for (;;) {
    		if (mode == ASK_VGA)
    			mode = mode_menu();
    		if (!set_mode(mode))
    			break;
    		printf("Undefined video mode number: %x\n", mode);
    		mode = ASK_VGA;
    	}
    	vesa_store_edid();
    	store_mode_params();
    	if (do_restore)
    		restore_screen();
    }
    But here are again other functions called
    Now I'm starting to check set_video() and the called functions,
    when I get results, I will post them here.

    maybe someone can give some hints,

    Eastler

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    3
    Hi again,

    now I had found one solution, here it is:

    When the kernel boots up (2.6.25.16),
    he must check the system. Thats why,
    he first saves the content of the screen
    and the actually Video-Mode.
    (in my case, the grub-messages)
    then checks a lot of things, which
    maybe clears the screen.

    After that the kernel checks, if the
    Mode-Number is a "normal" Mode
    of VGA-Cards. If it is, then the Kernel
    doesn't change the mode.
    In my case, this means, the content
    of grub didn't get cleared
    (the grafical Mode dosn't get changed)

    Because I had put a 8x10-Font on the card (with grub)
    this doesn't result in a normal VGA-Mode
    (its not 8x25 or 8x50), that's why the
    Kernel changes the Mode to a Number,
    which probaby would work on any PC.

    Now I have changed the Font in Grub
    to a 8x16 Font, that works fine,
    without any changes in kernel to fonts
    the console shows ( keeps ) the font,
    which I had put with grub on the VGA-Card.

    Hope, this helps someone

    Eastler

  4. $spacer_open
    $spacer_close

Posting Permissions

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