blob: edb826eb040f86e5fd8387dca5c440480e55e164 [file] [log] [blame]
#############################################################
#
# Google platform image creation for gflt platforms.
#
#############################################################
# WARNING WARNING WARNING
#
# Because of how buildroot handles fs generation macros, it EATS DOUBLE
# QUOTES. Use only single quotes in all shell commands in this file, or
# you'll get very weird, hard-to-find errors.
ROOTFS_GINSTALL_DEPENDENCIES = linux rootfs-initramfs
ROOTFS_GINSTALL_VERSION = $(shell cat $(BINARIES_DIR)/version)
ROOTFS_GINSTALL_PLATFORMS = $(shell echo $(BR2_TARGET_GENERIC_PLATFORMS_SUPPORTED) | sed 's/[, ][, ]*/, /g' | tr a-z A-Z)
GFLT_LOADER := u-boot-spi.bin
define ROOTFS_GINSTALL_CMD
set -e; \
set -x; \
rm -f $(BINARIES_DIR)/manifest && \
echo 'installer_version: 3' >>$(BINARIES_DIR)/manifest && \
echo 'image_type: unlocked' >>$(BINARIES_DIR)/manifest && \
echo 'platforms: [GFLT110]' >>$(BINARIES_DIR)/manifest && \
echo 'version: $(value ROOTFS_GINSTALL_VERSION)' >>$(BINARIES_DIR)/manifest && \
cd $(BINARIES_DIR) && \
cp $(value GFLT_LOADER) loader.img && \
cp uImage kernel.img && \
(echo -n 'kernel.img-sha1: ' && sha1sum kernel.img | cut -c1-40 && \
echo -n 'loader.img-sha1: ' && sha1sum loader.img | cut -c1-40;) >>manifest && \
tar -cf $(value ROOTFS_GINSTALL_VERSION).gi \
manifest version loader.img kernel.img
endef
$(eval $(call ROOTFS_TARGET,ginstall))