惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
V
V2EX
博客园_首页
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Announcements
Recent Announcements
博客园 - 司徒正美
Microsoft Security Blog
Microsoft Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Latest news
Latest news
Vercel News
Vercel News
The Register - Security
The Register - Security
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
小众软件
小众软件
L
Lohrmann on Cybersecurity
GbyAI
GbyAI
P
Privacy & Cybersecurity Law Blog
T
Tor Project blog
AWS News Blog
AWS News Blog
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
K
Kaspersky official blog
B
Blog RSS Feed
G
Google Developers Blog
量子位
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
Scott Helme
Scott Helme
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
Intezer
雷峰网
雷峰网
Martin Fowler
Martin Fowler
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Blog — PlanetScale
Blog — PlanetScale
IT之家
IT之家
F
Full Disclosure
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
The Hacker News
The Hacker News
U
Unit 42
S
SegmentFault 最新的问题
I
InfoQ
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
罗磊的独立博客
Spread Privacy
Spread Privacy
C
CERT Recently Published Vulnerability Notes

博客园 - 靖意风

使用QT 将可执行程序 进行打包 对使用的屏幕的整理 开发板启动时间优化 nmcli 设置网络配置 虚拟机下 安装 ubuntu 18.04 硬件基础知识__串口 字节对齐问题和 小端格式 在ubuntu下 编译23位的测试文件 31_了解 x6818开发板是 如何使用/dev/ttySAC0 进行打印log 10_linux dirver platform 框架 ubuntu24.04.02 下安装软件 记录 ubuntu 更新源 vmware 虚拟机的三种网卡 vmware 安装 ubuntu 24.04.02 07_linux 字符设备了解 04_kernel编程框架和 printk传参 05_使用linux内核的gpio库函数 03_uboot 命令整理 01_stm32 裸板程序 01_了解嵌入式开发
对mmc 设备进行分区
靖意风 · 2026-02-10 · via 博客园 - 靖意风

1. 查看emmc 的分区信息 ,发现只有mmcblk0boot0 和 mmcblk0boot1,用户是不能用的

#ls /dev/mmcblk0* -lh
brw-rw---- 1 0 0 179, 0 May 1 00:21 /dev/mmcblk0
brw-rw---- 1 0 0 179, 8 May 1 00:21 /dev/mmcblk0boot0
brw-rw---- 1 0 0 179, 16 May 1 00:21 /dev/mmcblk0boot1

还可以使用如下命令查看,发现 没有分区

#fdisk -l

Partition 1 has different physical/logical end:
phys=(486,254,63) logical=(487,29,54)
Disk /dev/mmcblk0: 7464 MB, 7826571264 bytes, 15286272 sectors
238848 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/mmcblk0 doesn't contain a valid partition table

2. 使用fdisk 进行分区,  需要指定起始位置 和终止位置,需要保存

fdisk /dev/mmcblk0

然后使用 mkfs.ext2  /dev/mmcblk0p1

然后查看

#fdisk -l

Partition 1 has different physical/logical end:
phys=(486,254,63) logical=(487,29,54)
Disk /dev/mmcblk0: 7464 MB, 7826571264 bytes, 15286272 sectors
238848 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 0,1,1 1023,3,16 16 1048591 1048576 512M 83 Linux
[root@Loongson-gz:/]#

3. 查看 分区的文件系统格式

[root@HuoLong-OS ~]# blkid /dev/mmcblk0p1
/dev/mmcblk0p1: UUID="c903f73a-86fc-4a49-9448-35f75823b4c6" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f05bf4e2-01"
[root@HuoLong-OS ~]#
[root@HuoLong-OS ~]# lsblk -f /dev/mmcblk0p1
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
mmcblk0p1
     ext4   1.0         c903f73a-86fc-4a49-9448-35f75823b4c6    5.5G    18% /
[root@HuoLong-OS ~]#
[root@HuoLong-OS ~]# file -s /dev/mmcblk0p1
/dev/mmcblk0p1: Linux rev 1.0 ext4 filesystem data, UUID=c903f73a-86fc-4a49-9448-35f75823b4c6 (needs journal recovery) (extents) (64bit) (large files) (huge files)
[root@HuoLong-OS ~]#
[root@HuoLong-OS ~]#
[root@HuoLong-OS ~]# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/root      ext4      7.1G  1.3G  5.5G  19% /
devtmpfs       devtmpfs  427M     0  427M   0% /dev
tmpfs          tmpfs     443M     0  443M   0% /dev/shm
tmpfs          tmpfs     177M  3.6M  174M   3% /run
tmpfs          tmpfs     4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs          tmpfs     443M     0  443M   0% /tmp
[root@HuoLong-OS ~]#
[root@HuoLong-OS ~]# mount | grep mmcblk0p1
/dev/mmcblk0p1 on / type ext4 (rw,relatime)