Created
September 2, 2016 11:13
-
-
Save tokkenno/219e53c61ca91e2ed2dd31b9c4be2fcd to your computer and use it in GitHub Desktop.
Compile an assambler file to be booted from a floppy or cdrom (ISO file).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| nasm -f bin -o os.bin src/os.asm | |
| dd if=/dev/zero of=floppy.img bs=1024 count=1440 | |
| dd if=os.bin of=floppy.img seek=0 count=1 conv=notrunc | |
| rm os.bin | |
| mkdir iso | |
| cp floppy.img dist/floppy.img | |
| mv floppy.img iso/floppy.img | |
| genisoimage -quiet -V 'MYOS' -input-charset iso8859-1 -o dist/cdrom.iso -b floppy.img -hide floppy.img iso/ | |
| rm -R iso |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment