Skip to contentSkip to conversation

Using grub on fuloong 6004

DISCUSSION David Kuehling 2 participants 11 messages Jul 23, 2011 – Sep 29, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

I've been unsuccessful so far with making grub work on my Fuloong 6004 box. What I tried first wast the 'grub-yeeloong' package of debian squeeze, building a grub.elf as described in the debian-yeeloong wiki
[1] (i.e. grub-mkimage --format=mipsel-yeeloong-elf ...)

The resulting grub.elf only shows a black screen when loaded from pmon, and doesn't show any reactions.

Then I found some mailinglist threads that refer to --format=mipsel-fuloong-elf (i.e. not "yeeloong"). Only the bzr trunk seems to have support for that. Tried this thursday's trunk version, and built my image using

  sudo grub-mkimage  --config=/boot/grub.elf.conf \
     --output=/boot/grub3.elf --format=mipsel-fuloong-elf --verbose \
      ata part_msdos ext2 reboot halt lspci ohci usbtest usbms linux \
      fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum

My /boot/grub.elf.conf reads

set root=ata0,msdos1
set prefix=($root)/grub

My /boot partition is /dev/sda (ext3).

however, this image now blanks the screen and shortly after reboots the fuloong when loaded from the pmon menu.

Am I doing anything wrong? Is Fuloong support known to be not (fully) functional?

cheers,

David

[1] http://wiki.debian.org/DebianYeeloong/HowTo/Install

Signature · 2 lines
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40
#1 lore raw
Quoted 15 lines · David Kuehling

Hi,

I've been unsuccessful so far with making grub work on my Fuloong 6004 box. What I tried first wast the 'grub-yeeloong' package of debian squeeze, building a grub.elf as described in the debian-yeeloong wiki
[1] (i.e. grub-mkimage --format=mipsel-yeeloong-elf ...)

The resulting grub.elf only shows a black screen when loaded from pmon, and doesn't show any reactions.

Then I found some mailinglist threads that refer to --format=mipsel-fuloong-elf (i.e. not "yeeloong"). Only the bzr trunk seems to have support for that. Tried this thursday's trunk version, and built my image using

Quoted 5 lines
  sudo grub-mkimage  --config=/boot/grub.elf.conf \
     --output=/boot/grub3.elf --format=mipsel-fuloong-elf --verbose \
      ata part_msdos ext2 reboot halt lspci ohci usbtest usbms linux \
      fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum

ata was renamed to pata.

Quoted 5 lines

My /boot/grub.elf.conf reads

set root=ata0,msdos1
set prefix=($root)/grub

Quoted 7 lines

My /boot partition is /dev/sda (ext3).

however, this image now blanks the screen and shortly after reboots the fuloong when loaded from the pmon menu.

Am I doing anything wrong? Is Fuloong support known to be not (fully) functional?

Fuloong 2F support was fully functional when it was merged. It's possible though that there was a recent regression. I'll retest today.

Quoted 11 lines

cheers,

David

[1] http://wiki.debian.org/DebianYeeloong/HowTo/Install

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

sudo grub-mkimage --config=/boot/grub.elf.conf \
--output=/boot/grub3.elf --format=mipsel-fuloong-elf --verbose \ ata part_msdos ext2 reboot halt lspci ohci usbtest usbms linux \ fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum

ata was renamed to pata.

Just recreated my grub.elf with ata in the grub.elf.conf replaced by pata, plus 'pata' module added to the grub-mkimage command line.

Now the grub blanks the screen and hangs when loaded from pmon.

Maybe I should add that I'm using a 750GB hard-disk with 4k sectors in my Fuloong. Could that be a problem? It's neigher a problem for pmon nor for linux, though.

cheers,

David

Signature · 2 lines
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40
#3 lore raw
Quoted 11 lines · David Kuehling
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

sudo grub-mkimage --config=/boot/grub.elf.conf \
--output=/boot/grub3.elf --format=mipsel-fuloong-elf --verbose \ ata part_msdos ext2 reboot halt lspci ohci usbtest usbms linux \ fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum

ata was renamed to pata.

Just recreated my grub.elf with ata in the grub.elf.conf replaced by pata, plus 'pata' module added to the grub-mkimage command line.

Now the grub blanks the screen and hangs when loaded from pmon.

There is a regression between r3284 and r3384. Bisecting it.

Quoted 3 lines

Maybe I should add that I'm using a 750GB hard-disk with 4k sectors in my Fuloong. Could that be a problem? It's neigher a problem for pmon nor for linux, though.

I have no such disk. We have support for 4K-sector disks but I'm not sure if it works with our ATA but if it doesn't it's trivial to fix. Just regressions first.

Quoted 9 lines

cheers,

David

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#4 lore raw
In reply to David Kuehling
Quoted 6 lines · David Kuehling
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

sudo grub-mkimage --config=/boot/grub.elf.conf \
--output=/boot/grub3.elf --format=mipsel-fuloong-elf --verbose \ ata part_msdos ext2 reboot halt lspci ohci usbtest usbms linux \ fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum

Quoted 6 lines
Quoted 1 line

ata was renamed to pata.

Just recreated my grub.elf with ata in the grub.elf.conf replaced by pata, plus 'pata' module added to the grub-mkimage command line.

Now the grub blanks the screen and hangs when loaded from pmon.

I've fixed 2 regressions in trunk.

Quoted 3 lines

Maybe I should add that I'm using a 750GB hard-disk with 4k sectors in my Fuloong. Could that be a problem? It's neigher a problem for pmon nor for linux, though.

I'm attaching a patch which should add the support for 4K sectors with ATA.

Quoted 9 lines

cheers,

David

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'grub-core/disk/ata.c'

disk/ata.c +20 -3
@@ -57,6 +57,7 @@
     {
       grub_dprintf ("ata", "Addressing: %d\n", dev->addr);
       grub_dprintf ("ata", "Sectors: %lld\n", (unsigned long long) dev->size);
+      grub_dprintf ("ata", "Sector size: %u\n", 1U << dev->log_sector_size);
     }
 }
 
@@ -170,6 +171,21 @@
   else
     dev->size = grub_le_to_cpu64(*((grub_uint64_t *) &info16[100]));
 
+  if (info16[106] & (1 << 12))
+    {
+      grub_uint32_t secsize;
+      secsize = grub_le_to_cpu32 (*((grub_uint32_t *) &info16[117]));
+      if (secsize & (secsize - 1) || !secsize
+	  || secsize > 1048576)
+	secsize = 256;
+      for (dev->log_sector_size = 0;
+	   (1U << dev->log_sector_size) < secsize;
+	   dev->log_sector_size++);
+      dev->log_sector_size++;
+    }
+  else
+    dev->log_sector_size = 9;
+
   /* Read CHS information.  */
   dev->cylinders = info16[1];
   dev->heads = info16[3];
@@ -314,7 +330,7 @@
       grub_ata_setaddress (ata, &parms, sector, batch, addressing);
       parms.taskfile.cmd = (! rw ? cmd : cmd_write);
       parms.buffer = buf;
-      parms.size = batch * GRUB_DISK_SECTOR_SIZE;
+      parms.size = batch << ata->log_sector_size;
       parms.write = rw;
       if (ata->dma)
 	parms.dma = 1;
@@ -322,9 +338,9 @@
       err = ata->dev->readwrite (ata, &parms, 0);
       if (err)
 	return err;
-      if (parms.size != batch * GRUB_DISK_SECTOR_SIZE)
+      if (parms.size != batch << ata->log_sector_size)
 	return grub_error (GRUB_ERR_READ_ERROR, "incomplete read");
-      buf += GRUB_DISK_SECTOR_SIZE * batch;
+      buf += batch << ata->log_sector_size;
       sector += batch;
       nsectors += batch;
     }
@@ -433,6 +449,7 @@
     return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not an ATA harddisk");
 
   disk->total_sectors = ata->size;
+  disk->log_sector_size = ata->log_sector_size;
 
   disk->id = grub_make_scsi_id (id, bus, 0);
 

=== modified file 'include/grub/ata.h'

grub/ata.h +1 -0
@@ -170,6 +170,7 @@
 
   /* Sector count.  */
   grub_uint64_t size;
+  grub_uint32_t log_sector_size;
 
   /* CHS maximums.  */
   grub_uint16_t cylinders;
#5 lore raw
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

Quoted 11 lines · David Kuehling
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

sudo grub-mkimage --config=/boot/grub.elf.conf \
--output=/boot/grub3.elf --format=mipsel-fuloong-elf --verbose \
ata part_msdos ext2 reboot halt lspci ohci usbtest usbms linux \
fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum

ata was renamed to pata.

Just recreated my grub.elf with ata in the grub.elf.conf replaced by pata, plus 'pata' module added to the grub-mkimage command line.

Quoted 8 lines
Quoted 2 lines

Now the grub blanks the screen and hangs when loaded from pmon.

I've fixed 2 regressions in trunk.

Quoted 3 lines

Maybe I should add that I'm using a 750GB hard-disk with 4k sectors in my Fuloong. Could that be a problem? It's neigher a problem for pmon nor for linux, though.

I'm attaching a patch which should add the support for 4K sectors with ATA.

Ok, I tried the new trunk, once with your patch and once without it.

Now grub comes up and displays a prompt, but not a menu. Keyboard doesn't work however, so I cannot do anything with grub yet.

I tried to re-run grub-mkimage with module 'usb_keyboard' and 'ahci' added, but that didn't help, keyboard still not working:

sudo grub-mkimage --config=/boot/grub.elf.conf --output=/boot/grub4-4k.elf --format=mipsel-fuloong-elf --verbose ata pata part_msdos ext2 reboot halt lspci ohci ahci usbtest usbms linux fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum usb_keyboard

grub.elf.conf:

set root=pata0,msdos1
set prefix=($root)/grub

I also ran 'grub-install' once, which put a full set of grub modules to /boot/grub. However, it failed to generate a grub image and complained:

$ sudo /usr/local/sbin/grub-install 
/usr/local/bin/grub-mkimage: error: cannot stat /usr/local/lib/grub/mipsel-loongson/uhci.mod.

according to lsusb, my keyboard is a

Bus 002 Device 003: ID 0b51:0020 Comfort Keyboard Co. Comfort Keyboard

, connected to the top-right usb slot. Other than that only a usb-mouse is also connected. No hubs or other advanced usb-hardware.

Any ideas what's wrong now?

cheers,

David

Signature · 2 lines
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40
#6 lore raw
Quoted 4 lines

Now grub comes up and displays a prompt, but not a menu. Keyboard doesn't work however, so I cannot do anything with grub yet.

You can use the serial

Quoted 3 lines

I tried to re-run grub-mkimage with module 'usb_keyboard' and 'ahci' added, but that didn't help, keyboard still not working:

usb_keyboard was obviously missing so I thought you use serial. Fuloong neither uses nor implements AHCI.

Quoted 9 lines

sudo grub-mkimage --config=/boot/grub.elf.conf --output=/boot/grub4-4k.elf --format=mipsel-fuloong-elf --verbose ata pata part_msdos ext2 reboot halt lspci ohci ahci usbtest usbms linux fat xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum usb_keyboard

grub.elf.conf:

set root=pata0,msdos1
set prefix=($root)/grub

Only module was renamed. Not the names of disks. You can achieve same result much more easily with -p '(ata0,msdos1)/grub'

Quoted 6 lines

I also ran 'grub-install' once, which put a full set of grub modules to /boot/grub. However, it failed to generate a grub image and complained:

$ sudo /usr/local/sbin/grub-install 
/usr/local/bin/grub-mkimage: error: cannot stat /usr/local/lib/grub/mipsel-loongson/uhci.mod.

Fix attached

Quoted 6 lines

according to lsusb, my keyboard is a

Bus 002 Device 003: ID 0b51:0020 Comfort Keyboard Co. Comfort Keyboard

, connected to the top-right usb slot. Other than that only a usb-mouse is also connected. No hubs or other advanced usb-hardware.

Can you try w/o mouse? Can you try with hotplugging keyboard rather than having one on boot?

Quoted 11 lines

Any ideas what's wrong now?

cheers,

David

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'grub-core/disk/ata.c'

disk/ata.c +20 -3
@@ -57,6 +57,7 @@
     {
       grub_dprintf ("ata", "Addressing: %d\n", dev->addr);
       grub_dprintf ("ata", "Sectors: %lld\n", (unsigned long long) dev->size);
+      grub_dprintf ("ata", "Sector size: %u\n", 1U << dev->log_sector_size);
     }
 }
 
@@ -170,6 +171,21 @@
   else
     dev->size = grub_le_to_cpu64(*((grub_uint64_t *) &info16[100]));
 
+  if (info16[106] & (1 << 12))
+    {
+      grub_uint32_t secsize;
+      secsize = grub_le_to_cpu32 (*((grub_uint32_t *) &info16[117]));
+      if (secsize & (secsize - 1) || !secsize
+	  || secsize > 1048576)
+	secsize = 256;
+      for (dev->log_sector_size = 0;
+	   (1U << dev->log_sector_size) < secsize;
+	   dev->log_sector_size++);
+      dev->log_sector_size++;
+    }
+  else
+    dev->log_sector_size = 9;
+
   /* Read CHS information.  */
   dev->cylinders = info16[1];
   dev->heads = info16[3];
@@ -314,7 +330,7 @@
       grub_ata_setaddress (ata, &parms, sector, batch, addressing);
       parms.taskfile.cmd = (! rw ? cmd : cmd_write);
       parms.buffer = buf;
-      parms.size = batch * GRUB_DISK_SECTOR_SIZE;
+      parms.size = batch << ata->log_sector_size;
       parms.write = rw;
       if (ata->dma)
 	parms.dma = 1;
@@ -322,9 +338,9 @@
       err = ata->dev->readwrite (ata, &parms, 0);
       if (err)
 	return err;
-      if (parms.size != batch * GRUB_DISK_SECTOR_SIZE)
+      if (parms.size != batch << ata->log_sector_size)
 	return grub_error (GRUB_ERR_READ_ERROR, "incomplete read");
-      buf += GRUB_DISK_SECTOR_SIZE * batch;
+      buf += batch << ata->log_sector_size;
       sector += batch;
       nsectors += batch;
     }
@@ -433,6 +449,7 @@
     return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not an ATA harddisk");
 
   disk->total_sectors = ata->size;
+  disk->log_sector_size = ata->log_sector_size;
 
   disk->id = grub_make_scsi_id (id, bus, 0);
 

=== modified file 'include/grub/ata.h'

grub/ata.h +1 -0
@@ -170,6 +170,7 @@
 
   /* Sector count.  */
   grub_uint64_t size;
+  grub_uint32_t log_sector_size;
 
   /* CHS maximums.  */
   grub_uint16_t cylinders;

=== modified file 'util/grub-install.in'

grub-install.in +5 -1
@@ -504,7 +504,11 @@
 fi
 
 if [ "x$disk_module" = xnative ]; then
-    disk_module="pata ahci ohci uhci usbms"
+    disk_module="pata ahci ohci"
+    if [ "x$target_cpu" = "xi386" ] || [ "x$target_cpu" = "xx86_64" ]; then
+	disk_module="$disk_module uhci"
+    fi
+    disk_module="$disk_module usbms"
 fi
 
 # The order in this list is critical.  Be careful when modifying it.
#7 lore raw
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

I also ran 'grub-install' once, which put a full set of grub modules to /boot/grub. However, it failed to generate a grub image and complained:

$ sudo /usr/local/sbin/grub-install /usr/local/bin/grub-mkimage:
error: cannot stat /usr/local/lib/grub/mipsel-loongson/uhci.mod.

Fix attached

Ok, with your latest uhci.diff, I can now just run 'grub-install' which leaves a (somewhat) working grub.elf in /boot. Feels like we're getting closer.

This shows the same behaviour like the grub-diy.elf that I generated via grub-mkimage:

- keyoard still not working. Tried plugging in after grub startup, but doesn't help (for grub-diy.elf i had to shortly plug in the keyboard to select it in pmon, so mayb that doesn't count). Also mouse was disconnected.

- menu looks a little grabled (lots of '@' instead of border), but won't complain about that

Grub is already better working than Pmon. Pmon refuses to load some of my kernels without any indication why (seems to have problems depending on image size, sometimes only vmlinux works, vmlinuz doesn't, kernels compiled with -O2 don't work at all, need -Os etc.).

As far as I could test (without keyboard), grub now loads 3 kernels+initrd images that pmon would not load.

cheers,

David

Signature · 2 lines
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40
#8 lore raw
Quoted 13 lines · David Kuehling
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

I also ran 'grub-install' once, which put a full set of grub modules to /boot/grub. However, it failed to generate a grub image and complained:

$ sudo /usr/local/sbin/grub-install /usr/local/bin/grub-mkimage:
error: cannot stat /usr/local/lib/grub/mipsel-loongson/uhci.mod.

Fix attached

Ok, with your latest uhci.diff, I can now just run 'grub-install' which leaves a (somewhat) working grub.elf in /boot. Feels like we're getting closer.

Quoted 8 lines

This shows the same behaviour like the grub-diy.elf that I generated via grub-mkimage:

- keyoard still not working. Tried plugging in after grub startup, but doesn't help (for grub-diy.elf i had to shortly plug in the keyboard to select it in pmon, so mayb that doesn't count). Also mouse was disconnected.

I've been unable to recreate. Keyboard worked fine both when GRUB loaded as ELF and when GRUB is firmware. I've uploaded them to
http://download-mirror.savannah.gnu.org/releases/grub/phcoder/grub.elf
and
http://download-mirror.savannah.gnu.org/releases/grub/phcoder/grub-fuloong.img.
do you see any messages if you set debug=usb,ohci ?

Quoted 3 lines

- menu looks a little grabled (lots of '@' instead of border), but won't complain about that

It just means that no unifont was supplied

Quoted 17 lines

Grub is already better working than Pmon. Pmon refuses to load some of my kernels without any indication why (seems to have problems depending on image size, sometimes only vmlinux works, vmlinuz doesn't, kernels compiled with -O2 don't work at all, need -Os etc.).

As far as I could test (without keyboard), grub now loads 3 kernels+initrd images that pmon would not load.

cheers,

David

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#9 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

[..]

Quoted 11 lines
Quoted 5 lines

- keyoard still not working. Tried plugging in after grub startup, but doesn't help (for grub-diy.elf i had to shortly plug in the keyboard to select it in pmon, so mayb that doesn't count). Also mouse was disconnected.

I've been unable to recreate. Keyboard worked fine both when GRUB loaded as ELF and when GRUB is firmware. I've uploaded them to
http://download-mirror.savannah.gnu.org/releases/grub/phcoder/grub.elf
and
http://download-mirror.savannah.gnu.org/releases/grub/phcoder/grub-fuloong.img.
do you see any messages if you set debug=usb,ohci ?

If I use your grub.elf, it just prints something like 'Press Esc to skip loading grub.cfg from hard-disk', then waits a few seconds, then the screen gets black and the hdd led light flickers and it's trying to boot something without success. Pressing Esc on the keyboard doesn not have any observable effect.

I tried with 4 different keyboards with no success.

With my own grub.elf, adding debug=usb,ohci to my /boot/grub/grub.cfg does not produce any output, but maybe it's just hidden by the menu showing up? Anything that I can do to be sure to see messages? Redirect them to the serial port?

Just to be sure, I now updated my grub.cfg to contain

insmod ohci
insmod usb
insmod usb_keyboard
[..]
terminal_input usb_keyboard

Which was generated from usr/local/etc/default/grub via the lines

GRUB_TERMINAL_INPUT=usb_keyboard
GRUB_PRELOAD_MODULES="ohci usb usb_keyboard"

The debug= lines I added before insmod ohci (but of course it's gone after update-grub).

In case it is of any help, I attach 'lspci -vv' and 'lsusb -vv' output.

Quoted 4 lines
Quoted 3 lines

- menu looks a little grabled (lots of '@' instead of border), but won't complain about that

It just means that no unifont was supplied

Yeah, with my dm-crypt partitions, grub has no chance to access its fonts. Moved them to /boot and added

GRUB_FONT=/boot/grub/fonts/euro.pf2

to my default/grub, now that part is fixed (I wonder why you don't copy fonts to /boot when you detect partitions unaccessible to grub in 00_header. debian's grub.d/05_debian_theme applies such a handling to the splash images, copying them if neccessary).

BTW the device.map file is still misgenerated by grub-mkdevmap on loongson. It writes 'hd0' where it should use 'ata0'.

cheers,

David

Signature · 2 lines
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

00:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
Subsystem: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 64 (8000ns min, 16000ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 36
Region 0: I/O ports at 4000 [size=256]
Region 1: Memory at 50072000 (32-bit, non-prefetchable) [size=256]
Expansion ROM at 50040000 [size=128K]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1+,D2+,D3hot+,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: r8169

00:08.0 VGA compatible controller: Silicon Integrated Systems [SiS] 315PRO PCI/AGP VGA Display Adapter (prog-if 00 [VGA controller])

	Subsystem: Device 3030:3030
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 71 (750ns min, 4000ns max)
	Interrupt: pin A routed to IRQ 38
	BIST result: 00
	Region 0: Memory at 40000000 (32-bit, prefetchable) [size=256M]
	Region 1: Memory at 50000000 (32-bit, non-prefetchable) [size=256K]
	Region 2: I/O ports at 4800 [size=128]
	Expansion ROM at 50060000 [size=64K]
	Capabilities: [40] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: sisfb

00:0e.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA (rev 03)

	Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA
	Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Region 0: I/O ports at 4cf0 [size=8]
	Region 1: I/O ports at 4400 [size=256]
	Region 2: I/O ports at 4c80 [size=64]
	Region 4: I/O ports at 4880 [size=128]
	Region 5: I/O ports at 4cc0 [size=32]

00:0e.2 IDE interface: Advanced Micro Devices [AMD] CS5536 [Geode companion] IDE (rev 01) (prog-if 80 [Master])

	Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] IDE
	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64 (16000ns max), Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 14
	Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
	Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
	Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
	Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
	Region 4: I/O ports at 4ce0 [size=16]
	Kernel driver in use: pata_amd

00:0e.3 Multimedia audio controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio (rev 01)
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0 (16000ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 9
Region 0: I/O ports at 4c00 [size=128]
Kernel driver in use: cs5535audio

00:0e.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC (rev 02) (prog-if 10 [OHCI])
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0 (16000ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 11
Region 0: Memory at 50070000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: ohci_hcd

00:0e.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC (rev 02) (prog-if 20 [EHCI])
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0 (16000ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 11
Region 0: Memory at 50071000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: ehci_hcd

Bus 002 Device 002: ID 0b51:0020 Comfort Keyboard Co. Comfort Keyboard Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10

  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0b51 Comfort Keyboard Co.
  idProduct          0x0020 Comfort Keyboard
  bcdDevice            1.00
  iManufacturer           1 Comfort Keyboard Company
  iProduct                2 Comfort Keyboard System
  iSerial                 0 
  bNumConfigurations      1

Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 54
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 20
Device Status: 0x0000
(Bus Powered)

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10

  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0001 1.1 root hub
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.39.3-dk5 ohci_hcd
  iProduct                2 OHCI Host Controller
  iSerial                 1 0000:00:0e.4
  bNumConfigurations      1

Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x0002
No power switching (usb 1.0)
Ganged overcurrent protection
bPwrOn2PwrGood 16 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0103 power enable connect
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00

  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.39.3-dk5 ehci_hcd
  iProduct                2 EHCI Host Controller
  iSerial                 1 0000:00:0e.5
  bNumConfigurations      1

Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x0009
Per-port power switching
Per-port overcurrent protection
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled

#10 lore raw
Quoted 13 lines · David Kuehling
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vladimir" == Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> writes:

[..]

Quoted 11 lines
Quoted 5 lines

- keyoard still not working. Tried plugging in after grub startup, but doesn't help (for grub-diy.elf i had to shortly plug in the keyboard to select it in pmon, so mayb that doesn't count). Also mouse was disconnected.

I've been unable to recreate. Keyboard worked fine both when GRUB loaded as ELF and when GRUB is firmware. I've uploaded them to
http://download-mirror.savannah.gnu.org/releases/grub/phcoder/grub.elf
and
http://download-mirror.savannah.gnu.org/releases/grub/phcoder/grub-fuloong.img.
do you see any messages if you set debug=usb,ohci ?

Quoted 4 lines

If I use your grub.elf, it just prints something like 'Press Esc to skip loading grub.cfg from hard-disk', then waits a few seconds, then the screen gets black and the hdd led light flickers and it's trying to boot something without success.

That's because you have a separate /boot and the version I uploaded looks only for /boot/grub/grub.cfg, not /grub/grub.cfg and in case of failure it retries. So other than keyboard not working it works as expected.

Quoted 5 lines

Pressing Esc on the keyboard doesn not have
any observable effect.

I tried with 4 different keyboards with no success.

That's weird given that code works with several keyboards here and also on yeeloong.

Quoted 4 lines

With my own grub.elf, adding debug=usb,ohci to my /boot/grub/grub.cfg does not produce any output, but maybe it's just hidden by the menu showing up? Anything that I can do to be sure to see messages? Redirect them to the serial port?

As a possibility. Or add an interruptible sleep at the end

Quoted 10 lines

Just to be sure, I now updated my grub.cfg to contain

insmod ohci
insmod usb
insmod usb_keyboard
[..]
terminal_input usb_keyboard

Which was generated from usr/local/etc/default/grub via the lines

Quoted 8 lines

GRUB_TERMINAL_INPUT=usb_keyboard
GRUB_PRELOAD_MODULES="ohci usb usb_keyboard"

The debug= lines I added before insmod ohci (but of course it's gone after update-grub).

In case it is of any help, I attach 'lspci -vv' and 'lsusb -vv' output.

Seems to be same as mine other than keyboard model, of course. In short, I'm puzzled.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

- menu looks a little grabled (lots of '@' instead of border), but won't complain about that

It just means that no unifont was supplied

Yeah, with my dm-crypt partitions, grub has no chance to access its fonts. Moved them to /boot and added

Quoted 6 lines

GRUB_FONT=/boot/grub/fonts/euro.pf2

to my default/grub, now that part is fixed (I wonder why you don't copy fonts to /boot when you detect partitions unaccessible to grub in 00_header. debian's grub.d/05_debian_theme applies such a handling to the splash images, copying them if neccessary).

Because we recommended a too small /boot/grub partition on PowerMacs in the past.

Quoted 2 lines

BTW the device.map file is still misgenerated by grub-mkdevmap on loongson. It writes 'hd0' where it should use 'ata0'.

doesn't matter as long as UUIDs are correct.

Quoted 9 lines

cheers,

David

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko