From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZROk4-0001fn-Vk for mharc-grub-devel@gnu.org; Mon, 17 Aug 2015 14:02:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZROjz-0001b8-IL for grub-devel@gnu.org; Mon, 17 Aug 2015 14:02:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZROjv-0002dk-0v for grub-devel@gnu.org; Mon, 17 Aug 2015 14:02:35 -0400 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:33015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZROju-0002cl-Ov; Mon, 17 Aug 2015 14:02:30 -0400 Received: by lbbsx3 with SMTP id sx3so87349913lbb.0; Mon, 17 Aug 2015 11:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=nSdsU/WcQ53NlnemW88wcnbjmAKJ5LV598OyBsUy6Ic=; b=idtSyCxFIcfw9RtvA8gDUvNZq+9P8UjaU4W8JGCIcCCLtyMKGxzdEXO/2MactJnAR2 vySuYEdJAbfQcBm6ZJy6QoKJIVmrs0e0dyCe5VhImI1NBEdQkBFWT6hVbChM5qW/dKnK 8aLQ6T63hkKjheCiwP6mqZyhBfu5P8WPnK6trifKIENoWb4ldoM4Ohd7jwdSY81aOVzU /+1lrmwLekt7AYxQiFwQRWcGUHFKigiM9PLdlbQi9kbAuxQ5KynWL4guMjuHxE3Cx0jh N5+l/xj6PQ/kmoFf12E3M6vVtL/sfQ4uCxG/KfdtfppWJytlx7lRgeYvb67hwGB/iuh/ 1uug== X-Received: by 10.152.8.38 with SMTP id o6mr2097095laa.116.1439834549869; Mon, 17 Aug 2015 11:02:29 -0700 (PDT) Received: from [192.168.1.43] (ppp91-76-5-127.pppoe.mtu-net.ru. [91.76.5.127]) by smtp.gmail.com with ESMTPSA id z5sm4107690lag.5.2015.08.17.11.02.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Aug 2015 11:02:29 -0700 (PDT) Message-ID: <55D221B4.9080906@gmail.com> Date: Mon, 17 Aug 2015 21:02:28 +0300 From: Andrei Borzenkov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Mark H Weaver , bug-grub@gnu.org, The development of GNU GRUB Subject: Re: yeeloong: cs5536 (Geode companion) not working in grub master References: <87io8g1p8u.fsf@netris.org> In-Reply-To: <87io8g1p8u.fsf@netris.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22d 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: Mon, 17 Aug 2015 18:02:38 -0000 15.08.2015 19:38, Mark H Weaver пишет: > I'm attempting to get grub working on the Lemote Yeeloong 8101B > (Loongson 2F) as a second-stage bootloader from PMON. > > I have grub-2.02-beta2-499-g4fe8e6d mostly working, with one exception: > none of the devices on the cs5536 (Geode companion) are accessible, > which unfortunately includes the IDE interface for the internal disk. > As far as I understand code, if GRUB wants to have cs5536 and does not find it it stops. If you enter GRUB it means it skipped cs5536 initialization. According to code, it can happen only if grub_arch_memsize != 0. I do not see where GRUB itself sets it before this check. So my only guess that PMON (whatever it is) fills in this field in GRUB header. We could add debug print to verify this. > This grub is able to access filesystems from a thumb drive plugged into > one of the USB ports: the one next to the ethernet jack, which is the > one that is not connected to the cs5536. Grub is unable to access the > other two USB ports, which are connected to the cs5536. > > I'm judging what disks are accessible based on tab completion, trying > various partition names like (hd0,msdos1) (ata0,msdos1), and also using > the 'search' command. > > lspci from grub prints: > > 00:02.0 10ec:8139 [0200] Ethernet Controller > 00:03.0 126f:0712 [0300] VGA Controller > 00:04.0 1033:0035 [0c03] USB Controller [PI 10] > 00:04.1 1033:00e0 [0c03] USB Controller [PI 20] > 00:09.0 1022:208f [ff00] > This is correct; it is the PCI ID that GRUB expects. > whereas "lspci -nn" from my booted system reports: > > 00:07.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ [10ec:8139] (rev 10) > 00:08.0 VGA compatible controller [0300]: Silicon Motion, Inc. SM712 LynxEM+ [126f:0712] (rev b0) > 00:09.0 USB controller [0c03]: NEC Corporation OHCI USB Controller [1033:0035] (rev 44) > 00:09.1 USB controller [0c03]: NEC Corporation uPD72010x USB 2.0 Controller [1033:00e0] (rev 05) > 00:0e.0 ISA bridge [0601]: AMD [Advanced Micro Devices, Inc.] CS5536 [Geode companion] ISA [1022:2090] (rev 03) > 00:0e.2 IDE interface [0101]: AMD [Advanced Micro Devices, Inc.] CS5536 [Geode companion] IDE [1022:209a] (rev 01) > 00:0e.3 Multimedia audio controller [0401]: AMD [Advanced Micro Devices, Inc.] CS5536 [Geode companion] Audio [1022:2093] (rev 01) > 00:0e.4 USB controller [0c03]: AMD [Advanced Micro Devices, Inc.] CS5536 [Geode companion] OHC [1022:2094] (rev 02) > 00:0e.5 USB controller [0c03]: AMD [Advanced Micro Devices, Inc.] CS5536 [Geode companion] EHC [1022:2095] (rev 02) > > I built this grub from GNU Guix, which uses stock GCC 4.9.3 and binutils > 2.25 configured for the N32 ABI. I passed TARGET_CFLAGS="-Os -mabi=32" > and TARGET_CCASFLAGS="-mabi=32" to configure. Here's the command I used > to build the grub image: > > grub-mkimage --prefix='(hd0,0)/boot/grub' \ > --config=grub.elf.conf --output=grub.elf \ > --format=mipsel-yeeloong-elf --verbose ata part_msdos ext2 reboot \ > halt lspci ohci usbtest usbms linux fat xfs part_gpt multiboot2 \ > minicmd configfile gcry_md5 hashsum echo search > > where grub.elf.conf contains: > > set root=hd0,0 > set prefix=($root)/boot/grub > > If it would help, I can provide instructions for how to reproduce the > same toolchain and/or grub using GNU Guix. > > Any ideas or suggestions would be much appreciated. > > Mark > > _______________________________________________ > Bug-grub mailing list > Bug-grub@gnu.org > https://lists.gnu.org/mailman/listinfo/bug-grub >