嵌入式爱好者

查看: 1083|回复: 1

[Linux] PCU1101 createSdcard执行失败

[复制链接]

1

主题

2

帖子

7

积分

FCU11xx通行证

扫一扫,手机访问本帖
发表于 2023-3-15 20:41:56 | 显示全部楼层 |阅读模式

nuc:~/Downloads/createSdcard$ ls /dev/sd*/dev/sda
nuc:~/Downloads/createSdcard$ sudo ./createSdcard.sh
[sudo] password for wang:



################################################################################

This script will create a bootable SD card from custom or pre-built binaries.

The script must be run with root permissions and from the bin directory of
the SDK

Example:
$ sudo ./create-sdcard.sh

Formatting can be skipped if the SD card is already formatted and
partitioned properly.

################################################################################


Availible Drives to write images to:

#  major   minor    size   name
1:   8        0    7565312 sda

Enter Device Number: 1

DEVICEDRIVENAME=sda
DEVICESIZE=7565312

sda was selected

Checking the device is unmounted

sda1  sda2   sda3


SD Card is not correctly partitioned

################################################################################

        Now ** 1 partitions

################################################################################

1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000124383 s, 8.2 MB/s
DISK SIZE - 7746879488 bytes
sfdisk: unsupported unit 'M'

################################################################################

        Partitioning Boot

################################################################################
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.vfat: unable to open /dev/sda1: No such file or directory

Mount the partitions
mount: /home/wang/Downloads/createSdcard/boot: special device /dev/sda1 does not exist.

Emptying partitions



回复

使用道具 举报

1

主题

2

帖子

7

积分

FCU11xx通行证

 楼主| 发表于 2023-3-15 21:29:11 | 显示全部楼层
折腾半天,参考下面的步骤算是ok了。不过起来后发现LIBC版本太低了,还是2.13的。用的gcc4.6的。淘宝店客服说可以支持gcc5.X 。 请问新版本在哪里可以拿到?


https://bbs.elecfans.com/jishu_2238361_1_1.html

原来是运行你们的一键脚本,制作的sd卡不成功。
这个问题不用纠结了。
后来研究好了,请看解决方案:
最近在研究 fcu1101时,板子只支持sd的方式跟新系统。
使用原厂的一键制作sd卡的代码,不知道什么原因总是不成功。
经过几天的折腾,总结一下:
比如找一个128M的sd卡,接到windows上,用系统自带 硬盘管理 将SD卡分成2个区。比如将第一个分区划分10M,第二个分区划分剩余空间,并格式化为 fat32 的格式。再将第一分区删除。
将update.tar.bz2 解压的文件拷贝到第二分区。第二分区下将看到 sdrun 和 target 两个目录。
然后将sd卡 连接到虚拟机中的ubuntu,在sd卡的分区位置打开终端(终端中的当前位置为sd卡的根目录)运行
sudo dd if=/dev/zero of=/dev/sdb bs=1k seek=384 conv=fsync count=129
sudo dd if=sdrun/u-boot.imx of=/dev/sdb bs=1k seek=1 conv=fsync
然后就可以按照厂家说明书中的步骤继续刷机了。



说明:
dd if=/dev/zero of=$DRIVE bs=1024 count=1
(我感觉)上面的这句代码将会“删除”mrb信息,导致分区无法读。所以不要运行这句代码。
sd卡不正常时,当时刷机出现类似低格那种小方块,当时跑了一夜也没跑完。正常的刷机,其实不慢,几分钟吧,debug监控中没有乱码,会出现 writing 的语句。
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-3-29 13:00

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表