Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ChibiOS-Contrib, mirroring script. #13896

Merged
merged 1 commit into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/chibios-contrib
Submodule chibios-contrib updated 43 files
+10 −0 demos/MIMXRT1062/RT-TEENSY4_1/main.c
+16 −1 demos/MIMXRT1062/RT-TEENSY4_1/usbcfg.c
+19 −5 os/common/ports/RISCV-ECLIC/chcore.h
+53 −32 os/common/ports/RISCV-ECLIC/compilers/GCC/chcoreasm.S
+4 −0 os/common/startup/ARMCMx/compilers/GCC/ld/MK64FX512.ld
+4 −0 os/common/startup/ARMCMx/compilers/GCC/ld/MK66FX1M0.ld
+2 −0 os/hal/boards/SIPEED_LONGAN_NANO/board.c
+5 −1 os/hal/include/hal_crc.h
+2 −2 os/hal/ports/GD/GD32VF103/GPIO/hal_pal_lld.c
+4 −4 os/hal/ports/GD/GD32VF103/gd32vf103.h
+105 −8 os/hal/ports/NRF5/LLD/TIMERv1/hal_gpt_lld.c
+70 −1 os/hal/ports/NRF5/LLD/TIMERv1/hal_gpt_lld.h
+205 −146 os/hal/ports/NRF5/LLD/TIMERv1/hal_icu_lld.c
+1 −1 os/hal/ports/NRF5/LLD/TIMERv1/hal_icu_lld.h
+8 −0 os/hal/ports/NRF5/LLD/UARTEv1/driver.mk
+548 −0 os/hal/ports/NRF5/LLD/UARTEv1/hal_uart_lld.c
+259 −0 os/hal/ports/NRF5/LLD/UARTEv1/hal_uart_lld.h
+470 −0 os/hal/ports/NRF5/NRF52832/hal_efl_lld.c
+130 −0 os/hal/ports/NRF5/NRF52832/hal_efl_lld.h
+14 −0 os/hal/ports/NRF5/NRF52832/nrf52_isr.c
+2 −0 os/hal/ports/NRF5/NRF52832/platform.mk
+12 −12 os/hal/ports/NUMICRO/LLD/GPIOv1/hal_pal_lld.c
+13 −1 os/hal/ports/NUMICRO/LLD/GPIOv1/hal_pal_lld.h
+48 −10 os/hal/ports/NUMICRO/LLD/SERIALv1/hal_serial_lld.c
+1 −1 os/hal/ports/NUMICRO/LLD/USBv1/hal_usb_lld.c
+5 −5 os/hal/ports/NUMICRO/LLD/USBv1/usb_memcpy.S
+10 −8 os/hal/ports/NUMICRO/NUC123/hal_lld.c
+5 −1 os/hal/ports/NUMICRO/NUC123/hal_lld.h
+11 −0 os/hal/ports/STM32/LLD/CRCv1/hal_crc_lld.c
+18 −15 os/various/devices_lib/rf/nrf52_radio.c
+2 −2 os/various/devices_lib/rf/nrf52_radio.h
+1 −1 testhal/NRF52/NRF52832/RADIO-ESB/Makefile
+18 −15 testhal/NRF52/NRF52832/RADIO-ESB/nrf52_radio.c
+2 −2 testhal/NRF52/NRF52832/RADIO-ESB/nrf52_radio.h
+211 −0 testhal/NRF52/NRF52832/UART/Makefile
+757 −0 testhal/NRF52/NRF52832/UART/chconf.h
+533 −0 testhal/NRF52/NRF52832/UART/halconf.h
+173 −0 testhal/NRF52/NRF52832/UART/halconf_community.h
+144 −0 testhal/NRF52/NRF52832/UART/main.c
+29 −0 testhal/NRF52/NRF52832/UART/mcuconf.h
+17 −0 testhal/NRF52/NRF52832/UART/readme.txt
+0 −2 testhal/NUMICRO/NUC123/NUTINY-SDK-NUC123-V2.0/SERIAL/cfg/halconf.h
+1 −4 testhal/NUMICRO/NUC123/NUTINY-SDK-NUC123-V2.0/SERIAL/cfg/mcuconf.h
46 changes: 37 additions & 9 deletions util/update_chibios_mirror.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
################################
# Configuration

# The branches to mirror
branches="trunk stable_20.3.x stable_21.6.x"
# The ChibiOS branches to mirror
chibios_branches="trunk stable_20.3.x stable_21.6.x"

# The tags to mirror
tags="ver19.1.3 ver20.3.1 ver20.3.2 ver20.3.3 ver21.6.0"
# The ChibiOS tags to mirror
chibios_tags="ver20.3.1 ver20.3.2 ver20.3.3 ver21.6.0"

# The ChibiOS-Contrib branches to mirror
contrib_branches="master chibios-20.3.x"

################################
# Actions
Expand All @@ -19,9 +22,12 @@ this_script="$(realpath "${BASH_SOURCE[0]}")"
script_dir="$(realpath "$(dirname "$this_script")")"
qmk_firmware_dir="$(realpath "$script_dir/../")"
chibios_dir="$qmk_firmware_dir/lib/chibios"
contrib_dir="$qmk_firmware_dir/lib/chibios-contrib"

chibios_git_location=$(realpath "$chibios_dir/$(cat "$chibios_dir/.git" | awk '/gitdir:/ {print $2}')")
chibios_git_config=$(realpath "$chibios_git_location/config")
contrib_git_location=$(realpath "$contrib_dir/$(cat "$contrib_dir/.git" | awk '/gitdir:/ {print $2}')")
contrib_git_config=$(realpath "$contrib_git_location/config")

cd "$chibios_dir"

Expand All @@ -40,16 +46,38 @@ git fetch --all --tags --prune
echo "Fetching latest from subversion..."
git svn fetch

echo "Updating branches..."
for branch in $branches ; do
echo "Updating ChibiOS branches..."
for branch in $chibios_branches ; do
echo "Creating branch 'svn-mirror/$branch' from 'svn/$branch'..."
git branch -f svn-mirror/$branch svn/$branch \
&& git push qmk svn-mirror/$branch
done

echo "Updating tags..."
for tagname in $tags ; do
echo "Updating ChibiOS tags..."
for tagname in $chibios_tags ; do
echo "Creating tag 'svn-mirror/$tagname' from 'svn/tags/$tagname'..."
GIT_COMMITTER_DATE="$(git log -n1 --pretty=format:'%ad' svn/tags/$tagname)" git tag -f -a -m "Tagging $tagname" svn-mirror/$tagname svn/tags/$tagname
git push qmk svn-mirror/$tagname
done
done

cd "$contrib_dir"

if [[ -z "$(cat "$contrib_git_config" | grep '\[remote "qmk"\]')" ]] ; then
git remote add qmk [email protected]:qmk/ChibiOS-Contrib.git
git remote set-url qmk [email protected]:qmk/ChibiOS-Contrib.git --push
fi

if [[ -z "$(cat "$contrib_git_config" | grep '\[remote "upstream"\]')" ]] ; then
git remote add upstream [email protected]:ChibiOS/ChibiOS-Contrib.git
git remote set-url upstream [email protected]:ChibiOS/ChibiOS-Contrib.git --push
fi

echo "Updating remotes..."
git fetch --all --tags --prune

echo "Updating ChibiOS-Contrib branches..."
for branch in $contrib_branches ; do
echo "Creating branch 'mirror/$branch' from 'upstream/$branch'..."
git branch -f mirror/$branch upstream/$branch \
&& git push qmk mirror/$branch
done