I think I have everything set up to access MTD (and UBI) devices as "block", however, lsblk always ignores them, and refuses to list anything but the mmc. I can read ubifs and boot from it though, and since UBI runs on top of MTD block devices, MTD block device should be working, right?

I also have UBI_BLOCK enabled, so I would expect UBI volumes to appear in the "lsblk" as well.

Example U-boot session:

Zynq> mtd list
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
List of MTD devices:
* nor0
  - device: flash@0
  - parent: spi@e000d000
  - driver: jedec_spi_nor
  - path: /axi/spi@e000d000/flash@0
  - type: NOR flash
  - block size: 0x10000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000002000000 : "nor0"
          - 0x000000000000-0x000000100000 : "qspi-boot-bin"
          - 0x000000100000-0x000002000000 : "qspi-rootfs"

Zynq> lsblk
Block Driver          Devices
-----------------------------
efi_blk             : <none>
mmc_blk             : mmc 0
mtd_blk             : <none>
ubi_blk             : <none>
usb_storage_blk     : <none>

Zynq> ubi part qspi-rootfs
Zynq> ubi list
0: qspi-rootfs
Zynq> lsblk
Block Driver          Devices
-----------------------------
efi_blk             : <none>
mmc_blk             : mmc 0
mtd_blk             : <none>
ubi_blk             : <none>
usb_storage_blk     : <none>


I would have expected the SPI NOR flash to appear in the "mtd_blk" devices, and would expect the UBI volumes to appear in the "ubi_blk" list.
What am I missing?

What I'm aiming for here is to be able to:
- Read from squashfs in (raw) MTD partition (NOR flash is ideal for that)
- Read kernel/devicetree (fit) from UBI volume
- Read from squashfs inside UBI volume


I can read files from UBIFS (and boot into Linux using bootcmd_ubifs) just fine, e.g.:
Zynq> ubifsmount ubi0:qspi-rootfs
Zynq> ls ubi 0
<DIR>        5200  Fri Mar 09 12:34:56 2018  bin
<DIR>         160  Fri Mar 09 12:34:56 2018  dev
<DIR>        4984  Fri Mar 09 12:34:56 2018  etc
...


--
Mike Looijmans
System Expert

TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijm...@topic.nl
W: www.topic.nl



Reply via email to