当前位置: 首页 > news >正文

北京都有那些做网站的公司最新消息今天的新闻

北京都有那些做网站的公司,最新消息今天的新闻,淘宝店铺如何和别的网站做链接,卫生室可以做网站吗Yocto/OpenEmbedded使用的磁盘镜像格式是 wic。为嵌入式系统提供 bootable images。 The disk image format used in the Yocto Project is wic. .wic 文件显然只是一个带有分区表和分区的磁盘镜像,就像下载 Linux 发行版时获得的所有 .img 文件一样。这就是为什么你…

Yocto/OpenEmbedded使用的磁盘镜像格式是 wic。为嵌入式系统提供 bootable images。

The disk image format used in the Yocto Project is wic.

.wic 文件显然只是一个带有分区表和分区的磁盘镜像,就像下载 Linux 发行版时获得的所有 .img 文件一样。这就是为什么你可以使用 dd 命令烧写 .wic 文件,就像使用 .img 文件一样。

A .wic file is apparently just a disk image with a partition table and partitions, just like all the .img files you get when downloading e.g Linux distros. That's why you can flash a .wic file using dd just like you would with a .img file.

之所以使用 .wic 文件扩展名,是因为它是由 wic 工具创建的,该工具读取 .wks 文件中描述的分区布局,并生成带有相应分区的映像。有关 wic 工具的更多信息,请参阅: 19 Creating Partitioned Images Using Wic — The Yocto Project ® 5.0.1 documentation

The reason for the .wic file extension is simply that it's created by the wic tool, which reads a partition layout described in a .wks file and generates an image with the corresponding partitions. For more info on the wic tool, see:  19 Creating Partitioned Images Using Wic — The Yocto Project ® 5.0.1 documentation 

如何读取wic文件中的内容呢?

1,Mount the .wic File

将wic文件加载为loop device。

Automatically find an available loop device and associate it with a file.

$ sudo losetup -Pf --show my-image.wic

/dev/loop17

$ losetup --help

-a, --all                     list all used devices

-P, --partscan                create a partitioned loop device

-f, --find                    find first unused device

--show                    print device name after setup (with -f)

-d, --detach <loopdev>...     detach one or more devices

-D, --detach-all              detach all used devices

$ losetup -a

上面结果显示加载为/dev/loop17设备。

将设备名赋值给变量:

LOOP_DEVICE=$(sudo losetup -Pf --show my-image.wic)

2, List Partitions

使用fdisk命令,查看加载设备的分区信息

$ sudo fdisk -l /dev/loop17

Disk /dev/loop17: 7.11 GiB, 7638816768 bytes, 14919564 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x076c4a2a

Device        Boot  Start      End  Sectors  Size Id Type

/dev/loop17p1 *     16384   186775   170392 83.2M  c W95 FAT32 (LBA)

/dev/loop17p2      196608 14919563 14722956    7G 83 Linux

3,Mount Partitions

sudo mount  /dev/loop17p1 mnt

4,Access Files

cd mnt

ls

5, Cleaning up

Unmount partitions:

sudo umount mnt

6, Detach the loop device

sudo losetup -d /dev/loop17


使用kpartx命令操作:

$ kpartx --help

-a add partition devmappings

-d del partition devmappings

-v verbose

-l list partitions devmappings that would be added by -a

$ sudo kpartx -av my-image.wic

[sudo] password for dev:

add map loop17p1 (252:0): 0 170392 linear 7:17 16384

add map loop17p2 (252:1): 0 14722956 linear 7:17 196608

$ sudo kpartx -l my-image.wic

loop17p1 : 0 170392 /dev/loop17 16384

loop17p2 : 0 14722956 /dev/loop17 196608

$ sudo kpartx -l /dev/loop17

loop17p1 : 0 170392 /dev/loop17 16384

loop17p2 : 0 14722956 /dev/loop17 196608

$ sudo fdisk -l /dev/loop17

Disk /dev/loop17: 7.11 GiB, 7638816768 bytes, 14919564 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x076c4a2a

Device        Boot  Start      End  Sectors  Size Id Type

/dev/loop17p1 *     16384   186775   170392 83.2M  c W95 FAT32 (LBA)

/dev/loop17p2      196608 14919563 14722956    7G 83 Linux

$ ls /dev/mapper/

control  loop17p1  loop17p2

$ sudo mount /dev/mapper/loop17p2 mnt

$ sudo umount mnt

$ sudo kpartx -dv my-image.wic

del devmap : loop17p1

del devmap : loop17p2

loop deleted : /dev/loop17

$ sudo kpartx -dv /dev/loop17

del devmap : loop17p1

del devmap : loop17p2

参考:

linux - Difference between wic and hddimg format in yocto - Stack Overflow

http://www.hkea.cn/news/8536/

相关文章:

  • 哪些网站可以做外贸友情链接交易购买
  • 深圳市住建设局网站推广的软件有哪些
  • 互联网营销师挣的是谁的钱宁波seo服务
  • 西安做商铺的网站十堰seo优化方法
  • 网站开发与应用论文百度权重网站排名
  • wordpress管理员插件seo网络营销推广排名
  • 洞头网站建设谷歌seo工具
  • 什么网站做外贸最好公司做网站需要多少钱
  • 嘉兴网站建设方案外包百度快照和广告的区别
  • 怎么做一淘宝客网站吗常用的网络推广方式有哪些
  • 寿光网站建设公司百度引擎搜索入口
  • 哪里能做网站南宁百度推广代理商
  • 深圳软件定制开发公司排行温州seo结算
  • 坂田网站建设推广公司石家庄百度推广优化排名
  • 手机网站建设新闻百度资源提交
  • 建设网站功能定位传统营销
  • 网站页面构架seo排名哪家有名
  • banner设计网站重庆旅游seo整站优化
  • 网站建设中最基本的决策之一是网络营销师工作内容
  • 深圳建站的公司外包公司和劳务派遣的区别
  • 用java怎么做网站镇江seo快速排名
  • 深圳网站建设在哪里可以如何做优化排名
  • 棋牌网站建设源码营销策划主要做些什么
  • 网站在哪里备案5118站长工具
  • 杭州制作网站个人sem是什么的英文缩写
  • 如何做网站限制策略东莞免费建站公司
  • 资阳的网站建设域名seo站长工具
  • 网站如何做排名靠前福州关键词快速排名
  • 江西锐安建设工程有限公司网站磁力搜索引擎
  • 网站设计代码武汉推广服务