06-08-2015, 10:59 AM | #1 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Q: /dev/mmcblk0 media change [SOLVED]
I attempted a magic trick: make a fully autonomous memory upgrade mod that allows you to replace the internal SD card while the reader is running. So instead of WinDiskImager PartitionEditor Resizer the Kobo would do it all for you, pop the old card out, pop the new card in, make some magic happen in betwixt, and done.
I got passing far. The data that needs to be transferred is 512MiB at most (much less in practice) and the device has 512MiB of RAM. So in theory, you should be able to read the 512MiB into RAM, pop the old card out, pop the new card in, write the 512MiB back, fix the partitions, reboot and there you are. However, there's a snag. The Kobo refuses to acknowledge that the internal card was replaced while the system was running. The result is a load of read errors: Code:
Buffer I/O error on device mmcblk0, logical block 190 mmcblk0: retrying using single block read mmcblk0: error -110 sending status comand mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0 end_request: I/O error, dev mmcblk0, sector 0 mmcblk0: error -110 sending status comand mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0 end_request: I/O error, dev mmcblk0, sector 1 So, a question for developers, Linux Gurus, whatever: is there some way to make the internal card switch work? What I attempted so far: - make sure the internal card is entirely umounted (everything on tmpfs) - set /sys/module/mmc_core/parameters/removable to 1 or Y - go into standby and back - mmc-utils, sdtool, eject There don't seem to be the usual facilities (rescan scsi whatnots). Edit: SOLVED: https://www.mobileread.com/forums/sho...10#post3114410 Last edited by frostschutz; 06-09-2015 at 07:22 PM. |
06-08-2015, 11:51 AM | #2 |
Time Waster
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
|
Maybe this will help, I just had a quick look:
https://github.com/Lefinnois/USBdetach I think the key here is to detach the kernel driver from the device, and then attach it again. |
Advert | |
|
06-08-2015, 11:55 AM | #3 |
Time Waster
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
|
Maybe again, a simple
Code:
eject /dev/mmcblk0 |
06-08-2015, 12:59 PM | #4 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Interesting suggestions, but they all report inappropriate ioctl on device X.
|
06-09-2015, 04:48 AM | #5 |
Time Waster
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
|
|
Advert | |
|
06-09-2015, 06:06 AM | #6 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
I've found that too. Reloading the module isn't possible since the driver is built-in. The other suggestions (device/delete, host/scan etc.) don't seem to be available on the Kobo. And I never could get the device to reset by itself.
|
06-09-2015, 06:26 AM | #7 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
This works:
Code:
# blockdev --getsize64 /dev/mmcblk0 3965190144 # readlink /sys/block/mmcblk0 ../devices/platform/mxsdhci.2/mmc_host/mmc0/mmc0:af9e/block/mmcblk0 # echo mxsdhci.2 > /sys/bus/platform/drivers/mxsdhci/unbind ~~~ change card ~~~ # echo mxsdhci.2 > /sys/bus/platform/drivers/mxsdhci/bind # blockdev --getsize64 /dev/mmcblk0 8168931328 The mod itself: https://www.mobileread.com/forums/sho...d.php?t=261578 Last edited by frostschutz; 06-11-2015 at 05:08 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building a comprehensive media PC to share media (Mylar, Plex, Calibre, Sickbeard) | Ackis | Devices | 1 | 04-07-2014 06:43 PM |
Oh sh*t - just trashed mmcblk0 | ixtab | Kindle Developer's Corner | 12 | 08-30-2012 06:30 AM |
If Piracy Were an Issue, Media Companies Would Change | taosaur | News | 178 | 02-28-2012 10:19 AM |
Einfacher Feature-Request: /dev/ptmx und /dev/ttyUSB2 modes | Seneca | PocketBook | 2 | 12-05-2011 04:41 PM |
[HELP]Where to get mmcblk0 image for unbricking kindle 3 (3g wifi,version 3.21)?? | vidy | Kindle Developer's Corner | 2 | 10-04-2011 09:53 AM |