Browse Source

image.mk: Create a manifest file of installed packages as a build artifact

A few linux BSP's create a manifest file of installed packages for a given
target in order to help them understand exactly what's on their images. Create
one here as well as a build artifact since many users have an affinity to
prune down on packages to save valuable flash space.

Signed-off-by: Pushpal Sidhu <[email protected]>
Signed-off-by: Tim Harvey <[email protected]>
Pushpal Sidhu 9 years ago
parent
commit
4fd043b95b
1 changed files with 8 additions and 0 deletions
  1. 8 0
      include/image.mk

+ 8 - 0
include/image.mk

@@ -264,6 +264,13 @@ define Image/mkfs/prepare
 	$(call Image/mkfs/prepare/default,$(1))
 endef
 
+define Image/Manifest
+	$(STAGING_DIR_HOST)/bin/opkg \
+		--offline-root $(TARGET_DIR) \
+		--add-arch all:100 \
+		--add-arch $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD)):200 list-installed > \
+		$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
+endef
 
 ifdef CONFIG_TARGET_ROOTFS_TARGZ
   define Image/Build/targz
@@ -565,5 +572,6 @@ define BuildImage
 	$(MAKE) legacy-images
 
   install: install-images
+	$(call Image/Manifest)
 
 endef