THE GOALS
- Implement in no more than 512 bytes a bootsector that will work on BOTH FAT12 and FAT16 formatted media. The bootsector must detect at runtime which filesystem type it is running on and act appropriately. This bootsector must be self contained; for example, it cannot load an additional sector to handle FAT16 operations.
- Scan for a file named "OSLOADER " in the root directory.
- OSLOADER is a statically linked 32 bit ELF file. Parse the headers and load the file accordingly. Several sample files will be provided at a later date to test your bootsector against. None of these files will have load addresses above the first megabyte.
- Jump to the ELF entry point.
- Use only instructions available on the i386.
- The bootsector must of course work on REAL HARDWARE as well as ALL major emulators (bochs, qemu, virtual pc, virtualbox, vmware). I know someone that happens to have a very very picky i486 laptop that refuses to boot most modern bootsectors.
- You may make NO assumptions about the filesystem (beyond that it is either FAT12 or FAT16), the boot media (beyond that it will be no larger than 8GB), the hardware, or the OSLOADER, with one further exception. The size of the OSLOADER is guaranteed to be no more than 128K.
- Be able to load and execute a 32-bit ELF file of any size that is also linked above the first megabyte.
- The contest entry deadline is 23:59 April 30 2010 UTC. To be fair to everyone involved, and to give everyone a chance to see this contest announcement, no entries will be accepted before 23:59 Jan 30 2010 UTC. Sample files to be used to test your bootsector will be posted after this date. At this time, a list of hardware used to test entries will be made available.
- All entries MUST be ISC licensed. This is because "public domain" does not exist in all countries, and the ISC license is about as close as you can get to public domain.
- Entries must compile with either nasm (version 2.05 or later) or GNU binutils (version 2.15 or later). Include in your entry the proper command line to compile the source code. Both AT&T and Intel syntaxes are allowed.
- All entries MUST be liberally commented. Highly optimized assembly, as these entries are expected to be, can be quite hard to follow. Just because you understand it, doesn't mean anyone else will. An entry that accomplishes all the goals but is not commented will be disqualified.
- All entries MUST be original works. Collaborations are allowed.
- After the contest deadline passes, all submitted entries will be voted on by the OSDev community to select a winner. This vote will be based on the cleanliness of the code, ease of understanding, and code size. Voting will be open for 1 week after the contest deadline passes. Voting will close at 23:59 May 7 2010 UTC.
- The FIRST entry submitted that accomplishes goals 1 through 7 and passes all tests will be declared the winner. A submitted entry that does not pass all tests may be modified and resubmitted.
- There are TWO winners! The first winner is as mentioned above, and the second winner will be announced after community voting has closed. So if someone has already claimed the first prize, you should still submit your entry. It is also possible for the same entry to win twice.
That's right, there's a real prize! Two of them, actually.
- First prize is a $50 gift certificate to amazon.com. The winner will be announced upon submission of a validated working bootsector.
- Second prize is a $25 gift certificate to amazon.com. The winner will be the entry with the most votes at the end of the community voting period.
- In lieu of amazon.com gift certificates, each winner may elect to have a donation made to the Peer Directed Projects Center (the organization behind freenode) in their name.
- Prizes will be awarded within 30 days of each winner being announced.
- In case a winning entry is a collaboration, the prize money will be equally distributed amongst all collaborators.
Publicly reply to this post with your entry as an attachment. Do not send your entry privately (via PM or email), or provide a link to another site that hosts your entry. Make sure your entry contains compilation instructions as well as a means of contacting you if your entry should be a winner.
DISCLAIMER
By submitting an entry, you hereby agree to all contest goals and rules. Contest rules are subject to change without notice, so check back often. In the event of major conflicts between the goals and/or the rules, the contest deadlines may be extended. Clarification of the goals and/or rules will not automatically change any contest deadlines. Under no circumstances will contest deadlines be shortened. By participating in this contest and agreeing to the contest goals and rules, you hereby waive any and all legal rights you may have to challenge, change, sway, or otherwise intimidate the outcome of the contest.
Questions and comments welcome. Reply here, via PM, or hit me up on freenode (where I go by, you guessed it, quok).