-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathkernel-build
More file actions
executable file
·20 lines (16 loc) · 867 Bytes
/
kernel-build
File metadata and controls
executable file
·20 lines (16 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash -xe
sudo rm -Rf /home/vagrant/linux
git clone --depth=1 https://github.com/raspberrypi/linux.git -b rpi-5.6.y /home/vagrant/linux
cp /vagrant/linux/* /home/vagrant/linux
cd /home/vagrant/linux
mv config .config
# Fix "multiple definition of `yylloc'" lexer error
sed -i 's/^YYLTYPE yylloc;$/extern YYLTYPE yylloc;/' scripts/dtc/dtc-lexer.l
# Apply Preepmt-RT patch
curl http://cdn.kernel.org/pub/linux/kernel/projects/rt/5.6/patch-5.6.14-rt7.patch.gz | gunzip > rt.patch
git apply rt.patch
# PATH=$PATH:/home/vagrant/tools/arm-bcm2708/arm-linux-gnueabihf/bin
# KERNEL=kernel7l
make -j $(($(nproc) + 1)) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- prepare
make -j $(($(nproc) + 1)) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs
sudo env PATH=$PATH make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=/mnt modules_install