From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QkwzQ-0005Mi-P3 for mharc-grub-devel@gnu.org; Sun, 24 Jul 2011 07:36:56 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkwzO-0005Mc-95 for grub-devel@gnu.org; Sun, 24 Jul 2011 07:36:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkwzM-0000yJ-Sb for grub-devel@gnu.org; Sun, 24 Jul 2011 07:36:54 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:40168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkwzM-0000xx-Gx for grub-devel@gnu.org; Sun, 24 Jul 2011 07:36:52 -0400 Received: by wwf22 with SMTP id 22so2674455wwf.30 for ; Sun, 24 Jul 2011 04:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=LUtu64XkoiqzG8ttj7kpQ4IcexVakyKw0OhPwTgTUG8=; b=SoPQpeEkCNsW42My4xzroM/TKpnn//JJ+ThAMtIuBoRBXYkv+9wPHDA5qCf0yoEjZO q2xSIVs/IL8CVsrRpJRfytz20mfEc+lBBU8IO7VK9TrkeqvrfSq6/M4OezWWMHyxUlhj iMY21FImJgMeztm4I2AQpOBO5UEGYlJo+KWpM= Received: by 10.216.74.74 with SMTP id w52mr2723117wed.113.1311507410189; Sun, 24 Jul 2011 04:36:50 -0700 (PDT) Received: from debian.x201.phnet (141-65.203-62.cust.bluewin.ch [62.203.65.141]) by mx.google.com with ESMTPS id u46sm844200wec.1.2011.07.24.04.36.47 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 24 Jul 2011 04:36:49 -0700 (PDT) Message-ID: <4E2C03CB.1000900@gmail.com> Date: Sun, 24 Jul 2011 13:36:43 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Using grub on fuloong 6004 References: <87sjpxuu9j.fsf@snail.Pool> <4E2AB7C1.5070305@gmail.com> <87oc0luope.fsf@snail.Pool> <4E2AF535.6090500@gmail.com> <87fwlwx827.fsf@snail.Pool> In-Reply-To: <87fwlwx827.fsf@snail.Pool> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigF11469349DBDB4FE2B5AAF4D" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2011 11:36:55 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF11469349DBDB4FE2B5AAF4D Content-Type: multipart/mixed; boundary="------------060002030204040804030600" This is a multi-part message in MIME format. --------------060002030204040804030600 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > 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 > 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. > sudo grub-mkimage --config=3D/boot/grub.elf.conf > --output=3D/boot/grub4-4k.elf --format=3Dmipsel-fuloong-elf --verbose a= ta > pata part_msdos ext2 reboot halt lspci ohci ahci usbtest usbms linux fa= t > xfs part_gpt multiboot2 minicmd configfile gcry_md5 hashsum usb_keyboar= d > > grub.elf.conf: > > set root=3Dpata0,msdos1 > set prefix=3D($root)/grub Only module was renamed. Not the names of disks. You can achieve same result much more easily with -p '(ata0,msdos1)/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=20 > /usr/local/bin/grub-mkimage: error: cannot stat /usr/local/lib/grub/mip= sel-loongson/uhci.mod. > Fix attached > 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-mous= e > 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? > Any ideas what's wrong now? > > cheers, > > David > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------060002030204040804030600 Content-Type: text/x-diff; name="uhci.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="uhci.diff" =3D=3D=3D modified file 'grub-core/disk/ata.c' --- grub-core/disk/ata.c 2011-07-07 19:46:25 +0000 +++ grub-core/disk/ata.c 2011-07-23 16:17:06 +0000 @@ -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_si= ze); } } =20 @@ -170,6 +171,21 @@ else dev->size =3D grub_le_to_cpu64(*((grub_uint64_t *) &info16[100])); =20 + if (info16[106] & (1 << 12)) + { + grub_uint32_t secsize; + secsize =3D grub_le_to_cpu32 (*((grub_uint32_t *) &info16[117])); + if (secsize & (secsize - 1) || !secsize + || secsize > 1048576) + secsize =3D 256; + for (dev->log_sector_size =3D 0; + (1U << dev->log_sector_size) < secsize; + dev->log_sector_size++); + dev->log_sector_size++; + } + else + dev->log_sector_size =3D 9; + /* Read CHS information. */ dev->cylinders =3D info16[1]; dev->heads =3D info16[3]; @@ -314,7 +330,7 @@ grub_ata_setaddress (ata, &parms, sector, batch, addressing); parms.taskfile.cmd =3D (! rw ? cmd : cmd_write); parms.buffer =3D buf; - parms.size =3D batch * GRUB_DISK_SECTOR_SIZE; + parms.size =3D batch << ata->log_sector_size; parms.write =3D rw; if (ata->dma) parms.dma =3D 1; @@ -322,9 +338,9 @@ err =3D ata->dev->readwrite (ata, &parms, 0); if (err) return err; - if (parms.size !=3D batch * GRUB_DISK_SECTOR_SIZE) + if (parms.size !=3D batch << ata->log_sector_size) return grub_error (GRUB_ERR_READ_ERROR, "incomplete read"); - buf +=3D GRUB_DISK_SECTOR_SIZE * batch; + buf +=3D batch << ata->log_sector_size; sector +=3D batch; nsectors +=3D batch; } @@ -433,6 +449,7 @@ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not an ATA harddisk"); =20 disk->total_sectors =3D ata->size; + disk->log_sector_size =3D ata->log_sector_size; =20 disk->id =3D grub_make_scsi_id (id, bus, 0); =20 =3D=3D=3D modified file 'include/grub/ata.h' --- include/grub/ata.h 2011-07-07 10:21:53 +0000 +++ include/grub/ata.h 2011-07-23 15:38:46 +0000 @@ -170,6 +170,7 @@ =20 /* Sector count. */ grub_uint64_t size; + grub_uint32_t log_sector_size; =20 /* CHS maximums. */ grub_uint16_t cylinders; =3D=3D=3D modified file 'util/grub-install.in' --- util/grub-install.in 2011-07-10 14:06:31 +0000 +++ util/grub-install.in 2011-07-24 11:35:39 +0000 @@ -504,7 +504,11 @@ fi =20 if [ "x$disk_module" =3D xnative ]; then - disk_module=3D"pata ahci ohci uhci usbms" + disk_module=3D"pata ahci ohci" + if [ "x$target_cpu" =3D "xi386" ] || [ "x$target_cpu" =3D "xx86_64" = ]; then + disk_module=3D"$disk_module uhci" + fi + disk_module=3D"$disk_module usbms" fi =20 # The order in this list is critical. Be careful when modifying it. --------------060002030204040804030600-- --------------enigF11469349DBDB4FE2B5AAF4D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk4sA8sACgkQNak7dOguQglnMQD/UXRHuNi7orLlhScMAZStTJ4t Z2uuEJIQ9fQ6aOORdRQA/1OO9zKJkY63ZV7MSTQh7qMmAYyizUqOpAunfJDNW8PJ =1GXE -----END PGP SIGNATURE----- --------------enigF11469349DBDB4FE2B5AAF4D--