diff --git a/core/Makefile b/core/Makefile index 142a2c16c..628a8de30 100644 --- a/core/Makefile +++ b/core/Makefile @@ -735,6 +735,34 @@ systemtarball-nodeps: $(FS_GET_STATS) \ stnod: systemtarball-nodeps +####### +## boot tarball +define build-boottarball-target + $(hide) echo "Target boot fs tarball: $(INSTALLED_BOOTTARBALL_TARGET) + $(hide) mkdir -p $(PRODUCT_OUT)/boot + $(hide) cp -f $(INTERNAL_BOOTIMAGE_FILES) $(PRODUCT_OUT)/boot/. + $(hide) echo $(BOARD_KERNEL_CMDLINE) > $(PRODUCT_OUT)/boot/cmdline + $(hide) $(MKTARBALL) $(FS_GET_STATS) \ + $(PRODUCT_OUT) boot $(PRIVATE_BOOT_TAR) \ + $(INSTALLED_BOOTTARBALL_TARGET) +endef + +ifndef BOOT_TARBALL_FORMAT + BOOT_TARBALL_FORMAT := bz2 +endif + +boot_tar := $(PRODUCT_OUT)/boot.tar +INSTALLED_BOOTTARBALL_TARGET := $(boot_tar).$(BOOT_TARBALL_FORMAT) +$(INSTALLED_BOOTTARBALL_TARGET): PRIVATE_BOOT_TAR := $(boot_tar) +$(INSTALLED_BOOTTARBALL_TARGET): $(FS_GET_STATS) $(INTERNAL_BOOTIMAGE_FILES) + $(build-boottarball-target) + +.PHONY: boottarball-nodeps btnod +boottarball-nodeps btnod: $(FS_GET_STATS) \ + $(filter-out boottarball-nodeps btnod,$(MAKECMDGOALS)) + $(build-boottarball-target) + + # ----------------------------------------------------------------- # data partition image INTERNAL_USERDATAIMAGE_FILES := \ diff --git a/core/main.mk b/core/main.mk index 14817c23a..8a86aebd4 100644 --- a/core/main.mk +++ b/core/main.mk @@ -659,6 +659,9 @@ ramdisk: $(INSTALLED_RAMDISK_TARGET) .PHONY: systemtarball systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET) +.PHONY: boottarball +boottarball: $(INSTALLED_BOOTTARBALL_TARGET) + .PHONY: userdataimage userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET)