added reboot warning if active kernel version doesn't match updated kernel version
This commit is contained in:
parent
17e2875d4d
commit
bd7623e9fb
|
@ -1,55 +0,0 @@
|
|||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]: "
|
||||
labels: [bug, triage]
|
||||
assignees:
|
||||
- AIWintermuteAI
|
||||
- Pillar1989
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of what the bug is.
|
||||
placeholder: |
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
placeholder: ""
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: platform
|
||||
attributes:
|
||||
label: Platform
|
||||
description: What platform are you running the code on.
|
||||
placeholder: |
|
||||
- Device: [e.g. Raspberry Pi 4]
|
||||
- OS: [e.g. Raspbian OS 32bit kernel version ...]
|
||||
- Version/commit number [e.g. d1816f5]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
19
install.sh
19
install.sh
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Color
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root (use sudo)" 1>&2
|
||||
exit 1
|
||||
|
@ -52,8 +56,6 @@ if [ $errorFound = 1 ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
#because https://github.com/raspberrypi/linux/commit/14075fb3b561869c760a096a92ca0fab1f573174, remove snd-soc-wm8960.ko first
|
||||
find /lib/modules -name "snd-soc-wm8960.ko" -exec rm -rf {} \;
|
||||
|
||||
ver="0.3"
|
||||
uname_r=$(uname -r)
|
||||
|
@ -128,6 +130,16 @@ base_ver=$(get_kernel_version)
|
|||
base_ver=${base_ver%%[-+]*}
|
||||
#kernels="${base_ver}+ ${base_ver}-v7+ ${base_ver}-v7l+"
|
||||
kernels=$(uname -r)
|
||||
kernel_base_ver=${kernels%[-+]*}
|
||||
|
||||
if [[ "$base_ver" != "$kernel_base_ver" ]] ; then
|
||||
echo "------------------------------------------------------"
|
||||
echo -e " ${RED}WARNING${NC} Your loaded kernel version is $kernel_base_ver"
|
||||
echo " Not matching the updated version $base_ver."
|
||||
echo " Kernel was updated, but new kernel was not loaded yet"
|
||||
echo -e " Please ${RED}reboot${NC} your machine AND THEN run this script ${RED}again"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
function install_module {
|
||||
local _i
|
||||
|
@ -157,6 +169,9 @@ function install_module {
|
|||
mkdir -p /var/lib/dkms/$mod/$ver/$marker
|
||||
}
|
||||
|
||||
#because https://github.com/raspberrypi/linux/commit/14075fb3b561869c760a096a92ca0fab1f573174, remove snd-soc-wm8960.ko first
|
||||
#find /lib/modules -name "snd-soc-wm8960.ko" -exec rm -rf {} \;
|
||||
|
||||
install_module "./" "seeed-voicecard"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue