From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PWaUj-00029J-8T for mharc-grub-devel@gnu.org; Sat, 25 Dec 2010 15:13:37 -0500 Received: from [140.186.70.92] (port=59122 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWaUg-00028z-N9 for grub-devel@gnu.org; Sat, 25 Dec 2010 15:13:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWaUf-00031c-I9 for grub-devel@gnu.org; Sat, 25 Dec 2010 15:13:34 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:52560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWaUf-00031O-6C for grub-devel@gnu.org; Sat, 25 Dec 2010 15:13:33 -0500 Received: by wyj26 with SMTP id 26so7928877wyj.0 for ; Sat, 25 Dec 2010 12:13:32 -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:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=Dd0kYkYNlw7OF7tSI+f5VtxQ827LEXgPg5C3hHwGfmo=; b=faRodBr/B3LTd2exCp2Fy69yZC+Wb1LUy0QoM9irzvjfReNw7PElpg5BTh1hBAKxgW X6M/dSQ5wCZ1HMrg97+9i8waziGZvN6TWTLZVLxM1L4M1DPEFHFyQrXcsWA8twg/jfxG b2vH6+FLkCvz5E9jTbrm0Iq+KtIG6wSLgSCTc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=mWWCjA3tH2Q6uKzZUNovBAPxbHNiW71voBQMvF8uA/nn/KyMy69O+9zSbOSyd6CqB1 8OIQEjQqea1WMKCjUdnNRZ73Qz8W+CZknycamMfdp+CMHJvKgvqZnRG0RqkqBDkWrwr6 PRRtn32GeW0R3aDo1DU/2yGTqWNYrsOv8Daoc= Received: by 10.216.37.8 with SMTP id x8mr7614203wea.30.1293308012457; Sat, 25 Dec 2010 12:13:32 -0800 (PST) Received: from debian.bg45.phnet (12-131.62-81.cust.bluewin.ch [81.62.131.12]) by mx.google.com with ESMTPS id t11sm4439024wes.17.2010.12.25.12.13.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 25 Dec 2010 12:13:31 -0800 (PST) Message-ID: <4D16505E.3050209@gmail.com> Date: Sat, 25 Dec 2010 21:13:18 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101211 Icedove/3.0.11 MIME-Version: 1.0 To: =?UTF-8?B?Tmljb2xhcyBkZSBQZXNsb8O8YW4=?= References: <4D0FB8A2.5060407@gmail.com> <4D15E5C9.8000501@gmail.com> <4D164CC5.1090105@gmail.com> In-Reply-To: <4D164CC5.1090105@gmail.com> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigDB9C41D656B37BB426C84B30" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: The development of GNU GRUB Subject: Re: 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: Sat, 25 Dec 2010 20:13:35 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDB9C41D656B37BB426C84B30 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >>> 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). >> grub_usb_bulk_write does exactly this. However it's not to be exported= >> as a command > > Whould you support adding such command? > > usb_bulk_write > usb bus/address is assigned on runtime and depends on enumeration order so no way to know it in advance for sure. If usbid =3D vendor/device id then it's posssible although doesn't seem optimal. Which interface does usb-modeswitch use? >>> Contrary to USBModeSwitch that use a database at runtime to decide ho= w >>> to switch the device, it is probably easier to decide this at >>> grub-mkconfig time, using the same database. >>> >> Doing any USB detection at grub-mkconfig time is a bad idea. USB is in= >> flux and you can't possibly know e.g. the address of target device on >> runtime. On the other hand it should be easy to write a parser for >> device_reference.txt. > > Yes, you are right. I didn't plan to try and use a fixed USB address. > But, it sounds reasonable to assume that, for a given user, the device > is always the same (usb id). So, the usb id of the device, the > endpoint number and the string to send to the endpoint could be > selected at grub-mkconfig time and given as arguments to the grub > command I plan to create. > I still don't a clear grasp of target usecases and hence of the appropriate ways to autoconfig. >> It's also probably easier to write something that small from scratch >> than to port it (all the >> value is in the database, not code). Another question is how much >> autoconfigured it should be. >> Some people may prefer these devices be in non-storage mode as >> usually the only thing they store >> are useless buggy drivers. > > The kind of device I know provides two different modes: > > - default mode, where the device is seen as a CD reader and gives > access to a virtual CD that hold the Windows drivers for the device. > (Mostly useless, from a non Windows point of view). > - switched mode, where the device is seen as a 3G modem plus a > micro-SD card reader. I plan to boot from this micro-SD card. > > From a grub point of view, deciding to switch or to stay to the > default mode depends on whether the "kernel" one plan to boot is > located on a normal device or one a device that need to be switched > prior to be usable. > > So the switch command should only be incorporated into the menu entry > that is designed to boot on the switchable device that hold the > micro-SD card. Interesting possibility. Perhaps such devices could be scanned on runtime and we look at present files. > > And by the way, it is possible to virtually "burn" an ISO image into > the device, so it is possible to use the virtual CD reader to hold > grub. But that is another story. > I've vaguely heard that this way you can actually change the device firmware so I wouldn't exepriment with this unless I can allow myself brick the device in question (I actually have one such device) > Nicolas. > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigDB9C41D656B37BB426C84B30 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.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk0WUF4ACgkQNak7dOguQgkUswD+IsSV9tnpMY0dz1kpFHUBbA7w OyvSJZER8/NHraIFC4QBAKqerD9QGWKwJm8fV2azm6/0y/y9bwQzhlY7KmxG/vXl =WICF -----END PGP SIGNATURE----- --------------enigDB9C41D656B37BB426C84B30--