制作SD卡文件系统
# mkdir sd_rootfs
# cd sd_rootfs
# cp ../project/image/output/rootfs/* ./ -rf
# cp ../project/image/output/customer/ . -rf
# cp ../project/image/output/appconfigs/ . -rf
# cp ../project/image/output/miservice/config/ . -rf
# tar -cvf rootfs.tar ./*
# touch make_sd_rootfs.sh
make_sd_rootfs.sh内容如下:
#!/bin/sh
PWD=$(pwd)
images_dir=${PWD}/images_for_mksdcard
if [ "$1" == "" ]; then
echo "!!!!!!!!!!!! ./make_sd_rootfs.sh /dev/sdb !!!!!!!!!!!"
exit 0
fi
sfdisk ${1}
mkfs.ext3 -F -j ${1}1
mkdir tmp_rootfs
mount -t ext3 ${1}1 tmp_rootfs
tar -xvf ./rootfs.tar -C tmp_rootfs
umount tmp_rootfs
rm -rf tmp_rootfs
# chmod a+x make_sd_rootfs.sh
把SD卡接入到ubuntu中,首先要把SD umount掉,假设被是识别为/dev/sdb,则执行:
#umount /dev/sd*
# sudo ./make_sd_rootfs.sh /dev/sdb
等待制作完成。
# sudo mount /dev/sdb1 /mnt
# sudo umount /mnt
制作完成,将SD卡取出并接入到开发板的SD卡座上。
kernel支持EXT2/3/4
# cd kernel
# ARCH=arm make menuconfig
File systems —>
<*> The Extended 3 (ext3) filesystem
如果没有支持,需重新配置并更新kernel。
保存当前config:
# cp .config arch/arm/configs/infinity2m_spinand_ssc011a_s01a_minigui_doublenet_defconfig -f
设置bootargs
uboot模式下执行:
SigmaStar # setenv bootargs console=ttyS0,115200 root=/dev/mmcblk1p1 rw rootwait=1 LX_MEM=0x7f00000 mma_heap=mma_heap_name0,miu=0,sz=0xa00000 mma_memblock_remove=1 highres=off mmap_reserved=fb,miu=0,sz=0x300000,max_start_off=0x3300000,max_end_off=0x3600000 mtdparts=nand0:384k@1280k(IPL0),384k(IPL1),384k(IPL_CUST0),384k(IPL_CUST1),768k(UBOOT0),768k(UBOOT1),256k(ENV),256k(ENV1),0x20000(KEY_CUST),0x60000(LOGO),0x500000(KERNEL),0x500000(RECOVERY),-(UBI)
SigmaStar # saveenv
# mount
# df -h
文档更新时间: 2022-06-23 17:09 作者:Aeeditor