代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。