Howto make opensuse running on Gdium?

46 views
Skip to first unread message

eryu guan

unread,
Jun 16, 2009, 11:48:27 PM6/16/09
to gd...@googlegroups.com
Hi all,

I'm trying to port opensuse to mips(actually it's gdium running loongson2f). A basic bootable opensuse system is ready and able to do rpmbuild in qemu emulator. Now I'm trying to make this newly built system running on Gdium. I did the following steps but the OS couldn't be booting.

(I have two G-keys, the black one has G-linux on it and the other one(white) doesn't. Assume that on my laptop the black G-key is /dev/sdb and the white one is /dev/sdc)
1. Copy G-key using dd.
   dd if=/dev/sdb of=/dev/sdc bs=4k
2. Copy cross-compiled OpenSuSE to the partition labeled "mips" on sdc, it's mounted on /media/sdc2
   cd /media/sdc2
   rm -rf ./*
   tar xjf /path/to/opensuse.tar.bz2
3. Copy fstab,kernel image,kernel modules from black G-key to white
   cp /media/sdb2/etc/fstab /media/sdc2/etc/
   cp -r /media/sdb2/boot/* /media/sdc2/boot/
   cp -r /media/sdb2/lib/modules/* /media/sdc2/lib/modules/
4. Boot OpenSuSE on Gdium.
PMON> load /dev/fs/ext2@usbg0/boot/
vmlinux.32
PMON> initrd /dev/fs/ext2@usbg0/boot/initrd.gz
PMON> g console=tty1 root=/dev/sda2 video=sm501fb:1024x600@60

It is stuck on the following messages:
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
Splashy ERROR: Timeout (120 sec) occurred while waiting for a message on the Splashy socket
(!) [  304:    0.000] ---> Caught signal 11 (sent by the kernel) <---
Splashy caught signal number 6. Exiting...

Then I tried to copy kernel image and kernel modules from Debian(which is usable, I booted up the cross-compiled OpenSuSE in qemu running the Debian kernel and modules).
PMON> load /dev/fs/ext2@usbg0/boot/vmlinux-2.6.26-1-4kc-malta
PMON> g console=tty1 root=/dev/sda2 video=sm501fb:1024x600@60

It is stuck on the following messages:
BEV in SR set to zero.
PMON> load /dev/fs/ext2@usbg0/boot/vmlinux-2.6.26-1-4kc-malta
Loading file: /dev/fs/ext2@usbg0/boot/vmlinux-2.6.26-1-4kc-malta (elf)
0x80100000/4423813 + 0x80538085/244075(z) + 11264 syms
Entry address is 80432500
PMON> g console=tty1 root=/dev/sda2 video=sm501fb:1024x600@60
  zero      at       v0       v1       a0       a1       a2       a3
00000000 00000000 00000000 00000000 00000004 aff7fd68 aff7fd7c 800790c8
   t0       t1       t2       t3       t4       t5       t6       t7
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   s0       s1       s2       s3       s4       s5       s6       s7
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   t8       t9       k0       k1       gp       sp       s8       ra
00000000 00000000 00000000 00000000 00000000 aff7fd48 00000000 800500d0

I have read the documents on OLPH wiki and still have no idea about what to do now. Could you please give me some tips or documents?

Thanks!

Guan Eryu

Philippe Vachon

unread,
Jun 17, 2009, 12:52:53 AM6/17/09
to gd...@googlegroups.com
Hi there!

Glad to see your OpenSuSE port is moving along nicely -- can't wait
until you have something that is testable!

Let's see if I can provide something of help to you. Unfortunately, my
Gdium is on the other side of the continent right now, so I'm going a
bit by memory right now.

In the first case, what happens if you try booting without the initrd at
all? I can't remember the details of what is in the Gdium initrd, but
none of it was essential, so that step can be skipped for the time
being. Maybe that'll give us some new failing behaviours!

The second hang means the kernel failed sometime before the video
hardware is initialized. To track down what is happening, you'll need to
wire up a serial port (there's details on the OLPH wiki on how to do
this) or see if it's possible for Lemote or Emtec to send you a Gdium
motherboard with the RS232 hardware installed. Alternatively, if you can
wait a week, send me the kernel image and I can try to have a look at
what is wrong.
If you're using hardware that has a serial port, and it's
hanging like that, you've got bigger issues (the kernel you're using is
somehow bad -- the fact that it works with a debian image makes me
wonder, and would be why I'd want a copy of said kernel image myself).

Hopefully my hazy, jet-lagged ideas are of some use.

Cheers,
Phil

yajin zhou

unread,
Jun 17, 2009, 2:04:00 AM6/17/09
to gd...@googlegroups.com
Hi

I have no idea about the fisrt error message. But for the second error message, it seems you are using a wrong malta kernel image for gdium. You can use the image from glinux or build the kernel by yourself. I have built it several days ago and it works well in my gdium.

The working kernel source:
http://lebesgue.cowpig.ca/~philippe/gdium/linux-2.6.24.5-gdiumv3-2.2mnb.tar.gz

Follow the following article to build your toolchain to build the kernel.
http://olph.gdium.com/wiki/doku.php/system:building_a_toolchain

Hope it helps you.


yajin

http://vm-kernel.org

eryu guan

unread,
Jun 17, 2009, 1:04:20 PM6/17/09
to gd...@googlegroups.com
Thanks for your reply.

I've tried to boot with initrd.gz and it gave me panic.

VFS: Cannot open root device "sda2" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


I know little about the serial port, I'm a newbie in porting. I'll search more documents about this.

Guan Eryu

2009/6/17 Philippe Vachon <phil...@cowpig.ca>

eryu guan

unread,
Jun 17, 2009, 1:29:14 PM6/17/09
to gd...@googlegroups.com
Thanks for your reply.

I have setup cross-toolchain and compiled opensuse's kernel source using the config file from G-linux, but it didn't boot. Sorry for missing the error messages, I didn't take them down as they were similar with the messages above.

I'll try your method.

Guan Eryu

2009/6/17 yajin zhou <yaji...@vm-kernel.org>

Philippe Vachon

unread,
Jun 17, 2009, 10:31:12 PM6/17/09
to gd...@googlegroups.com
Hi!

If you're using the Glinux kernel, that'd mean to me there's no valid
filesystem on sda2 (though I don't quite buy that); could you give me
the output for df -T when you have all theh gkey partitions mounted?

Additionally, you should probably throw a "rootwait" in the boot command
line for your gdium -- so something like

g -- console=tty1 root=/dev/sda2 rootwait video=sm501fb:1024x600@60

which tells the kernel to wait for the root filesystem device (a USB
device in the Gdium's case) to settle down and be found.

Cheers,
Phil

eryu guan

unread,
Jun 18, 2009, 4:06:10 AM6/18/09
to gd...@googlegroups.com
Hi Phil,

Thanks for your help!
This is the result of df -T, sdb is opensuse, sdc is the original Gkey
$ df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/sda13    ext3    15338272   7452260   7106864  52% /
tmpfs        tmpfs     1557892         8   1557884   1% /lib/init/rw
udev         tmpfs       10240       248      9992   3% /dev
tmpfs        tmpfs     1557892         0   1557892   0% /dev/shm
/dev/sda2     ext3      186671     40414    136618  23% /boot
/dev/sda12    ext3    10285984   4194632   5568844  43% /home
/dev/sda1     vfat    15716960  13009504   2707456  83% /media/sda1
/dev/sda5     vfat     6285152   5640696    644456  90% /media/sda5
/dev/sda6     vfat     6285152   2488976   3796176  40% /media/sda6
/dev/sda7     ext3    25806268   5533156  18962212  23% /media/sda7
/dev/sda8     vfat    20968704  18195872   2772832  87% /media/sda8
/dev/sda9     ext3     4382840   4160360         0 100% /media/sda9
/dev/sda11    ext3    10317828   5737440   4056272  59% /media/sda11
/dev/sdc2     ext3     6472832   5234524    909504  86% /media/mips_
/dev/sdc3     ext3     1438256    109528   1328728   8% /media/home_
/dev/sdc1     vfat     6563292     61532   6501760   1% /media/homegdium_
/dev/sdb2     ext3     6472832    936492   5207536  16% /media/mips
/dev/sdb3     ext3     1438256    106244   1332012   8% /media/home
/dev/sdb1     vfat     6563292     61532   6501760   1% /media/homegdium


And boot the Glinux kernel without initrd with the "rootwait" argument it says:
PMON> load /dev/fs/ext2@usbg0/boot/vmlinux.32
PMON> g console=tty1 root=/dev/sda2 rootwait video=sm501fb:1024x600@60

 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI removable disk
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 280k freed
scsi 1:0:0:0: Direct-Access    Generic- Multi-Card     1.00 PQ: 0 ANSI: 0 CCS
sd 1:0:0:0: [sdb] Attached SCSI removable disk


Then nothing happens. If I press Enter, the screen still scrolls up.


Boot Glinux kernel with initrd and rootwait argument, it says:
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
Splashy ERROR: Timeout (120 sec) occurred while waiting for a message on the Splashy socket
(!) [  304:    0.000] ---> Caught signal 11 (sent by the kernel) <---
Splashy caught signal number 6. Exiting...


This is the same message as booting without the "rootwait" argument.

Guan Eryu
2009/6/18 Philippe Vachon <phil...@cowpig.ca>

Philippe Vachon

unread,
Jun 18, 2009, 2:39:51 PM6/18/09
to gd...@googlegroups.com
Hi,

Well, the rootwait argument has helped you. You're now hanging when
trying to start init on /dev/sda2. Try starting with init=/bin/sh and
see if you get further. Failing that, I'd have to have a look at how
you've built everything.

Cheers,
Phil
Reply all
Reply to author
Forward
0 new messages