nanopct6(-lts): u-boot: edge: fix for pulling devicetree-rebasing using git
- otherwise git breaks when unconfigured
This commit is contained in:
parent
db2a996606
commit
391007ae9a
@ -72,13 +72,21 @@ function pre_config_uboot_target__nanoptc6_patch_uboot_dtsi_for_ums() {
|
||||
# @TODO this probably can be removed for 2025.04
|
||||
function pre_config_uboot_target__nanoptc6_patch_uboot_dtsi_for_ums() {
|
||||
[[ "${BRANCH}" != "edge" ]] && return 0
|
||||
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: pull in upstream/dts for UMS" "info"
|
||||
|
||||
regular_git add . || true
|
||||
regular_git commit -m "commit pre update OF upstream so that tree is clean" || true
|
||||
run_host_command_logged bash tools/update-subtree.sh pull dts v6.13-rc5-dts "||" true # do not fail as conflicts are expected
|
||||
regular_git checkout --theirs dts/upstream # "accept theirs" on all conflicts
|
||||
regular_git add dts/upstream
|
||||
regular_git commit -m "Update OF upstream to v6.13-rc5-dts and accept theirs on all conflicts"
|
||||
# Need to specify params and envs so git doesn't break when commiter/author/gpg/HOME/etc is unset.
|
||||
declare -a common_envs=("HOME=${HOME}" "PATH=${PATH}")
|
||||
declare -a git_params=("-c" "commit.gpgsign=false")
|
||||
declare -a commit_params=(--author="${MAINTAINER} <${MAINTAINERMAIL}>")
|
||||
declare -a commit_envs=("GIT_COMMITTER_NAME=${MAINTAINER}" "GIT_COMMITTER_EMAIL=${MAINTAINERMAIL}" "GIT_AUTHOR_NAME=${MAINTAINER}" "GIT_AUTHOR_EMAIL=${MAINTAINERMAIL}")
|
||||
|
||||
run_host_command_logged env -i "${common_envs[@]@Q}" git add . || true
|
||||
run_host_command_logged env -i "${common_envs[@]@Q}" "${commit_envs[@]@Q}" git "${git_params[@]@Q}" commit "${commit_params[@]@Q}" -m "'commit pre update OF upstream so that tree is clean'" || true
|
||||
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: running tools/update-subtree.sh" "info"
|
||||
run_host_command_logged env -i "${common_envs[@]@Q}" "${commit_envs[@]@Q}" bash tools/update-subtree.sh pull dts v6.13-rc5-dts "||" true # do not fail as conflicts are expected
|
||||
run_host_command_logged env -i "${common_envs[@]@Q}" git checkout --theirs dts/upstream
|
||||
run_host_command_logged env -i "${common_envs[@]@Q}" git add dts/upstream
|
||||
run_host_command_logged env -i "${common_envs[@]@Q}" "${commit_envs[@]@Q}" git "${git_params[@]@Q}" commit "${commit_params[@]@Q}" -m "'Update OF upstream to v6.13-rc5-dts and accept theirs on all conflicts'"
|
||||
}
|
||||
|
||||
function post_config_uboot_target__extra_configs_for_nanopct6_mainline_environment_in_spi() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user