Commit 23aa9781 authored by Joanne Hugé's avatar Joanne Hugé

Update compile kernel script

parent 6ecab67e
#!/bin/bash
usage() {
echo "Usage: $0 [-hdkms] [-l LINUX_PATH] [-o OUTPUT_STR] (-p | -u CONFIG_PATH | -c CONFIG_PATH | -n OLD_CONFIG_PATH NEW_CONFIG_PATH)"
echo "Usage: $0 [-hgdkms] [-l LINUX_PATH] [-o OUTPUT_STR | -O OUTPUT_NAME] (-p | -u CONFIG_PATH | -c CONFIG_PATH | -n OLD_CONFIG_PATH NEW_CONFIG_PATH)"
exit 1;
}
linux_path=$HOME/linux
output_str=""
while getopts "hdkmpsu:c:nl:o:" opt; do
while getopts "hgdkmpsu:c:nl:o:O:" opt; do
case "${opt}" in
h )
usage
;;
g )
update_git=1
;;
s )
copy_to_sepia=1
;;
......@@ -52,6 +55,9 @@ while getopts "hdkmpsu:c:nl:o:" opt; do
o )
output_str="_${OPTARG}"
;;
O )
output_name="${OPTARG}"
;;
* )
usage
;;
......@@ -70,6 +76,10 @@ linux_path=$(readlink -m $linux_path)
export ARCH=arm;export CROSS_COMPILE=arm-linux-gnueabihf-;
cd $linux_path;
if [ -n "$update_git" ]; then
git pull;
fi
if [ -z "$partial_compile" ]; then
if [ -n "${new_config}" ]; then
......@@ -133,7 +143,9 @@ fi
# Compression
kernel_version=$(git describe --tags)
output_name=${kernel_version}_kernel${output_str}
if [ -z "$output_name" ]; then
output_name=${kernel_version}_kernel${output_str}
fi
echo "Creating output folder";
mkdir -p ../$output_name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment