de36d333c2
In the great tradition of LinuxBIOS this allows adding a kernel as payload. add-payload is extended to also allow adding an initial ramdisk (-I filename) and a command line (-C console=ttyS0). Change-Id: Iaca499a98b0adf0134e78d6bf020b6531a626aaa Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/3302 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
38 lines
754 B
Makefile
38 lines
754 B
Makefile
obj ?= $(shell pwd)
|
|
|
|
HOSTCC ?= gcc
|
|
CFLAGS ?= -g -Wall -Werror
|
|
CFLAGS += -D_7ZIP_ST
|
|
|
|
BINARY:=$(obj)/cbfstool
|
|
|
|
COMMON:=cbfstool.o common.o cbfs_image.o compress.o fit.o
|
|
COMMON+=cbfs-mkstage.o cbfs-mkpayload.o
|
|
# LZMA
|
|
COMMON+=lzma/lzma.o
|
|
COMMON+=lzma/C/LzFind.o lzma/C/LzmaDec.o lzma/C/LzmaEnc.o
|
|
|
|
COMMON+=linux_trampoline.o cbfs-payload-linux.o
|
|
|
|
COMMON:=$(addprefix $(obj)/,$(COMMON))
|
|
|
|
all: dep $(BINARY)
|
|
|
|
$(obj)/%.o: %.c
|
|
$(HOSTCC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -f $(COMMON) $(BINARY)
|
|
|
|
tags:
|
|
ctags *.[ch]
|
|
|
|
$(obj)/cbfstool:$(COMMON)
|
|
$(HOSTCC) $(CFLAGS) -o $@ $^
|
|
|
|
dep:
|
|
@$(HOSTCC) $(CFLAGS) -MM *.c > .dependencies
|
|
@$(HOSTCC) $(CFLAGS) -MM lzma/*.c >> .dependencies
|
|
@$(HOSTCC) $(CFLAGS) -MM lzma/C/*.c >> .dependencies
|
|
|
|
-include .dependencies
|