123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- /*++
- Copyright (c) 2014 Minoca Corp. All Rights Reserved
- Module Name:
- BIOS UEFI Firmware
- Abstract:
- This module implements a UEFI-compatible firmware layer on top of a
- legacy PC/AT BIOS.
- Author:
- Evan Green 26-Feb-2014
- Environment:
- Firmware
- --*/
- function build() {
- plat = "bios";
- text_address = "0x100000";
- sources = [
- "acpi.c",
- "bioscall.c",
- ":" + plat + "fwv.o",
- "disk.c",
- "debug.c",
- "fwvol.c",
- "intr.c",
- "main.c",
- "memmap.c",
- "timer.c",
- "video.c",
- "x86/entry.S",
- "x86/realmexe.S"
- ];
- includes = [
- "$//uefi/include"
- ];
- sources_config = {
- "CFLAGS": ["-fshort-wchar"]
- };
- link_ldflags = [
- "-nostdlib",
- "-static"
- ];
- link_config = {
- "LDFLAGS": link_ldflags
- };
- common_libs = [
- "//uefi/core:ueficore",
- "//kernel/kd:kdboot",
- "//uefi/core:ueficore",
- "//uefi/archlib:uefiarch",
- "//lib/fatlib:fat",
- "//lib/basevid:basevid",
- "//lib/rtl/base:basertlb",
- "//kernel/kd/kdusb:kdnousb",
- "//uefi/core:emptyrd",
- ];
- libs = [
- "//uefi/dev/ns16550:ns16550"
- ];
- libs += common_libs;
- platfw = plat + "fw";
- elf = {
- "label": platfw + ".elf",
- "inputs": sources + libs,
- "sources_config": sources_config,
- "includes": includes,
- "config": link_config
- };
- entries = executable(elf);
- //
- // Build the firmware volume.
- //
- ffs = [
- "//uefi/core/runtime:rtbase.ffs",
- "//uefi/plat/bios/runtime:" + plat + "rt.ffs"
- ];
- fw_volume = uefi_fwvol_o(plat, ffs);
- entries += fw_volume;
- flattened = {
- "label": platfw,
- "inputs": [":" + platfw + ".elf"]
- };
- flattened = flattened_binary(flattened);
- entries += flattened;
- return entries;
- }
- return build();
|