| trunk/i386/boot0/boot0.s |
| 313 | 313 | jne .Pass2 |
| 314 | 314 | |
| 315 | 315 | .Pass1: |
| 316 | %ifdef HFSFIRST |
| 317 | cmp BYTE [si + part.type], kPartTypeHFS ; In pass 1 we're going to find a HFS+ partition |
| 318 | ; equipped with boot1h in its boot record |
| 319 | ; regardless if it's active or not. |
| 320 | jne .continue |
| 321 | mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature. |
| 322 | %else |
| 316 | 323 | cmp BYTE [si + part.bootid], kPartActive ; In pass 1 we are walking on the standard path |
| 317 | | jne .continue ; by trying to hop on the active partition. |
| 318 | | xor dh, dh ; Argument for loadBootSector to skip HFS+ partition |
| 319 | | ; signature check. |
| 324 | ; by trying to hop on the active partition. |
| 325 | jne .continue |
| 326 | xor dh, dh ; Argument for loadBootSector to skip HFS+ partition |
| 327 | ; signature check. |
| 328 | %endif |
| 329 | |
| 320 | 330 | jmp .tryToBoot |
| 321 | 331 | |
| 322 | 332 | .Pass2: |
| 323 | | ; cmp BYTE [si + part.type], kPartTypeHFS ; In pass 2 we're going to find a HFS+ partition |
| 324 | | ; jne .continue ; equipped with boot1h in its boot record |
| 325 | | ; ; regardless if it's active or not. |
| 326 | | mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature. |
| 333 | %ifdef HFSFIRST |
| 334 | cmp BYTE [si + part.bootid], kPartActive ; In pass 2 we are walking on the standard path |
| 335 | ; by trying to hop on the active partition. |
| 336 | jne .continue |
| 337 | xor dh, dh ; Argument for loadBootSector to skip HFS+ partition |
| 338 | ; signature check. |
| 339 | %else |
| 340 | cmp BYTE [si + part.type], kPartTypeHFS ; In pass 2 we're going to find a HFS+ partition |
| 341 | ; equipped with boot1h in its boot record |
| 342 | ; regardless if it's active or not. |
| 343 | jne .continue |
| 344 | mov dh, 1 ; Argument for loadBootSector to check HFS+ partition signature. |
| 345 | %endif |
| 327 | 346 | |
| 328 | 347 | DebugChar('*') |
| 329 | 348 | |
| ... | ... | |
| 755 | 774 | |
| 756 | 775 | %if VERBOSE |
| 757 | 776 | gpt_str db 'GPT', 0 |
| 758 | | test_str db 'testing', 0 |
| 777 | test_str db 'test', 0 |
| 759 | 778 | done_str db 'done', 0 |
| 760 | 779 | %endif |
| 761 | 780 | |
| ... | ... | |
| 773 | 792 | pad_boot: |
| 774 | 793 | times 440-($-$$) db 0 |
| 775 | 794 | |
| 776 | | %ifdef FLOPPY |
| 777 | | ;-------------------------------------------------------------------------- |
| 778 | | ; Put fake partition entries for the bootable floppy image |
| 779 | | ; |
| 780 | | part1bootid db 0x80 ; first partition active |
| 781 | | part1head db 0x00 ; head # |
| 782 | | part1sect db 0x02 ; sector # (low 6 bits) |
| 783 | | part1cyl db 0x00 ; cylinder # (+ high 2 bits of above) |
| 784 | | part1systid db 0xab ; Apple boot partition |
| 785 | | times 3 db 0x00 ; ignore head/cyl/sect #'s |
| 786 | | part1relsect dd 0x00000001 ; start at sector 1 |
| 787 | | part1numsect dd 0x00000080 ; 64K for booter |
| 788 | | part2bootid db 0x00 ; not active |
| 789 | | times 3 db 0x00 ; ignore head/cyl/sect #'s |
| 790 | | part2systid db 0xa8 ; Apple UFS partition |
| 791 | | times 3 db 0x00 ; ignore head/cyl/sect #'s |
| 792 | | part2relsect dd 0x00000082 ; start after booter |
| 793 | | ; part2numsect dd 0x00000abe ; 1.44MB - 65K |
| 794 | | part2numsect dd 0x000015fe ; 2.88MB - 65K |
| 795 | | %endif |
| 796 | | |
| 797 | 795 | pad_table_and_sig: |
| 798 | 796 | times 510-($-$$) db 0 |
| 799 | 797 | dw kBootSignature |
| trunk/i386/boot0/Makefile |
| 6 | 6 | INSTALLDIR = $(DSTROOT)/usr/standalone/i386 |
| 7 | 7 | DIRS_NEEDED = $(SYMROOT) |
| 8 | 8 | |
| 9 | | all embedtheme: $(DIRS_NEEDED) boot0 chain0 |
| 9 | all embedtheme: $(DIRS_NEEDED) boot0 boot0hfs chain0 |
| 10 | 10 | |
| 11 | 11 | boot0: boot0.s Makefile $(NASM) |
| 12 | 12 | $(NASM) boot0.s -o $(SYMROOT)/$@ |
| 13 | 13 | |
| 14 | boot0hfs: boot0.s Makefile $(NASM) |
| 15 | $(NASM) boot0.s -DHFSFIRST -o $(SYMROOT)/$@ |
| 16 | |
| 14 | 17 | chain0: chain0.s Makefile $(NASM) |
| 15 | 18 | $(NASM) chain0.s -o $(SYMROOT)/$@ |
| 16 | 19 | |
| 17 | 20 | |