1 Star 0 Fork 1.3K

shafeipaozi / kernel

forked from openEuler / kernel 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
work.sh 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
shafeipaozi 提交于 2022-09-30 19:13 . add work
#! /bin/bash
while getopts ":a:c:i:o:" opt
do
case $opt in
a)
#echo "this is -a option. OPTARGG=[$OPTARG] OPTIND=[$OPTIND]"
aa="$OPTARG"
;;
c)
#echo "this is -c option. PTARG=[$OPTARG] OPTIND=[$OPTIND]"
cc="$OPTARG"
;;
i)
if [ -z "$OPTARG" ];then
export CONFIG=""
else
export CONFIG="$OPTARG"
fi;;
o)
export LOG="$OPTARG"
;;
?)
exit 1
;;
esac
done
make mrproper
make ARCH=$aa CROSS_COMPILE=$cc openeuler_defconfig
make ARCH=$aa CROSS_COMPILE=$cc menuconfig
checkrpm(){
local package=""
for i in $@
do
if ! rpm -qa|grep -q $i &>/dev/null;then
package+=$i
fi
done
if [ -n "${package}" ];then
yum install $package -y
else
echo "${package} installed"
fi
}
checkrpm "flex bison bc ncurses-devel elfutils-devel openssl-devel"
function Make_with_Stdio(){
make ARCH=$(([ -n "${ARCH}"] && echo ${ARCH}) || echo "arm") CROSS_COMPILE=$(([ -n "${CROSS_COMPILE}"] && ${CROSS_COMPILE}) || echo "cc") -j8 > $(([ -n "${aa}" ] && echo ${aa}) || echo "make.log") | tail -f
}
cat .config > .config.old
if ! [ -f "${CONFIG}" ]; then
echo "CONFIG Not Found."
exit 6
else
cat $CONFIG > .config
fi
Make_with_Stdio $LOG
#make ARCH=$aa CROSS_COMPILE=$cc -j8
C
1
https://gitee.com/shafeipaozi/kernel.git
git@gitee.com:shafeipaozi/kernel.git
shafeipaozi
kernel
kernel
openEuler-22.09

搜索帮助