mirror of
https://github.com/linux-msm/bootrr.git
synced 2026-02-25 13:12:03 -08:00
Makefile: add target to generate cpio
It is convenient to deliver the bootrr as a cpio archive which can be appended to an initramfs image. The output cpio filename can be overriding the CPIONAME variable, it is set to 'bootrr' by default. Also use a default value for DESTDIR, so that "make cpio" just works. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
e4ea38f586
commit
2a1010e7ad
16
Makefile
16
Makefile
@@ -4,6 +4,9 @@ all:
|
||||
|
||||
all-install :=
|
||||
|
||||
DESTDIR ?= dest
|
||||
CPIONAME ?= bootrr
|
||||
|
||||
HELPERS := assert_file_is_empty \
|
||||
assert_device_present \
|
||||
assert_driver_present \
|
||||
@@ -41,4 +44,17 @@ $(foreach v,${HELPERS},$(eval $(call add-scripts,helpers,$v)))
|
||||
|
||||
install: $(all-install)
|
||||
|
||||
CPIO := $(PWD)/$(CPIONAME).cpio
|
||||
|
||||
$(CPIO): $(all-install)
|
||||
@cd $(DESTDIR) && find ./$(prefix)/bin | cpio -o -H newc > $(CPIO)
|
||||
|
||||
%.cpio.gz: %.cpio
|
||||
@gzip < $< > $@
|
||||
|
||||
cpio: $(CPIO)
|
||||
|
||||
cpio.gz: $(CPIO).gz
|
||||
|
||||
clean:
|
||||
@rm -f $(CPIO) $(CPIO).gz
|
||||
|
||||
Reference in New Issue
Block a user