Changeset 96


Ignore:
Timestamp:
Apr 8, 2017, 12:26:41 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Removed Linux noise [v1.1.1-testing]

This stuff was already commented out and not applicable anymore.
It was used to directly boot Linux kernels from FAT some eons ago.
Linux is supported by chain-loading GRUB.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

Location:
trunk/bootcode
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/airboot.asm

    r89 r96  
    13131313                call    AFTERCRAP_Main
    13141314
    1315                 ; [Linux support removed since v1.02]
    1316                 ; Now get FAT16-Linux Kernel Partition, If requested
    1317                 ;cmp     [CFG_LinuxKrnlPartition], 0FFh
    1318                 ;je      MBR_Main_NoLinuxKrnlPartition
    1319                 ;call    LINUX_InitFAT16access
    1320     ;MBR_Main_NoLinuxKrnlPartition:
    1321 
    1322 
    1323 
    13241315    MBR_Main_ReEnterBootMenuPre:
    13251316                ; SetUp PartitionPointers for BootMenu (filter non-bootable)
     
    15761567include special/virus.asm       ; Virus Detection / Anti-Virus
    15771568size_virus = $-b_virus
    1578 
    1579 ; [Linux support removed since v1.02]
    1580 ;include special/fat16.asm       ; FAT-16 Support
    1581 ;include special/linux.asm       ; Linux Kernel Support
    15821569
    15831570b_billsuxx:
     
    18991886; It is truncated to 11 chars because AiR-BOOT currently does not support
    19001887; longer labelnames. The name is also capitalized.
    1901 ;OS2_InstallVolume       db  12 dup (0)
    1902 ;OS2_InstallVolume       db  'HIGHLOG' ,0
    1903 ;OS2_InstallVolume       db  'ECS-MIDDLE',0,0
    1904 ;OS2_InstallVolume       db  'ECS-HIGH',0,0,0,0
    1905 ;OS2_InstallVolume       db  'ECS-HIGH',0,'NO',0
    1906 ;OS2_InstallVolume       db  'KANWEG2',0
    19071888OS2_InstallVolume       db  0,'NOPHASEONE' ,0
    19081889
     
    23172298LVM_CRCTable        dd   256 dup (?) ; LVM-CRC (->SPECiAL\LVM.asm)
    23182299
    2319 ;~ ; [Linux support removed since v1.02]
    2320 ;~ FAT16_Drive             db     ?    ; FAT-16: Drive of FAT16-partition
    2321 ;~ FAT16_AbsPartitionBegin dd     ?    ; FAT-16: LBA Begin of Partition
    2322 ;~ FAT16_SecsPerCluster    db     ?    ; FAT-16: Sectors Per Cluster
    2323 ;~ FAT16_NumOfRootEntries  dw     ?    ; FAT-16: Number of Root Entries
    2324 ;~ FAT16_SecsPerFAT        dw     ?    ; FAT-16: Sectors Per FAT
    2325 ;~ FAT16_AbsFATBegin       dd     ?    ; FAT-16: LBA Begin of FAT
    2326 ;~ FAT16_AbsRootBegin      dd     ?    ; FAT-16: LBA Begin of Root
    2327 ;~ FAT16_AbsClusterBegin   dd     ?    ; FAT-16: LBA Begin of Clusters
    2328 ;~ FAT16_FATCacheSector    db     ?    ; FAT-16: FAT-Sector No in Cache
    2329 ;~ FAT16_FATCache          db   512 dup (?) ; FAT-16: FAT-Area Cache
    2330 ;~ LINUX_KernelEntries     db   680 dup (?) ; 34*20 -> Space for Kernel-Entries
    2331 ;~ LINUX_KernelNo          db     ?         ; Total of Kernels in KernelEntries
    2332 ;~ LINUX_KernelSizeTable   db   120 dup (?) ; Size-Table (6 bytes per kernel)
    23332300
    23342301
  • trunk/bootcode/regular/bootmenu.asm

    r73 r96  
    955955        mov     Menu_EntryAutomatic, dl
    956956
    957         ;~ ; [Linux support removed since v1.02]
    958         ;~ ; Okay, now we check if Default/Last Kernel Partition Name is available...
    959         ;~ ;  if so, simply set Menu_EntryDefault/Menu_EntryLast.
    960         ;~ mov     si, offset CFG_LinuxDefaultKernel
    961         ;~ call    LINUX_SearchKernelName        ; DL - Filtered Entry No
    962         ;~ cmp     dl, 0FFh
    963         ;~ je      BMRMV_DefaultKernelNF
    964         ;~ mov     Menu_EntryDefault, dl
    965     ;~ BMRMV_DefaultKernelNF:
    966         ;~ mov     si, offset CFG_LinuxLastKernel
    967         ;~ call    LINUX_SearchKernelName        ; DL - Filtered Entry No
    968         ;~ cmp     dl, 0FFh
    969         ;~ je      BMRMV_LastKernelNF
    970         ;~ mov     Menu_EntryLast, dl
    971     ;~ BMRMV_LastKernelNF:
    972 
    973957        ; restlichen Variablen berechnen...
    974958        mov     dl, Menu_TotalParts
  • trunk/bootcode/regular/partmain.asm

    r84 r96  
    3636    call    PART_FixUpSelectionNumber
    3737    mov     CFG_PartAutomatic, dl
    38 
    39 ; [Linux support removed since v1.02]
    40 ;   ; Fix-Up Linux Kernel Partition - If lost, search for FAT-16
    41 ;   mov     bl, 06h
    42 ;   mov     dl, CFG_LinuxKrnlPartition
    43 ;   call    PART_FixUpPartitionNumber
    44 ;   mov     CFG_LinuxKrnlPartition, dl
    45 ;
    46 ;   ; Fix-Up Linux Root Partition - If lost, search for Linux partition (83h)
    47 ;   mov     bl, 83h
    48 ;   mov     dl, CFG_LinuxRootPartition
    49 ;   call    PART_FixUpPartitionNumber
    50 ;   mov     CFG_LinuxRootPartition, dl
    5138   ret
    5239PART_FixUpDefaultPartitionValues EndP
     
    264251    PCMPP_NoResumeBootSeqInclude:
    265252
    266 ; [Linux support removed since v1.02]
    267 ;   ; Now include all Linux Kernels, if any available...
    268 ;   movzx   cx, LINUX_KernelNo
    269 ;   or      cx, cx
    270 ;   jz      PCMPP_NoLinuxKernels
    271 ;   mov     ax, offset LINUX_KernelEntries
    272 ;  PCMPP_KernelLoop:
    273 ;      mov     ds:[bx], ax
    274 ;      add     bx, 2
    275 ;      add     ax, LocIPT_LenOfIPT
    276 ;   dec     cx
    277 ;   jnz     PCMPP_KernelLoop
    278 ;  PCMPP_NoLinuxKernels:
    279 
    280253        ;movzx   cx, CFG_Partitions ; LocIPT_MaxPartitions
    281254        mov   cl,CFG_Partitions ; LocIPT_MaxPartitions
     
    378351        je      PCTS_IsFloppy                       ; Is Floppy
    379352
    380 ; [Linux support removed since v1.02]
    381 ;   cmp     ax, offset LINUX_KernelEntries
    382 ;   jae     PCTS_IsKernelEntry
    383 
    384353        ;
    385354        ; Is partition, AX contains pointer to IPT entry
     
    390359        mov     dl, al                          ; Index in IPT
    391360        ret
    392 
    393 ; [Linux support removed since v1.02]
    394 ;  PCTS_IsKernelEntry:
    395 ;   mov     dl, 0FDh
    396 ;   ret
    397361
    398362    PCTS_IsBIOSbootSeq:
     
    469433; Destroyed: AX
    470434PART_GetSizeElementPointer      Proc Near   Uses bx
    471 ; [Linux support removed since v1.02]
    472 ;   cmp     ax, offset LINUX_KernelEntries
    473 ;   jae     PGSEP_IsKernelEntry
    474435        mov     si, offset PartitionSizeTable
    475436        sub     ax, offset PartitionTable
    476 ;   jmp     PGSEP_Continue
    477 ; [Linux support removed since v1.02]
    478 ;  PGSEP_IsKernelEntry:
    479 ;   mov     si, offset LINUX_KernelSizeTable
    480 ;   sub     ax, offset LINUX_KernelEntries
    481 ;  PGSEP_Continue:
    482437        mov     bl, LocIPT_LenOfIPT
    483438        div     bl                            ; Divide with IPTlength
     
    10531008        call    MBR_Teletype
    10541009
    1055 
    1056 ; [Linux support removed since v1.02]
    1057 ;      cmp     dh, 0FDh
    1058 ;      je      PSP_IsKernel
    1059 
    10601010        ;~ pusha
    10611011        ;~ call    MBR_Teletype
     
    10771027        call    MBR_TeletypeVolName
    10781028        jmp     PSP_IsFloppyCDROMetc                                                ; JUMPS BUITEN SI POP !!! AANPASSEN
    1079 
    1080 
    1081 ; [Linux support removed since v1.02]
    1082 ;    PSP_IsKernel:
    1083 ;      IFDEF ReleaseCode
    1084 ;         ; Save configuration on HDD boots (save CFG_LinuxLastKernel)
    1085 ;         call    DriveIO_SaveConfiguration
    1086 ;      ENDIF
    1087 ;      call    MBR_Teletype       ; Prints out BootingNow2 including KernelName
    1088 ;      mov     si, offset TXT_BootingNowKernel
    1089 ;      call    MBR_Teletype
    1090 ;      jmp     PSP_IsFloppyCDROMetc
    10911029
    10921030
     
    14171355        je      PSP_ResumeBIOSbootSeq
    14181356
    1419 ; [Linux support removed since v1.02]
    1420 ;   cmp     al, 0FDh                        ; Kernel-Booting ?
    1421 ;   je      PSP_KernelBooting
    1422 
    14231357        jmp     PSP_StartNormal
    14241358
     
    14281362        dw      0FFF0h
    14291363        dw      0F000h
    1430 
    1431 ; [Linux support removed since v1.02]
    1432 ;  PSP_KernelBooting:
    1433 ;   call    LINUX_LoadKernel              ; DS:SI - Entry Pointer to Kernel
    1434 ;   db      0EAh                          ; if return to here -> Reboot
    1435 ;   dw      0FFF0h
    1436 ;   dw      0F000h
    1437 
    14381364
    14391365
  • trunk/bootcode/regular/partscan.asm

    r94 r96  
    8080        mov     cx, LocIPT_MaxPartitions
    8181        rep     movsb
    82 
    83 ; [Linux support removed since v1.02]
    84 ;   ; Search for any Linux partition and remember, if it got found...
    85 ;   mov     si, offset PartitionTable
    86 ;   movzx   cx, CFG_Partitions
    87 ;   xor     dl, dl                        ; DL - Is Linux here ?
    88 ;   or      cx, cx
    89 ;   jz      PSSFP_NoPartitions
    90 ;  PSSFP_LinuxLoop:
    91 ;      cmp     bptr [si+LocIPT_SystemID], 083h  ; Hard-Coded
    92 ;      jne     PSSFP_NoLinux
    93 ;      mov     dl, 1                      ; Linux found...
    94 ;     PSSFP_NoLinux:
    95 ;      add     si, LocIPT_LenOfIPT
    96 ;   loop    PSSFP_LinuxLoop
    97 ;  PSSFP_NoPartitions:
    98 ;   mov     GotLinux, dl                  ; Set Flag
    9982
    10083        ; ...and finally check, if we need to set a Drive-Letter
  • trunk/bootcode/setup/main.asm

    r76 r96  
    773773SETUP_EnterMenu_ExtendedOptions EndP
    774774
    775 ; [Linux support removed since v1.02]
    776 ;SETUP_EnterMenu_LinuxCommandLine Proc Near  Uses dx bp
    777 ;   test    GotLinux, 1
    778 ;   jz      SEMLCL_NoLinux
    779 ;   call    SETUP_EnterMenu_EnterLinuxCmdLine
    780 ;   ret
    781 ;  SEMLCL_NoLinux:
    782 ;   mov     cx, 0C04h
    783 ;   mov     si, offset TXT_SETUP_NoLinuxInstalled
    784 ;   call    SETUP_ShowErrorBox
    785 ;   ret
    786 ;SETUP_EnterMenu_LinuxCommandLine EndP
    787 
    788775SETUP_EnterMenu_DefineMasterPassword Proc Near
    789776   mov     di, offset CFG_MasterPassword
     
    799786
    800787; ============================================================================
    801 
    802 ; [Linux support removed since v1.02]
    803 ;SETUP_EnterMenu_EnterLinuxCmdLine Proc Near
    804 ;   mov     cx, 0D05h
    805 ;   call    VideoIO_Color
    806 ;   mov     bx, 0C02h
    807 ;   mov     dx, 0F4Fh
    808 ;   call    VideoIO_MakeWindow
    809 ;   mov     cx, 0F05h
    810 ;   call    VideoIO_Color
    811 ;
    812 ;   mov     si, offset TXT_SETUP_EnterLinuxCmdLine
    813 ;   call    GetLenOfString                ; CX - Len of Error Message
    814 ;   mov     dx, cx
    815 ;   mov     cx, 0D28h
    816 ;   call    VideoIO_LocateToCenter        ; LocateToCenter 13, 40 using LenOfStr
    817 ;   call    VideoIO_Print                 ; Writes 'Please enter Linux-CmdLine'
    818 ;
    819 ;   mov     cx, 0E05h
    820 ;   call    VideoIO_Color
    821 ;   mov     cx, 0E04h
    822 ;   call    VideoIO_Locate
    823 ;   mov     al, ' '
    824 ;   mov     cl, 74
    825 ;   call    VideoIO_PrintSingleMultiChar
    826 ;   mov     cx, 0E04h
    827 ;   call    VideoIO_Locate
    828 ;   mov     si, offset CFG_LinuxCommandLine
    829 ;   push    si
    830 ;      call    VideoIO_Print              ; Writes Linux Command-Line
    831 ;   pop     si
    832 ;   mov     cx, 0E04h
    833 ;   call    VideoIO_Locate
    834 ;
    835 ;   push    cs
    836 ;   pop     es                            ; ES == CS
    837 ;   mov     di, offset TmpSector
    838 ;   mov     cx, 37
    839 ;   rep     movsw                         ; Copy LinuxCmdLine -> TmpSectorSpace
    840 ;
    841 ;   mov     si, offset TmpSector
    842 ;   mov     cx, 74
    843 ;   call    VideoIO_LetUserEditString     ; -> does actual editing
    844 ;   jnc     SEMELCL_UserAbort             ; Did user abort ?
    845 ;
    846 ;   ; Otherwise copy TmpSectorSpace to LinuxCmdLine
    847 ;   mov     di, offset CFG_LinuxCommandLine
    848 ;   mov     cx, 74
    849 ;   call    GetLenOfName                  ; Get real length of Cmd-Line into CX
    850 ;   jz      SEMELCL_NulLine
    851 ;   rep     movsb
    852 ;  SEMELCL_NulLine:
    853 ;   mov     ax, 75
    854 ;   sub     ax, cx
    855 ;   mov     cx, ax
    856 ;   xor     al, al
    857 ;   rep     stosb                         ; Fill up with NULs
    858 ;
    859 ;  SEMELCL_UserAbort:
    860 ;   ret
    861 ;SETUP_EnterMenu_EnterLinuxCmdLine EndP
    862788
    863789;        In: di - Place for Password to be defined
     
    14661392SETUPMAGIC_ChangeDefaultSelection EndP
    14671393
    1468 ; [Linux support removed since v1.02]
    1469 ;SETUPMAGIC_ChangeLinuxKernelPart Proc Near   Uses ax cx dx si es di
    1470 ;   mov     di, si
    1471 ;   mov     dl, ds:[bx]                   ; Cur Partition No.
    1472 ;   push    bx
    1473 ;      jc      SMCLKP_DoNotModify
    1474 ;     SMCLKP_NowGoOn:
    1475 ;      mov     dh, CFG_Partitions         ; CFG_Partitions is Base==1
    1476 ;      inc     dl                         ; +1 -> 00h instead FFh -> Disabled
    1477 ;     SMCLKP_RejectPartition:
    1478 ;      call    SETUPMAGIC_InternalCheckUp ; CheckUp DL (max. CFG_Partitions)
    1479 ;     SMCLKP_DoNotModify:
    1480 ;      or      dl, dl
    1481 ;      jz      SMCLKP_FunctionDisabled
    1482 ;      ; Get Partition-Pointer (SI) to Partition-To-Boot (DL)
    1483 ;      dec     dl
    1484 ;      call    PART_GetPartitionPointer
    1485 ;      inc     dl
    1486 ;      cmp     bptr ds:[si+LocIPT_SystemID], 06h ; FAT-16 required
    1487 ;      jne     SMCLKP_RejectPartition
    1488 ;   pop     bx
    1489 ;   add     si, LocIPT_Name               ; Location of Name
    1490 ;   push    cs
    1491 ;   pop     es
    1492 ;   add     di, LocMENU_ItemPack          ; DI points to ItemPack
    1493 ;   mov     cx, 11
    1494 ;   rep     movsb                         ; Copy cur PartitionName to ItemPack
    1495 ;   xor     al, al
    1496 ;   stosb                                 ; Ending Zero
    1497 ;  SMCLKP_WriteNewValue:
    1498 ;   dec     dl
    1499 ;   mov     ds:[bx], dl                   ; Set new partition number
    1500 ;   ret
    1501 ;
    1502 ;     SMCLKP_FunctionDisabled:
    1503 ;   pop     bx
    1504 ;   mov     si, offset TXT_SETUP_MAGIC_Disabled
    1505 ;   push    cs
    1506 ;   pop     es
    1507 ;   add     di, LocMENU_ItemPack          ; DI points to ItemPack...
    1508 ;   call    SETUPMAGIC_InternalCopyTillNUL
    1509 ;   jmp     SMCLKP_WriteNewValue
    1510 ;SETUPMAGIC_ChangeLinuxKernelPart EndP
    1511 
    1512 ; [Linux support removed since v1.02]
    1513 ;SETUPMAGIC_ChangeLinuxRootPart  Proc Near   Uses ax cx dx si es di
    1514 ;   mov     di, si
    1515 ;   pushf                                 ; lame, but it's not working other ways
    1516 ;      test    ds:[GotLinux], 1
    1517 ;      jnz     SMCLRP_GotLinux
    1518 ;   popf
    1519 ;   add     di, LocMENU_ItemPack          ; DI points to ItemPack
    1520 ;   mov     si, offset TXT_SETUP_MAGIC_NoLinux
    1521 ;   push    cs
    1522 ;   pop     es
    1523 ;   call    SETUPMAGIC_InternalCopyTillNUL
    1524 ;   ret
    1525 ;     SMCLRP_GotLinux:
    1526 ;      mov     dl, ds:[bx]                ; Cur Partition No.
    1527 ;      mov     dh, CFG_Partitions
    1528 ;      dec     dh
    1529 ;   popf
    1530 ;   push    bx
    1531 ;      jc      SMCLRP_DoNotModify         ; Thou shall not modify :)
    1532 ;     SMCLRP_RejectPartition:
    1533 ;      call    SETUPMAGIC_InternalCheckUp ; CheckUp DL (max. CFG_Partitions-1)
    1534 ;     SMCLRP_DoNotModify:
    1535 ;      ; Get Partition-Pointer (SI) to Partition-To-Boot (DL)
    1536 ;      call    PART_GetPartitionPointer
    1537 ;      cmp     bptr ds:[si+LocIPT_SystemID], 083h
    1538 ;      jne     SMCLRP_RejectPartition
    1539 ;   pop     bx
    1540 ;   mov     ds:[bx], dl
    1541 ;   push    cs
    1542 ;   pop     es
    1543 ;   add     di, LocMENU_ItemPack          ; DI points to ItemPack...
    1544 ;   push    di
    1545 ;      mov     cx, 12
    1546 ;      xor     al, al
    1547 ;      rep     stosb                      ; Fill with NULs
    1548 ;   pop     di
    1549 ;   call    LINUX_TranslateToDEV          ; now translate thingie (DL)
    1550 ;   ret
    1551 ;SETUPMAGIC_ChangeLinuxRootPart  EndP
    1552 
    1553 ; [Linux support removed since v1.02]
    1554 ; CH-ItemNo, CL-Add/Sub, BX-PtrToVariable, SI-ItemPack
    1555 ;SETUPMAGIC_ChangeLinuxDefaultKernel Proc Near   Uses ax cx dx si es di
    1556 ;   mov     di, si
    1557 ;   jc      SMCLDK_DoNotEdit
    1558 ;
    1559 ;   ; --- Edit Linux Default Kernel Name ---
    1560 ;   mov     cl, 29                        ; Left side: 29
    1561 ;   test    ch, 1000b
    1562 ;   jz      SMCLDK_NoRightSide
    1563 ;   and     ch, 111b
    1564 ;   mov     cl, 68                        ; Right side: 68
    1565 ;  SMCLDK_NoRightSide:
    1566 ;   add     ch, 6                         ; Koordinate umberechnen
    1567 ;   push    cx
    1568 ;      call    VideoIO_Locate
    1569 ;      mov     cx, 0E01h
    1570 ;      call    VideoIO_Color              ; Yellow on Blue
    1571 ;      mov     cl, 12
    1572 ;      mov     si, offset CFG_LinuxDefaultKernel
    1573 ;      call    VideoIO_FixedPrint         ; Print out [SI] (Length = CL)
    1574 ;   pop     cx
    1575 ;   call    VideoIO_Locate
    1576 ;   mov     cl, 11
    1577 ;   mov     si, offset CFG_LinuxDefaultKernel
    1578 ;   call    VideoIO_LetUserEditString
    1579 ;
    1580 ;   ; Final-Process string (which means upper-case it)
    1581 ;   mov     cl, 11
    1582 ;  SMCLDK_FinalProcessLoop:
    1583 ;      mov     al, bptr ds:[si]
    1584 ;      cmp     al, 'a'
    1585 ;      jb      SMCLDK_FinalProcessSkip
    1586 ;      cmp     al, 'z'
    1587 ;      ja      SMCLDK_FinalProcessSkip
    1588 ;      sub     al, 20h
    1589 ;     SMCLDK_FinalProcessSkip:
    1590 ;      mov     bptr ds:[si], al
    1591 ;      inc     si
    1592 ;   dec     cl
    1593 ;   jnz     SMCLDK_FinalProcessLoop
    1594 ;   ; --- End of Edit Linux Default Kernel Name ---
    1595 ;
    1596 ;  SMCLDK_DoNotEdit:
    1597 ;   push    cs
    1598 ;   pop     es
    1599 ;   add     di, LocMENU_ItemPack          ; DI points to ItemPack...
    1600 ;   mov     si, offset CFG_LinuxDefaultKernel
    1601 ;   mov     cx, 6                         ; Copy from CFG-Space to ItemPack
    1602 ;   rep     movsw
    1603 ;   ret
    1604 ;SETUPMAGIC_ChangeLinuxDefaultKernel EndP
    16051394
    16061395SETUPMAGIC_ChangeTimedKeyHandling Proc Near   Uses ax cx dx ds si es di
Note: See TracChangeset for help on using the changeset viewer.