[OpenWrt-Devel] Signing, meta-data, etc. on images and losetup mounts...

Petr Štetiar ynezz at true.cz
Wed Apr 29 05:06:25 EDT 2020


Philip Prindeville <philipp_subx at redfish-solutions.com> [2020-04-27 18:17:01]:

> I was trying to take a openwrt-*-generic-squashfs-combined-efi.img file from master and verify it for correctness with “losetup”, etc.
> But losetup bailed because the image wasn’t a multiple of 512 bytes long.

It works for me (tm):

 $ binwalk bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img | grep Squashfs
 17301504      0x1080000       Squashfs filesystem, little endian, version 4.0, compression:xz, size: 6672270 bytes, 1266 inodes, blocksize: 262144 bytes, created: 2020-04-29 07:43:39

 $ sudo mount -o loop,offset=17301504 bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img tmp

 $ cat tmp/etc/openwrt_version 
 r13122+7-522f6b7eee47

BTW it's usually faster to verify the correctness with QEMU:

 $ ./scripts/qemustart x86 64 bin/targets/x86/64/openwrt-x86-64-generic-squashfs-combined-efi.img

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list