diff options
Diffstat (limited to 'vendor/sync')
-rwxr-xr-x | vendor/sync | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/vendor/sync b/vendor/sync index 5daf751..48895f8 100755 --- a/vendor/sync +++ b/vendor/sync @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -e # globals @@ -183,6 +183,35 @@ build_wlroots() } # ------------------------------------------------------------------------ +# kernel headers + +KERNEL_URL="https://github.com/sabotage-linux/kernel-headers" +KERNEL_TAG="v4.19.88-1" + +build_kernel() +{ + git clone $KERNEL_URL kernel + cd kernel && git checkout $KERNEL_TAG + + # probably wrong for risxv64 + for subdir in linux asm asm-generic + do + for arch in amd64 i386 riscv64 + do + cp -rL "./x86/include/$subdir" "../../sys/linux/$arch/$subdir" + done + for arch in arm arm64 + do + cp -rL "$arch/include/$subdir" "../../sys/linux/$arch/$subdir" + done + done + + cd $VENDOR + echo $KERNEL_TAG > kernel/build.tag +} + + +# ------------------------------------------------------------------------ # utility functions update() @@ -190,10 +219,10 @@ update() base=$1 tag=$2 - if [ -d $base ] && [ `cat $base/build.tag` = $tag ]; then + if [ -d "$base" ] && [ "$(cat "$base/build.tag")" = "$tag" ]; then echo "$base: up to date" else - build_$base + "build_$base" fi } @@ -205,4 +234,5 @@ update() update musl $MUSL_TAG update zlib $ZLIB_TAG -update wlroots $WLROOTS_TAG +update kernel $WLROOTS_TAG +# update wlroots $WLROOTS_TAG |