# 如果没有传入参数,则提示错误
if [ -z $MODE ]; then
echo "\nERROR: Must set the compile mode"
echo "Example: $0 nand or $0 sd\n"
exit
fi
# 如果传入参数大于1,则提示错误
if [ $# -gt 1 ]; then
echo -e "\033[40;32m"
echo "Usage: ./mk [mode]"
echo " mode: nand, sd"
echo "compile: ./mk nand or ./mk sd"
echo -e "\033[40;37m"
fi
if [ $MODE = "nand" ]; then
make distclean
make smdkv210_nand_config
make -j${CPU_NUM}
mv u-boot.bin uboot_nand.bin
cp uboot_nand.bin /home/lqm/share/tftpboot/uboot.bin
echo "^_^ uboot_nand.bin is finished successful!"
exit
elif [ $MODE = "sd" ]; then
make distclean
make smdkv210_sd_config
make -j${CPU_NUM}
mv u-boot.bin uboot_sd.bin
cp uboot_sd.bin /home/lqm/share/tftpboot/uboot.bin
echo "^_^ uboot_sd.bin is finished successful!"
exit
else
echo -e "\033[40;32m"
echo "Usage: ./mk [mode]"
echo " mode: nand, sd"
echo "compile: ./mk nand or ./mk sd"
echo -e "\033[40;37m"
exit
fi
再执行mk脚本编译SD卡启动的uboot:
./mk sd
第四步:编译内核
make smdkv210_android_defconfig
make menuconfig
配置文件系统以支持SD卡文件系统:
Check Ext4 filesystem on menuconfig.
File systems
Set <*> The Extended 4 (ext4) filesystem
Set [*] Use ext4 for ext2/ext3 file systems
Save & Exit
修改makefile文件:
ARCH ?= arm
CROSS_COMPILE ?= /opt/arm-2009q3/bin/arm-none-linux-gnueabi-
如果提示如下错误:
Error: No MBR is found at SD/MMC.
Hint: use fdisk command to make partitions.
则先执行指令"fdisk -c 0",执行过程如下:
注意,x210ii开发板,需执行指令fdisk -c 1
SMDKV210 # fdisk -c 0
fdisk is completed
我按上面的步骤执行,再把放到板子上,还是同样的问题,在网上也没找到解决方法,不知其他人遇到这个问题没有。作者: 星期八 时间: 2012-6-30 00:32
x210 # fastboot
mmc/sd device's initialization is failed.
Error: No MBR is found at SD/MMC.
Hint: use fdisk command to make partitions.
x210 # fdisk -c 1
fdisk is completed