Showing a splash image while loading a huge initrd

Consider a live GNU/Linux distro with the following constraints: all the software should be contained in an initrd image (which results in its huge size) and the kernel contains as few statically-compiled modules as possible.

Consider the bootup process of the described distro: the bootloader (eg grub or isolinux) loads the kernel, which then loads and extracts the initrd into the memory. During the extraction (which takes 20-30 seconds on old computers) nothing happens on the screen.

I was wondering, is there a ready-made solution of showing a splash screen during the initrd extraction process? If not, can you please comment on the following ideas:

  • Statically compile an eg 600x480x8bit image into the kernel and somehow flush it into the framebuffer while initrd is being extracted.

  • Do the same, but force a particular video driver to be loaded (eg VESA) and hack into its code, rather that kernel's framebuffer.

  • Thank you.


    Perhaps you can make it simpler: Create 2 initrd files. The first one can be small. Then it can call Plymouth to show a splash screen while the real initrd is extracted.


    You are wrong if you think, that the kernel loads the initrd image. It is done by the boot loader. If you want to show a splash screen you have to tell your boot loader to display an image. How to do this depends on your boot loader.


    You might try creating a plain .ppm file and use LZMA compression for the Kernel Compression Mode. This might be done by using the boot logo option, but not sure if it will work for you.

    First you need to enable support in your kernel for Bootup logo and Standard 224-color Linux Logo:

    Device Drivers —> Graphics Support –>

    Support for frame buffer devices
    VESA VGA graphics support
    Video mode selection support
    Framebuffer Console support
    Select compiled-in fonts
    VGA 8×16 font
    Bootup logo
    Standard 224-color Linux log
    

    Second,if supposed that you have a .png image named screen.png, you need to generate the appropiate .ppm file: pngtopnm screen.png| ppmquant -fs 223 | pnmtoplainpnm > /usr/src/linux/drivers/video/logo/logo_linux_clut224.ppm

    Then just compile, install, update your bootloader and check if it works for you.

    链接地址: http://www.djcxy.com/p/11454.html

    上一篇: eclipse中android int替换为android.R.integer

    下一篇: 加载一个巨大的initrd时显示一个闪屏图像