Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2015, 10:59 AM   #1
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
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
Only way it accepts the card is a power-off which loses RAM so the magic trick is kaputt.

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.
frostschutz is offline   Reply With Quote
Old 06-08-2015, 11:51 AM   #2
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
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.
giorgio130 is offline   Reply With Quote
Advert
Old 06-08-2015, 11:55 AM   #3
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
Maybe again, a simple
Code:
eject /dev/mmcblk0
would be enough.
giorgio130 is offline   Reply With Quote
Old 06-08-2015, 12:59 PM   #4
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
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.
frostschutz is offline   Reply With Quote
Old 06-09-2015, 04:48 AM   #5
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
Another approach:

http://unix.stackexchange.com/questi...oving-the-card
giorgio130 is offline   Reply With Quote
Advert
Old 06-09-2015, 06:06 AM   #6
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
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.
frostschutz is offline   Reply With Quote
Old 06-09-2015, 06:26 AM   #7
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
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
Thanks for your suggestions!

The mod itself: https://www.mobileread.com/forums/sho...d.php?t=261578

Last edited by frostschutz; 06-11-2015 at 05:08 AM.
frostschutz is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 06:26 AM.


MobileRead.com is a privately owned, operated and funded community.