[LinuxBIOS] qemu and OLPC

ron minnich rminnich at gmail.com
Tue Sep 19 06:44:05 CEST 2006


I almost have this going, needs some smart people to take a look.

To use it, follow the qemu tutorial for getting and patching qemu.

For the bios, ignore the instuctions.

Do this:
git-clone git://dev.laptop.org/users/jcrouse/buildrom
cd buildrom
Now you need to set things up so that you get a linuxbios for qemu. replace
the Config.mk with the one I am attaching.

not type make. After some time, you will have a deploy/linuxbios.rom to use
as a bios. cp it to some directory, say your home dir.

Now get an OLPC image, go to wiki.laptop.org and grab (e.g.) the build81
ext3 image.

bunzip2 that image.

Now do as the tutorial says:

qemu -L ~ -hda1 blahblah.ext3 --nographic, e.g.
/opt/qemu-0.8.2/bin/qemu -L  ~ -hda
roots/olpc-stream-development-81-20060831_1548-ext3.img -nographic
and watch it boot up:
LinuxBIOS-2.0.0-OpenBIOS Mon Sep 18 22:07:06 MDT 2006 starting...
Copying LinuxBIOS to ram.
Jumping to LinuxBIOS.
LinuxBIOS-2.0.0-OpenBIOS Mon Sep 18 22:07:06 MDT 2006 booting...
Enumerating buses...
Finding PCI configuration type.
PCI: Using configuration type 1
PCI_DOMAIN: 0000 enabled
PCI: pci_scan_bus for bus 0
set_pci_ops: seeking driver for 8086:1237 class 60000
PCI: 00:00.0 [8086/1237] enabled
set_pci_ops: seeking driver for 8086:7000 class 60100
PCI: 00:01.0 [8086/7000] enabled
set_pci_ops: seeking driver for 8086:7010 class 10180
PCI: 00:01.1 [8086/7010] enabled
set_pci_ops: seeking driver for 8086:7113 class 68000
PCI: 00:01.3 [8086/7113] enabled
set_pci_ops: seeking driver for 1013:b8 class 30000
PCI: 00:02.0 [1013/00b8] enabled
set_pci_ops: seeking driver for 10ec:8029 class 20000
PCI: 00:03.0 [10ec/8029] enabled
PCI: pci_scan_bus returning with max=00
done
Allocating resources...
Reading resources...
Done reading resources.
Setting resources...
I would set ram size to 0x20000 Kbytes
PCI: 00:01.1 20 <- [0x0000001400 - 0x000000140f] io
PCI: 00:02.0 10 <- [0x00fc000000 - 0x00fdffffff] prefmem
PCI: 00:02.0 14 <- [0x00fe000000 - 0x00fe000fff] mem
PCI: 00:03.0 10 <- [0x0000001000 - 0x00000010ff] io
Done setting resources.
Done allocating resources.
Enabling resources...
PCI: 00:00.0 subsystem <- 00/00
PCI: 00:00.0 cmd <- 140
PCI: 00:01.0 subsystem <- 00/00
PCI: 00:01.0 cmd <- 147
PCI: 00:01.1 cmd <- 141
PCI: 00:01.3 cmd <- 140
PCI: 00:02.0 cmd <- 143
PCI: 00:03.0 cmd <- 141
done.
Initializing devices...
Root Device init
PCI: 00:00.0 init
PCI: 00:01.0 init
PCI: 00:01.1 init
PCI: 00:01.3 init
PCI: 00:02.0 init
PCI: 00:03.0 init
Devices initialized
Copying IRQ routing tables to 0xf0000...done.
Verifing copy of IRQ routing tables at 0xf0000...done
Checking IRQ routing table consistency...
check_pirq_routing_table() - irq_routing_table located at: 0x000f0000
done.
Moving GDT to 0x500...ok
Wrote linuxbios table at: 00000530 - 00000b64  checksum 5dad

Welcome to elfboot, the open sourced starter.
January 2002, Eric Biederman.
Version 1.3

rom_stream: 0xfff20000 - 0xfffeffff
Uncompressing to RAM 0x01000000  olen = 0x000c995e done.
Found ELF candiate at offset 0
Dropping non PT_LOAD segment
New segment addr 0x10000 size 0x1ab24 offset 0x168 filesize 0x561c
(cleaned up) New segment addr 0x10000 size 0x1ab24 offset 0x168 filesize
0x561c
New segment addr 0x91000 size 0x70 offset 0x5784 filesize 0x0
(cleaned up) New segment addr 0x91000 size 0x70 offset 0x5784 filesize 0x0
New segment addr 0x100000 size 0x700000 offset 0x5784 filesize 0x907c9
(cleaned up) New segment addr 0x100000 size 0x700000 offset 0x5784 filesize
0x907c9
New segment addr 0x800000 size 0x33a11 offset 0x95f4d filesize 0x33a11
(cleaned up) New segment addr 0x800000 size 0x33a11 offset 0x95f4d filesize
0x33a11
Loading Segment: addr: 0x0000000007fe8000 memsz: 0x0000000000006000 filesz:
0x000000000000561c
Clearing Segment: addr: 0x0000000007fed61c memsz: 0x00000000000009e4
Loading Segment: addr: 0x0000000000091000 memsz: 0x0000000000000070 filesz:
0x0000000000000000
Clearing Segment: addr: 0x0000000000091000 memsz: 0x0000000000000070
Loading Segment: addr: 0x0000000000100000 memsz: 0x0000000000700000 filesz:
0x00000000000907c9
Clearing Segment: addr: 0x00000000001907c9 memsz: 0x000000000066f837
Loading Segment: addr: 0x0000000000016000 memsz: 0x0000000000014b24 filesz:
0x0000000000000000
Clearing Segment: addr: 0x0000000000016000 memsz: 0x0000000000014b24
Loading Segment: addr: 0x0000000000800000 memsz: 0x0000000000033a11 filesz:
0x0000000000033a11
   120:stream_skip() - overflowed source buffer
Jumping to boot code at 0x10000
Firmware type: LinuxBIOS
Linux version 2.6.18-rc4jhc (rminnich at q.ccstar.lanl.gov) (gcc version
4.0.220051125 (Red Hat
4.0.2-8)) #1 Mon Sep 18 22:04:13 MDT 2006
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 0000000000000bd0 (reserved)
 BIOS-e820: 0000000000000bd0 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 00000000000f0400 (reserved)
 BIOS-e820: 0000000000100000 - 0000000008000000 (usable)
user-defined physical RAM map:
 user: 0000000000000000 - 0000000000000bd0 (reserved)
 user: 0000000000000bd0 - 00000000000a0000 (usable)
 user: 00000000000f0000 - 00000000000f0400 (reserved)
 user: 0000000000100000 - 0000000007700000 (usable)
119MB LOWMEM available.
DMI not present or invalid.
Allocating PCI resources starting at 10000000 (gap: 07700000:f8900000)
Detected 1694.659 MHz processor.
Built 1 zonelists.  Total pages: 30464
Kernel command line: console=ttyS0,115200 video=gxfb:1024x768 mem=119m
rdinit=/linuxrc
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 118932k/121856k available (780k kernel code, 2456k reserved, 191k
data, 108k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 3094.78 BogoMIPS
(lpj=15473942)
Mount-cache hash table entries: 512
CPU: L1 I cache: 8K
CPU: L2 cache: 128K
CPU: Intel Pentium II (Klamath) stepping 03
Checking 'hlt' instruction... OK.
Unpacking initramfs... done
Freeing initrd memory: 206k freed
PCI: Using configuration type 1
Setting up standard PCI resources
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI quirk: region b000-b03f claimed by PIIX4 ACPI
PCI: Using IRQ router PIIX/ICH [8086/7000] at 0000:00:01.0
PCI: Found IRQ 11 for device 0000:00:03.0
PCI: Ignore bogus resource 6 [0:0] of 0000:00:02.0
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
Limiting direct PCI/PCI transfers.
PCI: PIIX3: Enabling Passive Release on 0000:00:01.0
Activating ISA DMA hang workarounds.
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Using IPI Shortcut mode
Time: tsc clocksource has been installed.
Freeing unused kernel memory: 108k freed
input: AT Raw Set 2 keyboard as /class/input/input0
OLPC ROM rev_a_20060913-2
Build timestamp: 20060918 22:06:37
Starting bootmenu.
Couldn't open /dev/fb0
NOTICE: Starting the shell...
# TSC appears to be running slowly. Marking it as unstable
Time: pit clocksource has been installed.

#


so you have a root prompt. But getting to graphics is another matter.

ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20060918/50f8f1e7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Config.mk
Type: application/octet-stream
Size: 2313 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20060918/50f8f1e7/attachment.obj>


More information about the coreboot mailing list