$(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
PAGESIZE :=
SUBPAGESIZE :=
VID_HDR_OFFSET :=
- UBINIZE_OPTS := -E 5
+ UBINIZE_OPTS :=
+ UBINIZE_PARTS :=
MKUBIFS_OPTS :=
FS_OPTIONS/ubifs = $$(MKUBIFS_OPTS)
endef
DEFAULT_DEVICE_VARS := \
- DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE \
+ DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_SIZE KERNEL_INITRAMFS_IMAGE \
DEVICE_DTS DEVICE_DTS_DIR BOARD_NAME CMDLINE \
UBOOTENV_IN_UBI KERNEL_IN_UBI \
BLOCKSIZE PAGESIZE SUBPAGESIZE VID_HDR_OFFSET \
- UBINIZE_OPTS UIMAGE_NAME
+ UBINIZE_OPTS UIMAGE_NAME UBINIZE_PARTS
define Device/ExportVar
$(1) : $(2):=$$($(2))
endef
endif
-define Device/Build/check_size
- @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \
- echo "WARNING: Image file $@ is too big" >&2; \
- rm -f $@; \
- }
-endef
-
define Device/Build/compile
$$(_COMPILE_TARGET): $(KDIR)/$(1)
$(eval $(call Device/Export,$(KDIR)/$(1)))
$$(KDIR_KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS)
@rm -f $$@
$$(call concat_cmd,$$(KERNEL))
- $$(if $$(KERNEL_SIZE),$$(call Device/Build/check_size,$$(KERNEL_SIZE)))
+ $$(if $$(KERNEL_SIZE),$$(call Build/check-size,$$(KERNEL_SIZE)))
endif
endef
$(MAKE) legacy-images
install: install-images
+ $(call Image/Manifest)
endef