DESK-XZ7-L/Peripherals/SD

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2024/01/23 DESK-XZ7-L-1.0.1 release



Peripheral SD[edit | edit source]

The SD device, if present, will be associated by the Linux kernel to the mmcblk0 device:

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

[    0.740571] mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
...
[    0.824174] mmc0: new high speed SDHC card at address aaaa
[    0.830415] mmcblk0: mmc0:aaaa SA16G 14.8 GiB
[    0.837970]  mmcblk0: p1 p2

Additional information[edit | edit source]

Once detected, it can be mounted and accessed via usual Linux commands:

root@bora:~# mkdir -p /mnt/mmcblk0p1
root@bora:~# mkdir -p /mnt/mmcblk0p2
root@bora:~# mount /dev/mmcblk0p1 /mnt/mmcblk0p1
root@bora:~# mount /dev/mmcblk0p2 /mnt/mmcblk0p2
root@bora:~# ls /mnt/mmcblk0p1
BOOT.BIN  System Volume Information  boot.scr  image.ub
root@bora:~# ls /mnt/mmcblk0p2
bin  boot  dev  etc  home  lib  lost+found  media  mnt  proc  run  sbin  sys  tmp  usr  var
root@bora:~# dd if=/dev/zero of=test_file_100MB bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 1.50526 s, 69.7 MB/s
root@bora:~# time cp test_file_100MB /mnt/mmcblk0p1

real    0m3.006s
user    0m0.011s
sys     0m1.853s
root@bora:~#