Changeset 35


Ignore:
Timestamp:
Jan 13, 2013, 9:16:10 AM (13 years ago)
Author:
Ben Rietbroek
Message:

Corrected CRC calculations in installers and setaboot [2012-01-21]

Fixes

o Corrected CRC calculations on AiR-BOOT configuration in the

installers and setaboot. They are now v1.07 compatible again.

Note

This commit and all following commits upto and including the RC3
commit [2012-09-09] are delayed commits from a local repository.
Also, the RC (Release Candidate) naming of the corresponding commits
is a bit misleading. One would label a revision with RC when near to
a final release. Since many things have changed between RC1,RC2 & RC3,
these RC's should be interpreted as mile-stones.

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can destroy the MBR on all attached disks!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE ABOVE COMMITS!!

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/AIR-BOOT.ASM

    r34 r35  
    2121; -------------------
    2222;
    23 ; v1.08
    24 ; -----
     23; v1.0.8
     24; ------
     25; - Changed version format to be more WarpIN compatible.
     26;   This is a cosmetic change only.
    2527; - Fixed driveletter feature which was broken in v1.07.
    2628; - Reworked MBR-code to provide two I13X signatures.
    27 ; - Fixes booting older eCS installations on HPFS
    28 ; - Fixes booting Windows when installed in logical partition
     29; - Fixed booting older eCS installations on HPFS
     30; - Fixed booting Windows when installed in logical partition
    2931;   with loader on FAT32.
    3032; - Corrected contact links.
    3133; - Location of AUX parameters has changed.
     34; - Fixed DOS installer (AIRBOOT.COM)
     35;
    3236; NOTE:
    3337;   AB v1.07 had a bug with saving and loading the correct size of the
     
    3539;   wrongly.
    3640;   While AB v1.0.8 fixes this, it has to use the v1.07 way of CRC calculation.
    37 ;   Otherwise SET(A)BOOT from the eCS v2.1 would break and reboot after phase1
    38 ;   would show the boot-menu instead of automatically booting the system
    39 ;   being installed. (SET(A)BOOT would see a corrupted AB config)
     41;   Otherwise SET(A)BOOT from the eCS v2.1 would break because it sees
     42;   a corrupt AiR-BOOT configuration.
    4043;   This means that the CRC over the AB config is calculated over 5 sectors
    4144;   instead of 7, just like in v1.07.
    42 ;   This will be corrected with a future release of eComStation.
    43 ;   Note that after such a correction, an installation from a v2.1 eCS CD
    44 ;   with a version of AiR-BOOT >v1.07 active will not automatically
    45 ;   boot-through after phase1.
    46 ;   Since there will be more changes in AB in the future, the method of
    47 ;   passing the install-volume needs to be refined and made more
    48 ;   independent of a possible AB version installed.
     45;
     46; NOTE:
     47;   Because of space constraints most of the debug code has been commented
     48;   out in this version.
     49;   Possibly it will be re-enabled after code cleanup and changing to JWasm.
     50;
    4951;
    5052; v1.07
     
    7577; debug the booting process, converting between data-types
    7678; and outputting log-data to the com-port.
    77 
     79;
     80;
     81; v1.06
     82; -----
     83; This is the last version developed by Martin Kiewitz.
     84; It serves as the base for the versions above.
     85; Please do not post your feedback on sourceforge or bother Martin with
     86; regard to the above versions.
     87; Use the eCS bug-tracker or the Trac project-page at netlabs.
     88; See the documentation for the correct contact information.
    7889
    7990
     
    376387              db      0EBh                ; JMP-Short -> MBR_Start
    377388              ; Uses the 'A' as the displacement !
    378               db      'AiRBOOT', 23h, 11h, 20h, 11h, 01h, 08h, TXT_LanguageID
    379 
    380               ; ID String, Date and Version Number, U for US version
     389              db      'AiRBOOT', 20h, 01h, 20h, 12h, 01h, 08h, TXT_LanguageID
     390
     391              ; ID String, Date (DD,MM,CC,YY), Version Number, Language ID
    381392              db      1                   ; Total Sectors Count,
    382393                                          ; Will get overwritten by FIXBSET.exe
     
    665676
    666677                           org   001B8h
     678
     679                           ; Disk Signature
    667680                           db    'DSIG'
    668681
     682                           ; Unused word
    669683                           dw    '$$'
     684
     685                           ; Partition Table
     686                           db    16    dup('0')
     687                           db    16    dup('1')
     688                           db    16    dup('2')
     689                           db    16    dup('3')
     690
     691                           ; Boot Sigbature
     692                           dw    0aa55h
    670693
    671694                           org   00200h
  • trunk/BOOTCODE/REGULAR/STD_TEXT.ASM

    r32 r35  
    3737;Copyright             db ' AiR-BOOT v1.07 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
    3838;Copyright             db ' AiR-BOOT v1.0.8 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
    39 Copyright             db ' AiR-BOOT v1.0.8-internal-beta - ** !! NOT FOR DISTRIBUTION !! **', 0
     39;Copyright             db ' AiR-BOOT v1.0.8-internal-beta - ** !! NOT FOR DISTRIBUTION !! **', 0
     40Copyright             db ' AiR-BOOT v1.0.8 - (c) 1998-2012 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
     41
    4042; Rousseau: switch around
    4143BootEndMsg           db 'This is GPLv3+ software. Please visit: http://www.gnu.org/licenses/gpl.txt', 0
  • trunk/INSTALL/DOS/AIRBOOT.ASM

    r30 r35  
    2929COM_StartUp:    jmp     COM_Init
    3030
    31 COM_Copyright   db 'AiR-BOOT Installer for DOS v1.07', 13, 10
    32                 db ' - (c) Copyright 2008-2009 by M. Kiewitz.', 13, 10
     31COM_Copyright   db 'AiR-BOOT Installer for DOS v1.0.8', 13, 10
     32                db ' - (c) Copyright 2008-2012 by M. Kiewitz.', 13, 10
    3333                db 13, 10
    3434                db '-> ...Please wait... <-', 13, 10, 0
  • trunk/INSTALL/INST_X86/INSTALL.INC

    r32 r35  
    333333   xor     bx, bx
    334334
    335    mov     cx, 7     ; Rousseau: changed to 7 for v1.0.7+
     335   ;mov     cx, 7     ; Rousseau: changed to 7 for v1.0.7+
     336
     337   ; Rousseau: Changed back to 5 to be compatible with the v1.07 OS/2 and WIN
     338   ; installers AIRBOOT2.EXE and AIRBOOTW.EXE dat do a CRC over 5 sectors.
     339   mov     cx, 5
    336340
    337341  IC_CalcConfigLoop:
     
    343347   mov     dx, 0080h                 ; Head 0, Drive 80 (CONFIG Write)
    344348   mov     si, offset BootImage+6C00h ; Config-Location
    345    call    SaveImageSector           ; Configuration
    346    call    SaveImageSector           ; Partition Table 1
    347    call    SaveImageSector           ; Partition Table 2
    348    call    SaveImageSector           ; Hide-Partition Table 1
    349    call    SaveImageSector           ; Hide-Partition Table 2
    350    call    SaveImageSector           ; MBR BackUp (just to be sure, no valid is there)
    351 
    352    ;call     SaveImageSector
    353    ;call     SaveImageSector
     349
     350   call    SaveImageSector           ; Configuration                (sec 55)
     351
     352   ; Rousseau: Added 2 extra SaveImageSector calls for the v1.07+
     353   ; 45-partition version.
     354   ; Note the MBR backup at sector 62 (LBA 61).
     355   call    SaveImageSector           ; Partition Table part 1       (sec 56)
     356   call    SaveImageSector           ; Partition Table part 2       (sec 57)
     357   call    SaveImageSector           ; Partition Table part 3       (sec 58)
     358
     359   call    SaveImageSector           ; Hide-Partition Table part 1  (sec 59)
     360   call    SaveImageSector           ; Hide-Partition Table part 2  (sec 60)
     361   call    SaveImageSector           ; Hide-Partition Table part 3  (sec 61)
     362
     363   call    SaveImageSector           ; MBR BackUp                   (sec 62)
     364
    354365   ret
    355366InstallConfig                  EndP
     
    552563   call    APIShowChar
    553564   mov     al, ah
     565;   cmp     al,'8'
     566;   jb      ShowNumber2_skip_dot
     567   ; Display separation dot
     568   push    ax
     569   mov     al,'.'
     570   call    APIShowChar
     571   pop     ax
     572;  ShowNumber2_skip_dot:
    554573   call    APIShowChar
    555574   ret
     
    650669   xor     bx, bx
    651670
    652    mov     cx, 7                         ; Total of 7 Sectors
     671   ;mov     cx, 7                         ; Total of 7 Sectors
    653672                                         ; Rousseau: changed above to 7
     673   ; Rousseau: Changed back to 5 to be compatible with the v1.07 OS/2 and WIN
     674   ; installers AIRBOOT2.EXE and AIRBOOTW.EXE dat do a CRC over 5 sectors.
     675   mov     cx, 5
    654676
    655677  IVC_CheckSumLoop2:
  • trunk/TOOLS/OS2/SETABOOT/SETABOOT.C

    r32 r35  
    312312// Since the functionality of this utility is for AiR-BOOT only, we will pass the request to
    313313// the OS/2 BM SETBOOT utility which is called SETBM.EXE as of eCS 2.1.
    314 // Since the objective here is to supply OS/2 BM SETBOOT compatibility, if SETBM.EXE is not found,
    315 // some other system locations are searched for the OS/2 version of SETBOOT.EXE.
    316 // Any SETBOOT.EXE that is found and that does not have a module-name of "setaboot" is invoked,
    317 // and passed along the command-line the user issued.
    318 // In this case also the return-value of the OS/2 version of SETBOOT.EXE is returned.
     314// In this case also the return-value of SETBM.EXE is returned.
    319315*/
    320316int   DoClassicActions(int argc, char **argv) {
     
    347343      printf("\n");
    348344      printf("ERROR: SETBOOT (AiR-BOOT version)\n");
    349       printf("Since the AiR-BOOT Boot Manager is not installed, this program (SETBOOT.EXE), funcions as a wrapper\n");
     345      printf("Since the AiR-BOOT Boot Manager is not installed,\n");
     346      printf("this program (SETBOOT.EXE), funcions as a wrapper\n");
    350347      printf("to %s that should be used to control IBM Boot Manager.\n", classic_setboots[0]);
    351348      printf("However, %s could not be found in the PATH, the error-code is: %d\n", classic_setboots[0], rc);
     
    396393      printf("\n");
    397394      printf("ERROR: SETBOOT (AiR-BOOT version)\n");
    398       printf("Since the AiR-BOOT Boot Manager is not installed, this program (SETBOOT.EXE), funcions as a wrapper\n");
     395      printf("Since the AiR-BOOT Boot Manager is not installed,\n");
     396      printf("this program (SETBOOT.EXE), funcions as a wrapper\n");
    399397      printf("to %s that should be used to control IBM Boot Manager.\n", classic_setboots[0]);
    400398      printf("However, something went wrong when executing %s.\n", classic_setboots[0]);
     
    418416}
    419417
    420 
     418/*
     419// This funtion is invoked when AiR-BOOT is installed.
     420// It mimics the behavior of the original SETBOOT.EXE utility,
     421// but operates on AiR-BOOT.
     422*/
    421423int   DoAirBootActions(int argc, char **argv, BOOL ab_detected, BOOL ab_bad) {
    422424   ULONG           CurArgument      = 0;
     
    472474   */
    473475   //puts ("SETABOOT - AiR-BOOT Configuration Utility (OS/2) - (c) 2004-2009 by M. Kiewitz");
    474    puts ("SETABOOT v1.07a - AiR-BOOT Configuration Utility - (c) 2004-2011 by M. Kiewitz");
     476   //puts ("SETABOOT v1.07a - AiR-BOOT Configuration Utility - (c) 2004-2011 by M. Kiewitz");
     477   puts ("SETABOOT v1.0.8 - AiR-BOOT Configuration Utility - (c) 2004-2012 by M. Kiewitz");
    475478
    476479
     
    941944
    942945   // Calculate CheckSum...
     946   // Rousseau: Only check 5 sectors for v1.07 compatibility.
    943947   ResultCheck = 0; CurSectorNo = 55;
    944    while (CurSectorNo<62) {
     948   while (CurSectorNo<60) {
    945949      ResultCheck = GetChecksumOfSector(ResultCheck, CurSectorNo);
    946950      CurSectorNo++;
Note: See TracChangeset for help on using the changeset viewer.