mirror of
https://github.com/kairos-io/packages.git
synced 2025-08-17 15:38:10 +00:00
Add linux-jetson nvidia kernel (#123)
* Add jetson kernel * Rename category * Build only on cross-host (it's faster) * Don't build on arm64 * Fix CI * Prepare package * Set version Signed-off-by: mudler <mudler@c3os.io> * Cleanup space, add kmod Signed-off-by: mudler <mudler@c3os.io> --------- Signed-off-by: mudler <mudler@c3os.io>
This commit is contained in:
parent
ba7dd0d403
commit
2f176f99db
4
.github/workflows/build-arm64.yaml
vendored
4
.github/workflows/build-arm64.yaml
vendored
@ -17,6 +17,10 @@ jobs:
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
mkdir build
|
||||
- name: Release space from worker
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
||||
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
|
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@ -17,6 +17,10 @@ jobs:
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
mkdir build
|
||||
- name: Release space from worker
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
||||
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
||||
- name: Download meta 🔧
|
||||
uses: luet-lab/luet-github-action@master
|
||||
with:
|
||||
|
9
.github/workflows/pr.yaml
vendored
9
.github/workflows/pr.yaml
vendored
@ -17,6 +17,10 @@ jobs:
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
mkdir build
|
||||
- name: Release space from worker
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
||||
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
@ -45,6 +49,7 @@ jobs:
|
||||
REPOSITORY_TYPE: docker
|
||||
pushFinalImages: false
|
||||
pushCache: false
|
||||
values: values/arm64.yaml
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -55,6 +60,10 @@ jobs:
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
mkdir build
|
||||
- name: Release space from worker
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
||||
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
||||
- name: Download meta 🔧
|
||||
uses: luet-lab/luet-github-action@master
|
||||
with:
|
||||
|
29
packages/kernels/linux-tegra/build.yaml
Normal file
29
packages/kernels/linux-tegra/build.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
{{ if eq .Values.arch "arm64" }}
|
||||
# There is no arm64 package. There is only a linux-tegra, generic, for ARM64, built from x86.
|
||||
{{ else }}
|
||||
image: "ubuntu:20.04"
|
||||
|
||||
prelude:
|
||||
- apt update && apt install -y git-core build-essential bc wget xxd kmod
|
||||
- wget https://developer.nvidia.com/downloads/remetpack-463r32releasev73t210jetson-210linur3273aarch64tbz2 -O Jetson-210_Linux_R32.7.3_aarch64.tbz2
|
||||
- tar xvf Jetson-210_Linux_R32.7.3_aarch64.tbz2
|
||||
- wget https://developer.nvidia.com/downloads/remack-sdksjetpack-463r32releasev73sourcest210publicsourcestbz2 -O public_sources.tbz2
|
||||
- tar xvf public_sources.tbz2
|
||||
- wget https://developer.nvidia.com/embedded/dlc/l4t-gcc-7-3-1-toolchain-64-bit
|
||||
- tar xvf l4t-gcc-7-3-1-toolchain-64-bit
|
||||
|
||||
# https://forums.developer.nvidia.com/t/kernel-build-script-nvbuild-sh-with-output-dir-option-not-working/173087
|
||||
steps:
|
||||
- |
|
||||
cd Linux_for_Tegra/source/public && tar xvf kernel_src.tbz2 && \
|
||||
mkdir kernel_out && \
|
||||
echo "CONFIG_EFI_STUB=y" >> ./kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig && \
|
||||
echo "CONFIG_EFI=y" >> ./kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig && \
|
||||
sed -i '86s/.*/ O_OPT=(O="${KERNEL_OUT_DIR}")/' nvbuild.sh && \
|
||||
CROSS_COMPILE_AARCH64_PATH=/luetbuild/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/ ./nvbuild.sh -o $PWD/kernel_out
|
||||
- mkdir -p /out/boot
|
||||
- cp Linux_for_Tegra/source/public/kernel_out/arch/arm64/boot/Image /out/boot
|
||||
- cd Linux_for_Tegra/source/public/kernel/kernel-4.9/ && make CROSS_COMPILE=/luetbuild/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/ LOCALVERSION="-tegra" ARCH=arm64 O=/luetbuild/Linux_for_Tegra/source/public/kernel_out modules_install INSTALL_MOD_PATH=/out
|
||||
# https://blog.kevmo314.com/compiling-custom-kernel-modules-on-the-jetson-nano.html
|
||||
package_dir: /out
|
||||
{{ end }}
|
3
packages/kernels/linux-tegra/definition.yaml
Normal file
3
packages/kernels/linux-tegra/definition.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
category: "kernels"
|
||||
name: "linux-tegra"
|
||||
version: "4.9.299"
|
Loading…
Reference in New Issue
Block a user