From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PUm5r-0005LS-VF for mharc-grub-devel@gnu.org; Mon, 20 Dec 2010 15:12:28 -0500 Received: from [140.186.70.92] (port=38324 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUm5o-0005Hx-58 for grub-devel@gnu.org; Mon, 20 Dec 2010 15:12:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUm5m-0001ea-Lt for grub-devel@gnu.org; Mon, 20 Dec 2010 15:12:24 -0500 Received: from mail-ww0-f67.google.com ([74.125.82.67]:39031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUm5m-0001db-HW for grub-devel@gnu.org; Mon, 20 Dec 2010 15:12:22 -0500 Received: by wwb31 with SMTP id 31so928134wwb.6 for ; Mon, 20 Dec 2010 12:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=Mnr/ZfflFvgLeW+lp6RprDCKMYI7O3+cDsmIKw3/Ml0=; b=s8UbEzS95sZxkge+2uiyGNijSvNAK5EjOWwV9Bbs7yNPtfdjHdhpzEmWII+Ms+d5oZ gZEBr/I/Vxs94dwhD+lPc9UVWsp+ZZbIwQs7tXHiNFZMhO++PQw3eVSKwUB/KnlPiLre r6/u3BR11qFHUQAAILbvOEoEV5BOktddIXkTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=kcMpWYR+afOOsgxIPHOkH3NDRYSLapEI9o0M+0Hq7n8+ExHha0q+cHI14QME14lHQt 1CwNx2NXSNWgm6nWjCBpx3hAd6KD2RaXasMAghN5ScHmwUU02/nTN1GDg68iWnfC6PpA 0gfOZi1lVN7lifjpUVf7e2w6cGfvF6ZJrGNv4= Received: by 10.227.147.129 with SMTP id l1mr2856144wbv.26.1292875940994; Mon, 20 Dec 2010 12:12:20 -0800 (PST) Received: from [192.168.0.101] (eab95-4-88-175-177-37.fbx.proxad.net [88.175.177.37]) by mx.google.com with ESMTPS id 11sm3003418wbi.6.2010.12.20.12.12.19 (version=SSLv3 cipher=RC4-MD5); Mon, 20 Dec 2010 12:12:20 -0800 (PST) Message-ID: <4D0FB8A2.5060407@gmail.com> Date: Mon, 20 Dec 2010 21:12:18 +0100 From: =?ISO-8859-1?Q?Nicolas_de_Peslo=FCan?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: USB bulk transfert from GRUB ? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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, 20 Dec 2010 20:12:26 -0000 Hi, Some USB devices require a specific command to be sent (using USB bulk transfer) before they switch to "storage mode". Such devices are switched by USBmodeSwitch (http://www.draisberghof.de/usb_modeswitch/), after the operating system start. USBmodeSwitch use libusb to send the right command to the right USB endpoint, depending on the ID of the USB device. In order to be able to boot from such devices, one needs to switch the device early, before the operating system is started. I think GRUB2 should be the right place for this. For as far as I understand, libusb is available from inside GRUB2, so it shouldn't be really difficult to add a command to initiate a given bulk transfert to a given USB endpoint. (My understanding is that no such command already exists). Contrary to USBModeSwitch that use a database at runtime to decide how to switch the device, it is probably easier to decide this at grub-mkconfig time, using the same database. Of course, I perfectly understand that the first part of GRUB2 cannot be located from this kind of USB devices, because it needs to be loaded before GRUB2 start, and we would face a chicken and egg problem. Any comments ? Nicolas.