Browse Source

Add -p option to cherry-pick a patchset

This patch adds the -p/--patchset option to cherry-pick
a patchset on the top of a coreboot tag or commit. The patchset
should be submitted for review (not necessarily merged) to
the gerrit owned by coreboot.org.
pull/165/head
Jean-Yves Vet 4 years ago
parent
commit
71332f591a
2 changed files with 23 additions and 0 deletions
  1. +5
    -0
      build.sh
  2. +18
    -0
      common/download_coreboot.sh

+ 5
- 0
build.sh View File

@ -25,6 +25,7 @@ usage()
echo " -c, --commit <commit> Git commit hash" echo " -c, --commit <commit> Git commit hash"
echo " -h, --help Show this help" echo " -h, --help Show this help"
echo " -i, --config Execute with interactive make config" echo " -i, --config Execute with interactive make config"
echo " -p, --patchset <patchset> Cherry-pick a patch set which is not merged yet"
echo " -t, --tag <tag> Git tag/version" echo " -t, --tag <tag> Git tag/version"
echo echo
echo "If a tag, commit or bleeding-edge flag is not given, the latest Coreboot release will be built." echo "If a tag, commit or bleeding-edge flag is not given, the latest Coreboot release will be built."
@ -55,6 +56,9 @@ do
-i | --config) -i | --config)
COREBOOT_CONFIG=true COREBOOT_CONFIG=true
shift 1;; shift 1;;
-p | --patchset)
COREBOOT_PATCHSET="$2"
shift 2;;
-t | --tag) -t | --tag)
COREBOOT_TAG="$2" COREBOOT_TAG="$2"
shift 2;; shift 2;;
@ -93,6 +97,7 @@ docker run --rm -it \
-v "$PWD/$MODEL:$DOCKER_SCRIPT_DIR" \ -v "$PWD/$MODEL:$DOCKER_SCRIPT_DIR" \
-v "$PWD/common:$DOCKER_COMMON_SCRIPT_DIR" \ -v "$PWD/common:$DOCKER_COMMON_SCRIPT_DIR" \
-e COREBOOT_COMMIT="$COREBOOT_COMMIT" \ -e COREBOOT_COMMIT="$COREBOOT_COMMIT" \
-e COREBOOT_PATCHSET="$COREBOOT_PATCHSET" \
-e COREBOOT_TAG="$COREBOOT_TAG" \ -e COREBOOT_TAG="$COREBOOT_TAG" \
-e COREBOOT_CONFIG="$COREBOOT_CONFIG" \ -e COREBOOT_CONFIG="$COREBOOT_CONFIG" \
coreboot/coreboot-sdk:"$COREBOOT_SDK_VERSION" \ coreboot/coreboot-sdk:"$COREBOOT_SDK_VERSION" \


+ 18
- 0
common/download_coreboot.sh View File

@ -60,6 +60,20 @@ function checkoutCommit() {
} }
################################################################################ ################################################################################
################################################################################
## Cherry-pick a patchset
################################################################################
function cherryPickPatchset() {
cd "$DOCKER_COREBOOT_DIR" || exit
# Workaround git complaining about unset email
git config --global user.email "dummys@docker.com" && git config --global user.name "skull.docker"
git fetch "https://review.coreboot.org/coreboot" "$COREBOOT_PATCHSET" || exit
git cherry-pick FETCH_HEAD || exit
git submodule update --recursive --remote
}
################################################################################ ################################################################################
## Download the latest released version of Coreboot ## Download the latest released version of Coreboot
@ -100,5 +114,9 @@ function downloadOrUpdateCoreboot() {
gitUpdate gitUpdate
checkoutTag checkoutTag
fi fi
if [ "$COREBOOT_PATCHSET" ]; then
cherryPickPatchset
fi
} }
################################################################################ ################################################################################

Loading…
Cancel
Save