Hi,
I'm trying to learn how to cross-compile things for RPi & piCore. I found that there exists several methods how to do it, either to run piCore in QEMU completely, or use some toolchains, or use chroot with qemu-user-static package. Problem is that I'm not, for some reason, to mount the image I've downloaded. It doesn't depend if it's piCore 7.0 or 8.0 or arm6 or arm7. MD5 sums of img files are ok.
This is what I get when I use kpartx:
$ sudo kpartx -a -v piCore-8.0.img
add map loop0p1 (254:0): 0 61440 linear 7:0 8192
device-mapper: resume ioctl on loop0p2 failed: Invalid argument
create/reload failed on loop0p2
With losetup:
$ sudo losetup --find --show "piCore-8.0.img"
/dev/loop0
$ ls -l /dev | grep loop0
brw-rw---- 1 root disk 7, 0 18.10.2016 22:09 loop0
When I mount .img file from Nautils through Disk Image Mounter, then I see /dev/loop0p1 and /dev/loop0p2 but then:
sudo mount /dev/loop0p2 mnt
mount: /dev/loop0p2 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop0p2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
or
sudo mount /dev/loop0p1 mnt
mount: /dev/loop0p1 is write-protected, mounting read-only
which also doesn't seem to be right…
Am I just doing something wrong. Am I missing some tool/package installed?
Thanks
Btw. I'm trying to use this method:
http://raspberrypi.stackexchange.com/a/54288