All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Yocto img file deployment
@ 2020-05-04 12:06 Damien LEFEVRE
  0 siblings, 0 replies; only message in thread
From: Damien LEFEVRE @ 2020-05-04 12:06 UTC (permalink / raw
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1645 bytes --]

Hi,

I have a yocto image: image.img.

On my build PC I have
> file image.img
image.img: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,1),
end-CHS (0x3ff,254,63), startsector 1, 802815 sectors, extended partition
table (last)

> fdisk -l image.img
Disk image.img: 392 MiB, 411041792 bytes, 802816 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: gpt
Disk identifier: 45C0DFD4-267E-4C4A-820F-B94F180165E7

Device     Start    End Sectors  Size Type
image.img1  2048 800767  798720  390M Linux filesystem



And I can calculate the offset (512 * 2048 = 1048576) to mount image.img1
to let say /tmp/update
mount -t ext4 -o loop,offset=1048576 image.img /tmp/update



Now on the target device (Tegra), I'd like to write the content of
image.img1 to /dev/mmcblk0p38. But the output of busybox's fdisk is
different

> fdisk -l image.img
Disk image.img: 392 MB, 411041792 bytes, 802816 sectors
49 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device   Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors
 Size Id Type
image.img1    0,0,1       1023,254,63          1     802815     802815
 391M ee EFI GPT
Partition 1 has different physical/logical start (non-Linux?):
     phys=(0,0,1) logical=(0,0,2)
Partition 1 has different physical/logical end:
     phys=(1023,254,63) logical=(49,248,7)

How can I deduce the offset from this output?

Better even, is there a way to dd image.img1 directly to /dev/mmcblk0p38?

Thanks,

[-- Attachment #2: Type: text/html, Size: 1811 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-04 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04 12:06 Yocto img file deployment Damien LEFEVRE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.