-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathstart_chroot_script
31 lines (24 loc) · 958 Bytes
/
start_chroot_script
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
# Custom Kernel Build start script
# Custom RaspberryPi Kernel builder
# Written by Guy Sheffer <guysoft at gmail dot com>
# GPL V3
########
set -x
set -e
# Source error handling, leave this in place
source /common.sh
install_cleanup_trap
pushd /home/pi
sudo apt-get update --allow-releaseinfo-change
sudo apt-get -y install make gcc git bc p7zip-full bison flex libssl-dev
# git clone --depth=1 https://github.com/raspberrypi/linux
# COMMIT=48564b51ac75d81f3f3b584fab8c3be44c7248a8 # fails on recipe for target 'bcm2709_defconfig' failed
#REVERT_COMMIT="120ec1e4cdddfc16c31581c2c30511c6c16fe0fd" # patch fail
# page 1
wget "${KERNEL_URL}/${KERNEL_COMMIT}.tar.gz" -O "${KERNEL_COMMIT}.tar.gz"
# unzip -q ${KERNEL_COMMIT}.zip
tar xzvf ${KERNEL_COMMIT}.tar.gz
FOLDER_NAME=$(tar -ztvf "${KERNEL_COMMIT}.tar.gz" | head -n 1 | awk '{ print $6 }')
mv "${FOLDER_NAME%?}" linux
popd