I want to run my OS from in my USB flash disk.It has been successfully booted and go to the Kernel code.Now it's in protect mode(x86) and how can I read the USB disk?Have I to write a USB driver?I would not like to change the CPU's mode...
Also,I try to read it like ATA disk (through the I/O port 0x1F0--0x1F7) but failed.
friends help me...
How to read the USB flash disk in protect mode?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How to read the USB flash disk in protect mode?
Two sensible options, really.
1:
Just load whatever you might care for from the USB stick into memory using the BIOS before actually launching your kernel, so you don't need a driver later. Ramdisks work pretty much the same way.
1:
2:write a USB driver
Just load whatever you might care for from the USB stick into memory using the BIOS before actually launching your kernel, so you don't need a driver later. Ramdisks work pretty much the same way.
Re: How to read the USB flash disk in protect mode?
You can try http://www.amazon.com/gp/product/1468151983Combuster wrote:1:write a USB driver
Re: How to read the USB flash disk in protect mode?
That book looks pretty ideal for hobby osdev work.
Re: How to read the USB flash disk in protect mode?
The author reviewed his own book and only gave it 4/5osdog wrote:You can try http://www.amazon.com/gp/product/1468151983
Seriously though, has anyone read this book? Is it a good resource?
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
- DavidCooper
- Member
- Posts: 1150
- Joined: Wed Oct 27, 2010 4:53 pm
- Location: Scotland
Re: How to read the USB flash disk in protect mode?
I downloaded the Kindle version a week or two ago when it first came out (I couldn't afford to take a punt on the paper version before that, but I should have known to trust Mike Gonta when he recommended it here a year and a half ago). I've been reading through it repeatedly ever since then, and it certainly does make it all look possible, although there are still more than a few gaps left in my understanding. I reckon it could be the book that saves the hobby OS when EFI takes over, so it's probably an essential purchace, and it does a lot more than it says on the tin. Five stars from me.
I wouldn't want to work with it on a Kindle though - best to download the free program Kindle for PC (from Amazon) to read it on a computer so that you can navigate and scroll through it efficiently, or ideally get a paper version of the book.
As for the author reviewing his own book at Amazon, that was a clear mistake born out of modesty - his rating's the lowest one it's likely to get.
I wouldn't want to work with it on a Kindle though - best to download the free program Kindle for PC (from Amazon) to read it on a computer so that you can navigate and scroll through it efficiently, or ideally get a paper version of the book.
As for the author reviewing his own book at Amazon, that was a clear mistake born out of modesty - his rating's the lowest one it's likely to get.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming