Chameleon

Chameleon Commit Details

Date:2014-10-21 17:47:49 (6 years 1 month ago)
Author:ErmaC
Commit:2426
Parents: 2425
Message:Replace "NULL" terminated strings and fit boot2 sectors size
Changes:
M/trunk/i386/boot1/boot1f32.s
M/trunk/i386/boot1/boot1he.s
M/trunk/i386/boot0/boot0.s
M/trunk/i386/boot0/boot0hfs.s
M/trunk/i386/boot0/boot0md.s
M/trunk/CHANGES
M/trunk/i386/boot1/boot1h.s

File differences

trunk/i386/boot0/boot0.s
8888
8989
9090
91
9192
9293
9394
......
764765
765766
766767
767
768768
769769
770770
......
772772
773773
774774
775
776
775777
776778
777779
kPartCountEQU 4; number of paritions per table
kPartTypeHFSEQU 0xaf; HFS+ Filesystem type
kPartTypeABHFSEQU 0xab; Apple_Boot partition
kPartTypePMBREQU 0xee; On all GUID Partition Table disks a Protective MBR (PMBR)
; in LBA 0 (that is, the first block) precedes the
; GUID Partition Table Header to maintain compatibility
; NULL terminated strings.
;
log_title_strdb 10, 13, 'boot0: ', 0
boot_error_str db 'error', 0
%if VERBOSE
gpt_strdb 'GPT', 0
done_strdb 'done', 0
%endif
boot_error_str db 'error', 0
;--------------------------------------------------------------------------
; Pad the rest of the 512 byte sized booter with zeroes. The last
; two bytes is the mandatory boot sector signature.
trunk/i386/boot0/boot0hfs.s
8888
8989
9090
91
9192
9293
9394
......
763764
764765
765766
766
767767
768768
769769
......
771771
772772
773773
774
775
774776
775777
776778
kPartCountEQU 4; number of paritions per table
kPartTypeHFSEQU 0xaf; HFS+ Filesystem type
kPartTypeABHFSEQU 0xab; Apple_Boot partition
kPartTypePMBREQU 0xee; On all GUID Partition Table disks a Protective MBR (PMBR)
; in LBA 0 (that is, the first block) precedes the
; GUID Partition Table Header to maintain compatibility
; NULL terminated strings.
;
log_title_strdb 10, 13, 'boot0: ', 0
boot_error_str db 'error', 0
%if VERBOSE
gpt_strdb 'GPT', 0
done_strdb 'done', 0
%endif
boot_error_str db 'error', 0
;--------------------------------------------------------------------------
; Pad the rest of the 512 byte sized booter with zeroes. The last
; two bytes is the mandatory boot sector signature.
trunk/i386/boot0/boot0md.s
442442
443443
444444
445
445446
446447
447448
448449
449
450
451450
452451
453452
......
868867
869868
870869
871
872870
873871
874872
......
876874
877875
878876
877
878
879879
880880
881881
jne .continue
.tryToBoot:
;
; Found boot partition, read boot sector to memory.
;
.tryToBoot:
call loadBootSector
jne .continue
jmp SHORT initBootLoader
; NULL terminated strings.
;
log_title_strdb 10, 13, 'boot0:', 0
boot_error_str db 'error', 0
gpt_strdb 'GPT', 0
;test_strdb 'test', 0
%endif
boot_error_str db 'error', 0
;--------------------------------------------------------------------------
; Pad the rest of the 512 byte sized booter with zeroes. The last
; two bytes is the mandatory boot sector signature.
trunk/i386/boot1/boot1f32.s
7575
7676
7777
78
78
7979
8080
8181
kBoot1LoadAddrEQU0x7C00; boot1 load address
kBoot1RelocAddrEQU0xE000; boot1 relocated address
kBoot2SectorsEQU(448 * 1024 - 512) / kSectorBytes; max size of 'boot' file in sectors
kBoot2SectorsEQU(480 * 1024 - 512) / kSectorBytes; max size of 'boot' file in sectors
kBoot2SegmentEQU0x2000; boot2 load segment
kBoot2AddressEQUkSectorBytes; boot2 load address
trunk/i386/boot1/boot1he.s
7979
8080
8181
82
82
8383
8484
8585
kBoot1ExtAddrEQUkBoot1RelocAddr + kSectorBytes; boot1 load address for sector 41-47
kHFSPlusBufferEQUkBoot1RelocAddr + kBoot1ExtSize; HFS+ Volume Header address
kBoot2SectorsEQU(448 * 1024 - 512) / kSectorBytes; max size of 'boot' file in sectors
kBoot2SectorsEQU(480 * 1024 - 512) / kSectorBytes; max size of 'boot' file in sectors = 448 but I want 472
kBoot2SegmentEQU0x2000; boot2 load segment
kBoot2AddressEQUkSectorBytes; boot2 load address
trunk/i386/boot1/boot1h.s
977977
978978
979979
980
980
981981
982982
983983
......
14311431
14321432
14331433
1434
1435
1434
1435
14361436
14371437
14381438
;
%if VERBOSE
root_strdb'/boot', NULL
root_strdb'/boot', CR, LF, NULL
%endif
;--------------------------------------------------------------------------
;
%if VERBOSE
log_title_strdbCR, LF, 'boot1: ', NULL
error_strdb'error', NULL
log_title_strdb'boot1: ', NULL
error_strdb'error', NULL
%endif
searchCatalogKeyddkHFSRootFolderID
trunk/CHANGES
1
12
23
34
- Slice and Clover Team : Replace "NULL" terminated strings and fit Boot2 Sectors size
- ErmaC : Update bootargs
- crazybirdy : Fit length for "Loading Darwin"
- meklort : Update align directives to 2^(old_align)

Archive Download the corresponding diff file

Revision: 2426