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.x.x release
2025/06/12 DESK-XZ7-L 2.x.x 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]

[    1.033849] mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
[    1.086200] mmc0: new high speed SDHC card at address aaaa
[    1.092748] mmcblk0: mmc0:aaaa SA16G 14.8 GiB
[    1.104330]  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   dev  home  lost+found  mnt   run   sys  usr  www
boot  etc  lib   media       proc  sbin  tmp  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, 0.956393 s, 110 MB/s
root@bora:~# time cp test_file_100MB /mnt/mmcblk0p1

real    0m1.980s
user    0m0.000s
sys     0m1.918s
root@bora:~#