summaryrefslogtreecommitdiff
path: root/script/build_kernel.sh
blob: e9d74efb48a3e504b6c91224056566e4108fec32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

set -e
set -x

# 定义变量
DEPENDENCIES="git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison"
# TARGET="x86_64-softmmu"
# CONFIG_OPTIONS="--enable-debug --target-list=$TARGET --enable-virtfs --enable-trace-backends=log"

sudo apt-get install $DEPENDENCIES

cd ..
# 内核源码较大,先 depth=1 保证能下载下来
git clone --depth=1 https://github.com/OS-F-4/uintr-linux-kernel.git
cd uintr-linux-kernel/
git fetch --depth=10
#git fetch --depth=1000

mkdir build
cp ../../script/.config ./build/

make O=build bzImage -j 12 V=1
make O=build modules -j 4