Plz help ! I need VGA

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
thebrave
Newbie
Posts: 7
Joined: Sun Aug 17, 2003 3:27 pm

Plz help ! I need VGA

Post by thebrave »

Could some one compile me a kernel to enable vga output ?
I don't know how to do...
Scocou
Novice
Posts: 44
Joined: Tue Aug 12, 2003 12:22 am
Location: British Columbia, Canada

Post by Scocou »

I don't know how to do...
I'll tell you in four easy steps. First open a console or xterm and log in as root (or su) if not already done. Next you must

Code: Select all

cd /usr/src/linux
to navigate to the kernel sources directory. To configure your kernel, you must

Code: Select all

make menuconfig
to open the kernel configuration dialog. Everything is already set by Shallax, all you need to do is add support for vga text console. Scroll down in menuconfig until you reach Console drivers ---> then press <enter>. The item already selected at the head of the list is the one you want, it's called [ ]VGA text console. Press <space> or <y> to select this option. A star will appear, as such [*]VGA text console[/b]. That's it! Now to rebuild your kernel. Simply choose exit to leave menuconfig, ensuring you say yes when asked to save your changes. Next type

Code: Select all

make dep && make clean bzImage
This will rebuild your kernel, if you wanted to rebuild your modules as well (not necessary in this case) simply add modules modules_install to the end of the command. This will take ~30mins. Now all that's left is to move your kernel to the appropriate name & directory, that being /mnt/fatx/e/vmlinuz . Do this like so

Code: Select all

mv /usr/src/linux/arch/i386/boot/bzImage /mnt/fatx/e/vmlinuz
Now you must reboot to enjoy your new kernel. Good luck! I must mention I haven't ever tried vga support with the Xbox, so I have no idea if the kernel will work how you expect. I am simply describing exactly what I would do, were I to build one for you. I will do it btw, if you try this and can't make it work ;) Did you make a VGA output converter, or can you buy them now?
Anastrophe
Novice
Posts: 25
Joined: Mon Aug 25, 2003 3:41 am

Post by Anastrophe »

I found that very useful myself - thanks
thebrave
Newbie
Posts: 7
Joined: Sun Aug 17, 2003 3:27 pm

Post by thebrave »

Arrrg! Don't work... yes I succed (I think) creating a new kernel.
I have overwritten vmlinux in /boot/ and in /mnt/fatx/e/ with my brand new bzImage but (as usual) linux boot but don't recognize vga cable, it continues to send PAL signal.

I have no idea what to do now....
detroit
Novice
Posts: 39
Joined: Mon Aug 11, 2003 10:37 pm
Location: Stafford, UK

Post by detroit »

here's what I did:

cd /usr/src/linux
make menuconfig

Scroll in menuconfig to Console drivers and enable [ ]VGA text console.
Then scroll down to and enter 'Frame-buffer support'. Disable 'nVidia Riva support (EXPERIMENTAL)'. Exit menuconfig, save your changes. Then type:

make dep && make clean bzImage
mv /usr/src/linux/arch/i386/boot/bzImage /mnt/fatx/e/vmlinuz

--- I also grepped through /etc removing references to xbv, you can probably skip this.
detroit
Novice
Posts: 39
Joined: Mon Aug 11, 2003 10:37 pm
Location: Stafford, UK

Post by detroit »

btw-- the above approach yielded color output in text console.

I think I will make two separate kernels-- one for vga and one for TV.
I need to think of best way to allow selecting the kernel when launching gentoox.xbe
kernel_sanders
Novice
Posts: 24
Joined: Sun Aug 31, 2003 3:04 am
Location: Memphis, TN

ftp in via evox

Post by kernel_sanders »

If you can, ftp into your xbox using EvoX or a boot CD and use ftp to switch kernels. You can even keep both on a seperate machine, and upload the one you want to use when you want to switch. Or, a more legal alternative would be to boot your machine into Linux mode (using Cromwell, since it auto-boots) and sftp in and change it that way. Both require network acess, unless you want to use a boot cd and use a keyboard. Or you can just use a keyboard and a boot cd. I did the USB hub mod, so I can hook at least 3 usb devices into it. Haven't tried 4, even though 3 is supposed to be the max per controller port.
detroit
Novice
Posts: 39
Joined: Mon Aug 11, 2003 10:37 pm
Location: Stafford, UK

Post by detroit »

i didn't feel like manually swapping kernels out via ftp, etc, so instead i copied of gentooxx.xbe and linuxboot.cfg, to gentooxv.xbe and linuxboov.cfg. I edited linuxboov.cfg to boot the alternate vga kernel I named vmlinuz_vga. I patched gentooxv.xbe to read linuxboov.cfg. This approach allows selecting the xbe and associated kernel via evox, depending on whether xbox is using VGA or TV.
del33ted_g33k
Novice
Posts: 30
Joined: Mon Aug 11, 2003 10:58 am
Location: Western Australia

Post by del33ted_g33k »

sweet i think i might buy a vga converter box
kernel_sanders
Novice
Posts: 24
Joined: Sun Aug 31, 2003 3:04 am
Location: Memphis, TN

If you buy a VGA conv. box...

Post by kernel_sanders »

If you buy a VGA converter box, buy one with S-Video & Component (480i). I have a Key-Digital clone they used to sell @ Lik-Sang. Mine only inputs 480p, 720p, and 1080i. I've only gotten GentooX to output in 480p by removing RivaFB in the Kernel and commenting out xbvinit in local.start - and only console output at that. So be sure to get one that's an upscan converter, unless you enjoy your games @ 480p and don't mine using SSH.
detroit
Novice
Posts: 39
Joined: Mon Aug 11, 2003 10:37 pm
Location: Stafford, UK

Post by detroit »

you should be able to run x in 480p- i was able to do this after the method mentioned above. The line doublers are not recommended.
Terra
Novice
Posts: 23
Joined: Fri Oct 03, 2003 7:45 am

Post by Terra »

I am using the Neoya x2vga adapter.

There is a glitch with the nvnet driver when you compile your own kernel.

The steps that I used:
1) Boot up to EvoX
2) FTP up virgin files (rootfs, swapfs, etc) to /E/
3) Boot GentooX
4) SSH into the (correct) IP
5) Get busy with the new kernel compile
# cd /usr/src
# cp -val linux-2.4.20{,-vga}
# rm linux
# ln -s linux-2.4.20-vga linux
# cd linux-2.4.20-vga
** edit the Makefile and change EXTRAVERSION to: -xbox-vga
# mv .config ..
# make mrproper
# mv ../.config .
# make menuconfig
** 1) Select VGA_CONSOLE
** 2) DeSelect FB_RIVA
# make dep
# make bzImage && make modules modules_install
# cp -p arch/i386/boot/bzImage /mnt/fatx/e/vmlinuz-vga
** edit linuxboot.cfg to reflect the changes
kernel vmlinuz-vga
initrd initrd.gz
append init=/linuxrc root=/dev/ram0 pci=biosirq kbd-reset
# reboot
Sidenote, I have tried this using the existing linux-2.4.20 directory and compiling in there just to test the sanity of it all. I showed the above to illustrate a low cost way of keeping 2 source trees by using the hardlink method where the only major cost is the compiled object files. nvnet still exhibited the same behavior.

From here, it initially boots up fine, until we hit the network initialization. I have my dhcpd server setup to provide a specific IP matched against the requester's MAC address. The issue is that nvnet is trying to probe its MAC address via I2C sniffing into the EEPROM - and fails. Therefore it will default to the hardcoded IP of: 192.168.1.13

Here is the resulting ifconfig:
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.1.13 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:581 errors:0 dropped:0 overruns:0 frame:0
TX packets:468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:56673 (55.3 Kb) TX bytes:183816 (179.5 Kb)
Interrupt:4

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:198 (198.0 b) TX bytes:198 (198.0 b)

The .config file differences between the virgin one, and the one that I used to enable the VGA console:
--- ../linux-2.4.20/.config 2003-08-23 15:24:34.000000000 +0100
+++ .config 2003-10-06 22:41:44.000000000 +0100
@@ -1163,7 +1091,7 @@
#
# Console drivers
#
-# CONFIG_VGA_CONSOLE is not set
+CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
# CONFIG_MDA_CONSOLE is not set

@@ -1172,7 +1100,7 @@
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
-CONFIG_FB_RIVA=y
+# CONFIG_FB_RIVA is not set
# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_PM3 is not set

The 'dmesg' from the freshly booted vmlinuz-vga kernel. The points of failure have been bolded.
Linux version 2.4.20-xbox-vga (root@Xbox) (gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)) #2 Mon Oct 6 22:41:54 BST 2003
BIOS-provided physical RAM map:
BIOS-88: 0000000000000000 - 000000000009f000 (usable)
BIOS-88: 0000000000100000 - 0000000003c00000 (usable)
60MB LOWMEM available.
On node 0 totalpages: 15360
zone(0): 4096 pages.
zone(1): 11264 pages.
zone(2): 0 pages.
Kernel command line: init=/linuxrc root=/dev/ram0 pci=biosirq kbd-reset kbd-reset xboxeepromkey=<removed> xboxhdkey=<removed>
PCI: Unknown option `biosirq'
Local APIC disabled by BIOS -- reenabling.
Found and enabled local APIC!
Initializing CPU#0
Detected 733.332 MHz processor.
Console: colour dummy device 80x25
Calibrating delay loop... 1461.45 BogoMIPS
Memory: 57848k/61440k available (1353k kernel code, 3204k reserved, 445k data, 112k init, 0k highmem)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 128K
CPU: After generic, caps: 0383fbff 00000000 00000000 00000000
CPU: Common caps: 0383fbff 00000000 00000000 00000000
CPU: Intel Celeron (Coppermine) stepping 0a
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 733.3266 MHz.
..... host bus clock speed is 133.3320 MHz.
cpu: 0, clocks: 1333320, slice: 666660
CPU0<T0:1333312,T1:666640,D:12,S:666660,C:1333320>
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: Intel
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Cannot allocate resource region 1 of device 01:00.0
PCI: Failed to allocate resource 1(f0000000-f3ffffff) for 01:00.0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
VFS: Diskquotas version dquot_6.4.0 initialized
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
i2c-core.o: i2c core module
i2c-dev.o: i2c /dev entries driver module
i2c-core.o: driver i2c-dev dummy driver registered.
i2c-proc.o version 2.6.1 (20010825)
vesafb: framebuffer at 0xf3c00000, mapped to 0xc480d000, size 4096k
vesafb: mode is 640x480x32, linelength=2560, pages=1
vesafb: scrolling: redraw
vesafb: directcolor: size=8:8:8:8, shift=24:16:8:0
Console: switching to colour frame buffer device 80x30
fb0: VESA VGA frame buffer device
initialize_kbd: No keyboard controller preset
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.10e
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PCI_IDE: unknown IDE controller on PCI bus 00 device 48, VID=10de, DID=01bc
PCI_IDE: chipset revision 177
PCI_IDE: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xff60-0xff67, BIOS settings: hda:pio, hdb:pio
PCI_IDE: simplex device: DMA disabled
ide1: PCI_IDE Bus-Master DMA disabled (BIOS)
hda: C/H/S=49934/1/232 from BIOS ignored
hda: Maxtor 6Y200P0, ATA DISK drive
hdb: THOMSON-DVD, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
blk: queue c0309b64, I/O limit 4095Mb (mask 0xffffffff)
hda: 398297088 sectors (203928 MB) w/7936KiB Cache, CHS=24792/255/63, UDMA(33)
Uniform CD-ROM driver Revision: 3.12
Partition check:
/dev/ide/host0/bus0/target0/lun0: unknown partition table
ide0: unexpected interrupt, status=0x58, count=1
p50 p51 p52 p53 p54 p55
NET4: Frame Diverter 0.46
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
i2c-core.o: driver i2c xbox-extsmi driver registered.
IEEE 802.2 LLC for Linux 2.1 (c) 1996 Tim Alpaerts
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
bh with no client!?
bh with no client!?
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 384k freed
VFS: Mounted root (ext2 filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 112k freed
FATX driver 0.0.1
VFS: Can't find ext3 filesystem on dev loop(7,0).
VFS: Can't find ext2 filesystem on dev loop(7,0).
Unable to identify CD-ROM format.
reiserfs: checking transaction log (device 07:00) ...
Using r5 hash to sort names
ReiserFS version 3.6.25
reiserfs_getopt: unknown option "errors=remount-ro"
reiserfs_getopt: unknown option "errors=remount-ro"
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
PCI: Setting latency timer of device 00:02.0 to 64
usb-ohci.c: USB OHCI at membase 0xc4cf3000, IRQ 1
usb-ohci.c: usb-00:02.0, PCI device 10de:01c2 (nVidia Corporation)
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 4 ports detected
PCI: Setting latency timer of device 00:03.0 to 64
usb-ohci.c: USB OHCI at membase 0xc4cf5000, IRQ 9
usb-ohci.c: usb-00:03.0, PCI device 10de:01c2 (nVidia Corporation)
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver keyboard
usbkbd.c: :USB HID Boot Protocol keyboard driver
usb.c: registered new driver usb_mouse
usbmouse.c: v1.6:USB HID Boot Protocol mouse driver
mice: PS/2 mouse device common for all mice
usb.c: registered new driver xpad
xpad.c: driver for Xbox controllers with mouse emulation v0.1.1
PCI: Setting latency timer of device 00:04.0 to 64
i2c-core.o: driver nvnet temporary driver registered.
nvnet: No I2C adapter found
i2c-core.o: driver unregistered: nvnet temporary driver
nvnet: Couldn't read XBox MAC address, using zero
divert: allocating divert_blk for eth0
Adding Swap: 262136k swap-space (priority -1)
hub.c: new USB device 00:02.0-1, assigned address 2
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: new USB device 00:02.0-1.3, assigned address 3
hub.c: USB hub found
hub.c: 3 ports detected
hub.c: new USB device 00:02.0-1.3.1, assigned address 4
xpad.c: Microsoft Xbox Controller
xpad.c: Mouse Emulation @ Microsoft Xbox Controller
xpad.c: Opening Xpad Device
And finally, since it is complaing about I2C, I include the results of:
# grep -i I2C .config
# I2C support
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=m
# CONFIG_I2C_PHILIPSPAR is not set
CONFIG_I2C_ELV=m
CONFIG_I2C_VELLEMAN=m
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ELEKTOR=m
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_PROC=y
CONFIG_I2C_XBOX=y
CONFIG_I2C_EXTSMI=y
# CONFIG_I2C_PARPORT is not set
Hopefully the above is detailed enough for anyone to provide further insight into this issue.

Has anyone experienced this issue, or am I swimming alone?

Has anyone figured out what is causing nvnet to hose (00:00:00:00:00:00) its MAC address?

Has anyone found a solution to this problem with nvnet and/or I2C not being able to snarf its MAC address from the EEPROM?

Thank you for any information that can be provided.

--Terra
Terra
Novice
Posts: 23
Joined: Fri Oct 03, 2003 7:45 am

Post by Terra »

After further research I have found a viable workaround.

I looked at the differences between a stock gentoox kernel startup, and the modified one removing the FB_RIVA driver.

Edited for brevity with interesting parts bolded
--- dmesg-virgin 2003-10-07 00:45:06.000000000 +0100
+++ dmesg 2003-10-06 23:07:30.000000000 +0100
@@ -1,4 +1,4 @@
-Linux version 2.4.20-xbox (root@Home.localhost) (gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)) #1 Sat Aug 23 15:26:34 BST 2003
+Linux version 2.4.20-xbox-vga (root@Xbox) (gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)) #2 Mon Oct 6 22:41:54 BST 2003
BIOS-provided physical RAM map:
BIOS-88: 0000000000000000 - 000000000009f000 (usable)
BIOS-88: 0000000000100000 - 0000000003c00000 (usable)
@@ -57,31 +57,12 @@
i2c-dev.o: i2c /dev entries driver module
i2c-core.o: driver i2c-dev dummy driver registered.
i2c-proc.o version 2.6.1 (20010825)
-rivafb: Using maximum available framebuffer 4M
-i2c-xbox.o version 0.0.1
-i2c-xbox.o: DEBUG: SMBA c000
-i2c-xbox.o: DEBUG: SMBGCFG c000
-i2c-xbox.o: PCI status 00b0
-i2c-xbox.o: can't get assigned irq 0
-i2c-xbox.o: Found nVidia XBOX nForce SMBus controller.
-i2c-dev.o: Registered 'SMBus adapter at c000' as minor 0
-i2c-core.o: adapter SMBus adapter at c000 registered as adapter 0.
-i2c-xbox.o: SMBus bus detected and initialized
-i2c-core.o: driver i2c xbox conexant driver registered.

-conexant-i2c: Using 'SMBus adapter at c000'!
-i2c-core.o: client [I2C xbox conexant client] registered to adapter [SMBus adapter at c000](pos. 0).
-i2c-core.o: client [I2C xbox pic client] registered to adapter [SMBus adapter at c000](pos. 1).
-i2c-core.o: client [I2C xbox eeprom client] registered to adapter [SMBus adapter at c000](pos. 2).
-rivafb: Setting video mode from EEPROM (NTSC)
-rivafb: RIVA MTRR set to ON
-Console: switching to colour frame buffer device 100x37
-rivafb: PCI nVidia NV20 framebuffer ver 0.9.4-xbox (GeForce3 X-Box, 4MB @ 0xF3C00000)
-vesafb: abort, cannot reserve video memory at 0xf3c00000
-vesafb: framebuffer at 0xf3c00000, mapped to 0xc5c0f000, size 4096k
+vesafb: framebuffer at 0xf3c00000, mapped to 0xc480d000, size 4096k
vesafb: mode is 640x480x32, linelength=2560, pages=1
vesafb: scrolling: redraw
vesafb: directcolor: size=8:8:8:8, shift=24:16:8:0
-fb1: VESA VGA frame buffer device
+Console: switching to colour frame buffer device 80x30
+fb0: VESA VGA frame buffer device
initialize_kbd: No keyboard controller preset
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.10e
This was when I found the case of dependency assumption. Without the FB_RIVA driver, the call to 'i2c_xbox_init()' is never made, therefore when nvnet rolls around to initialize it will not have access to the SMBus in order to probe the MAC from EEPROM.

At this point, there are two verified operational workarounds, depending if you edited the EXTRAVERSION within the kernel Makefile or not. Please read prior post to see why.

>>Workaround for: EXTRAVERSION = -xbox
This one is pretty simple.
Edit /etc/modules.autoload and add 'i2c-xbox' right before the line with 'usbcore'. Run 'modules-update' and reboot. navnet will once again snarf its MAC address properly from EEPROM.
>>Workaround for: EXTRAVERSION = -xbox-vga
This one is more complicated since we need to fixup the initrd.gz image.
# mkdir -p /work/initrd-mnt-vga
# cd /work
# cp -p /mnt/fatx/e/initrd.gz ./
# mv initrd.gz initrd-vga.gz
# gunzip initrd-vga.gz
# mount -oloop initrd-vga initrd-mnt-vga
# cd initrd-mnt-vga
# mkdir lib/modules/2.4.20-xbox-vga
# cp -pv /lib/modules/2.4.20-xbox-vga/kernel/{drivers/net/nvnet/nvnet.o,{fs/{fat/fat.o,fatx/fatx.o}}} lib/modules/2.4.20-xbox-vga
# nano -w linuxrc
**Look for the following line:
insmod /lib/modules/`uname -r`/fatx.o
**Add the following line right after the 'fatx.o' line
insmod /lib/modules/`uname -r`/i2c-xbox.o
# cd ..
# umount initrd-mnt-vga
# gzip -v initrd-vga
# cp -pv initrd-vga.gz /mnt/fatx/e/
**Edit your linuxboot.cfg file and change the initrd entry to:
initrd initrd-vga.gz
# reboot
Please let me know if you find any errors or omissions (or if you found it beneficial) in the above informational text.

Thanks.

--Terra
Post Reply