123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- ################################################################################
- #
- # Copyright (c) 2015 Minoca Corp.
- #
- # This file is licensed under the terms of the GNU General Public License
- # version 3. Alternative licensing terms are available. Contact
- # info@minocacorp.com for details. See the LICENSE file at the root of this
- # project for complete licensing information.
- #
- # Module Name:
- #
- # Raspberry Pi 2 UEFI Firmware
- #
- # Abstract:
- #
- # This module implements UEFI firmware for the Raspberry Pi 2.
- #
- # Author:
- #
- # Chris Stevens 19-Mar-2015
- #
- # Environment:
- #
- # Firmware
- #
- ################################################################################
- include $(SRCDIR)/../common
- BINARY := rpi2fw.elf
- BINARYTYPE = staticapp
- BINPLACE = bin
- VPATH += $(BINROOT):
- LDFLAGS += -Wl,--no-wchar-size-warning -nodefaultlibs -nostartfiles -nostdlib
- OBJS += debug.o \
- fwvol.o \
- intr.o \
- main.o \
- memmap.o \
- rpi2fwv.o \
- ramdenum.o \
- smbios.o \
- smp.o \
- timer.o \
- ARMV7_OBJS = armv7/entry.o \
- armv7/smpa.o \
- armv7/timera.o \
- TEXT_ADDRESS := 0x00008000
- TARGETLIBS += $(OBJROOT)/os/uefi/dev/pl11/pl11.a \
- $(OBJROOT)/os/uefi/dev/sd/core/sd.a \
- $(OBJROOT)/os/uefi/dev/bcm2709/bcm2709.a \
- $(OBJROOT)/os/uefi/core/emptyrd/emptyrd.a
- EXTRA_SRC_DIRS = armv7
- ##
- ## Only build the directories if the binary hasn't been forced on the command
- ## line.
- ##
- ifeq ($(BINARY), rpi2fw.elf)
- DIRS = acpi \
- blobs \
- runtime
- endif
- include $(SRCROOT)/os/minoca.mk
- CFLAGS += -fshort-wchar
- ##
- ## Define the target that creates the firmware volume object file.
- ##
- FWVOL_IMAGES = $(RTBASE) runtime/rpi2rt.ffs acpi/acpi.ffs
- rpi2fwv.o: rpi2fwv
- rpi2fwv: $(FWVOL_IMAGES)
- @echo Generating - $@
- @genfv -o $@ $^
- runtime/rpi2rt.ffs: runtime
- acpi/acpi.ffs: acpi
- postbuild: rpi2fw
- rpi2fw: $(BINARY)
- @echo Flattening - $(notdir $<)
- @$(OBJCOPY) -O binary $^ $@
- @cp -p $@ $(BINROOT)/
|