HP_Compaq_530_-_Splashscreen
Contents |
Howto splash screen / framebuffer for none standard display
This doc can have missing steps and may cause harm to your system!! Please, do not make kernel changes until you have one as backup working!!!
I would like to share how to make framebuffer initialization in initramfs with genkernel for faulty video bios with none standard resolution.
Hardware, software details
Output of lspci: HP_Compaq_530
| Code: kernel verion |
#uname -a 2.6.26-tuxonice #1 SMP PREEMPT |
Processor:
i686 Intel(R) Core(TM) Duo CPU T2600 @ 2.16GHz GenuineIntel GNU/Linux
Helpful links
There are some documentation of howto setup gentoo on HP_Compaq_530.
There are some useful documentations on setting framebuffer:
DebianEeePC HowTo SplashyWithDmcryptAndStandardGrub
HOWTO_fbsplash
Xorg video drivers x11-drivers/xf86-video-i810 works well without any headache. But in console this kind of displays does not work at resolution 1280x800, there is no mode in its video bios. To correct it there is a need to use 915resolution program.
Downloading package
| Code: |
echo "sys-apps/915resolution ~x86" >> /etc/portage/package.keywords emerge -f 915resolution |
Compiling 915resolution staticly
We need only to download this program, because it does not detect 945GME graphics adapter
| Code: |
lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) |
unpatched 915resolution
| Code: |
./915resolution -l Intel 800/900 Series VBIOS Hack : version 0.5.3 Intel chipset detected. However, 915resolution was unable to determine the chipset type. Chipset Id: 27ac8086 Please report this problem to stomljen@yahoo.com |
So we have to unpack and patch and then make statically so it could run in initramfs
patched 915resolution
| Code: |
cd /usr/portage/sys-apps/915resolution/ ebuild 915resolution-0.5.3-r2.ebuild unpack |
Then go to directory where ebuild put sources
| Code: |
cd /tmp/portage/sys-apps/915resolution-0.5.3-r2 |
Apply the patch:
| File: 915resolution-0.5.3-945GME.patch |
diff -ruN 915resolution-0.5.3.orig/915resolution.c 915resolution-0.5.3/915resolution.c
--- 915resolution-0.5.3.orig/915resolution.c 2008-08-31 20:06:16.000000000 +0400
+++ 915resolution-0.5.3/915resolution.c 2008-09-14 13:56:16.000000000 +0400
@@ -66,12 +66,12 @@
typedef enum {
CT_UNKWN, CT_830, CT_845G, CT_855GM, CT_865G, CT_915G, CT_915GM, CT_945G, CT_945GM,
- CT_946GZ, CT_G965, CT_Q965, CT_965GM
+ CT_946GZ, CT_G965, CT_Q965, CT_965GM, CT_945GME
} chipset_type;
char * chipset_type_names[] = {
"UNKNOWN", "830", "845G", "855GM", "865G", "915G", "915GM", "945G", "945GM",
- "946GZ", "G965", "Q965", "965GM"
+ "946GZ", "G965", "Q965", "965GM", "945GME"
};
typedef enum {
@@ -253,6 +253,10 @@
type = CT_965GM;
break;
+ case 0x27ac8086:
+ type = CT_945GME;
+ break;
+
default:
type = CT_UNKWN;
break;
@@ -540,6 +544,7 @@
case CT_G965:
case CT_Q965:
case CT_965GM:
+ case CT_945GME:
outl(0x80000090, 0xcf8);
map->b1 = inb(0xcfd);
map->b2 = inb(0xcfe);
@@ -581,6 +586,7 @@
case CT_G965:
case CT_Q965:
case CT_965GM:
+ case CT_945GME:
outl(0x80000090, 0xcf8);
outb(map->b1, 0xcfd);
outb(map->b2, 0xcfe);
@@ -842,6 +848,9 @@
else if (!strcmp(argv[index], "965GM")) {
*forced_chipset = CT_965GM;
}
+ else if (!strcmp(argv[index], "945GME")) {
+ *forced_chipset = CT_945GME;
+ }
else if (!strcmp(argv[index], "Q965")) {
*forced_chipset = CT_Q965;
}
diff -ruN 915resolution-0.5.3.orig/Makefile 915resolution-0.5.3/Makefile
--- 915resolution-0.5.3.orig/Makefile 2007-04-15 11:31:29.000000000 +0400
+++ 915resolution-0.5.3/Makefile 2008-08-31 20:10:30.000000000 +0400
@@ -4,6 +4,7 @@
OBJS=${SRCS:.c=.o}
CFLAGS:=-s -Wall -ggdb
+LDFLAGS:=-s -static
${PRG}: ${OBJS}
|
Note, Line LDFLAGS:=-s -static in Makefile added
If patching is successful, then just compile a binary for initramfs
| Code: |
915resolution-0.5.3 # make cc -s -Wall -ggdb -c -o 915resolution.o 915resolution.c cc -s -static 915resolution.o -o 915resolution 915resolution-0.5.3 # ./915resolution -l Intel 800/900 Series VBIOS Hack : version 0.5.3 Chipset: 945GME BIOS: TYPE 1 Mode Table Offset: $C0000 + $269 Mode Table Entries: 36 Mode 30 : 640x480, 8 bits/pixel Mode 32 : 800x600, 8 bits/pixel Mode 34 : 1024x768, 8 bits/pixel Mode 38 : 1280x1024, 8 bits/pixel Mode 3a : 1600x1200, 8 bits/pixel Mode 3c : 1920x1440, 8 bits/pixel Mode 41 : 640x480, 16 bits/pixel Mode 43 : 800x600, 16 bits/pixel Mode 45 : 1024x768, 16 bits/pixel Mode 49 : 1280x1024, 16 bits/pixel Mode 4b : 1600x1200, 16 bits/pixel Mode 4d : 1920x1440, 16 bits/pixel Mode 50 : 640x480, 32 bits/pixel Mode 52 : 800x600, 32 bits/pixel Mode 54 : 1024x768, 32 bits/pixel Mode 58 : 1280x1024, 32 bits/pixel Mode 5a : 1600x1200, 32 bits/pixel Mode 5c : 1920x1440, 32 bits/pixel |
Changes to genkernel scripts
Next step is to create a file which will be executed in inirams
So copy this file to some accessible folder
| Code: |
mkdir -p /opt/915resolution cp /tmp/portage/sys-apps/915resolution-0.5.3-r2/work/915resolution-0.5.3/915resolution |
I hope you compiled kernel with support of uvesafb driver as module?
No, then please follow links: HOWTO_uvesafb and HOWTO_Framebuffer_Support
| Linux Kernel Configuration: My current kernel setting |
Device Drivers ---> Graphics support ---> <*> Support for frame buffer devices ---> --- Support for frame buffer devices <M> Userspace VESA VGA graphics support Console display driver support ---> -*- VGA text console [*] Enable Scrollback Buffer in System RAM (4096) Scrollback Buffer Size (in KB) [*] Video mode selection support <*> Framebuffer Console support [ ] Map the console to the primary display device [ ] Framebuffer Console Rotation [*] Support for the Framebuffer Console Decorations [ ] Select compiled-in fonts |
Then let's make some modifications to genkernel files...
| Code: |
cd /usr/share/genkernel/generic/ vim framebuffer.scripts |
| File: /usr/share/genkernel/generic/framebuffer.scripts |
#!/bin/sh
echo "Patching video BIOS with 915resolution"
/sbin/915resolution 58 1280 800 32
chk=`cat /proc/modules | grep uvesafb`
[ "x$chk" != "x" ] && rmmod uvesafb
#/sbin/modprobe uvesafb vbemode=0x011b nocrtc mtrr=3 # Modprobe does not work, don't know why
insmod /lib/modules/${KV}/kernel/drivers/video/cfbcopyarea.ko
insmod /lib/modules/${KV}/kernel/drivers/video/cfbfillrect.ko
insmod /lib/modules/${KV}/kernel/drivers/video/cfbimgblt.ko
insmod /lib/modules/${KV}/kernel/drivers/video/uvesafb.ko vbemode=0x011b mtrr=3
|
then save it and add framebuffer script to /usr/share/genkernel/generic/linuxrc script
add ". /bin/framebuffer.scripts" string after "/bin/busybox --install -s"
| File: /usr/share/genkernel/generic/linuxrc |
# Set up symlinks
/bin/busybox --install -s
. /bin/framebuffer.scripts
if [ "$0" = '/init' ]
|
Then lets add these two lines to then end of the file "/usr/share/genkernel/x86/modules_load"
| File: /usr/share/genkernel/x86/modules_load |
# Framebuffer MODULES_FB="uvesafb cfbcopyarea cfbimgblt cfbfillrect" |
So in this case we will have 4 modules in our initramfs files appear. We also have to modify the script of genkernel
Note, I did not think of creating additional function so find
| File: /usr/share/genkernel/gen_initramfs.sh |
append_busybox() {
##insert after:
## tar -xjf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initramfs-busybox-temp/bin" busybox ||
## gen_die 'Could not extract busybox bincache!'
## chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox"
##
##these lines:
#
mkdir -p "${TEMP}/initramfs-busybox-temp/sbin/"
cp "${GK_SHARE}/generic/framebuffer.scripts" ${TEMP}/initramfs-busybox-temp/bin/
cp /opt/915resolution/915resolution ${TEMP}/initramfs-busybox-temp/sbin/
cp /opt/v86d/v86d ${TEMP}/initramfs-busybox-temp/sbin/
chmod +x "${TEMP}/initramfs-busybox-temp/bin/framebuffer.scripts"
#
|
Here I also include v86d files as it is required by uvesafb, so we include 3 files uvesafb.ko, v86d, 915resolution in our image.
| Code: |
emerge -av v86d |
and in kernel configuration add
| Linux Kernel Configuration: |
General Setup: <*> Initial RAM filesystem and RAM disk (initramfs/initrd) support Initramfs source file(s):/usr/share/v86d/initramfs (CONFIG_INITRAMFS_SOURCE="/usr/share/v86d/initramfs") |
Uhhh, I think that's all and right now we can create kernel with framebuffer I used standard splash
| Code: |
emerge -av media-gfx/splash-themes-livecd |
and finally
| Code: |
genkernel --splash=livecd-2007.0 --splash-res=1280x800 all |
or if you already have compiled kernel, you can rebuild only initrd
| Code: |
genkernel --splash=livecd-2007.0 --splash-res=1280x800 initrd |
Then we check for the files we need in initramfs
| Code: |
#zcat /boot/initramfs-genkernel-x86-2.6.26-tuxonice | cpio --list . lib64 dev dev/tty1 dev/console dev/null usr usr/bin usr/sbin temp sys etc etc/fstab bin sbin var var/lock var/lock/dmraid proc . init etc etc/initrd.defaults etc/initrd.scripts lib lib/keymaps lib/keymaps/sk-y.map ... cutted ... lib/keymaps/jp.map sbin sbin/init sbin/modprobe linuxrc . bin bin/udhcpc.scripts bin/busybox bin/echo bin/ash bin/cut bin/sh bin/[ bin/mount bin/uname bin/framebuffer.scripts sbin sbin/915resolution sbin/v86d . etc etc/lvm bin bin/lvm sbin . etc etc/modules etc/modules/fs etc/modules/dmraid etc/modules/mdadm etc/modules/scsi etc/modules/pcmcia etc/modules/pata etc/modules/firewire etc/modules/lvm etc/modules/sata etc/modules/evms etc/modules/net etc/modules/ataraid etc/modules/usb etc/modules/fb lib lib/modules lib/modules/2.6.26-tuxonice lib/modules/2.6.26-tuxonice/modules.inputmap lib/modules/2.6.26-tuxonice/kernel lib/modules/2.6.26-tuxonice/kernel/drivers lib/modules/2.6.26-tuxonice/kernel/drivers/scsi lib/modules/2.6.26-tuxonice/kernel/drivers/scsi/scsi_wait_scan.ko lib/modules/2.6.26-tuxonice/kernel/drivers/pcmcia lib/modules/2.6.26-tuxonice/kernel/drivers/pcmcia/rsrc_nonstatic.ko lib/modules/2.6.26-tuxonice/kernel/drivers/pcmcia/yenta_socket.ko lib/modules/2.6.26-tuxonice/kernel/drivers/pcmcia/pcmcia.ko lib/modules/2.6.26-tuxonice/kernel/drivers/media lib/modules/2.6.26-tuxonice/kernel/drivers/media/video lib/modules/2.6.26-tuxonice/kernel/drivers/media/video/videobuf-core.ko lib/modules/2.6.26-tuxonice/kernel/drivers/md lib/modules/2.6.26-tuxonice/kernel/drivers/md/dm-mirror.ko lib/modules/2.6.26-tuxonice/kernel/drivers/md/dm-log.ko lib/modules/2.6.26-tuxonice/kernel/drivers/md/dm-snapshot.ko lib/modules/2.6.26-tuxonice/kernel/drivers/video lib/modules/2.6.26-tuxonice/kernel/drivers/video/cfbimgblt.ko lib/modules/2.6.26-tuxonice/kernel/drivers/video/cfbcopyarea.ko lib/modules/2.6.26-tuxonice/kernel/drivers/video/uvesafb.ko lib/modules/2.6.26-tuxonice/kernel/drivers/video/cfbfillrect.ko lib/modules/2.6.26-tuxonice/kernel/drivers/hid lib/modules/2.6.26-tuxonice/kernel/drivers/hid/usbhid lib/modules/2.6.26-tuxonice/kernel/drivers/hid/usbhid/usbhid.ko lib/modules/2.6.26-tuxonice/kernel/drivers/usb lib/modules/2.6.26-tuxonice/kernel/drivers/usb/storage lib/modules/2.6.26-tuxonice/kernel/drivers/usb/storage/usb-storage.ko lib/modules/2.6.26-tuxonice/kernel/drivers/usb/core lib/modules/2.6.26-tuxonice/kernel/drivers/usb/core/usbcore.ko lib/modules/2.6.26-tuxonice/kernel/drivers/usb/host lib/modules/2.6.26-tuxonice/kernel/drivers/usb/host/ohci-hcd.ko lib/modules/2.6.26-tuxonice/kernel/drivers/usb/host/uhci-hcd.ko lib/modules/2.6.26-tuxonice/kernel/drivers/usb/host/ehci-hcd.ko lib/modules/2.6.26-tuxonice/modules.ccwmap lib/modules/2.6.26-tuxonice/modules.usbmap lib/modules/2.6.26-tuxonice/modules.ieee1394map lib/modules/2.6.26-tuxonice/modules.symbols lib/modules/2.6.26-tuxonice/modules.seriomap lib/modules/2.6.26-tuxonice/modules.alias lib/modules/2.6.26-tuxonice/modules.dep lib/modules/2.6.26-tuxonice/modules.order lib/modules/2.6.26-tuxonice/modules.pcimap lib/modules/2.6.26-tuxonice/modules.ofmap lib/modules/2.6.26-tuxonice/modules.isapnpmap . dev dev/console dev/tty0 dev/null dev/misc dev/vc dev/fb etc etc/initrd.splash etc/splash etc/splash/livecd-2007.0 etc/splash/livecd-2007.0/1280x800.cfg etc/splash/livecd-2007.0/images etc/splash/livecd-2007.0/images/background-1280x800.png etc/splash/livecd-2007.0/images/verbose-1280x800.png etc/splash/livecd-2007.0/images/overlay-800.png etc/splash/livecd-2007.0/Vera.ttf root lib lib/splash lib/splash/sys lib/splash/proc sbin sbin/fbcondecor_helper sbin/splash_helper 8687 blocks |
Please, pay attention that you should see the following files
| File: initramfs-genkernel-x86-2.6.26-tuxonice |
bin/framebuffer.scripts sbin sbin/915resolution sbin/v86d lib/modules/2.6.26-tuxonice/kernel/drivers/video lib/modules/2.6.26-tuxonice/kernel/drivers/video/cfbimgblt.ko lib/modules/2.6.26-tuxonice/kernel/drivers/video/cfbcopyarea.ko lib/modules/2.6.26-tuxonice/kernel/drivers/video/uvesafb.ko lib/modules/2.6.26-tuxonice/kernel/drivers/video/cfbfillrect.ko |
/boot/grub/grub.conf
My grub.conf has
| File: grub.conf |
title=Gentoo Linux (2.6.26-tuxonice) root (hd0,0) kernel /kernel-genkernel-x86-2.6.26-tuxonice root=/dev/sda6 psmouse.proto=imps ramdisk=16384 console=tty1 splash=silent,theme:livecd-2007.0 console=tty1 pci=nommconf quiet initrd /initramfs-genkernel-x86-2.6.26-tuxonice |
If then try reboot...
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.
