Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 01 Sep 2014, 08:45
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Howto use the Framebuffer with Puppy 430/431
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Wed 20 Jan 2010, 12:13    Post subject:  Howto use the Framebuffer with Puppy 430/431  

0. Intro
The linux-framebuffer is an abstraction-layer that could be used to enlarge the capabilities of the commandline-interface. it could be used to display graphics (some of us know the tux on bootup) or to change the resolution of the cli. normally puppy is configured to boot with a resolution of 640 x 480. By using the framebuffer, you could enlarge this to use the native resolution of your monitor.

Puppy does not enable the framebuffer by default but at least for 430/431 it is 'relatively' easy to make the needed changes.

But be aware that you'll need to edit the initrd.gz and the pup-430.sfs / pup-431.sfs.
Read carefully and as STEP 1! Use at your own risk, maybe try it with a 'clean' system first.


1. Create a working-directory (Linux-Partition)

2. unpack initrd.gz
a) copy initrd.gz to you working directory
b) open a terminal in your working-directory
Code:
mkdir initdir
cd initdir
zcat ../initrd.gz | cpio -i -d

you should now have copied the content of the initrd.gz to initdir.

3. unpack pup-430.sfs
Note: as you probably want to make changes for the version you're running, you cannot mount the sfs by clicking, as it is allready mounted.
a) copy pup-430.sfs to /tmp
b) rename it to pup-430x.sfs
c) click on pup-430x.sfs to mount it.
d) create a subdir pup-430 in your working directory.
e) open a terminal
Code:
copy -r /mnt/pup-430x/* /WORKINGDIR/pup-430

d) click on pup-430x.sfs to unmount it.

you're now prepared to apply the changes. i will use INITDIR and PUPDIR as names for our subdirectories. If i only use pup-430.. in the following, it allways means pup-430/pup-431...

4. copy framebuffer-devices
we need the framebuffer-devices in initrd.gz to be able to use it on bootup.
a) open a terminal
Code:
cp /PUPDIR/dev/fb* /INITDIR/dev

EDIT 20100127: changed mv to cp as we need the devices in PUPDIR and INITDIR.

5. move modules
we need the kernel-modules in initrd.gz.
a) open a terminal
Code:
mv /PUPDIR/lib/modules/2.6.30.5/kernel/drivers/video/console /INITDIR/lib/modules/2.6.30.5/kernel/drivers/video


6. Update modules.dep
a) open /INITDIR/lib/modules/2.6.30.5/modules.dep
b) paste the following at the end of the file
Code:
/lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/bitblit.ko: /lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/softcursor.ko
/lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/fbcon.ko: /lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/bitblit.ko /lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/softcursor.ko /lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/tileblit.ko /lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/font.ko
/lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/font.ko:
/lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/mdacon.ko:
/lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/softcursor.ko:
/lib/modules/2.6.30.5/initrd/kernel/drivers/video/console/tileblit.ko:

c) save

7. Load module fbcon in init
a) open /INITDIR/init and add the following to line 253
Code:
modprobe fbcon

b) save the file.

Note: It does not need to be Line 253, but you should use a line at the beginning of the init as you'll have a black screen until fbcon is loaded.

8. resquash PUPDIR
a) open your working-directory in a terminal
Code:
dir2sfs pup-430

b) you'll get a wrong named file pup-430_430.sfs. rename it to pup-430.sfs

Your new sfs is ready.

9. repack initrd.gz
a) open your working-directory in a terminal
Code:
cd initdir
find . | cpio -o -H newc | gzip -9 > ../initrd.gz


Your new initrd.gz is ready.

10. Exchange Files
a) Boot from a Live-CD with puppy pfix=ram
b) Backup the 'old' initrd.gz and pup-430/431.sfs.
c) Copy the new initrd.gz and pup-430/431.sfs to your regular boot-drive (and subfolder).

11. Edit your boot-config file
You now have to edit your boot-config file. This could be menu.lst / syslinux.cfg /isolinux.cfg
a) backup the 'old' file.
b) add
Code:
vga=[VGA-OPTION]

to the line where the initrd.gz is 'called', as example
Code:
append initrd=initrd.gz pmedia=usbflash vga=0x314

in my syslinux-config. See '10.1 VGA-Options' for possible values. You could also add
Code:
vga=ask

in a first run. If so you will be asked to choose a parameter from a list. You could then append that setting in a second run to your boot-config file.

If you want to remaster a cd (isolinux.cfg) it might be best, to always choose 'vga=ask'.
c) save

10.1 VGA-Options
There are 2 ways to call an vga-option, you will have to find out yourself, which one works for you. For me, values from the first list work. It might be a little trial and error.

Code:
Colours |640x480 | 800x600 | 1024x768 | 1152x864 | 1280x1024
----------------------------------------------------------------
08 bits | 0x301  |  0x303  |   0x305  |  0x161   |   0x307
15 bits | 0x310  |  0x313  |   0x316  |  0x162   |   0x319
16 bits | 0x311  |  0x314  |   0x317  |  0x163   |   0x31A


Code:
vga = normal
1024x768x64k: vga=791
1024x768x32k: vga=790
1024x768x256: vga=773
800x600x64k:  vga=788
800x600x32k:  vga=787
800x600x256:  vga=771
640x480x64k:  vga=785
640x480x32k:  vga=784
640x480x256:  vga=769

If your looking for another resolution, google will be your friend.

11. Reboot

If everything went well, you could now use your cli with a better resolution.

THANKS: My thanks go to Pizzasgood. Most parts of this howto is based on his docs for pebble http://www.murga-linux.com/puppy/viewtopic.php?t=26339.

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html

Last edited by aragon on Thu 15 Apr 2010, 12:11; edited 2 times in total
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Mon 25 Jan 2010, 08:40    Post subject:  

QUESTION:
Does anybody know, why devices in /dev that are in the initrd.gz (but not in the pup-file), are not show in /dev?

thanks
aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11031
Location: Arizona USA

PostPosted: Mon 25 Jan 2010, 16:23    Post subject:  

Aragon, could you add a bit about what framebuffer is and why it might be useful? Some people might not realize they need it. Smile
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Tue 26 Jan 2010, 04:43    Post subject:  

will try to...

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2238

PostPosted: Tue 26 Jan 2010, 07:02    Post subject:  

Devices in the intrd are completely separate from the main system. What happens in the initrd is not automatically apparent to the main system, though what happens there is not forgotten by the kernel.
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Wed 27 Jan 2010, 04:23    Post subject:  

amigo wrote:
Devices in the intrd are completely separate from the main system. What happens in the initrd is not automatically apparent to the main system, though what happens there is not forgotten by the kernel.

thanks for the explanation. so we just copy over the fb-devices from PUPDIR to INITDIR.

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2238

PostPosted: Wed 27 Jan 2010, 06:17    Post subject:  

Yeah, or use mknod to create them -you'd have to look up the specs for the framebuffer devices -you can llok in MAKEDEV or look them up in the table in the kernel sources under Documentation/devices.txt
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Wed 27 Jan 2010, 12:52    Post subject:  

yup, should be

Code:
mknod /dev/fb[NO] c 29 [NO x 32]


eg
Code:
mknod /dev/fb0 c 29 0
mknod /dev/fb1 c 29 32
mknod /dev/fb2 c 29 64

...

EDIT: fixed typo missing c

aragon[/code]

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2238

PostPosted: Wed 27 Jan 2010, 16:53    Post subject:  

Understand, it wasn't because of laziness that I didn't simply look them up and tell you -I just didn't want to take away your joy at finding them yourself... LOL
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Thu 28 Jan 2010, 04:38    Post subject:  

amigo wrote:
Understand, it wasn't because of laziness that I didn't simply look them up and tell you -I just didn't want to take away your joy at finding them yourself... LOL

he he, yes but this time i got them allready in my snippets... Wink
aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
foreirongold

Joined: 28 Jun 2009
Posts: 12

PostPosted: Thu 04 Feb 2010, 23:03    Post subject:  

Thanks for the tutorial, but how would you do this on a full hard drive install (no initrd)?

The modules and dependencies seem to be there already but I can't seem to find a good spot to load fbcon; as soon as "starting..." comes up on the console an undefined resolution error appears (using vga=773 in menu.lst). I'm guessing busybox needs to load fbcon straight away, but is that a simple matter of finding another init file and sticking it in or would I need to recompile the kernel with fbcon built-in?
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 05 Feb 2010, 05:08    Post subject:  

foreirongold wrote:
The modules and dependencies seem to be there already but I can't seem to find a good spot to load fbcon; as soon as "starting..." comes up on the console an undefined resolution error appears (using vga=773 in menu.lst).

try to use a value from the first table like
Code:
vga=0x317

in menu.lst. i have the same problem as mentioned and for me the values from the first table work.

good luck
aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
jplt


Joined: 12 Nov 2010
Posts: 118
Location: Somewhere en NORMANDIE - FRANCE

PostPosted: Fri 02 Aug 2013, 05:10    Post subject:  

Hello,

does this method work in the new puppy's (puppy precise) ?

Thanks

_________________
my hardware/mon materiel

Frugal Install Puppy Precise 5.7.1
Back to top
View user's profile Send private message 
Keef


Joined: 20 Dec 2007
Posts: 622
Location: Staffordshire

PostPosted: Sun 25 Aug 2013, 16:14    Post subject:  

Bit late with a response, but just in case it is useful...
Framebuffer is enabled in Precise. In order to use it, use for example
Code:
video=1024x768
on the kernel line in your grub menu or equivalent.
Code:
vga=791
does not work, well it does until the kernel module kicks in then it reverts to 640x480, which must be a default.
Only found out what was going on today.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3964
Location: Kiel,Germany

PostPosted: Sun 25 Aug 2013, 16:30    Post subject:  

Quote:
which must be a default.

Yes it is compiled into the kernel:
CONFIG_CMDLINE="video=640x480"

That wasn't always there , Lupu kernel 2.6.33.2 with common intel graphics i915 modeset=1 really gives a console after fbcon.ko loaded of 132x60 lines instead of the default 80x32 .
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0977s ][ Queries: 12 (0.0038s) ][ GZIP on ]