forked from rockchip-linux/kernel
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I1e4ccf219f79edd2807f017e303387d2a0da38a9
- Loading branch information
Showing
6 changed files
with
163 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,3 +120,4 @@ all.config | |
|
||
# fetched Android config fragments | ||
android/configs/android-*.cfg | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
image: ayufan/rock64-dockerfiles:x86_64 | ||
|
||
variables: | ||
GITHUB_USER: ayufan-rock64 | ||
GITHUB_REPO: linux-kernel | ||
|
||
USE_CCACHE: "true" | ||
CCACHE_DIR: "/data/shared/ccache" | ||
|
||
stages: [build] | ||
|
||
before_script: | ||
- ccache -M 0 -F 0 | ||
|
||
build: | ||
stage: build | ||
only: [branches] | ||
script: | ||
- export RELEASE=$((1000+$CI_PIPELINE_IID)) | ||
- ./dev-make kernel-package | ||
- | | ||
set -x | ||
export RELEASE_NAME="$(./dev-make version)" | ||
export RELEASE_TITLE="$(./dev-make version)" | ||
export DESCRIPTION="$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID" | ||
github-release release \ | ||
--tag "${RELEASE_NAME}" \ | ||
--name "${RELEASE_TITLE}" \ | ||
--description "${DESCRIPTION}" \ | ||
--target "${CI_COMMIT_SHA}" \ | ||
--draft | ||
for i in ../*$(./dev-make info)*.deb; do | ||
github-release upload \ | ||
--tag "${RELEASE_NAME}" \ | ||
--name "$(basename "${i}")" \ | ||
--file "${i}" | ||
done | ||
github-release edit \ | ||
--tag "${RELEASE_NAME}" \ | ||
--name "${RELEASE_TITLE}" \ | ||
--description "${DESCRIPTION}" | ||
rm ../*$(./dev-make info)*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
exec make -f dev.mk "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
CURDIR="$PWD" | ||
|
||
case $(uname -s) in | ||
Darwin) | ||
exec docker run \ | ||
--rm \ | ||
-it \ | ||
-e HOME -v "${HOME}:${HOME}" \ | ||
-e USER \ | ||
-u "$(id -u):$(id -g)" \ | ||
--privileged \ | ||
-h rock64-build-env \ | ||
-v "${CURDIR}:${CURDIR}" \ | ||
-w "${CURDIR}" \ | ||
ayufan/rock64-dockerfiles:x86_64 \ | ||
"$@" | ||
;; | ||
|
||
Linux) | ||
exec docker run \ | ||
--rm \ | ||
-it \ | ||
-e HOME -v "${HOME}:${HOME}" \ | ||
-e USER \ | ||
-u "$(id -u):$(id -g)" \ | ||
$(id -Gz | xargs -0 -n1 -I{} echo "--group-add={}") \ | ||
-v /etc/passwd:/etc/passwd:ro \ | ||
-v /dev/bus/usb:/dev/bus/usb \ | ||
-v "${SSH_AUTH_SOCK}:${SSH_AUTH_SOCK}" \ | ||
-e SSH_AUTH_SOCK \ | ||
--privileged \ | ||
-h rock64-build-env \ | ||
-v "${CURDIR}:${CURDIR}" \ | ||
-w "${CURDIR}" \ | ||
ayufan/rock64-dockerfiles:x86_64 \ | ||
"$@" | ||
;; | ||
|
||
*) | ||
echo "Not supported: $(uname -s)" | ||
exit 1 | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
RELEASE ?= | ||
KERNEL_DEFCONFIG ?= rockchip_linux_defconfig | ||
|
||
KERNEL_VERSION ?= $(shell $(KERNEL_MAKE) -s kernelversion) | ||
KERNEL_RELEASE ?= $(shell $(KERNEL_MAKE) -s kernelrelease) | ||
KDEB_PKGVERSION ?= $(KERNEL_VERSION)-$(RELEASE)-rockchip-ayufan | ||
|
||
KERNEL_MAKE ?= make \ | ||
ARCH=arm64 \ | ||
HOSTCC=aarch64-linux-gnu-gcc \ | ||
CROSS_COMPILE="ccache aarch64-linux-gnu-" | ||
|
||
.config: arch/arm64/configs/$(KERNEL_DEFCONFIG) | ||
$(KERNEL_MAKE) $(KERNEL_DEFCONFIG) | ||
|
||
.PHONY: .scmversion | ||
.scmversion: | ||
ifneq (,$(RELEASE)) | ||
@echo "-$(RELEASE)-rockchip-ayufan-g$$(git rev-parse --short HEAD)" > .scmversion | ||
else | ||
@echo "-rockchip-dev" > .scmversion | ||
endif | ||
|
||
version: | ||
@echo "$(KDEB_PKGVERSION)" | ||
|
||
.PHONY: info | ||
info: .config .scmversion | ||
@echo $(KERNEL_RELEASE) | ||
|
||
.PHONY: kernel-menuconfig | ||
kernel-menuconfig: | ||
$(KERNEL_MAKE) $(KERNEL_DEFCONFIG) | ||
$(KERNEL_MAKE) HOSTCC=gcc menuconfig | ||
$(KERNEL_MAKE) savedefconfig | ||
mv defconfig arch/arm64/configs/$(KERNEL_DEFCONFIG) | ||
|
||
.PHONY: kernel-image | ||
kernel-image: .config .scmversion | ||
$(KERNEL_MAKE) Image dtbs -j$$(nproc) | ||
|
||
.PHONY: kernel-modules | ||
kernel-image-and-modules: .config .scmversion | ||
$(KERNEL_MAKE) Image modules dtbs -j$$(nproc) | ||
$(KERNEL_MAKE) modules_install INSTALL_MOD_PATH=$(CURDIR)/out/linux_modules | ||
|
||
.PHONY: kernel-package | ||
kernel-package: .config .scmversion | ||
KDEB_PKGVERSION=$(KDEB_PKGVERSION) $(KERNEL_MAKE) bindeb-pkg -j$$(nproc) | ||
|
||
.PHONY: kernel-update-dts | ||
kernel-update-dts: .config .scmversion | ||
$(KERNEL_MAKE) dtbs -j$$(nproc) | ||
rsync --partial --checksum --include="*.dtb" -rv arch/arm64/boot/dts/rockchip root@$(REMOTE_HOST):$(REMOTE_DIR)/boot/dtbs/$(KERNEL_RELEASE) | ||
|
||
.PHONY: kernel-update | ||
kernel-update-image: .scmversion | ||
rsync --partial --checksum -rv arch/arm64/boot/Image root@$(REMOTE_HOST):$(REMOTE_DIR)/boot/vmlinuz-$(KERNEL_RELEASE) | ||
rsync --partial --checksum --include="*.dtb" -rv arch/arm64/boot/dts/rockchip root@$(REMOTE_HOST):$(REMOTE_DIR)/boot/dtbs/$(KERNEL_RELEASE) | ||
rsync --partial --checksum -av out/linux_modules/lib/modules/$(KERNEL_RELEASE) root@$(REMOTE_HOST):$(REMOTE_DIR)/lib/modules/$(KERNEL_RELEASE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters