Add support for copy_files as defined in HardwarePack v3

Registered by Данило Шеган

We should add support for copy_files feature as defined in the specification for HardwarePack v3 (https://wiki.linaro.org/HardwarePacksV3).

We should get Ryan Harkin and Ricardo Salveti involved as main stakeholders, to ensure delivery satisfies our requirements to have fully UEFI-enabled images.

Blueprint information

Status:
Complete
Approver:
Данило Шеган
Priority:
High
Drafter:
Paul Sokolovsky
Direction:
Approved
Assignee:
James Tunnicliffe
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2012.09
Started by
Paul Sokolovsky
Completed by
James Tunnicliffe

Related branches

Sprints

Whiteboard

[pfalcon 2012-08-27] Would be nice to clarify where files for copy_files are taken from in https://wiki.linaro.org/HardwarePacksV3. Based on the context, they come from package defined by "package" field, but making it explicit is good.
[pfalcon 2012-08-28] Checking with Ryan/Ricardo, we need to support taking files from arbitrary packages, not just main bootloader package (usacase: suppose there's single generic bootloader package, and packages with per-board configs). Also, need to put files not just flat at /boot, but support directory structure (usecase: Grub expects stuff in /boot/grub).
[pfalcon 2012-08-28] Spotted issues with supporting multiple bootloaders in single hwpack (on linaro-hwpack-create level, l-m-c may as well support them).
[pfalcon 2012-08-28] WIP branch: https://code.launchpad.net/~pfalcon/linaro-image-tools/copy_files-lhc . Implements copy_files, as well as proper separation of multiple global and board-specific bootloaders. Need more polishing and tests.
[pfalcon 2012-09-04] There was no copy_files in v2, so no need to convert.

Meta:
Headline: The HardwarePacks v3 format now implements the "copy_files" directive, a list of files to copy from an optionally named packages to an optionally named destination.
Acceptance: copy_files is implemented in the manner enough to support UEFI-enabled images.

(?)

Work Items

Work items:
[pfalcon] Contact Ryan Harkin & Ricardo Salveti for requirements and usecases: DONE
Finalize extended copy_files filespec format (allowing to take a file from any package, and put at arbitrary dest path): DONE
[dooferlad] Refactor tests: DONE
[pfalcon] Implement copy_files support in linaro-hwpack-create: DONE
[pfalcon] Implement copy_files support in linaro-media-create: DONE
[dooferlad] Implement extended copy_files filespec format: DONE
[dooferlad] Revamp multiple bootloaders support: DONE
[pfalcon] Check the need for v2 conversion for copy_files: DONE
[dooferlad] Update Wiki to show new spec: DONE

This blueprint contains Public information 
Everyone can see this information.