mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2024-12-13 13:15:39 +00:00
Cleanup FIP build targets and messages
At present the fip.bin depends on phony targets for BL images, resulting in unconditional remake of fip.bin. Also the build messages doesn't match with the rest of build system. This patch modifies the fip.bin dependencies to the actual BL binary images so that fip.bin is remade only when the component images are rebuilt/modified. The build messages and FIP Makefile are modified to match the style of rest of the build system. Change-Id: I8dd08666ff766d106820a5b4b037c2161bcf140f
This commit is contained in:
parent
08c28d5385
commit
2f2cef4657
22
Makefile
22
Makefile
@ -49,6 +49,8 @@ else
|
||||
Q=
|
||||
endif
|
||||
|
||||
export Q
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
ifneq (${DEBUG}, 0)
|
||||
@ -197,8 +199,13 @@ PP := ${CROSS_COMPILE}gcc -E ${CFLAGS}
|
||||
|
||||
|
||||
bl1: ${BUILD_BL1} ${BUILD_PLAT}/bl1.bin
|
||||
FIP_DEPS += ${BUILD_PLAT}/bl1.bin
|
||||
|
||||
bl2: ${BUILD_BL2} ${BUILD_PLAT}/bl2.bin
|
||||
FIP_DEPS += ${BUILD_PLAT}/bl2.bin
|
||||
|
||||
bl31: ${BUILD_BL31} ${BUILD_PLAT}/bl31.bin
|
||||
FIP_DEPS += ${BUILD_PLAT}/bl31.bin
|
||||
|
||||
BASE_COMMIT ?= origin/master
|
||||
|
||||
@ -230,6 +237,7 @@ else
|
||||
ifeq (,$(wildcard ${BL33}))
|
||||
$(error "The file BL33 points to cannot be found (${BL33})")
|
||||
endif
|
||||
FIP_DEPS += ${BL33}
|
||||
endif
|
||||
|
||||
|
||||
@ -283,13 +291,13 @@ endif
|
||||
clean:
|
||||
@echo " CLEAN"
|
||||
${Q}rm -rf ${BUILD_PLAT}
|
||||
${Q}make -C ${FIPTOOLPATH} clean
|
||||
${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
|
||||
|
||||
realclean distclean:
|
||||
@echo " REALCLEAN"
|
||||
${Q}rm -rf ${BUILD_BASE}
|
||||
${Q}rm -f ${CURDIR}/cscope.*
|
||||
${Q}make -C ${FIPTOOLPATH} clean
|
||||
${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
|
||||
|
||||
dump:
|
||||
@echo " OBJDUMP"
|
||||
@ -310,9 +318,9 @@ checkpatch: locate-checkpatch
|
||||
@git format-patch --stdout ${BASE_COMMIT} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
|
||||
|
||||
${FIPTOOL}:
|
||||
@echo " BUILDING FIRMWARE IMAGE PACKAGE TOOL $@"
|
||||
${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH}
|
||||
@echo
|
||||
${Q}make -C ${FIPTOOLPATH}
|
||||
@echo "Built $@ successfully"
|
||||
@echo
|
||||
|
||||
${BUILD_DIRS}:
|
||||
@ -389,9 +397,7 @@ ${BUILD_PLAT}/bl31.bin: ${BUILD_BL31}/bl31.elf
|
||||
@echo "Built $@ successfully"
|
||||
@echo
|
||||
|
||||
${BUILD_PLAT}/fip.bin: bl2 bl31 ${FIP_DEPS} locate-bl33 ${FIPTOOL}
|
||||
@echo " CREATE FIRMWARE IMAGE PACKAGE $@"
|
||||
@echo
|
||||
${BUILD_PLAT}/fip.bin: locate-bl33 ${FIP_DEPS} ${FIPTOOL}
|
||||
${Q}${FIPTOOL} --dump \
|
||||
--bl2 ${BUILD_PLAT}/bl2.bin \
|
||||
--bl31 ${BUILD_PLAT}/bl31.bin \
|
||||
@ -399,6 +405,8 @@ ${BUILD_PLAT}/fip.bin: bl2 bl31 ${FIP_DEPS} locate-bl33 ${FIPTOOL}
|
||||
${FIP_ARGS} \
|
||||
$@
|
||||
@echo
|
||||
@echo "Built $@ successfully"
|
||||
@echo
|
||||
|
||||
|
||||
cscope:
|
||||
|
@ -32,7 +32,7 @@ PROJECT = fip_create
|
||||
OBJECTS = fip_create.o
|
||||
|
||||
CFLAGS = -Wall -Werror -pedantic -std=c99
|
||||
ifeq ($(BUILD),DEBUG)
|
||||
ifeq (${DEBUG},1)
|
||||
CFLAGS += -g -O0 -DDEBUG
|
||||
else
|
||||
CFLAGS += -O2
|
||||
@ -47,16 +47,16 @@ RM := rm -rf
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(PROJECT)
|
||||
all: ${PROJECT}
|
||||
|
||||
$(PROJECT): $(OBJECTS) Makefile
|
||||
@echo "[LD] $@"
|
||||
$(CC) $(OBJECTS) -o $@
|
||||
${PROJECT}: ${OBJECTS} Makefile
|
||||
@echo " LD $@"
|
||||
${Q}${CC} ${OBJECTS} -o $@
|
||||
|
||||
%.o: %.c %.h Makefile
|
||||
@echo "[CC] $@"
|
||||
$(CC) -c $(CFLAGS) $(INCLUDE_PATHS) $< -o $@
|
||||
@echo " CC $<"
|
||||
${Q}${CC} -c ${CFLAGS} ${INCLUDE_PATHS} $< -o $@
|
||||
|
||||
clean:
|
||||
$(RM) $(PROJECT)
|
||||
$(RM) $(OBJECTS)
|
||||
${Q}${RM} ${PROJECT}
|
||||
${Q}${RM} ${OBJECTS}
|
||||
|
Loading…
Reference in New Issue
Block a user