打印

【AM335x】为 SD 卡创建分区的过程

[复制链接]
1257|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
FCCdsp|  楼主 | 2017-5-24 11:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
【AM335x】为 SD 卡创建分区的过程



首先,我用的是 VirtualBox,将 SD 卡放到 USB Adapter 之后,安装完驱动。即可执行 bin 下的 creat-sdcard.sh 脚本.
simon@simon-laptop:~/Work/ti-sdk-am335x-evm-05.04.01.00/bin$ sudo ./create-sdcard.sh


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

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       16    3813376 sdb

Enter Device Number: 1


sdb was selected

Checking the device is unmounted
unmounted /dev/sdb1
unmounted /dev/sdb2
unmounted /dev/sdb3

sdb1  sdb2   sdb3
72261 923737 2795310


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

   Detected device has 3 partitions already

   Re-partitioning will allow the choice of 2 or 3 partitions

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

Would you like to re-partition the drive anyways [y/n] : y


Now partitioning sdb ...


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

        Select 2 partitions if only need boot and rootfs (most users)
        Select 3 partitions if need SDK & CCS on SD card.  This is usually used
        by device manufacturers with access to partition tarballs.

        ****WARNING**** continuing will erase all data on sdb

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

Number of partitions needed [2/3] : 2


Now partitioning sdb with 2 partitions...


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

                Now making 2 partitions

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

1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 2.89689 s, 362 kB/s
Disk /dev/sdb doesn't contain a valid partition table
DISK SIZE - 3904897024 bytes
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdb: 474 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/sdb: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+      8       9-     72261    c  W95 FAT32 (LBA)
/dev/sdb2         10     473     464    3727080   83  Linux
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

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

                Partitioning Boot

################################################################################
mkfs.vfat 3.0.7 (24 Dec 2009)

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

                Partitioning rootfs

################################################################################
mke2fs 1.41.11 (14-Mar-2010)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
233392 inodes, 931770 blocks
46588 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=956301312
29 block groups
32768 blocks per group, 32768 fragments per group
8048 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done                           
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


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

   Partitioning is now done
   Continue to install filesystem or select 'n' to safe exit

   **Warning** Continuing will erase files any files in the partitions

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


Would you like to continue? [y/n] : y



Mount the partitions

Emptying partitions


Syncing....

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

        Choose file path to install from

        1 ) Install pre-built images from SDK
        2 ) Enter in custom boot and rootfs file paths

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

Choose now [1/2] : 1


Will now install from SDK pre-built images
now installing:  ti-sdk-am335x-evm-05.04.01.00
################################################################################

        Copying files now... will take minutes

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

Copying boot partition

MLO copied

u-boot.bin file not found

u-boot.img copied

uImage copied

Copying rootfs System partition
Written 100%  

Syncing...

Un-mount the partitions

Remove created temp directories

Operation Finished

相关帖子

沙发
qudongdong| | 2017-5-29 09:46 | 只看该作者
你好 我用AM335x  SD卡启动时 没有反应 什么也没输出  拔掉SD卡 打印CCC......  不知道大神可遇到过这样的问题

使用特权

评论回复
板凳
51xlf| | 2017-5-29 22:56 | 只看该作者
这个直接SD卡能不能启动?

使用特权

评论回复
地板
51xlf| | 2017-5-29 23:00 | 只看该作者
嵌入式开发不是很容易。

使用特权

评论回复
5
lzmm| | 2017-6-2 23:12 | 只看该作者
这个外部的SD直接启动芯片?

使用特权

评论回复
6
lzmm| | 2017-6-2 23:15 | 只看该作者
不是使用内部的EMMC加载的吗?

使用特权

评论回复
7
acq| | 2019-7-15 11:26 | 只看该作者
qudongdong 发表于 2017-5-29 09:46
你好 我用AM335x  SD卡启动时 没有反应 什么也没输出  拔掉SD卡 打印CCC......  不知道大神可遇到过这样的 ...

跟我遇到的一模一样

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

967

主题

1447

帖子

9

粉丝