kientzle/crochet-freebsd — pull request #50 by pkelsey (2014-03-10 21:43:01+00:00)
Title: Versioned uboot patches

Until my disk_pull_request branch is merged into kientzle:master, the diffs for this feature are best viewed at https://github.com/pkelsey/crochet-freebsd/compare/disk_pull_request...versioned_uboot_patches.

This branch adds support for versioning uboot patch files so it's easier
to maintain a set of uboot patch files against one uboot release while
support for another uboot release, or master, is developed. Also,
users may have achieved stability with a given uboot release and be
reluctant to move ahead to a later version, in which case it is
beneficial to be able to keep the older patchset around for continued
used with the older uboot release.

`uboot_set_patch_version [patch_version]` must now be
called before uboot_test or uboot_patch_files is called. This sets
the new variable UBOOT_PATCH_VERSION to patch_version, if it is
supplied, or otherwise extracts the version from the uboot_src_dir
parameter. Failing that, the result will be "unknown". Typically,
this call will look like `uboot_set_patch_version ${_UBOOT_SRC}
${_UBOOT_PATCH_VERSION}`, so the user can set
_UBOOT_PATCH_VERSION to select a specific set of patches.

`uboot_patch_files` returns the pattern that will identify the set of
patch files corresponding to ${UBOOT_PATCH_VERSION}. The pattern is
currently "${BOARDDIR}/files/uboot-${UBOOT_PATCH_VERSION}_*.patch".

`uboot_test ...` no longer requires the fetch instructions to be
provided in common configurations, as _uboot_download_instructions is
now capable of generating sensible instructions when the source
version is a uboot relase version number or is "master". Note that
_uboot_download_instructions first examines the supplied source dir to
determine the version to use in generating download instructions, and
if that fails, it assumes that ${UBOOT_PATCH_VERSION} represents the
uboot release that is being used under a non-standard directory name
and gives instructions for fetching that version to the standard
place.

board/BeagleBone/setup.sh will not try to use the
sysutils/u-boot-beaglebone-eabi port unless
BEAGLEBONE_UBOOT_PATCH_VERSION is empty.

All of the extant uboot patch files for each board have been renamed
to use the appropriate "uboot-_" prefix. In the case of
Wandboard, some of the patch files were further renamed to follow the
convention used by the other boards where the path of the file being
patched is included in the patch file name.