Skip to content

Commit a4d4222

Browse files
committed
Makefile: use actual conf file to define the targets
The makefile targets are defined mainly as a wildcard of $(wildcard platforms/*) and $(platform)/partitions.xml. They both define the location of the 'output' file (the XML file being the output file), and they hardcode the platform folder. Together they simply assume that there can be only one partitions.conf file inside the platform folder which is ./platforms/<board>. However for each board we want to be able to support multiple board configurations, such as a board with either an eMMC or a UFS disk, or perhaps a board that comes with a 16GB eMMC or 32 GB eMMC. So ideally we want to support: ./platforms/<board>/emmc/paritions.conf ./platforms/<board>/emmc-32gb/paritions.conf ./platforms/<board>/ufs/paritions.conf With this patch, we are looking for partitions.conf file, and we set the makefile targets based on that. We essentially introduce support for the following pattern: ./platforms/<board>/partitions.conf ./platforms/<board>/<variant>/partitions.conf Similarly, make sure we are looking for contexts.xml templates in both folders: ./platforms/<board>/contents.xml.in ./platforms/<board>/<variant>/contents.xml.in Signed-off-by: Nicolas Dechesne <[email protected]>
1 parent 7d4364e commit a4d4222

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
TOPDIR := $(PWD)
2-
PLATFORMS := $(foreach platform,$(wildcard platforms/*),$(platform)/gpt)
3-
PARTITIONS_XML := $(foreach platform,$(wildcard platforms/*),$(platform)/partitions.xml)
4-
CONTENTS_XML := $(patsubst %.xml.in,%.xml,$(wildcard platforms/*/contents.xml.in))
2+
PARTITIONS := $(wildcard platforms/*/partitions.conf platforms/*/*/partitions.conf)
3+
PARTITIONS_XML := $(patsubst %.conf,%.xml, $(PARTITIONS))
4+
PLATFORMS := $(patsubst %/partitions.conf,%/gpt, $(PARTITIONS))
5+
6+
CONTENTS_XML_IN := $(wildcard platforms/*/contents.xml.in platforms/*/*/contents.xml.in)
7+
CONTENTS_XML := $(patsubst %.xml.in,%.xml, $(CONTENTS_XML_IN))
58
BINS := gen_contents.py gen_partition.py msp.py ptool.py
69
PREFIX ?= /usr/local
710

0 commit comments

Comments
 (0)