mirror of
https://github.com/linuxboot/linuxboot
synced 2024-11-21 23:59:59 +00:00
84 lines
2.9 KiB
Makefile
84 lines
2.9 KiB
Makefile
#
|
|
# Specific targets and things for the s2600wf mainboard.
|
|
#
|
|
# 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.
|
|
#
|
|
# For space reasons the DXE is put in the recovery FV at 0x2C00000
|
|
# and the kernel/initrd are put in a separate volume at 0x3500000.
|
|
#
|
|
# To upload the entire ROM (including ME and PEI):
|
|
# ( echo u0 4000000 ; pv build/s2600wf/linuxboot.vol ) > /dev/ttyACM0
|
|
#
|
|
# To upload just kernel or DXE:
|
|
# ( echo u3500000 400000 ; pv build/s2600wf/linux.vol ) > /dev/ttyACM0
|
|
# ( echo u2c00000 400000 ; pv build/s2600wf/dxe.vol ) > /dev/ttyACM0
|
|
#
|
|
|
|
# 4 MB DXE ROM, compressed from 15 MB
|
|
dxe-compress := 0xF00000
|
|
dxe-size := 0x400000
|
|
|
|
# 4 MB Linux ROM, uncompressed since bzImage is already compressed
|
|
linux-size := 0x400000
|
|
|
|
|
|
dxe-path := $(BUILD)/rom/0x03500000/9e21fd93-9c72-4c15-8c4b-e77f1db2d792/0
|
|
|
|
dxe-files := $(shell awk \
|
|
'/^[0-9A-Fa-f]/ {print "$(dxe-path)/"$$1".ffs"}' \
|
|
boards/$(BOARD)/image-files.txt \
|
|
)
|
|
|
|
|
|
# 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 =
|
|
FVS += $(BUILD)/rom/0x00000000.ifd
|
|
FVS += $(BUILD)/rom/0x00010000.bin # ME + PDR + DevExp + Gbe + PTT regions
|
|
FVS += $(BUILD)/dxe.vol # Recovery DXE at 0x2C00000
|
|
FVS += $(BUILD)/rom/0x03000000.fv # Empty FV at 0x3000000 (1.5 MB)
|
|
FVS += $(BUILD)/rom/0x03180000.fv # Empty FV (128 KB)
|
|
FVS += $(BUILD)/rom/0x031a0000.fv # Logo FV (128 KB)
|
|
FVS += $(BUILD)/rom/0x031c0000.fv # Empty FV (64 KB)
|
|
FVS += $(BUILD)/rom/0x031d0000.bin # Empty padding (196 KB)
|
|
FVS += $(BUILD)/rom/0x03200000.fv # Empty FV (3 MB)
|
|
FVS += $(BUILD)/linux.vol # Non-recovery DXE, replaced with Linux (4 MB)
|
|
FVS += $(BUILD)/rom/0x03900000.fv # NVRAM (1 MB)
|
|
# FVS += $(BUILD)/rom/0x03a00000.fv # PEI (non-recovery?) (2 MB)
|
|
FVS += $(BUILD)/2mb.fv # an empty FV to replace the unused PEI
|
|
FVS += $(BUILD)/rom/0x03c00000.fv # PEI (2 MB) (recovery won't boot without it)
|
|
FVS += $(BUILD)/rom/0x03e00000.fv # Microcode (196 KB)
|
|
FVS += $(BUILD)/rom/0x03e30000.fv # Unknown (512 KB)
|
|
FVS += $(BUILD)/rom/0x03e80000.fv # PeiCore (recovery) (512 KB)
|
|
FVS += $(BUILD)/rom/0x03f00000.fv # Microcode in FIT (196 KB)
|
|
FVS += $(BUILD)/rom/0x03f30000.fv # Unknown (512 KB)
|
|
# FVS += $(BUILD)/rom/0x03f80000.fv # PeiCore (non-recovery?) (512 KB)
|
|
FVS += $(BUILD)/512kb.fv # an empty FV to replace the unused PeiCore
|
|
|
|
$(BUILD)/512kb.fv: dxe/hello.ffs
|
|
./bin/create-fv -s 0x80000 $< > $@
|
|
$(BUILD)/2mb.fv: dxe/hello.ffs
|
|
./bin/create-fv -s 0x200000 $< > $@
|
|
|
|
|
|
# Replace the DxeCore and SmmCore with our own
|
|
$(BUILD)/dxe.vol: \
|
|
$(BUILD)/DxeCore.ffs \
|
|
$(BUILD)/PiSmmCore.ffs \
|
|
./dxe/linuxboot.ffs \
|
|
$(dxe-files) \
|
|
|
|
dxe/fvloader.ffs dxe/hello.ffs: dxe.intermediate
|
|
dxe.intermediate:
|
|
$(MAKE) -C dxe
|
|
|
|
# Linux and initrd go into their own FV
|
|
$(BUILD)/linux.vol: \
|
|
$(BUILD)/Linux.ffs \
|
|
$(BUILD)/Initrd.ffs \
|
|
|