the new msd/start4.elf performance seems slower then expected
See original GitHub issueDescribe the bug
the new msd/start4.elf
performance seems slower then expected
To Reproduce
# boot msd/start4.elf on a rpi4b
[root@amd-nixos:~]# time dd if=/dev/sdf of=/dev/null bs=4096
1940480+0 records in
1940480+0 records out
7948206080 bytes (7.9 GB, 7.4 GiB) copied, 718.837 s, 11.1 MB/s
real 11m58.853s
Expected behaviour the exact same uSD card, now in a laptop with a built-in mmc reader
[root@system76:~]# time dd if=/dev/mmcblk0 bs=4096 of=/dev/null
1940480+0 records in
1940480+0 records out
7948206080 bytes (7.9 GB, 7.4 GiB) copied, 185.129 s, 42.9 MB/s
real 3m5.138s
Bootloader version and configuration
[clever@amd-nixos:usbboot]$ git rev-parse HEAD
ff86c6dedebdc34382406915c44ef7933b20a177
SD card boot (please complete the following information):
[root@system76:/sys/class/block/mmcblk0/device]# cat cid
035344534c30384780956a0dae00fb01
[root@system76:/sys/class/block/mmcblk0/device]# cat csd
400e00325b5900003b377f800a404001
[root@system76:/sys/class/block/mmcblk0/device]# cat manfid
0x000003
[root@system76:/sys/class/block/mmcblk0/device]# cat name
SL08G
[root@system76:/sys/class/block/mmcblk0/device]# cat serial
0x956a0dae
a relatively recent 8gig samsung uSD card
Additional context
and one minor nit-pick:
Bus 006 Device 087: ID 0a5c:0001 Broadcom Corp. Compute Module
the msd/start4.elf
always claims to be a compute module, even if booting on an rpi4b
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Elf The Musical | Music Theatre International
Based on the beloved holiday film, this hilarious fish-out-of-water comedy follows Buddy the Elf in his quest to find his true identity. A...
Read more >Official Website | Elf The Musical - Bass Performance Hall
Performing Arts Fort Worth presents ELF THE MUSICAL at Bass Performance Hall November 11-13, 2022. Get your tickets at www.basshall.com. ELF The Musical...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/librerpi/rpi-tools/blob/master/nixos-msd/default.nix#L35
running the official kernel/modules, with a custom initrd/busybox, i was able to get ~74% the speed of a direct connection which is nearing the limits of usb2.0, but i dont know the exact implementation (10:8 encoding? overhead bytes per packet? packet size?) so i cant compute the exact limits
definitely a big improvement, and something to consider for when i need it in the future linux is also able to drive the ACT led normally, so it behaves more like a normal MSD as well
edit:
and if i remove the SD card from the loop and just read a dummy disk in tmpfs, i get the same speed, definitely a bottleneck in the usb area now
ah yeah, i can see how the 500mhz dual-core vs >1ghz quad-core, would make a fairly drastic difference
about the only way i can see to diagnose that more, would be for
msd/start4.elf
to print cpu usage stats to the serial if youuart_2ndstage=1
, but thats pretty low priority, since you can just boot a linux based MSD insteadthat only leaves 2 minor bugs:
bootcode4.bin
to undo breaking the boot chaingpio condionals in
bootconf.txt
might work, but ive not tried changing theBOOT_ORDER
dynamically yetupdate: yep, conditionals work! took https://github.com/raspberrypi/firmware/issues/1076 as an example, and put the following into
bootconf.txt
:now it goes into usb-dev mode by default, and the self-reflashing can update without any fuss and if i jumper gpio5<->gnd, it will instead boot from SD or usb-host!