From 1cf03154d27455d3153c4b8b2768af4e16154250 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Mon, 11 Mar 2024 16:56:30 -0500 Subject: [PATCH] ci: add quick kernel updater Signed-off-by: Robert Nelson --- .gitlab-ci.yml | 4 +++- get_kernel_update.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 get_kernel_update.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e495d7c..d633d3a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,7 +55,9 @@ pages: stage: deploy script: - mkdir -p ./public/ || true - - cp -v ./deploy/* ./public/ + - cp -v ./deploy/beaglev_fire.itb ./public/ + - cp -v ./deploy/modules.tar.gz ./public/ + - cp -v ./get_kernel_update.sh ./public/ - apindex public artifacts: when: on_success diff --git a/get_kernel_update.sh b/get_kernel_update.sh new file mode 100755 index 0000000..f950335 --- /dev/null +++ b/get_kernel_update.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +if ! id | grep -q root; then + echo "must be run as root" + exit +fi + +if [ -f ./beaglev_fire.itb ] ; then + rm -rf ./beaglev_fire.itb || true +fi + +if [ -f ./modules.tar.gz ] ; then + rm -rf ./modules.tar.gz || true +fi + +wget https://beaglev-fire.beagleboard.io/BeagleV-Fire-ubuntu/beaglev_fire.itb +wget https://beaglev-fire.beagleboard.io/BeagleV-Fire-ubuntu/modules.tar.gz + +if [ -f ./beaglev_fire.itb ] ; then + if [ -d /boot/firmware/ ] ; then + + if [ -f /boot/firmware/beaglev_fire.itb ] ; then + rm -rf /boot/firmware/beaglev_fire.itb || true + cp -v ./beaglev_fire.itb /boot/firmware/beaglev_fire.itb + sync + fi + fi +fi + +if [ -f ./modules.tar.gz ] ; then + tar xf ./modules.tar.gz -C /usr/ +fi