Skip to contentSkip to conversation

Using UML to work on framebuffers

DISCUSSION Jon Smirl 2 participants 3 messages Jan 15, 2003 Framebuffer layer

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

I have a patch for 2.5 that allows some framebuffers drivers (non-dma ones) to run unmodified on UML. I'm still working on DMA and IRQ support.

UML - user mode linux. UML runs the Linux kernel as a process. For example my PC is booted on 2.4 and the UML runs 2.5.

The advantage to this is that you can use gdb/ddd to debug the fb driver code. It's actually kind of neat. I use one gdb inside of UML to control the fbtest app and another gdb to step the code inside of the fb driver.

Is anyone interested in trying this out?

You need two video cards in your machine one for X and one for the target framebuffer. I am using AGP for X and targeting a PCI Rage128.

=====
Jon Smirl
[email protected]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving your online business a competitive advantage. Test-drive a Thawte SSL certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en

#1 lore raw

Yes very much so. It woudl make my life easier.

Quoted 30 lines

I have a patch for 2.5 that allows some framebuffers drivers (non-dma ones) to run unmodified on UML. I'm still working on DMA and IRQ support.

UML - user mode linux. UML runs the Linux kernel as a process. For example my PC is booted on 2.4 and the UML runs 2.5.

The advantage to this is that you can use gdb/ddd to debug the fb driver code. It's actually kind of neat. I use one gdb inside of UML to control the fbtest app and another gdb to step the code inside of the fb driver.

Is anyone interested in trying this out?

You need two video cards in your machine one for X and one for the target framebuffer. I am using AGP for X and targeting a PCI Rage128.

=====
Jon Smirl
[email protected]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Quoted 10 lines

-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving your online business a competitive advantage. Test-drive a Thawte SSL certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
Linux-fbdev-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving your online business a competitive advantage. Test-drive a Thawte SSL certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en

author
#2 lore raw

Here's what you need to do:

1) Initialize your secondary adapter with vbios.vm86
http://www.arava.co.il/matan/svgalib/hypermail/1660.html

2) bk pull bk://namesys.com/bk/reiser4-linux-2.5 r25

Namsys uses UML to develop Reiser4. Oleg keeps UML and 2.5 very closely integrated and up to date.

If someone tells me how, I can generate a patch for a vanilla 2.5. If I diff from torvalds, 1.919.1.104, would that work?

3) cd r25/fs
bk pull bk://namesys.com/bk/reiser4

this is just needed to build properly

4) Apply the attached patch

5) make mrproper

6) copy attached config file

7) make oldconfig ARCH=um

8) make linux ARCH=um

9) Download a system disk image
http://user-mode-linux.sourceforge.net/dl-sf.html
I am using:
root_fs.rh-7.2-full.pristine.20020312.bz2

if you are running redhat you will already have UML tools, if not you need to download them too.

10) Set up sudo to run linux as root. It needs to be root to play with the hardware.

11) start ddd &
do a ps -aux and get the pid for gdb
from ddd open the file linux and set breakpoints

12) run the image, i use:
./run gdb-pid
sudo /home/jonsmirl/aty25/linux ubd0=cow,/opt/uml/root_fs ubd1=cows,/opt/uml/swap root=/dev/ubd/0 ubd4=cowr,/opt/uml/reiser4 eth0=tuntap,,,192.168.0.2 debug=parent gdb-pid=${1} video=aty128fb

You don't need the swap and reiser4 images to start.

Read about networking with UML:
http://user-mode-linux.sourceforge.net/
I run NFS from UML to my host so that I can see my host's disk. If you aren't running NAT you may need to modify a few things.

Let me know what doesn't work. You're the lucky first to try this. This is a lot of work to get set up, but it is easy to use once you get it going.

Right now I'm trying to get interrupts working. Some USB people are after me to help make their debugging easier.

=====
Jon Smirl
[email protected]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com