Update BuildMe.yml #41
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
# This is a basic workflow to help you get started with Actions | |
name: Building Kernel For Enterprise NVIDIA AGX | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "master" branch | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Preparing build | |
run: | | |
sudo apt install -y build-essential bc tree | |
sudo gem install fpm | |
wget https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--glibc--stable-2020.08-1.tar.bz2 | |
tar -xjf aarch64--glibc--stable-* | |
ls -a | |
mkdir kernel_out | |
- name: Add OpenHD wifi | |
run: | | |
cd kernel/kernel-5.10/drivers/net/wireless/realtek/ | |
ls -a | |
rm -Rf rtl8xxxu | |
rm -Rf rtw88 | |
git clone https://github.com/openhd/rtl8812au/ -b nvidia | |
git clone https://github.com/openhd/rtl88x2bu/ | |
cd rtl8812au | |
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/' Makefile | |
sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/' Makefile | |
cd .. | |
cd rtl88x2bu | |
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/' Makefile | |
sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/' Makefile | |
- name: Add OpenHD patches | |
run: | | |
patch -p1 -i patches/openhd_wifi.patch | |
patch -p1 -i patches/openhd_modules.patch | |
#patch -p1 -i patches/openhd_imx577_driver.patch | |
- name: Building Kernel | |
run: | | |
export CROSS_COMPILE_AARCH64_PATH=/home/runner/work/linux-nvidia/linux-nvidia/aarch64--glibc--stable-2020.08-1 | |
export CROSS_COMPILE_AARCH64=/home/runner/work/linux-nvidia/linux-nvidia/aarch64--glibc--stable-2020.08-1/bin/aarch64-buildroot-linux-gnu- | |
./nvbuild.sh -o $PWD/kernel_out | |
- name: Packaging Kernel | |
run: | | |
mkdir -p workdir/usr/local/share/openhd/kernel/dts | |
mkdir -p workdir/lib/modules/5.10.192-tegra/ | |
cp kernel_out/arch/arm64/boot/Image workdir/usr/local/share/openhd/kernel/kernel.img | |
cp -r kernel_out/arch/arm64/boot/dts/nvidia/* workdir/usr/local/share/openhd/kernel/dts/ | |
cp -r kernel_out/openhd/* workdir/ | |
VERSION="5.10-$(date -d '+1 hour' +'%m-%d-%Y--%H-%M-%S')" | |
fpm -a arm64 -s dir -t deb -n openhd-linux-nvidia -v "$VERSION" -C workdir -p openhd-linux-nvidia_VERSION_ARCH.deb | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: | | |
*.deb |