v86 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +17 -6
- package/bios/seabios/.config +113 -0
- package/bios/seabios/.config.old +114 -0
- package/bios/seabios/.gitignore +4 -0
- package/bios/seabios/COPYING +674 -0
- package/bios/seabios/COPYING.LESSER +165 -0
- package/bios/seabios/Makefile +286 -0
- package/bios/seabios/README +17 -0
- package/bios/seabios/docs/Build_overview.md +104 -0
- package/bios/seabios/docs/Contributing.md +20 -0
- package/bios/seabios/docs/Debugging.md +111 -0
- package/bios/seabios/docs/Developer_Documentation.md +25 -0
- package/bios/seabios/docs/Developer_links.md +86 -0
- package/bios/seabios/docs/Download.md +27 -0
- package/bios/seabios/docs/Execution_and_code_flow.md +178 -0
- package/bios/seabios/docs/Linking_overview.md +160 -0
- package/bios/seabios/docs/Mailinglist.md +8 -0
- package/bios/seabios/docs/Memory_Model.md +253 -0
- package/bios/seabios/docs/README +5 -0
- package/bios/seabios/docs/Releases.md +482 -0
- package/bios/seabios/docs/Runtime_config.md +193 -0
- package/bios/seabios/docs/SeaBIOS.md +17 -0
- package/bios/seabios/docs/SeaVGABIOS.md +39 -0
- package/bios/seabios/out/autoconf.h +117 -0
- package/bios/seabios/out/include/config/acpi/dsdt.h +0 -0
- package/bios/seabios/out/include/config/acpi.h +0 -0
- package/bios/seabios/out/include/config/ahci.h +0 -0
- package/bios/seabios/out/include/config/apmbios.h +0 -0
- package/bios/seabios/out/include/config/ata/dma.h +0 -0
- package/bios/seabios/out/include/config/ata/pio32.h +0 -0
- package/bios/seabios/out/include/config/ata.h +0 -0
- package/bios/seabios/out/include/config/auto.conf +69 -0
- package/bios/seabios/out/include/config/auto.conf.cmd +9 -0
- package/bios/seabios/out/include/config/boot.h +0 -0
- package/bios/seabios/out/include/config/bootorder.h +0 -0
- package/bios/seabios/out/include/config/build/vgabios.h +0 -0
- package/bios/seabios/out/include/config/call32/smm.h +0 -0
- package/bios/seabios/out/include/config/cdrom/boot.h +0 -0
- package/bios/seabios/out/include/config/cdrom/emu.h +0 -0
- package/bios/seabios/out/include/config/debug/level.h +0 -0
- package/bios/seabios/out/include/config/drives.h +0 -0
- package/bios/seabios/out/include/config/entry/extrastack.h +0 -0
- package/bios/seabios/out/include/config/esp/scsi.h +0 -0
- package/bios/seabios/out/include/config/flash/floppy.h +0 -0
- package/bios/seabios/out/include/config/floppy.h +0 -0
- package/bios/seabios/out/include/config/fw/romfile/load.h +0 -0
- package/bios/seabios/out/include/config/hardware/irq.h +0 -0
- package/bios/seabios/out/include/config/kbd/call/int15/4f.h +0 -0
- package/bios/seabios/out/include/config/keyboard.h +0 -0
- package/bios/seabios/out/include/config/lpt.h +0 -0
- package/bios/seabios/out/include/config/lsi/scsi.h +0 -0
- package/bios/seabios/out/include/config/malloc/uppermemory.h +0 -0
- package/bios/seabios/out/include/config/megasas.h +0 -0
- package/bios/seabios/out/include/config/mouse.h +0 -0
- package/bios/seabios/out/include/config/mpt/scsi.h +0 -0
- package/bios/seabios/out/include/config/mptable.h +0 -0
- package/bios/seabios/out/include/config/mtrr/init.h +0 -0
- package/bios/seabios/out/include/config/optionroms.h +0 -0
- package/bios/seabios/out/include/config/override/pci/id.h +0 -0
- package/bios/seabios/out/include/config/pcibios.h +0 -0
- package/bios/seabios/out/include/config/pirtable.h +0 -0
- package/bios/seabios/out/include/config/pmm.h +0 -0
- package/bios/seabios/out/include/config/pmtimer.h +0 -0
- package/bios/seabios/out/include/config/pnpbios.h +0 -0
- package/bios/seabios/out/include/config/ps2port.h +0 -0
- package/bios/seabios/out/include/config/pvscsi.h +0 -0
- package/bios/seabios/out/include/config/qemu/hardware.h +0 -0
- package/bios/seabios/out/include/config/qemu.h +0 -0
- package/bios/seabios/out/include/config/rom/size.h +0 -0
- package/bios/seabios/out/include/config/rtc/timer.h +0 -0
- package/bios/seabios/out/include/config/s3/resume.h +0 -0
- package/bios/seabios/out/include/config/sdcard.h +0 -0
- package/bios/seabios/out/include/config/serial.h +0 -0
- package/bios/seabios/out/include/config/tcgbios.h +0 -0
- package/bios/seabios/out/include/config/threads.h +0 -0
- package/bios/seabios/out/include/config/tristate.conf +4 -0
- package/bios/seabios/out/include/config/tsc/timer.h +0 -0
- package/bios/seabios/out/include/config/use/smm.h +0 -0
- package/bios/seabios/out/include/config/vga/allocate/extra/stack.h +0 -0
- package/bios/seabios/out/include/config/vga/bochs/stdvga.h +0 -0
- package/bios/seabios/out/include/config/vga/bochs.h +0 -0
- package/bios/seabios/out/include/config/vga/did.h +0 -0
- package/bios/seabios/out/include/config/vga/extra/stack/size.h +0 -0
- package/bios/seabios/out/include/config/vga/fixup/asm.h +0 -0
- package/bios/seabios/out/include/config/vga/pci.h +0 -0
- package/bios/seabios/out/include/config/vga/stdvga/ports.h +0 -0
- package/bios/seabios/out/include/config/vga/vbe.h +0 -0
- package/bios/seabios/out/include/config/vga/vid.h +0 -0
- package/bios/seabios/out/include/config/vgahooks.h +0 -0
- package/bios/seabios/out/include/config/virtio/blk.h +0 -0
- package/bios/seabios/out/include/config/virtio/scsi.h +0 -0
- package/bios/seabios/out/include/config/xen.h +0 -0
- package/bios/seabios/out/scripts/kconfig/conf +0 -0
- package/bios/seabios/out/scripts/kconfig/conf.o +0 -0
- package/bios/seabios/out/scripts/kconfig/zconf.hash.c +289 -0
- package/bios/seabios/out/scripts/kconfig/zconf.lex.c +2420 -0
- package/bios/seabios/out/scripts/kconfig/zconf.tab.c +2538 -0
- package/bios/seabios/out/scripts/kconfig/zconf.tab.o +0 -0
- package/bios/seabios/scripts/acpi_extract.py +366 -0
- package/bios/seabios/scripts/acpi_extract_preprocess.py +41 -0
- package/bios/seabios/scripts/buildrom.py +56 -0
- package/bios/seabios/scripts/buildversion.py +134 -0
- package/bios/seabios/scripts/checkrom.py +95 -0
- package/bios/seabios/scripts/checkstack.py +226 -0
- package/bios/seabios/scripts/checksum.py +16 -0
- package/bios/seabios/scripts/encodeint.py +21 -0
- package/bios/seabios/scripts/gen-offsets.sh +17 -0
- package/bios/seabios/scripts/kconfig/.gitignore +22 -0
- package/bios/seabios/scripts/kconfig/Makefile +331 -0
- package/bios/seabios/scripts/kconfig/POTFILES.in +12 -0
- package/bios/seabios/scripts/kconfig/check.sh +13 -0
- package/bios/seabios/scripts/kconfig/conf.c +718 -0
- package/bios/seabios/scripts/kconfig/confdata.c +1250 -0
- package/bios/seabios/scripts/kconfig/expr.c +1168 -0
- package/bios/seabios/scripts/kconfig/expr.h +241 -0
- package/bios/seabios/scripts/kconfig/gconf.c +1542 -0
- package/bios/seabios/scripts/kconfig/gconf.glade +661 -0
- package/bios/seabios/scripts/kconfig/images.c +326 -0
- package/bios/seabios/scripts/kconfig/kxgettext.c +235 -0
- package/bios/seabios/scripts/kconfig/lex.zconf.c +2430 -0
- package/bios/seabios/scripts/kconfig/list.h +131 -0
- package/bios/seabios/scripts/kconfig/lkc.h +200 -0
- package/bios/seabios/scripts/kconfig/lkc_proto.h +57 -0
- package/bios/seabios/scripts/kconfig/lxdialog/.gitignore +4 -0
- package/bios/seabios/scripts/kconfig/lxdialog/BIG.FAT.WARNING +4 -0
- package/bios/seabios/scripts/kconfig/lxdialog/check-lxdialog.sh +87 -0
- package/bios/seabios/scripts/kconfig/lxdialog/checklist.c +332 -0
- package/bios/seabios/scripts/kconfig/lxdialog/dialog.h +257 -0
- package/bios/seabios/scripts/kconfig/lxdialog/inputbox.c +301 -0
- package/bios/seabios/scripts/kconfig/lxdialog/menubox.c +437 -0
- package/bios/seabios/scripts/kconfig/lxdialog/textbox.c +408 -0
- package/bios/seabios/scripts/kconfig/lxdialog/util.c +713 -0
- package/bios/seabios/scripts/kconfig/lxdialog/yesno.c +114 -0
- package/bios/seabios/scripts/kconfig/mconf.c +1036 -0
- package/bios/seabios/scripts/kconfig/menu.c +697 -0
- package/bios/seabios/scripts/kconfig/merge_config.sh +150 -0
- package/bios/seabios/scripts/kconfig/nconf.c +1556 -0
- package/bios/seabios/scripts/kconfig/nconf.gui.c +656 -0
- package/bios/seabios/scripts/kconfig/nconf.h +96 -0
- package/bios/seabios/scripts/kconfig/qconf.cc +1795 -0
- package/bios/seabios/scripts/kconfig/qconf.h +338 -0
- package/bios/seabios/scripts/kconfig/streamline_config.pl +647 -0
- package/bios/seabios/scripts/kconfig/symbol.c +1373 -0
- package/bios/seabios/scripts/kconfig/util.c +157 -0
- package/bios/seabios/scripts/kconfig/zconf.gperf +48 -0
- package/bios/seabios/scripts/kconfig/zconf.hash.c_shipped +289 -0
- package/bios/seabios/scripts/kconfig/zconf.l +363 -0
- package/bios/seabios/scripts/kconfig/zconf.lex.c_shipped +2420 -0
- package/bios/seabios/scripts/kconfig/zconf.tab.c_shipped +2538 -0
- package/bios/seabios/scripts/kconfig/zconf.y +733 -0
- package/bios/seabios/scripts/layoutrom.py +705 -0
- package/bios/seabios/scripts/python23compat.py +14 -0
- package/bios/seabios/scripts/readserial.py +190 -0
- package/bios/seabios/scripts/tarball.sh +36 -0
- package/bios/seabios/scripts/test-build.sh +90 -0
- package/bios/seabios/scripts/transdump.py +53 -0
- package/bios/seabios/scripts/vgafixup.py +96 -0
- package/bios/seabios/src/Kconfig +579 -0
- package/bios/seabios/src/apm.c +215 -0
- package/bios/seabios/src/asm-offsets.c +23 -0
- package/bios/seabios/src/biosvar.h +130 -0
- package/bios/seabios/src/block.c +623 -0
- package/bios/seabios/src/block.h +121 -0
- package/bios/seabios/src/bmp.c +117 -0
- package/bios/seabios/src/boot.c +793 -0
- package/bios/seabios/src/bootsplash.c +255 -0
- package/bios/seabios/src/bregs.h +80 -0
- package/bios/seabios/src/byteorder.h +71 -0
- package/bios/seabios/src/cdrom.c +322 -0
- package/bios/seabios/src/clock.c +506 -0
- package/bios/seabios/src/code16gcc.s +1 -0
- package/bios/seabios/src/config.h +108 -0
- package/bios/seabios/src/cp437.c +275 -0
- package/bios/seabios/src/cp437.h +1 -0
- package/bios/seabios/src/disk.c +779 -0
- package/bios/seabios/src/e820map.c +152 -0
- package/bios/seabios/src/e820map.h +26 -0
- package/bios/seabios/src/entryfuncs.S +165 -0
- package/bios/seabios/src/farptr.h +208 -0
- package/bios/seabios/src/font.c +139 -0
- package/bios/seabios/src/fw/acpi-dsdt-cpu-hotplug.dsl +78 -0
- package/bios/seabios/src/fw/acpi-dsdt-dbug.dsl +26 -0
- package/bios/seabios/src/fw/acpi-dsdt-hpet.dsl +36 -0
- package/bios/seabios/src/fw/acpi-dsdt-isa.dsl +102 -0
- package/bios/seabios/src/fw/acpi-dsdt-pci-crs.dsl +90 -0
- package/bios/seabios/src/fw/acpi-dsdt.dsl +342 -0
- package/bios/seabios/src/fw/acpi-dsdt.hex +554 -0
- package/bios/seabios/src/fw/acpi.c +685 -0
- package/bios/seabios/src/fw/biostables.c +491 -0
- package/bios/seabios/src/fw/coreboot.c +569 -0
- package/bios/seabios/src/fw/csm.c +347 -0
- package/bios/seabios/src/fw/dev-pci.h +52 -0
- package/bios/seabios/src/fw/dev-piix.h +29 -0
- package/bios/seabios/src/fw/dev-q35.h +52 -0
- package/bios/seabios/src/fw/lzmadecode.c +398 -0
- package/bios/seabios/src/fw/lzmadecode.h +67 -0
- package/bios/seabios/src/fw/mptable.c +197 -0
- package/bios/seabios/src/fw/mtrr.c +105 -0
- package/bios/seabios/src/fw/multiboot.c +111 -0
- package/bios/seabios/src/fw/paravirt.c +624 -0
- package/bios/seabios/src/fw/paravirt.h +63 -0
- package/bios/seabios/src/fw/pciinit.c +1187 -0
- package/bios/seabios/src/fw/pirtable.c +103 -0
- package/bios/seabios/src/fw/q35-acpi-dsdt.dsl +450 -0
- package/bios/seabios/src/fw/romfile_loader.c +259 -0
- package/bios/seabios/src/fw/romfile_loader.h +91 -0
- package/bios/seabios/src/fw/shadow.c +208 -0
- package/bios/seabios/src/fw/smbios.c +585 -0
- package/bios/seabios/src/fw/smm.c +269 -0
- package/bios/seabios/src/fw/smp.c +194 -0
- package/bios/seabios/src/fw/ssdt-misc.dsl +104 -0
- package/bios/seabios/src/fw/ssdt-misc.hex +88 -0
- package/bios/seabios/src/fw/ssdt-pcihp.dsl +36 -0
- package/bios/seabios/src/fw/ssdt-pcihp.hex +38 -0
- package/bios/seabios/src/fw/ssdt-proc.dsl +48 -0
- package/bios/seabios/src/fw/ssdt-proc.hex +35 -0
- package/bios/seabios/src/fw/xen.c +149 -0
- package/bios/seabios/src/fw/xen.h +125 -0
- package/bios/seabios/src/gen-defs.h +19 -0
- package/bios/seabios/src/hw/ahci.c +697 -0
- package/bios/seabios/src/hw/ahci.h +201 -0
- package/bios/seabios/src/hw/ata.c +1046 -0
- package/bios/seabios/src/hw/ata.h +163 -0
- package/bios/seabios/src/hw/blockcmd.c +372 -0
- package/bios/seabios/src/hw/blockcmd.h +114 -0
- package/bios/seabios/src/hw/dma.c +67 -0
- package/bios/seabios/src/hw/esp-scsi.c +241 -0
- package/bios/seabios/src/hw/esp-scsi.h +8 -0
- package/bios/seabios/src/hw/floppy.c +741 -0
- package/bios/seabios/src/hw/lsi-scsi.c +221 -0
- package/bios/seabios/src/hw/lsi-scsi.h +8 -0
- package/bios/seabios/src/hw/megasas.c +405 -0
- package/bios/seabios/src/hw/megasas.h +8 -0
- package/bios/seabios/src/hw/mpt-scsi.c +319 -0
- package/bios/seabios/src/hw/mpt-scsi.h +8 -0
- package/bios/seabios/src/hw/nvme-int.h +199 -0
- package/bios/seabios/src/hw/nvme.c +708 -0
- package/bios/seabios/src/hw/nvme.h +17 -0
- package/bios/seabios/src/hw/pci.c +133 -0
- package/bios/seabios/src/hw/pci.h +47 -0
- package/bios/seabios/src/hw/pci_ids.h +2632 -0
- package/bios/seabios/src/hw/pci_regs.h +556 -0
- package/bios/seabios/src/hw/pcidevice.c +192 -0
- package/bios/seabios/src/hw/pcidevice.h +76 -0
- package/bios/seabios/src/hw/pic.c +115 -0
- package/bios/seabios/src/hw/pic.h +60 -0
- package/bios/seabios/src/hw/ps2port.c +543 -0
- package/bios/seabios/src/hw/ps2port.h +67 -0
- package/bios/seabios/src/hw/pvscsi.c +333 -0
- package/bios/seabios/src/hw/pvscsi.h +8 -0
- package/bios/seabios/src/hw/ramdisk.c +108 -0
- package/bios/seabios/src/hw/rtc.c +100 -0
- package/bios/seabios/src/hw/rtc.h +75 -0
- package/bios/seabios/src/hw/sdcard.c +572 -0
- package/bios/seabios/src/hw/serialio.c +113 -0
- package/bios/seabios/src/hw/serialio.h +29 -0
- package/bios/seabios/src/hw/timer.c +259 -0
- package/bios/seabios/src/hw/tpm_drivers.c +636 -0
- package/bios/seabios/src/hw/tpm_drivers.h +127 -0
- package/bios/seabios/src/hw/usb-ehci.c +650 -0
- package/bios/seabios/src/hw/usb-ehci.h +177 -0
- package/bios/seabios/src/hw/usb-hid.c +442 -0
- package/bios/seabios/src/hw/usb-hid.h +29 -0
- package/bios/seabios/src/hw/usb-hub.c +205 -0
- package/bios/seabios/src/hw/usb-hub.h +64 -0
- package/bios/seabios/src/hw/usb-msc.c +222 -0
- package/bios/seabios/src/hw/usb-msc.h +10 -0
- package/bios/seabios/src/hw/usb-ohci.c +568 -0
- package/bios/seabios/src/hw/usb-ohci.h +144 -0
- package/bios/seabios/src/hw/usb-uas.c +289 -0
- package/bios/seabios/src/hw/usb-uas.h +9 -0
- package/bios/seabios/src/hw/usb-uhci.c +571 -0
- package/bios/seabios/src/hw/usb-uhci.h +128 -0
- package/bios/seabios/src/hw/usb-xhci.c +1161 -0
- package/bios/seabios/src/hw/usb-xhci.h +133 -0
- package/bios/seabios/src/hw/usb.c +499 -0
- package/bios/seabios/src/hw/usb.h +254 -0
- package/bios/seabios/src/hw/virtio-blk.c +211 -0
- package/bios/seabios/src/hw/virtio-blk.h +43 -0
- package/bios/seabios/src/hw/virtio-pci.c +501 -0
- package/bios/seabios/src/hw/virtio-pci.h +151 -0
- package/bios/seabios/src/hw/virtio-ring.c +147 -0
- package/bios/seabios/src/hw/virtio-ring.h +121 -0
- package/bios/seabios/src/hw/virtio-scsi.c +220 -0
- package/bios/seabios/src/hw/virtio-scsi.h +47 -0
- package/bios/seabios/src/jpeg.c +1055 -0
- package/bios/seabios/src/kbd.c +599 -0
- package/bios/seabios/src/list.h +91 -0
- package/bios/seabios/src/malloc.c +561 -0
- package/bios/seabios/src/malloc.h +70 -0
- package/bios/seabios/src/memmap.h +21 -0
- package/bios/seabios/src/misc.c +195 -0
- package/bios/seabios/src/mouse.c +342 -0
- package/bios/seabios/src/optionroms.c +475 -0
- package/bios/seabios/src/output.c +584 -0
- package/bios/seabios/src/output.h +68 -0
- package/bios/seabios/src/pcibios.c +241 -0
- package/bios/seabios/src/pmm.c +176 -0
- package/bios/seabios/src/pnpbios.c +88 -0
- package/bios/seabios/src/post.c +337 -0
- package/bios/seabios/src/resume.c +157 -0
- package/bios/seabios/src/romfile.c +146 -0
- package/bios/seabios/src/romfile.h +21 -0
- package/bios/seabios/src/romlayout.S +698 -0
- package/bios/seabios/src/sercon.c +677 -0
- package/bios/seabios/src/serial.c +317 -0
- package/bios/seabios/src/sha1.c +147 -0
- package/bios/seabios/src/sha1.h +8 -0
- package/bios/seabios/src/stacks.c +771 -0
- package/bios/seabios/src/stacks.h +68 -0
- package/bios/seabios/src/std/LegacyBios.h +985 -0
- package/bios/seabios/src/std/acpi.h +323 -0
- package/bios/seabios/src/std/bda.h +174 -0
- package/bios/seabios/src/std/disk.h +175 -0
- package/bios/seabios/src/std/mptable.h +77 -0
- package/bios/seabios/src/std/multiboot.h +260 -0
- package/bios/seabios/src/std/optionrom.h +59 -0
- package/bios/seabios/src/std/pirtable.h +35 -0
- package/bios/seabios/src/std/pmm.h +19 -0
- package/bios/seabios/src/std/pnpbios.h +24 -0
- package/bios/seabios/src/std/smbios.h +167 -0
- package/bios/seabios/src/std/tcg.h +554 -0
- package/bios/seabios/src/std/vbe.h +156 -0
- package/bios/seabios/src/std/vga.h +63 -0
- package/bios/seabios/src/string.c +251 -0
- package/bios/seabios/src/string.h +31 -0
- package/bios/seabios/src/system.c +357 -0
- package/bios/seabios/src/tcgbios.c +2014 -0
- package/bios/seabios/src/tcgbios.h +19 -0
- package/bios/seabios/src/types.h +156 -0
- package/bios/seabios/src/util.h +251 -0
- package/bios/seabios/src/version.c +5 -0
- package/bios/seabios/src/vgahooks.c +355 -0
- package/bios/seabios/src/x86.c +23 -0
- package/bios/seabios/src/x86.h +277 -0
- package/bios/seabios/vgasrc/Kconfig +211 -0
- package/bios/seabios/vgasrc/bochsdisplay.c +59 -0
- package/bios/seabios/vgasrc/bochsvga.c +447 -0
- package/bios/seabios/vgasrc/bochsvga.h +57 -0
- package/bios/seabios/vgasrc/cbvga.c +337 -0
- package/bios/seabios/vgasrc/clext.c +627 -0
- package/bios/seabios/vgasrc/geodevga.c +434 -0
- package/bios/seabios/vgasrc/geodevga.h +89 -0
- package/bios/seabios/vgasrc/ramfb.c +163 -0
- package/bios/seabios/vgasrc/stdvga.c +485 -0
- package/bios/seabios/vgasrc/stdvga.h +81 -0
- package/bios/seabios/vgasrc/stdvgaio.c +186 -0
- package/bios/seabios/vgasrc/stdvgamodes.c +534 -0
- package/bios/seabios/vgasrc/swcursor.c +96 -0
- package/bios/seabios/vgasrc/vbe.c +432 -0
- package/bios/seabios/vgasrc/vgabios.c +1131 -0
- package/bios/seabios/vgasrc/vgabios.h +88 -0
- package/bios/seabios/vgasrc/vgaentry.S +161 -0
- package/bios/seabios/vgasrc/vgafb.c +661 -0
- package/bios/seabios/vgasrc/vgafb.h +42 -0
- package/bios/seabios/vgasrc/vgafonts.c +785 -0
- package/bios/seabios/vgasrc/vgahw.h +152 -0
- package/bios/seabios/vgasrc/vgainit.c +202 -0
- package/bios/seabios/vgasrc/vgalayout.lds.S +23 -0
- package/bios/seabios/vgasrc/vgautil.h +103 -0
- package/bios/seabios/vgasrc/vgaversion.c +6 -0
- package/build/binaries.js +1 -1
- package/build/index-debug.cjs +1 -1
- package/build/index-debug.js +1 -1
- package/build/index.cjs +1 -1
- package/build/index.js +1 -1
- package/build/v86-debug.wasm +0 -0
- package/build/v86.wasm +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# SeaBIOS build system
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2008-2012 Kevin O'Connor <kevin@koconnor.net>
|
|
4
|
+
#
|
|
5
|
+
# This file may be distributed under the terms of the GNU LGPLv3 license.
|
|
6
|
+
|
|
7
|
+
# Output directory
|
|
8
|
+
OUT=out/
|
|
9
|
+
|
|
10
|
+
# Common command definitions
|
|
11
|
+
export HOSTCC := $(CC)
|
|
12
|
+
export CONFIG_SHELL := sh
|
|
13
|
+
export KCONFIG_AUTOHEADER := autoconf.h
|
|
14
|
+
export KCONFIG_CONFIG := $(CURDIR)/.config
|
|
15
|
+
export LC_ALL := C
|
|
16
|
+
CROSS_PREFIX=
|
|
17
|
+
ifneq ($(CROSS_PREFIX),)
|
|
18
|
+
CC=$(CROSS_PREFIX)gcc
|
|
19
|
+
endif
|
|
20
|
+
AS=$(CROSS_PREFIX)as
|
|
21
|
+
LD=$(CROSS_PREFIX)ld
|
|
22
|
+
OBJCOPY=$(CROSS_PREFIX)objcopy
|
|
23
|
+
OBJDUMP=$(CROSS_PREFIX)objdump
|
|
24
|
+
STRIP=$(CROSS_PREFIX)strip
|
|
25
|
+
PYTHON=python
|
|
26
|
+
CPP=cpp
|
|
27
|
+
IASL:=iasl
|
|
28
|
+
LD32BIT_FLAG:=-melf_i386
|
|
29
|
+
|
|
30
|
+
# Source files
|
|
31
|
+
SRCBOTH=misc.c stacks.c output.c string.c block.c cdrom.c disk.c mouse.c kbd.c \
|
|
32
|
+
system.c serial.c sercon.c clock.c resume.c pnpbios.c vgahooks.c pcibios.c \
|
|
33
|
+
apm.c cp437.c \
|
|
34
|
+
hw/pci.c hw/timer.c hw/rtc.c hw/dma.c hw/pic.c hw/ps2port.c hw/serialio.c \
|
|
35
|
+
hw/usb.c hw/usb-uhci.c hw/usb-ohci.c hw/usb-ehci.c \
|
|
36
|
+
hw/usb-hid.c hw/usb-msc.c hw/usb-uas.c \
|
|
37
|
+
hw/blockcmd.c hw/floppy.c hw/ata.c hw/ramdisk.c \
|
|
38
|
+
hw/lsi-scsi.c hw/esp-scsi.c hw/megasas.c hw/mpt-scsi.c
|
|
39
|
+
SRC16=$(SRCBOTH)
|
|
40
|
+
SRC32FLAT=$(SRCBOTH) post.c e820map.c malloc.c romfile.c x86.c optionroms.c \
|
|
41
|
+
pmm.c font.c boot.c bootsplash.c jpeg.c bmp.c tcgbios.c sha1.c \
|
|
42
|
+
hw/pcidevice.c hw/ahci.c hw/pvscsi.c hw/usb-xhci.c hw/usb-hub.c hw/sdcard.c \
|
|
43
|
+
fw/coreboot.c fw/lzmadecode.c fw/multiboot.c fw/csm.c fw/biostables.c \
|
|
44
|
+
fw/paravirt.c fw/shadow.c fw/pciinit.c fw/smm.c fw/smp.c fw/mtrr.c fw/xen.c \
|
|
45
|
+
fw/acpi.c fw/mptable.c fw/pirtable.c fw/smbios.c fw/romfile_loader.c \
|
|
46
|
+
hw/virtio-ring.c hw/virtio-pci.c hw/virtio-blk.c hw/virtio-scsi.c \
|
|
47
|
+
hw/tpm_drivers.c hw/nvme.c
|
|
48
|
+
SRC32SEG=string.c output.c pcibios.c apm.c stacks.c hw/pci.c hw/serialio.c
|
|
49
|
+
DIRS=src src/hw src/fw vgasrc
|
|
50
|
+
|
|
51
|
+
# Default compiler flags
|
|
52
|
+
cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
|
|
53
|
+
; then echo "$(2)"; else echo "$(3)"; fi ;)
|
|
54
|
+
|
|
55
|
+
EXTRAVERSION=
|
|
56
|
+
|
|
57
|
+
CPPFLAGS = -P -MD -MT $@
|
|
58
|
+
|
|
59
|
+
COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \
|
|
60
|
+
-Wall -Wno-strict-aliasing -Wold-style-definition \
|
|
61
|
+
$(call cc-option,$(CC),-Wtype-limits,) \
|
|
62
|
+
-m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \
|
|
63
|
+
-minline-all-stringops -fomit-frame-pointer \
|
|
64
|
+
-freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \
|
|
65
|
+
-ffunction-sections -fdata-sections -fno-common -fno-merge-constants
|
|
66
|
+
COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
|
|
67
|
+
COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,)
|
|
68
|
+
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
|
|
69
|
+
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
|
|
70
|
+
COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
|
|
71
|
+
COMMA := ,
|
|
72
|
+
|
|
73
|
+
CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0
|
|
74
|
+
CFLAGSSEG := $(COMMONCFLAGS) -DMODESEGMENT=1 -fno-defer-pop \
|
|
75
|
+
$(call cc-option,$(CC),-fno-jump-tables,-DMANUAL_NO_JUMP_TABLE) \
|
|
76
|
+
$(call cc-option,$(CC),-fno-tree-switch-conversion,)
|
|
77
|
+
CFLAGS32SEG := $(CFLAGSSEG) -DMODE16=0
|
|
78
|
+
CFLAGS16 := $(CFLAGSSEG) -DMODE16=1 \
|
|
79
|
+
$(call cc-option,$(CC),-m16,-Wa$(COMMA)src/code16gcc.s) \
|
|
80
|
+
$(call cc-option,$(CC),--param large-stack-frame=4,-fno-inline)
|
|
81
|
+
|
|
82
|
+
# Run with "make V=1" to see the actual compile commands
|
|
83
|
+
ifdef V
|
|
84
|
+
Q=
|
|
85
|
+
else
|
|
86
|
+
Q=@
|
|
87
|
+
MAKEFLAGS += --no-print-directory
|
|
88
|
+
endif
|
|
89
|
+
|
|
90
|
+
# Default targets
|
|
91
|
+
-include $(KCONFIG_CONFIG)
|
|
92
|
+
|
|
93
|
+
target-y :=
|
|
94
|
+
target-$(CONFIG_QEMU) += $(OUT)bios.bin
|
|
95
|
+
target-$(CONFIG_CSM) += $(OUT)Csm16.bin
|
|
96
|
+
target-$(CONFIG_COREBOOT) += $(OUT)bios.bin.elf
|
|
97
|
+
target-$(CONFIG_BUILD_VGABIOS) += $(OUT)vgabios.bin
|
|
98
|
+
|
|
99
|
+
all: $(target-y)
|
|
100
|
+
|
|
101
|
+
# Make definitions
|
|
102
|
+
.PHONY : all clean distclean FORCE
|
|
103
|
+
.DELETE_ON_ERROR:
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
################ Common build rules
|
|
107
|
+
|
|
108
|
+
# Verify the build environment works.
|
|
109
|
+
TESTGCC:=$(shell OUT="$(OUT)" CC="$(CC)" LD="$(LD)" IASL="$(IASL)" scripts/test-build.sh)
|
|
110
|
+
ifeq "$(TESTGCC)" "-1"
|
|
111
|
+
$(error "Please upgrade the build environment")
|
|
112
|
+
endif
|
|
113
|
+
|
|
114
|
+
ifeq "$(TESTGCC)" "0"
|
|
115
|
+
# Use -fwhole-program
|
|
116
|
+
CFLAGSWHOLE=-fwhole-program -DWHOLE_PROGRAM
|
|
117
|
+
endif
|
|
118
|
+
|
|
119
|
+
# Do a whole file compile by textually including all C code.
|
|
120
|
+
define whole-compile
|
|
121
|
+
@echo " Compiling whole program $3"
|
|
122
|
+
$(Q)printf '$(foreach i,$2,#include "$i"\n)' > $3.tmp.c
|
|
123
|
+
$(Q)$(CC) -I. $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3
|
|
124
|
+
endef
|
|
125
|
+
|
|
126
|
+
%.strip.o: %.o
|
|
127
|
+
@echo " Stripping $@"
|
|
128
|
+
$(Q)$(STRIP) $< -o $@
|
|
129
|
+
|
|
130
|
+
$(OUT)%.s: %.c
|
|
131
|
+
@echo " Compiling to assembler $@"
|
|
132
|
+
$(Q)$(CC) $(CFLAGS16) -S -c $< -o $@
|
|
133
|
+
|
|
134
|
+
$(OUT)%.o: %.c $(OUT)autoconf.h
|
|
135
|
+
@echo " Compile checking $@"
|
|
136
|
+
$(Q)$(CC) $(CFLAGS32FLAT) -c $< -o $@
|
|
137
|
+
|
|
138
|
+
$(OUT)%.lds: %.lds.S
|
|
139
|
+
@echo " Precompiling $@"
|
|
140
|
+
$(Q)$(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $@
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
################ Main BIOS build rules
|
|
144
|
+
|
|
145
|
+
$(OUT)asm-offsets.s: $(OUT)autoconf.h
|
|
146
|
+
|
|
147
|
+
$(OUT)asm-offsets.h: $(OUT)src/asm-offsets.s
|
|
148
|
+
@echo " Generating offset file $@"
|
|
149
|
+
$(Q)./scripts/gen-offsets.sh $< $@
|
|
150
|
+
|
|
151
|
+
$(OUT)ccode16.o: $(OUT)autoconf.h $(patsubst %.c, $(OUT)src/%.o,$(SRC16)) ; $(call whole-compile, $(CFLAGS16), $(addprefix src/, $(SRC16)),$@)
|
|
152
|
+
|
|
153
|
+
$(OUT)code32seg.o: $(OUT)autoconf.h $(patsubst %.c, $(OUT)src/%.o,$(SRC32SEG)) ; $(call whole-compile, $(CFLAGS32SEG), $(addprefix src/, $(SRC32SEG)),$@)
|
|
154
|
+
|
|
155
|
+
$(OUT)ccode32flat.o: $(OUT)autoconf.h $(patsubst %.c, $(OUT)src/%.o,$(SRC32FLAT)) ; $(call whole-compile, $(CFLAGS32FLAT), $(addprefix src/, $(SRC32FLAT)),$@)
|
|
156
|
+
|
|
157
|
+
$(OUT)romlayout.o: src/romlayout.S $(OUT)autoconf.h $(OUT)asm-offsets.h
|
|
158
|
+
@echo " Compiling (16bit) $@"
|
|
159
|
+
$(Q)$(CC) $(CFLAGS16) -c -D__ASSEMBLY__ $< -o $@
|
|
160
|
+
|
|
161
|
+
$(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(OUT)romlayout.o src/version.c scripts/layoutrom.py scripts/buildversion.py
|
|
162
|
+
@echo " Building ld scripts"
|
|
163
|
+
$(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autoversion.h
|
|
164
|
+
$(Q)$(CC) $(CFLAGS32FLAT) -c src/version.c -o $(OUT)version.o
|
|
165
|
+
$(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o
|
|
166
|
+
$(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o
|
|
167
|
+
$(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump
|
|
168
|
+
$(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump
|
|
169
|
+
$(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
|
|
170
|
+
$(Q)$(PYTHON) ./scripts/layoutrom.py $(OUT)code16.o.objdump $(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)$(KCONFIG_AUTOHEADER) $(OUT)romlayout16.lds $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
|
|
171
|
+
|
|
172
|
+
# These are actually built by scripts/layoutrom.py above, but by pulling them
|
|
173
|
+
# into an extra rule we prevent make -j from spawning layoutrom.py 4 times.
|
|
174
|
+
$(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds $(OUT)code32flat.o $(OUT)code16.o: $(OUT)romlayout16.lds
|
|
175
|
+
|
|
176
|
+
$(OUT)rom16.o: $(OUT)code16.o $(OUT)romlayout16.lds
|
|
177
|
+
@echo " Linking $@"
|
|
178
|
+
$(Q)$(LD) -T $(OUT)romlayout16.lds $< -o $@
|
|
179
|
+
|
|
180
|
+
$(OUT)rom32seg.o: $(OUT)code32seg.o $(OUT)romlayout32seg.lds
|
|
181
|
+
@echo " Linking $@"
|
|
182
|
+
$(Q)$(LD) -T $(OUT)romlayout32seg.lds $< -o $@
|
|
183
|
+
|
|
184
|
+
$(OUT)rom.o: $(OUT)rom16.strip.o $(OUT)rom32seg.strip.o $(OUT)code32flat.o $(OUT)romlayout32flat.lds
|
|
185
|
+
@echo " Linking $@"
|
|
186
|
+
$(Q)$(LD) -N -T $(OUT)romlayout32flat.lds $(OUT)rom16.strip.o $(OUT)rom32seg.strip.o $(OUT)code32flat.o -o $@
|
|
187
|
+
|
|
188
|
+
$(OUT)bios.bin.prep: $(OUT)rom.o scripts/checkrom.py
|
|
189
|
+
@echo " Prepping $@"
|
|
190
|
+
$(Q)rm -f $(OUT)bios.bin $(OUT)Csm16.bin $(OUT)bios.bin.elf
|
|
191
|
+
$(Q)$(OBJDUMP) -thr $< > $<.objdump
|
|
192
|
+
$(Q)$(OBJCOPY) -O binary $< $(OUT)bios.bin.raw
|
|
193
|
+
$(Q)$(PYTHON) ./scripts/checkrom.py $<.objdump $(CONFIG_ROM_SIZE) $(OUT)bios.bin.raw $(OUT)bios.bin.prep
|
|
194
|
+
|
|
195
|
+
$(OUT)bios.bin: $(OUT)bios.bin.prep
|
|
196
|
+
@echo " Creating $@"
|
|
197
|
+
$(Q)cp $< $@
|
|
198
|
+
|
|
199
|
+
$(OUT)Csm16.bin: $(OUT)bios.bin.prep
|
|
200
|
+
@echo " Creating $@"
|
|
201
|
+
$(Q)cp $< $@
|
|
202
|
+
|
|
203
|
+
$(OUT)bios.bin.elf: $(OUT)rom.o $(OUT)bios.bin.prep
|
|
204
|
+
@echo " Creating $@"
|
|
205
|
+
$(Q)$(STRIP) -R .comment $< -o $(OUT)bios.bin.elf
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
################ VGA build rules
|
|
209
|
+
|
|
210
|
+
# VGA src files
|
|
211
|
+
SRCVGA=src/output.c src/string.c src/hw/pci.c src/hw/serialio.c \
|
|
212
|
+
vgasrc/vgainit.c vgasrc/vgabios.c vgasrc/vgafb.c vgasrc/swcursor.c \
|
|
213
|
+
vgasrc/vgafonts.c vgasrc/vbe.c \
|
|
214
|
+
vgasrc/stdvga.c vgasrc/stdvgamodes.c vgasrc/stdvgaio.c \
|
|
215
|
+
vgasrc/clext.c vgasrc/bochsvga.c vgasrc/geodevga.c \
|
|
216
|
+
src/fw/coreboot.c vgasrc/cbvga.c vgasrc/bochsdisplay.c vgasrc/ramfb.c
|
|
217
|
+
|
|
218
|
+
ifeq "$(CONFIG_VGA_FIXUP_ASM)" "y"
|
|
219
|
+
$(OUT)vgaccode16.raw.s: $(OUT)autoconf.h $(patsubst %.c, $(OUT)%.o,$(SRCVGA)) ; $(call whole-compile, $(filter-out -fomit-frame-pointer,$(CFLAGS16)) -fno-omit-frame-pointer -S -Isrc, $(SRCVGA),$@)
|
|
220
|
+
|
|
221
|
+
$(OUT)vgaccode16.o: $(OUT)vgaccode16.raw.s scripts/vgafixup.py
|
|
222
|
+
@echo " Fixup VGA rom assembler"
|
|
223
|
+
$(Q)$(PYTHON) ./scripts/vgafixup.py $< $(OUT)vgaccode16.s
|
|
224
|
+
$(Q)$(AS) --32 src/code16gcc.s $(OUT)vgaccode16.s -o $@
|
|
225
|
+
else
|
|
226
|
+
$(OUT)vgaccode16.o: $(OUT)autoconf.h $(patsubst %.c, $(OUT)%.o,$(SRCVGA)) ; $(call whole-compile, $(CFLAGS16) -Isrc, $(SRCVGA),$@)
|
|
227
|
+
endif
|
|
228
|
+
|
|
229
|
+
$(OUT)vgaentry.o: vgasrc/vgaentry.S $(OUT)autoconf.h $(OUT)asm-offsets.h
|
|
230
|
+
@echo " Compiling (16bit) $@"
|
|
231
|
+
$(Q)$(CC) $(CFLAGS16) -c -D__ASSEMBLY__ $< -o $@
|
|
232
|
+
|
|
233
|
+
$(OUT)vgarom.o: $(OUT)vgaccode16.o $(OUT)vgaentry.o $(OUT)vgasrc/vgalayout.lds vgasrc/vgaversion.c scripts/buildversion.py
|
|
234
|
+
@echo " Linking $@"
|
|
235
|
+
$(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autovgaversion.h
|
|
236
|
+
$(Q)$(CC) $(CFLAGS16) -c vgasrc/vgaversion.c -o $(OUT)vgaversion.o
|
|
237
|
+
$(Q)$(LD) --gc-sections -T $(OUT)vgasrc/vgalayout.lds $(OUT)vgaccode16.o $(OUT)vgaentry.o $(OUT)vgaversion.o -o $@
|
|
238
|
+
|
|
239
|
+
$(OUT)vgabios.bin.raw: $(OUT)vgarom.o
|
|
240
|
+
@echo " Extracting binary $@"
|
|
241
|
+
$(Q)$(OBJCOPY) -O binary $< $@
|
|
242
|
+
|
|
243
|
+
$(OUT)vgabios.bin: $(OUT)vgabios.bin.raw scripts/buildrom.py
|
|
244
|
+
@echo " Finalizing rom $@"
|
|
245
|
+
$(Q)$(PYTHON) ./scripts/buildrom.py $< $@
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
################ DSDT build rules
|
|
249
|
+
|
|
250
|
+
iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
|
|
251
|
+
; then echo "$(2)"; else echo "$(3)"; fi ;)
|
|
252
|
+
|
|
253
|
+
%.hex: %.dsl ./scripts/acpi_extract_preprocess.py ./scripts/acpi_extract.py
|
|
254
|
+
@echo " Compiling IASL $@"
|
|
255
|
+
$(Q)$(CPP) $(CPPFLAGS) $< -o $(OUT)$*.dsl.i.orig
|
|
256
|
+
$(Q)$(PYTHON) ./scripts/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > $(OUT)$*.dsl.i
|
|
257
|
+
$(Q)$(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i
|
|
258
|
+
$(Q)$(PYTHON) ./scripts/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off
|
|
259
|
+
$(Q)cat $(OUT)$*.off > $@
|
|
260
|
+
|
|
261
|
+
iasl: src/fw/acpi-dsdt.hex src/fw/ssdt-proc.hex src/fw/ssdt-pcihp.hex src/fw/ssdt-misc.hex
|
|
262
|
+
|
|
263
|
+
################ Kconfig rules
|
|
264
|
+
|
|
265
|
+
define do-kconfig
|
|
266
|
+
$(Q)mkdir -p $(OUT)/scripts/kconfig/lxdialog
|
|
267
|
+
$(Q)mkdir -p $(OUT)/include/config
|
|
268
|
+
$(Q)mkdir -p $(addprefix $(OUT), $(DIRS))
|
|
269
|
+
$(Q)$(MAKE) -C $(OUT) -f $(CURDIR)/scripts/kconfig/Makefile srctree=$(CURDIR) src=scripts/kconfig obj=scripts/kconfig Q=$(Q) Kconfig=$(CURDIR)/src/Kconfig $1
|
|
270
|
+
endef
|
|
271
|
+
|
|
272
|
+
$(OUT)autoconf.h : $(KCONFIG_CONFIG) ; $(call do-kconfig, silentoldconfig)
|
|
273
|
+
$(KCONFIG_CONFIG): src/Kconfig vgasrc/Kconfig ; $(call do-kconfig, olddefconfig)
|
|
274
|
+
%onfig: ; $(call do-kconfig, $@)
|
|
275
|
+
help: ; $(call do-kconfig, $@)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
################ Generic rules
|
|
279
|
+
|
|
280
|
+
clean:
|
|
281
|
+
$(Q)rm -rf $(OUT)
|
|
282
|
+
|
|
283
|
+
distclean: clean
|
|
284
|
+
$(Q)rm -f .config .config.old
|
|
285
|
+
|
|
286
|
+
-include $(OUT)*.d $(patsubst %,$(OUT)%/*.d,$(DIRS))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Welcome to the SeaBIOS project! This project implements an X86 legacy
|
|
2
|
+
bios that is built with standard GNU tools.
|
|
3
|
+
|
|
4
|
+
Please see build and developer information at:
|
|
5
|
+
|
|
6
|
+
http://seabios.org/Developer_Documentation
|
|
7
|
+
|
|
8
|
+
For the impatient, SeaBIOS is built for QEMU and tested on QEMU with:
|
|
9
|
+
|
|
10
|
+
make
|
|
11
|
+
qemu -bios out/bios.bin
|
|
12
|
+
|
|
13
|
+
SeaBIOS can be configured with kconfig. To change the default
|
|
14
|
+
configuration one can run "make menuconfig" prior to running "make".
|
|
15
|
+
|
|
16
|
+
For other types of builds, and for more detailed developer
|
|
17
|
+
documentation, please see the online documentation listed above.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
The SeaBIOS code can be built using standard GNU tools. A recent Linux
|
|
2
|
+
distribution should be able to build SeaBIOS using the standard
|
|
3
|
+
compiler tools.
|
|
4
|
+
|
|
5
|
+
Building SeaBIOS
|
|
6
|
+
================
|
|
7
|
+
|
|
8
|
+
First, [obtain the code](Download). SeaBIOS can be compiled for
|
|
9
|
+
several different build targets. It is also possible to configure
|
|
10
|
+
additional compile time options - run **make menuconfig** to do this.
|
|
11
|
+
|
|
12
|
+
Build for QEMU (along with KVM, Xen, and Bochs)
|
|
13
|
+
-----------------------------------------------
|
|
14
|
+
|
|
15
|
+
To build for QEMU (and similar), one should be able to run "make" in
|
|
16
|
+
the main directory. The resulting file "out/bios.bin" contains the
|
|
17
|
+
processed bios image.
|
|
18
|
+
|
|
19
|
+
One can use the resulting binary with QEMU by using QEMU's "-bios"
|
|
20
|
+
option. For example:
|
|
21
|
+
|
|
22
|
+
`qemu -bios out/bios.bin -fda myfdimage.img`
|
|
23
|
+
|
|
24
|
+
One can also use the resulting binary with Bochs. For example:
|
|
25
|
+
|
|
26
|
+
`bochs -q 'floppya: 1_44=myfdimage.img' 'romimage: file=out/bios.bin'`
|
|
27
|
+
|
|
28
|
+
Build for coreboot
|
|
29
|
+
------------------
|
|
30
|
+
|
|
31
|
+
To build for coreboot please see the coreboot build instructions at:
|
|
32
|
+
<http://www.coreboot.org/SeaBIOS>
|
|
33
|
+
|
|
34
|
+
Build as a UEFI Compatibility Support Module (CSM)
|
|
35
|
+
--------------------------------------------------
|
|
36
|
+
|
|
37
|
+
To build as a CSM, first run kconfig (make menuconfig) and enable
|
|
38
|
+
CONFIG_CSM. Then build SeaBIOS (make) - the resulting binary will be
|
|
39
|
+
in "out/Csm16.bin".
|
|
40
|
+
|
|
41
|
+
This binary may be used with the OMVF/EDK-II UEFI firmware. It will
|
|
42
|
+
provide "legacy" BIOS services for booting non-EFI operating systems
|
|
43
|
+
and will also allow OVMF to display on otherwise unsupported video
|
|
44
|
+
hardware by using the traditional VGA BIOS. (Windows 2008r2 is known
|
|
45
|
+
to use INT 10h BIOS calls even when booted via EFI, and the presence
|
|
46
|
+
of a CSM makes this work as expected too.)
|
|
47
|
+
|
|
48
|
+
Having built SeaBIOS with CONFIG_CSM, one should be able to drop the
|
|
49
|
+
result (out/Csm16.bin) into an OVMF build tree at
|
|
50
|
+
OvmfPkg/Csm/Csm16/Csm16.bin and then build OVMF with 'build -D
|
|
51
|
+
CSM_ENABLE'. The SeaBIOS binary will be included as a discrete file
|
|
52
|
+
within the 'Flash Volume' which is created, and there are tools which
|
|
53
|
+
will extract it and allow it to be replaced.
|
|
54
|
+
|
|
55
|
+
Distribution builds
|
|
56
|
+
===================
|
|
57
|
+
|
|
58
|
+
If one is building a binary version of SeaBIOS as part of a package
|
|
59
|
+
(such as an rpm) or for wide distribution, please provide the
|
|
60
|
+
EXTRAVERSION field during the build. For example:
|
|
61
|
+
|
|
62
|
+
`make EXTRAVERSION="-${RPM_PACKAGE_RELEASE}"`
|
|
63
|
+
|
|
64
|
+
The EXTRAVERSION field should provide the package version (if
|
|
65
|
+
applicable) and the name of the distribution (if that's not already
|
|
66
|
+
obvious from the package version). This string will be appended to the
|
|
67
|
+
main SeaBIOS version. The above information helps SeaBIOS developers
|
|
68
|
+
correlate defect reports to the source code and build environment.
|
|
69
|
+
|
|
70
|
+
If one is building a binary in a build environment that does not have
|
|
71
|
+
access to the git tool or does not have the full SeaBIOS git repo
|
|
72
|
+
available, then please use an official SeaBIOS release tar file as
|
|
73
|
+
source. If building from a snapshot (where there is no official
|
|
74
|
+
SeaBIOS tar) then one should generate a snapshot tar file on a machine
|
|
75
|
+
that does support git using the scripts/tarball.sh tool. For example:
|
|
76
|
+
|
|
77
|
+
`scripts/tarball.sh`
|
|
78
|
+
|
|
79
|
+
The tarball.sh script encodes version information in the resulting tar
|
|
80
|
+
file which the build can extract and include in the final binary. The
|
|
81
|
+
above EXTRAVERSION field should still be set when building from a tar.
|
|
82
|
+
|
|
83
|
+
Overview of files in the repository
|
|
84
|
+
===================================
|
|
85
|
+
|
|
86
|
+
The **src/** directory contains the main bios source code. The
|
|
87
|
+
**src/hw/** directory contains source code specific to hardware
|
|
88
|
+
drivers. The **src/fw/** directory contains source code for platform
|
|
89
|
+
firmware initialization. The **src/std/** directory contains header
|
|
90
|
+
files describing standard bios, firmware, and hardware interfaces.
|
|
91
|
+
|
|
92
|
+
The **vgasrc/** directory contains code for [SeaVGABIOS](SeaVGABIOS).
|
|
93
|
+
|
|
94
|
+
The **scripts/** directory contains helper utilities for manipulating
|
|
95
|
+
and building the final roms.
|
|
96
|
+
|
|
97
|
+
The **out/** directory is created by the build process - it contains
|
|
98
|
+
all intermediate and final files.
|
|
99
|
+
|
|
100
|
+
When reading the C code be aware that code that runs in 16bit mode can
|
|
101
|
+
not arbitrarily access non-stack memory - see [Memory Model](Memory
|
|
102
|
+
Model) for more details. For information on the major C code functions
|
|
103
|
+
and where code execution starts see [Execution and code
|
|
104
|
+
flow](Execution and code flow).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
SeaBIOS welcomes contributions of code (either fixing bugs or adding
|
|
2
|
+
new functionality). At a high level, the process to contribute a
|
|
3
|
+
change is:
|
|
4
|
+
|
|
5
|
+
1. [Obtain](Download) the current code and documentation
|
|
6
|
+
2. Enhance and test the code locally
|
|
7
|
+
3. Submit changes to the SeaBIOS [mailing list](Mailinglist) as a
|
|
8
|
+
patch
|
|
9
|
+
4. Receive feedback, answer questions, and possibly provide updated
|
|
10
|
+
patches
|
|
11
|
+
5. When accepted, a maintainer (Kevin O'Connor or Gerd Hoffman) will
|
|
12
|
+
commit the change to the master SeaBIOS repository
|
|
13
|
+
|
|
14
|
+
The SeaBIOS patch submission process is similar to the
|
|
15
|
+
[QEMU process](http://wiki.qemu.org/Contribute/SubmitAPatch). Please
|
|
16
|
+
review the QEMU process for more details and tips on the best way to
|
|
17
|
+
submit patches. The SeaBIOS C code does follow a slightly different
|
|
18
|
+
coding style from QEMU (eg, mixed code and C99 style variable
|
|
19
|
+
declarations are encouraged, braces are not required around single
|
|
20
|
+
statement blocks), however patches in the QEMU style are acceptable.
|