$(call Image/mkfs/prepare/default,$(1))
endef
-
-define Image/Checksum
- ( cd ${BIN_DIR} ; \
- $(FIND) -maxdepth 1 -type f \! -name 'md5sums' -printf "%P\n" | sort | xargs $1 > $2 \
- )
+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
$(CP) $(TARGET_DIR) $(mkfs_cur_target_dir)
mv $(mkfs_cur_target_dir)/etc/opkg $(mkfs_cur_target_dir).opkg
echo 'src default file://$(PACKAGE_DIR_ALL)' > $(mkfs_cur_target_dir).conf
- $(if $(mkfs_packages_add), \
+ $(if $(call opkg_package_files,$(mkfs_packages_add)), \
$(opkg_target) update && \
$(opkg_target) install \
$(call opkg_package_files,$(mkfs_packages_add)))
PAGESIZE :=
SUBPAGESIZE :=
VID_HDR_OFFSET :=
- UBINIZE_OPTS := -E 5
+ UBINIZE_OPTS :=
+ UBINIZE_PARTS :=
MKUBIFS_OPTS :=
FS_OPTIONS/ubifs = $$(MKUBIFS_OPTS)
DEVICE_DTS_DIR :=
BOARD_NAME :=
+ UIMAGE_NAME :=
FILESYSTEMS := $(TARGET_FILESYSTEMS)
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
+ 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/Checksum,md5sum --binary,md5sums)
- $(call Image/Checksum,openssl dgst -sha256,sha256sums)
+ $(call Image/Manifest)
endef