When sdcard is /dev/mmcblk1 instead of mmcblk0

Hi,

I’m trying to port PYNQ on an iWave G35M board, which features an 8GB eMMC in addition to the SDcard reader.
As a result, on this board /dev/mmbclk0 refers to the eMMC as opposed to the SDcard, which is instead named /dev/mmcblk1. I believe PYNQ assumes the SDcard to be accessible through /dev/mmcblk0 which is probably the de-facto standard for all supported boards.
This actually breaks a few things, as, for instance, resizefs.sh will try to resize /dev/mmcblk0p2 and that is not a nice thing to do.

The same thing applies to the u-boot environment, which by default ends up in the eMMC and that might be confusing in the long run, as one would expect an SDcard to be self-contained.

On the other hand, one might want to just burn the resulting PYNQ .img in the eMMC somehow, though I have no idea what a linear workflow might be though.

Anyway, is there any plan or idea on how to make this (mmcblk0 or mmcblk1) configurable?

Thank you!

1 Like

We already have a change to resizefs that will be coming in the next version - it basically replaces the hard-coded paths with

TGTPART=$(mount | grep "/ " | cut -f 1 -d ' ')
TGTDEV=${TGTPART%p*}

We other place we hard-code it is in the device-tree and we haven’t worked out a solution there yet. All of the other references get pulled in from the BSP and it’s hard to do something generic given the difference between various boards.

Peter

1 Like