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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.