View previous topic :: View next topic |
Author |
Message |
elnone n00b
Joined: 14 Sep 2008 Posts: 2
|
Posted: Mon Sep 15, 2008 4:27 am Post subject: Howto splash screen / framebuffer for none standard display |
|
|
Howto splash screen / framebuffer for none standard display
Note: This doc has missing steps, May cause harm to your system!! Please, do not make kernel changes until you have one as backup working!!!
Hello, everyone!
I would like to share how to make framebuffer initialization in initramfs with genkernel for faulty video bios with none standard resolution.
I have notebook HP 530 (budget model)
http://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/321957-321957-64295-3251176-89315-3375953.html?jumpid=oc_R1002_USENC-001_HP%20530%20Notebook%20PC&lang=en&cc=us
> uname -a
Linux 8doch7121ha37 2.6.26-tuxonice #1 SMP PREEMPT Mon Sep 1 12:53:31 MSD 2008 i686 Intel(R) Core(TM) Duo CPU T2600 @ 2.16GHz GenuineIntel GNU/Linux
There are some documentation of howto setup gentoo on http://gentoo-wiki.com/HP_Compaq_530
but I found some usefull documentations on setting framebuffer.
http://wiki.debian.org/DebianEeePC/HowTo/SplashyWithDmcryptAndStandardGrub
http://gentoo-wiki.com/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. http://gentoo-wiki.com/HOWTO_Intel_Onboard_Graphics_Notebooks_Native_Resolution
echo "sys-apps/915resolution ~x86" >> /etc/portage/package.keywords
emerge -f 915resolution
We need only to download this program, because it does not detect 945GME graphics adapter
lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)
./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 staticly so it could run in initramfs
cd /usr/portage/sys-apps/915resolution/
ebuild 915resolution-0.5.3-r2.ebuild unpack
Then go to directory where ebuild put sources
cd /tmp/portage/sys-apps/915resolution-0.5.3-r2
Apply patch
> cat 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}
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 : 1280x800, 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 : 1280x800, 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
Next step is to create a file which will be executed in inirams
So copy this file to some accessible folder
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 http://ru.gentoo-wiki.com/HOWTO_uvesafb or http://gentoo-wiki.com/HOWTO_Framebuffer_Support
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...
# cd /usr/share/genkernel/generic/
# cat 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
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
save it and
# vim linuxrc
insert
. /bin/framebuffer.scripts
after /bin/busybox --install -s
27 # Set up symlinks
28 /bin/busybox --install -s
29
30 . /bin/framebuffer.scripts
31
32 if [ "$0" = '/init' ]
Then lets add these two lines to
../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
# vim /usr/share/genkernel/gen_initramfs.sh
I did not think of creating additional function so find
append_busybox() {
and 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.
# emerge -av v86d
and in kernel add
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
# emerge -av media-gfx/splash-themes-livecd
and finally
# genkernel --splash=livecd-2007.0 --splash-res=1280x800 ll
or if you already have compiled kernel, you can rebuild only initrd
# genkernel --splash=livecd-2007.0 --splash-res=1280x800 initrd
Then we check for the files we need in initramfs
zcat /boot/initramfs-genkernel-x86-2.6.26-tuxonice | cpio --list
Mine looks
.
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
lib/keymaps/34.map
lib/keymaps/37.map
lib/keymaps/trf.map
lib/keymaps/cz.map
lib/keymaps/9.map
lib/keymaps/41.map
lib/keymaps/us.map
lib/keymaps/is.map
lib/keymaps/20.map
lib/keymaps/1.map
lib/keymaps/azerty.map
lib/keymaps/8.map
lib/keymaps/croat.map
lib/keymaps/32.map
lib/keymaps/se.map
lib/keymaps/17.map
lib/keymaps/gr.map
lib/keymaps/4.map
lib/keymaps/br-a.map
lib/keymaps/5.map
lib/keymaps/br-l.map
lib/keymaps/13.map
lib/keymaps/es.map
lib/keymaps/fi.map
lib/keymaps/15.map
lib/keymaps/dk.map
lib/keymaps/11.map
lib/keymaps/24.map
lib/keymaps/lt.map
lib/keymaps/il.map
lib/keymaps/19.map
lib/keymaps/keymapList
lib/keymaps/42.map
lib/keymaps/wangbe.map
lib/keymaps/30.map
lib/keymaps/ro.map
lib/keymaps/2.map
lib/keymaps/be.map
lib/keymaps/uk.map
lib/keymaps/40.map
lib/keymaps/18.map
lib/keymaps/hu.map
lib/keymaps/nl.map
lib/keymaps/26.map
lib/keymaps/ua.map
lib/keymaps/39.map
lib/keymaps/mk.map
lib/keymaps/25.map
lib/keymaps/by.map
lib/keymaps/6.map
lib/keymaps/7.map
lib/keymaps/cf.map
lib/keymaps/trq.map
lib/keymaps/38.map
lib/keymaps/dvorak.map
lib/keymaps/12.map
lib/keymaps/23.map
lib/keymaps/la.map
lib/keymaps/sk-z.map
lib/keymaps/35.map
lib/keymaps/31.map
lib/keymaps/ru.map
lib/keymaps/16.map
lib/keymaps/fr.map
lib/keymaps/no.map
lib/keymaps/27.map
lib/keymaps/21.map
lib/keymaps/it.map
lib/keymaps/36.map
lib/keymaps/slovene.map
lib/keymaps/et.map
lib/keymaps/14.map
lib/keymaps/3.map
lib/keymaps/bg.map
lib/keymaps/33.map
lib/keymaps/sg.map
lib/keymaps/29.map
lib/keymaps/pt.map
lib/keymaps/de.map
lib/keymaps/10.map
lib/keymaps/28.map
lib/keymaps/pl.map
lib/keymaps/22.map
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
My grub.conf has
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 resume=swap:/dev/sda2 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... |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Mon Sep 15, 2008 8:53 am Post subject: |
|
|
Could you just for clarity's sake enclose code and instructions into BBCode [code] blocks, please? You can use [code="file"]file contents[/code] or [code="command"]results[/code]. This post has a long list of instructions that BBCode will help read.
Thanks for sharing this BTW. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|