#cat setup_env
#!/bin/sh
USER='whoami'
isroot()
{
if [ "$USER" = "root" ]; then
return
fi
echo "Current user is: $USER, please login to [root]"
sudo su
return
}
reset_kernel_config()
{
while :
do
echo -n "Ensure reset Kernel config [Y/N] "
read selectItem
if [ "$selectItem" = "Y" ]; then
echo "Configuere Kernel..."
cd kernel_imx/
echo "Reset kernel config..."
make imx5_android_defconfig
cd ..
return
elif [ "$selectItem" = "N" ]; then
return
else
echo -e "Input not valid, try again.\n" >&2
sleep 0.2
fi
done
}
mkuramdisk()
{
echo "Convert ramdisk to uramdisk..."
cd $URAMPATH
/mnt/FSL_BSP/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img
if [ $? -ne 0 ]; then
echo -e "\nERROR: make uramdisk failed.\n"
cd -
exit
fi
cd -
return
}
阅读(1548) | 评论(0) | 转发(0) |