# # Specific targets and things for the OCP Winterfell board # # This is responsible for extracting the DXE section from the ROM, # extracting each of the images from it, and setting the sizes for # the different firmware images. # # Replace just the dxe volume: # ( echo u860000 6a0000 ; pv build/winterfell/dxe.vol ) > /dev/ttyACM0 # 6.9 MB DXE+Linux ROM, uncompressed dxe-size := 0x6A0000 #dxe-compress := 0xF00000 dxe-path := $(BUILD)/rom/0x00860000 dxe-files := $(shell awk \ '/^[0-9A-Fa-f]/ {print "$(dxe-path)/"$$1".ffs"}' \ boards/$(BOARD)/image-files.txt \ ) $(dixe-files): extract.intermediate # The Intel firmware has lots of small pieces. # We replace the DXE recovery image and one of the other # images with the LinuxBoot one. Potentially we # can clean up more space. FVS := \ $(BUILD)/rom/0x00000000.ifd \ $(BUILD)/rom/0x00010000.bin \ $(BUILD)/nvram1.vol \ $(BUILD)/nvram2.vol \ $(BUILD)/rom/0x00840000.bin \ $(BUILD)/dxe.vol \ $(BUILD)/rom/0x00f00000.fv \ # Replace the DxeCore and SmmCore with our own # and add in the Linux kernel / initrd $(BUILD)/dxe.vol: \ $(dxe-files) \ $(BUILD)/Linux.ffs \ $(BUILD)/Initrd.ffs \ nvram1-size := 0x20000 nvram2-size := 0x20000 $(BUILD)/nvram1.vol: $(BUILD)/nvram1.ffs $(BUILD)/nvram2.vol: $(BUILD)/nvram2.ffs $(BUILD)/nvram1.ffs: $(BUILD)/rom/0x00800000/cef5b9a3-476d-497f-9fdc-e98143e0422c.ffs ./bin/nvram-compact < $< > $@ $(BUILD)/nvram2.ffs: $(BUILD)/rom/0x00820000/cef5b9a3-476d-497f-9fdc-e98143e0422c.ffs ./bin/nvram-compact < $< > $@ # I wish we could use our own builds of these, but # the AMI firmware modules do not play nice with us. NO = \ $(BUILD)/DxeCore.ffs \ $(BUILD)/ReportStatusCodeRouterRuntimeDxe.ffs \ $(BUILD)/StatusCodeHandlerRuntimeDxe.ffs \ $(BUILD)/RuntimeDxe.ffs \ $(BUILD)/PiSmmCore.ffs \ $(BUILD)/RuntimeDxe.ffs \ $(BUILD)/AcpiTableDxe.ffs \ $(BUILD)/AcpiPlatform.ffs \ $(BUILD)/PciBusDxe.ffs \ $(BUILD)/PciHostBridgeDxe.ffs \ $(BUILD)/PciSioSerialDxe.ffs \