因調查某 Bootloader 相關 Bug,需在 CentOS 6.5 上編譯 LILO (Linux Loader) 22.8。源碼來自 官方頁面。make 直接報錯缺少 16 位匯編/鏈接工具,本文記錄定位與解決全過程。
[root@localhost lilo-22.8]# make all ./checkit GCC version 2.91 or later is required gcc version 4.4.7 OKAY AS86 version 0.16.10 or later is required as86 is not present LD86 version 0.16.10 or later is required ld86 is not present BCC version 0.16.10 or later is recommended bcc is not present You will not be able to make floppy2, diag2.img, or lilo.com make: *** [test.img] Error 1
as86 (匯編器)、ld86 (鏈接器)、bcc (Bruce's C Compiler,16 位 C 編譯器)通過 rpmfind.net 查詢確認:as86、ld86、bcc 均包含在 dev86 包中。
# CentOS/RHEL/Fedora sudo yum install dev86 # Debian/Ubuntu sudo apt-get install dev86 # openSUSE sudo zypper install dev86
[root@localhost lilo-22.8]# which as86 ld86 bcc /usr/bin/as86 /usr/bin/ld86 /usr/bin/bcc [root@localhost lilo-22.8]# as86 --version as86 0.16.21 [root@localhost lilo-22.8]# ld86 --version ld86 0.16.21 [root@localhost lilo-22.8]# bcc --version bcc 0.16.21
[root@localhost lilo-22.8]# make clean [root@localhost lilo-22.8]# make all ./checkit GCC version 2.91 or later is required gcc version 4.4.7 OKAY AS86 version 0.16.10 or later is required as86 0.16.21 OKAY LD86 version 0.16.10 or later is required ld86 0.16.21 OKAY BCC version 0.16.10 or later is recommended bcc 0.16.21 OKAY ... 後續編譯正常進行 ...
lilo.com:16 位 DOS/實模式安裝程序boot.b:16 位 Boot Sector 代碼map:內核位置映射表grub-mkimage 生成多架構核心映像,不再依賴 16 位工具鏈;UEFI 系統直接運行 64 位 EFI 應用