Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit e5085d3

Browse files
committed
Kernel: update to 5.10.47
1 parent c52f5da commit e5085d3

6 files changed

Lines changed: 46 additions & 117 deletions

File tree

.github/workflows/BuildKernel.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/CreateRelease.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,57 @@
1-
# This is a basic workflow to help you get started with Actions
2-
1+
---
32
name: Build Kernel Package
43

5-
# Controls when the action will run.
4+
# yamllint disable-line rule:truthy
65
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
8-
push:
9-
branches: [ master ]
10-
pull_request:
11-
branches: [ master ]
6+
[push, pull_request]
127

13-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
148
jobs:
15-
# This workflow contains a single job called "build"
16-
build:
17-
# The type of runner that the job will run on
18-
runs-on: ubuntu-latest
9+
lint:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- name: 'Checkout repo'
13+
uses: actions/checkout@v2
14+
- name: 'Set up Python 3.9'
15+
uses: actions/setup-python@v2
16+
- name: 'Install dependencies'
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install yamllint
20+
sudo apt-get install shellcheck bash
21+
- name: 'Analysing the code'
22+
run: |
23+
yamllint .
24+
shellcheck ./*.sh
1925
20-
# Steps represent a sequence of tasks that will be executed as part of the job
26+
build:
27+
runs-on: ubuntu-20.04
2128
steps:
22-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23-
- uses: actions/checkout@v2
29+
- name: 'Checkout Repo'
30+
uses: actions/checkout@v2
2431

2532
- name: Build script
2633
id: build
2734
run: |
2835
mkdir /tmp/artifacts
2936
VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2)
30-
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
31-
#REL=$( git tag |grep -F $VERSION|sort -r|head -n1|tr -d v)
37+
REL=$(./next_version.sh mbp)
3238
echo Building $VERSION-$REL
3339
echo "::set-output name=tag::${VERSION}-${REL}"
3440
sudo ./build.sh
3541
cd /tmp/artifacts
3642
ls -l
3743
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
3844
ls -l
39-
45+
4046
- name: Upload package artifact
47+
if: github.ref == 'refs/heads/master'
4148
uses: actions/upload-artifact@v2
4249
with:
43-
name: linux-mbp-16x-wifi-${{ steps.build.outputs.tag }}
50+
name: linux-mbp-${{ steps.build.outputs.tag }}
4451
path: /tmp/artifacts/*
4552

4653
- name: Release
54+
if: github.ref == 'refs/heads/master'
4755
uses: softprops/action-gh-release@v1
4856
with:
4957
files: |
@@ -54,4 +62,3 @@ jobs:
5462
draft: true
5563
env:
5664
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-

build.sh

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ set -eu -o pipefail
44

55
## Update docker image tag, because kernel build is using `uname -r` when defining package version variable
66
# KERNEL_VERSION=$(curl -s https://www.kernel.org | grep '<strong>' | head -3 | tail -1 | cut -d'>' -f3 | cut -d'<' -f1)
7-
KERNEL_VERSION=5.13
8-
PKGREL=1
7+
KERNEL_VERSION=5.10.47
98
#KERNEL_REPOSITORY=git://kernel.ubuntu.com/virgin/linux-stable.git
109
KERNEL_REPOSITORY=https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
1110
REPO_PATH=$(pwd)
@@ -20,18 +19,7 @@ echo "CPU threads: $(nproc --all)"
2019
grep 'model name' /proc/cpuinfo | uniq
2120

2221
get_next_version () {
23-
echo $PKGREL
24-
#curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep "linux-image-${KERNEL_VERSION}-${1}" > /dev/null
25-
#OLD_BUILD_EXIST=$?
26-
#if test $OLD_BUILD_EXIST -eq 0
27-
#then
28-
# LATEST_BUILD=$(curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep "linux-image-${KERNEL_VERSION}-${1}" |
29-
# grep a | cut -d'>' -f2 | cut -d'<' -f1 |
30-
# sort -r | head -n 1 | cut -d'-' -f6 | cut -d'_' -f1)
31-
#else
32-
# LATEST_BUILD=0
33-
#fi
34-
#echo "$((LATEST_BUILD+1))"
22+
"${REPO_PATH}"/next_version.sh "${1}"
3523
}
3624

3725
### Clean up
@@ -87,12 +75,10 @@ make olddefconfig
8775
echo "" >"${KERNEL_PATH}"/.scmversion
8876

8977
# Build Deb packages
90-
make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp-16x-wifi KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version)"
78+
make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp KDEB_PKGVERSION="${KERNEL_VERSION}-$(get_next_version mbp)"
9179

9280
#### Copy artifacts to shared volume
9381
echo >&2 "===]> Info: Copying debs and calculating SHA256 ... "
94-
#cp -rfv ../*.deb "${REPO_PATH}/"
95-
#cp -rfv "${KERNEL_PATH}/.config" "${REPO_PATH}/kernel_config_${KERNEL_VERSION}"
9682
cp -rfv "${KERNEL_PATH}/.config" "/tmp/artifacts/kernel_config_${KERNEL_VERSION}"
9783
cp -rfv ../*.deb /tmp/artifacts/
9884
sha256sum ../*.deb >/tmp/artifacts/sha256

next_version.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep "linux-image-${KERNEL_VERSION}" > /dev/null
3+
OLD_BUILD_EXIST=$?
4+
if test $OLD_BUILD_EXIST -eq 0
5+
then
6+
LATEST_BUILD=$(curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep "linux-image-${KERNEL_VERSION}-${1}" |
7+
grep a | cut -d'>' -f2 | cut -d'<' -f1 |
8+
sort -r | head -n 1 | cut -d'-' -f6 | cut -d'_' -f1)
9+
else
10+
LATEST_BUILD=0
11+
fi
12+
echo "$((LATEST_BUILD+1))"

patch_driver.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ BUILD_PATH=/tmp/build-kernel
66

77
### Apple T2 drivers commit hashes
88
# Patches
9-
APPLE_SMC_DRIVER_GIT_URL=https://github.com/jamlam/mbp-16.1-linux-wifi.git
10-
APPLE_SMC_DRIVER_BRANCH_NAME=main
11-
APPLE_SMC_DRIVER_COMMIT_HASH=4c8b393ed7a874e3d9e44a2a467c1b7c74af1260
9+
APPLE_SMC_DRIVER_GIT_URL=https://github.com/aunali1/linux-mbp-arch.git
10+
APPLE_SMC_DRIVER_BRANCH_NAME=master
11+
APPLE_SMC_DRIVER_COMMIT_HASH=1faa37d704798bc04104a88f620e4f55b3466de0
1212
## BCE
1313
#APPLE_BCE_DRIVER_GIT_URL=https://github.com/aunali1/mbp2018-bridge-drv.git
1414
#APPLE_BCE_DRIVER_BRANCH_NAME=aur

0 commit comments

Comments
 (0)