Skip to content

Commit

Permalink
Update update_elrepo_config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ylx2016 authored Sep 12, 2024
1 parent 48cb20d commit b5f8921
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/update_elrepo_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: |
config_path=/home/runner/work/kernel/kernel/config_elrepo
action_kernel_ver=$(grep "Linux/x86_64" $config_path | awk -F '[- ]' '{print $3}')
kernel_ver=$(curl -s 'https://elrepo.org/linux/kernel/el7/x86_64/RPMS/?C=N;O=D' | grep -oP 'kernel-ml-headers[^"]+' | head -n 1 | awk -F '-' '{print $4}')
kernel_ver=$(curl -s 'https://elrepo.org/linux/kernel/el9/x86_64/RPMS/?C=N;O=D' | grep -oP 'kernel-ml-headers[^"]+' | head -n 1 | awk -F '-' '{print $4}')
echo "action_kernel_ver=$action_kernel_ver"
echo "kernel_ver=$kernel_ver"
if [[ "${action_kernel_ver}" == *"${kernel_ver}"* ]]; then
Expand All @@ -53,15 +53,15 @@ jobs:
working-directory: /workdir
run: |
sudo apt-get -qq install -y rpm2cpio
elrepo_c7_ver=$(curl -s 'https://elrepo.org/linux/kernel/el7/x86_64/RPMS/?C=N;O=D' | grep -oP 'kernel-ml-headers[^"]+' | head -n 1 | awk -F '-' '{print $4}')
sudo wget https://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-$elrepo_c7_ver-1.el7.elrepo.x86_64.rpm
sudo rpm2cpio kernel-ml-$elrepo_c7_ver-1.el7.elrepo.x86_64.rpm | cpio -divm
elrepo_c9_ver=$(curl -s 'https://elrepo.org/linux/kernel/el9/x86_64/RPMS/?C=N;O=D' | grep -oP 'kernel-ml-headers[^"]+' | head -n 1 | awk -F '-' '{print $4}')
sudo wget https://elrepo.org/linux/kernel/el9/x86_64/RPMS/kernel-ml-$elrepo_c9_ver-1.el9.elrepo.x86_64.rpm
sudo rpm2cpio kernel-ml-$elrepo_c9_ver-1.el9.elrepo.x86_64.rpm | cpio -divm
cd /workdir/boot
config=/home/runner/work/kernel/kernel/config_elrepo
elrepo_patch=/home/runner/work/kernel/kernel/elrepo_config.patch
sudo rm -rf $config
sudo mv config-*-1.el7.elrepo.x86_64 $config
sudo mv config-*-1.el9.elrepo.x86_64 $config
sudo sed -ri 's/.*CONFIG_TCP_CONG_CUBIC.*/CONFIG_TCP_CONG_CUBIC=m/' ${config}
sudo sed -ri 's/.*CONFIG_TCP_CONG_BBR.*/CONFIG_TCP_CONG_BBR=y/' ${config}
sudo sed -ri '/.*CONFIG_DEFAULT_CUBIC.*/i\CONFIG_TCP_CONG_BBR2=m' ${config}
Expand Down

0 comments on commit b5f8921

Please sign in to comment.