我在DM385 上编译好了UBOOT 写入SD 卡,使用MKSD_TI81XX.SH 写入SD 卡,却总部成功是怎么回事?我的OS 版本是UBUNTU 16.04 ?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我在DM385 上编译好了UBOOT 写入SD 卡,使用MKSD_TI81XX.SH 写入SD 卡,却总部成功是怎么回事?我的OS 版本是UBUNTU 16.04 ?
如果是制作SD卡失败,你也可以手动了执行;
用 fdisk 来重新分区;
mkfs.vfat -F 32 -n boot "$1"1 &> /dev/null
mkfs.ext3 -L rootfs "$1"2 &> /dev/null
格式化2个分区,分别拷贝数据,具体看看 mksd-ti81xx.sh 的步骤就可以了
我换了ubuntu12.04 出现
sudo ./mksd-ti81xxuboot.sh /dev/sdb1 MLO u-boot.bin
[sudo] password for hp:
All data on /dev/sdb1 now will be destroyed! Continue? [y/n]
y
[Partitioning /dev/sdb1...]
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.00569995 s, 184 MB/s
Disk /dev/sdb1 doesn't contain a valid partition table
DISK SIZE - 1020788736 bytes
CYLINDERS - 124
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
Warning: start=2048 - this looks like a partition rather than
the entire disk. Using fdisk on it is probably meaningless.
[Use the --force option if you really want this]
[Making filesystems...]
[Copying files...]
mount: special device /dev/sdb11 does not exist
umount: /dev/sdb11: not found
这个怎么操作?
qigong du1 说:sudo ./mksd-ti81xxuboot.sh /dev/sdb1 MLO u-boot.bin
你好;
你的SD卡 是dev/sdb 吗? 你这里命令需要写 /dev/sdb , 不是写/dev/sdb1
这个脚本会重新对sd卡进行分区的,所以下面就报了,找不到sdb11了。
我使用mount 命令查询了设备,显示的是
hp@hp:~/yourapp/Utils/sd-script$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/hp/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=hp)
vmware-vmblock on /run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,default_permissions,allow_other)
/dev/sdb1 on /media/D602-2712 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)
hp@hp:~/yourapp/Utils/sd-script$
这个写/dev/sdb1应该是对的!
现在我只想写UBOOT 和MLO ,一步一步的调试!
#!/bin/bash
if [[ -z $1 || -z $2 || -z $3 ]]
then
echo "mksd-ti814x Usage:"
echo " mksd-ti814x <device> <MLO> <u-boot.bin> <uImage> <rootfs tar.gz >"
echo " Example: mksd-ti814x /dev/sdc MLO u-boot.bin uImage nfs.tar.gz"
exit
fi
if ! [[ -e $2 ]]
then
echo "Incorrect MLO location!"
exit
fi
if ! [[ -e $3 ]]
then
echo "Incorrect u-boot.bin location!"
exit
fi
#if ! [[ -e $4 ]]
#then
# echo "Incorrect uImage location!"
# exit
#fi
#if ! [[ -e $5 ]]
#then
# echo "Incorrect rootfs location!"
# exit
#fi
echo "All data on "$1" now will be destroyed! Continue? [y/n]"
read ans
if ! [ $ans == 'y' ]
then
exit
fi
echo "[Partitioning $1...]"
DRIVE=$1
dd if=/dev/zero of=$DRIVE bs=1024 count=1024
SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
echo DISK SIZE - $SIZE bytes
CYLINDERS=`echo $SIZE/255/63/512 | bc`
echo CYLINDERS - $CYLINDERS
{
echo ,9,0x0C,*
echo 10,,,-
} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
echo "[Making filesystems...]"
mkfs.vfat -F 32 -n boot "$1"1 &> /dev/null
mkfs.ext3 -L rootfs "$1"2 &> /dev/null
echo "[Copying files...]"
mount "$1"1 /mnt
cp $2 /mnt/MLO
cp $3 /mnt/u-boot.bin
#cp $4 /mnt/uImage
umount "$1"1
#mount "$1"2 /mnt
#tar zxvf $5 -C /mnt &> /dev/null
#chmod 755 /mnt
#umount "$1"2
echo "[Done]"
我修改了SH 脚本,出现后
[Partitioning /dev/sdb1...]
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.00906893 s, 116 MB/s
Disk /dev/sdb1 doesn't contain a valid partition table
DISK SIZE - 1020788736 bytes
CYLINDERS - 124
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
Warning: start=2048 - this looks like a partition rather than
the entire disk. Using fdisk on it is probably meaningless.
[Use the --force option if you really want this]
[Making filesystems...]
[Copying files...]
mount: special device /dev/sdb11 does not exist
umount: /dev/sdb11: not found
[Done]
实现只写MLO 和UBOOT 怎么操作?
那你直接把mlo 和 uboot 直接拷贝到sd卡,反正你sd卡格式是fat32 的;
正常,应当启动会有uboot打印的