summaryrefslogtreecommitdiffstats
path: root/configs/platform-beaglebone/rules/image-boot-vfat.make
blob: 185c2b7463ac10b54f3a7020ab503774907d44e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*-makefile-*-
#
# Copyright (C) 2012 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
IMAGE_PACKAGES-$(PTXCONF_IMAGE_BOOT_VFAT) += image-boot-vfat

#
# Paths and names
#
IMAGE_BOOT_VFAT		:= image-boot-vfat
IMAGE_BOOT_VFAT_DIR	:= $(BUILDDIR)/$(IMAGE_BOOT_VFAT)
IMAGE_BOOT_VFAT_IMAGE	:= $(IMAGEDIR)/boot.vfat
IMAGE_BOOT_VFAT_DATA	:= \
	$(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.bin) \
	$(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.elf) \
	$(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.dat) \
	$(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt)
IMAGE_BOOT_VFAT_CONFIG	:= boot-vfat.config

# ----------------------------------------------------------------------------
# Image
# ----------------------------------------------------------------------------

define squote_and_comma
$(subst $(ptx/def/space),$(comma) ,$(addsuffix $(ptx/def/squote),$(addprefix $(ptx/def/squote),$(1))))
endef


IMAGE_BOOT_VFAT_ENV := \
	FIRMWARE_RPI2="$(call squote_and_comma,$(IMAGE_BOOT_VFAT_DATA))"

$(IMAGE_BOOT_VFAT_IMAGE):
	@$(call targetinfo)
	@GPU_MEM=$(PTXCONF_IMAGE_BOOT_VFAT_GPU_MEM) \
		ptxd_replace_magic "$(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt" > \
		"$(PTXDIST_TEMPDIR)/config.txt"
	@$(call image/genimage, IMAGE_BOOT_VFAT)
	@$(call finish)

# vim: syntax=make