1 Star 1 Fork 1

dangbinghoo / loongson1-kernel3.18

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.sh 862 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
echo -e "step0: Setup ENV ..."
export PATH=/opt/gcc-4.3-ls232/bin:$PATH
export ARCH=mips
export CROSS_COMPILE=mipsel-linux-
export MAKE_NPROC=-j`nproc`
export MKIME=mkimage
echo -e "OK :-)\n"
echo -e "step1: Config kernel ..."
if [ ! -f ./.config ]; then
make ls1c300a_openloongson_robot_defconfig
fi
echo -e "OK :-)\n"
echo -e "step2: Build kernel ..."
make $MAKE_NPROC
if [ $? -eq 0 ]; then
echo -e "OK :-)\n"
else
echo -e "Fail !!! :-(\n"
exit 1
fi
ENTRY_ADDR=`${CROSS_COMPILE}readelf -e vmlinux | grep "Entry point address" | awk '{print $4}'`
echo -e "step3: Make uImage ..."
$MKIME -A mips -O linux -T kernel -C gzip -a 0x80200000 -e $ENTRY_ADDR -n "Linux-3.18" -d arch/mips/boot/compressed/vmlinux.bin.z uImage
if [ $? -eq 0 ]; then
cp vmlinuz /srv/tftpboot/vmlinuz
echo -e "OK :-)\n"
else
echo -e "Fail !!! :-(\n"
exit 1
fi
exit 0
1
https://gitee.com/dangbinghoo/loongson1-kernel3.18.git
git@gitee.com:dangbinghoo/loongson1-kernel3.18.git
dangbinghoo
loongson1-kernel3.18
loongson1-kernel3.18
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891