Re: Booting from g_file_storage in cdrom mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 Dec 2009 10:39:58 -0500 (EST)
Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> Originally I wrote the cdrom additions using a 2048-byte block size.  
> This turned out to be quite messy, and when I realized that the SCSI
> spec allows a CD drive to use 512-byte blocks I gladly removed all the
> support for larger sectors.
What worth has a standard if so many people do not care?
It is messy because constants are spread all over the code. My patch
does not make that better. I do not see a reason why not at least put the
512, 9  and all calculated 2048/512=4 into constants (which should not 
increase runtime) 
or variables (to be set according to the cdrom parameter).
 That would prevent a lot of mess.
Before I start cleaning up, I would like to hear an opinion on this.

If every BIOS would boot from every usb stick I would not care about the block
size problem. I can put a file_gadget into my pocket but not a cdrom drive.
So to me booting from CDs is very useful.
> 
> > I cleaned up the patch especially the sector size stuff and with that patch 
> > I have installed ubuntu from a g_file_storage_gadget in cdrom mode successfully.
> 
> Of course you didn't bother to change do_write() and a bunch of other 
> places.  Doing it properly means reintroducing all that mess, which I'm 
> not anxious to do.

Even wodim dev=/dev/scdX -toc fails, so if you want to have cd write support,
there seems to be still a lot to do.

Greetings
Andreas Kemnade

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux