cli_classic.c: add -x option for do_extract()

This change introduces a new option to extract all layout regions to
files with the name of each region (or with the provided filename via
-i region:file). It is implemented by mutating the flash layout to
include all regions and backfilling the entry->file with entry->name
(replacing spaces with underscores)

Signed-off-by: Daniel Campello <>
Change-Id: I8c69223fa92cf5b50abe070f1ab9f19d3b42f6ff
Tested-by: build bot (Jenkins) <>
Reviewed-by: Edward O'Callaghan <>
5 files changed