-
Notifications
You must be signed in to change notification settings - Fork 450
Expand file tree
/
Copy pathbuild_install.bash
More file actions
executable file
·31 lines (29 loc) · 956 Bytes
/
build_install.bash
File metadata and controls
executable file
·31 lines (29 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
set -eu
SRC_DIR=$(cd $(dirname ${BASH_SOURCE:-$0})/../; pwd)
if [ -e /usr/src/linux ]; then
# build with linux headers installed from source
if grep -q "Raspberry Pi 4" /proc/cpuinfo; then
echo build_install_header_from_source_raspi4.bash
$SRC_DIR/utils/build_install_header_from_source_raspi4.bash
exit 0
else
echo build_install_header_from_source_raspi2.bash
$SRC_DIR/utils/build_install_header_from_source_raspi2.bash
exit 0
fi
elif [ "$(ls /usr/src/linux-* 2> /dev/null)" != '' ]; then
# build with linux headers installed with apt
if grep -q "Raspberry Pi 4" /proc/cpuinfo; then
echo build_install_header_from_apt_raspi4.bash
$SRC_DIR/utils/build_install_header_from_apt_raspi4.bash
exit 0
else
echo build_install_header_from_apt_raspi2.bash
$SRC_DIR/utils/build_install_header_from_apt_raspi2.bash
exit 0
fi
else
# Error
bash -e $SRC_DIR/utils/print_env.bash "No kernel header files found."
fi