2018-06-09 15:35:18 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
KVER=${1:-master}
|
2019-07-04 17:54:57 +08:00
|
|
|
CC=${2:-gcc}
|
2018-06-09 15:35:18 +08:00
|
|
|
|
|
|
|
src_dir="../linux-${KVER}"
|
|
|
|
|
|
|
|
if [ "${KVER}" = "master" ]; then
|
|
|
|
archive=master.tar.gz
|
|
|
|
else
|
|
|
|
archive="v${KVER}.tar.gz"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "${src_dir}" ]; then
|
|
|
|
wget -O - "https://github.com/torvalds/linux/archive/${archive}" | tar -C ../ -xz
|
|
|
|
fi
|
|
|
|
|
|
|
|
(
|
|
|
|
cd "$src_dir" || exit 1
|
2019-07-04 18:02:11 +08:00
|
|
|
make allmodconfig CC=${CC} HOSTCC=${CC}
|
|
|
|
make prepare CC=${CC} HOSTCC=${CC}
|
|
|
|
make scripts CC=${CC} HOSTCC=${CC}
|
2018-06-09 15:35:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
(
|
|
|
|
cd ashmem || exit 1
|
2019-07-04 18:02:11 +08:00
|
|
|
make KERNEL_SRC="../${src_dir}" CC=${CC} HOSTCC=${CC}
|
2018-06-09 15:35:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
(
|
|
|
|
cd binder || exit 1
|
2019-07-04 18:02:11 +08:00
|
|
|
make KERNEL_SRC="../${src_dir}" CC=${CC} HOSTCC=${CC}
|
2018-06-09 15:35:18 +08:00
|
|
|
)
|