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

推荐订阅源

B
Blog
Know Your Adversary
Know Your Adversary
博客园 - 叶小钗
雷峰网
雷峰网
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
量子位
A
About on SuperTechFans
The Register - Security
The Register - Security
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
IT之家
IT之家
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
J
Java Code Geeks
有赞技术团队
有赞技术团队
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
Hacker News: Ask HN
Hacker News: Ask HN
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
Stack Overflow Blog
Stack Overflow Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 司徒正美
NISL@THU
NISL@THU
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Schneier on Security
Schneier on Security
博客园 - 三生石上(FineUI控件)
T
The Blog of Author Tim Ferriss
AWS News Blog
AWS News Blog
The GitHub Blog
The GitHub Blog
C
Cisco Blogs
T
Tenable Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
V
Vulnerabilities – Threatpost
美团技术团队
L
LangChain Blog
Google DeepMind News
Google DeepMind News
腾讯CDC
P
Privacy International News Feed
Spread Privacy
Spread Privacy
D
DataBreaches.Net
Engineering at Meta
Engineering at Meta
S
Security @ Cisco Blogs

博客园 - midhillzhou

windows 11关闭防火墙 以使得 外部的开发板可以主动发起ping通电脑 uboot中调试景略以太网phy JL3111A2-NA windows上excel运行macro之后出现错误 在linux上移植phytool + 调试tja1103 以太网phy 使用gdb调试user程序 之 某个线程的调用栈 在uboot中修改tja 1103以太网phy from slave to master porting perf性能观测工具 porting 开源memtester uboot 2020版本下gpio命令的使用 + linux下的libgpiod lib库的移植使用 ubi文件系统的 制作 + 挂载 + 若干问题 i2c指令使用 + 仿照开源i2ctransfer实现的自己的i2ctransfer windows下outlook 撤回邮件 安装repo 使用lauterbach debug uboot之重定位 uboot中各种memory读写命令 uboot nand flash dump 环境变量 + 制作环境变量分区 + 代码结构详解 uboot bootm代码详解图 Beyond Compare 进行二进制文档的比对时,怎么去对齐(转载) notepad++分析log小技巧 使用继电器控制开发板上下电 uboot debug小技巧
在linux上移植sgdisk
midhillzhou · 2026-01-28 · via 博客园 - midhillzhou

 1.下载代码

git clone https://git.code.sf.net/p/gptfdisk/code gptfdisk

2.编译指令

make sgdisk 
CC=aarch64-none-linux-gnu-gcc 
CXX=aarch64-none-linux-gnu-g++ 
CFLAGS="--sysroot=rootfs_sdk/aarch64-buildroot-linux-gnu/sysroot" 
CXXFLAGS="--sysroot=rootfs_sdk/aarch64-buildroot-linux-gnu/sysroot" 
LDFLAGS="--sysroot=rootfs_sdk/aarch64-buildroot-linux-gnu/sysroot -Lrootfs_sdk/aarch64-buildroot-linux-gnu/sysroot/usr/lib"

将上式中的rootfs_sdk替换成sdk编译出来的sysroot的绝对路径,比如/home/zhongshan/SDK_V1.1/build/out/demo_emmc/objs/buildroot/rootfs_sdk

并将这些合成一行输入,

注意-Lrootfs_sdk里面的rootfs_sdk也要替换掉。比如-L/home/zhongshan/SDK_V1.1/build/out/demo_emmc/objs/buildroot/rootfs_sdk

3.将编译生成的sgdisk复制到板子上,并执行如下命令,查看分区情况

scp ./sgdisk root@192.168.1.202:/tmp/
root@mxx:/tmp # ./sgdisk -p /dev/mmcblk0
Disk /dev/mmcblk0: 61079552 sectors, 29.1 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 493DDFCA-B275-4783-B265-21CD15E365D0
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 61079518
Partitions will be aligned on 32-sector boundaries
Total free space is 58055037 sectors (27.7 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            2303   128.0 KiB   0700  sbl_a
   2            2304            2559   128.0 KiB   0700  sbl_b
   3            2560            2815   128.0 KiB   0700  hsm_a
   4            2816            3071   128.0 KiB   0700  hsm_b
   5            3072            3327   128.0 KiB   0700  metadata
   6            3328            3583   128.0 KiB   0700  metadata_bak
   7            3584            4607   512.0 KiB   0700  spl_a
   8            4608            5631   512.0 KiB   0700  spl_b
   9            5632            9727   2.0 MiB     0700  rtos_a
  10            9728           13823   2.0 MiB     0700  rtos_b
  11           13824           14847   512.0 KiB   0700  appdata
  12           14848           14879   16.0 KiB    0700  misc
  13           14880           14911   16.0 KiB    0700  misc_bak
  14           14912           15167   128.0 KiB   0700  ubootenv
  15           15168           15423   128.0 KiB   0700  ubootenv_bak
  16           15424           19519   2.0 MiB     0700  uboot_a
  17           19520           23615   2.0 MiB     0700  uboot_b
  18           23616           23871   128.0 KiB   0700  atf_a
  19           23872           24127   128.0 KiB   0700  atf_b
  20           24128           26175   1024.0 KiB  0700  optee_a
  21           26176           28223   1024.0 KiB  0700  optee_b
  22           28224           69183   20.0 MiB    0700  kernel_a
  23           69184          110143   20.0 MiB    0700  kernel_b
  24          110144          519743   200.0 MiB   0700  rootfs_a
  25          519744          929343   200.0 MiB   0700  rootfs_b
  26          929344         3026495   1024.0 MiB  0700  userdata

注释1:一个关于emmc 分区spec的网站

 https://uefi.org/specs/UEFI/2.10/05_GUID_Partition_Table_Format.html#

注释2:后来同事发现还有一个展示信息更加丰富的工具,如下

image