Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WaterLemons2k committed Mar 29, 2024
0 parents commit 66b8cfc
Show file tree
Hide file tree
Showing 7 changed files with 8,347 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- directory: /
package-ecosystem: github-actions
schedule:
interval: daily
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build

on:
push:
schedule:
- cron: "0 0 * * 0"

env:
BBR_REPO: google/bbr
BBR_BRANCH: v3

jobs:
keep-schedule:
uses: WaterLemons2k/scheduled-workflow-activity-action/.github/workflows/reusable.yml@v1

check:
runs-on: ubuntu-latest
env:
FILE: commit
outputs:
commit: ${{ steps.check.outputs.commit }}
hit: ${{ steps.cache.outputs.cache-hit == 'true' }}
steps:
- name: Check
id: check
run: echo "commit=$(git ls-remote /~https://github.com/${{ env.BBR_REPO }} ${{ env.BBR_BRANCH }} | cut -f 1)" >> $GITHUB_OUTPUT

- name: Cache
id: cache
uses: actions/cache@v4
with:
path: ${{ env.FILE }}
key: ${{ steps.check.outputs.commit }}

- name: Save
if: steps.cache.outputs.cache-hit != 'true'
run: echo ${{ steps.check.outputs.commit }} | tee ${{ env.FILE }}

build:
needs: check
if: needs.check.outputs.hit == 'false'
runs-on: ubuntu-latest
container: ghcr.io/waterlemons2k/linux-deps:buster
steps:
- name: Checkout BBR
uses: actions/checkout@v4
with:
repository: ${{ env.BBR_REPO }}
ref: ${{ env.BBR_BRANCH }}

- name: Fetch certs and configs
run: |
curl -fLO /~https://github.com/${{ github.repository }}/raw/${{ github.sha }}/{certs/debian-uefi-certs.pem,configs/.config}
echo "DATE=$(date +%F)" >> "$GITHUB_ENV"
- name: Build
run: make -j$(nproc) LOCALVERSION= bindeb-pkg

- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.DATE }}
body: Based on google/bbr@${{ needs.check.outputs.commit }}.
files: ../*.deb
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 WaterLemons2k

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# linux-image-cloud-bbr

linux-image-cloud with [TCP BBR v3](/~https://github.com/google/bbr/tree/v3) support.

The config file is based on this Debian kernel config file: [4.19.0-26-amd64](configs/4.19.0-26-cloud-amd64.config).

## Installation

Download the `linux-headers-*.deb` and `linux-image-*.deb` files from [Releases](../../releases).
Then install them with:

```sh
sudo dpkg -i linux-headers-*.deb linux-image-*.deb
```

## Getting started

BBR and FQ are enabled by default.

## Acknowledgments

### BBR

- [Zxilly/bbr-v3-pkg: Compile bbrv3 kernel into deb/rpm format.](/~https://github.com/Zxilly/bbr-v3-pkg)
- [Debian 11 手动编译 Google BBR v3 内核 - Sitao](https://sitao.org/Linux/bbrv3.html)
- [编译 Linux 内核启用 TCP BBR3-腾讯云开发者社区-腾讯云](https://cloud.tencent.com/developer/article/2345894)
- [编译 Google TCP BBR v3-荒岛](https://lala.im/8742.html)

### Kernel

- [Chapter 4. Common kernel-related tasks](https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-building)
- [BuildADebianKernelPackage - Debian Wiki](https://wiki.debian.org/BuildADebianKernelPackage)
- [How to quickly build a trimmed Linux kernel — The Linux Kernel documentation](https://docs.kernel.org/admin-guide/quickly-build-trimmed-linux.html#distro-specific-adjustments)

### Certificate

- [8.10. Compiling a Kernel](https://debian-handbook.info/browse/stable/sect.kernel-compilation.html#sidebar.kernel-config-keyring)
42 changes: 42 additions & 0 deletions certs/debian-uefi-certs.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-----BEGIN CERTIFICATE-----
MIIDnjCCAoagAwIBAgIRAO1UodWvh0iUjZ+JMu6cfDQwDQYJKoZIhvcNAQELBQAw
IDEeMBwGA1UEAxMVRGViaWFuIFNlY3VyZSBCb290IENBMB4XDTE2MDgxNjE4MDkx
OFoXDTQ2MDgwOTE4MDkxOFowIDEeMBwGA1UEAxMVRGViaWFuIFNlY3VyZSBCb290
IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnZXUi5vaEKwuyoI3
waTLSsMbQpPCeinTbt1kr4Cv6maiG2GcgwzFa7k1Jf/F++gpQ97OSz3GEk2x7yZD
lWjNBBH+wiSb3hTYhlHoOEO9sZoV5Qhr+FRQi7NLX/wU5DVQfAux4gOEqDZI5IDo
6p/6v8UYe17OHL4sgHhJNRXAIc/vZtWKlggrZi9IF7Hn7IKPB+bK4F9xJDlQCo7R
cihQpZ0h9ONhugkDZsjfTiY2CxUPYx8rr6vEKKJWZIWNplVBrjyIld3Qbdkp29jE
aLX89FeJaxTb4O/uQA1iH+pY1KPYugOmly7FaxOkkXemta0jp+sKSRRGfHbpnjK0
ia9XeQIDAQABo4HSMIHPMEEGCCsGAQUFBwEBBDUwMzAx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