kobolabs / Kobo-Reader

http://www.koboereader.com/
603 stars 126 forks source link

Possibly outdated instructions to replace kernel; Kobo Touch #12

Closed debiatan closed 12 years ago

debiatan commented 12 years ago

Hello dear developers!

I am trying to replace the running kernel of a Kobo Touch with firmware 1.9.17 using the instructions provided in Kobo-Reader/documentation/README.kernel. I have cross-compiled the zImage I intend to use as well as the associated modules and now I am stuck at the step of actually replacing the kernel image. I have put it on the user .kobo/upgrade/ directory, unmounted and unplugged the device, but I see no effect (the Kobo does not reboot, the file is not removed from that directory and forcing a reboot and looking for changes in the /proc/config.gz reveals nothing new).

Seeing that the instructions I'm following are two years old, I was thinking that they could be outdated and there could be some new procedure to perform the kernel upgrade. I should know better than to blame the tools, but I am really clueless as to how to overcome this problem.

Thanks in advance and keep the good work!

gtalusan commented 12 years ago

You probably want to use uImage, not zImage.

debiatan commented 12 years ago

Thanks for your fast reply!

I have repeated the process first with uImage, as you have suggested, and then with Image, for the sake of completeness. Again no reboots and no change to the configuration of the running kernel even after manual reboot.

There are not many ways to deviate from the instructions but, just in case, I'll just write down the paths where the files have ended in: /mnt/onboard/.kobo/upgrade/zImage /mnt/onboard/.kobo/upgrade/uImage /mnt/onboard/.kobo/upgrade/Image

I hope none of the changes I have made (pretty standard all of them: Installing Tweaks and opening telnet and ssh) are affecting the outcome. If you think it worth trying, I can revert the device back to it's factory firmware revision (1.9.16, if I recall correctly) and try again. I have a full backup of the internal microSD card, although I would prefer to avoid having to restore it later.

Cheers!

gtalusan commented 12 years ago

If you can dd to the SD card just write the kernel to the correct offset.

On Thu, Oct 25, 2012 at 12:00 PM, Miguel Lechón notifications@github.comwrote:

Thanks for your fast reply!

I have repeated the process first with uImage, as you have suggested, and then with Image, for the sake of completeness. Again no reboots and no change to the configuration of the running kernel even after manual reboot.

There are not many ways to deviate from the instructions but, just in case, I'll just write down the paths where the files have ended in: /mnt/onboard/.kobo/upgrade/zImage /mnt/onboard/.kobo/upgrade/uImage /mnt/onboard/.kobo/upgrade/Image

I hope none of the changes I have made (pretty standard all of them: Installing Tweaks and opening telnet and ssh) are affecting the outcome. If you think it worth trying, I can revert the device back to it's factory firmware revision (1.9.16, if I recall correctly) and try again. I have a full backup of the internal microSD card, although I would prefer to avoid having to restore it later.

Cheers!

— Reply to this email directly or view it on GitHubhttps://github.com/kobolabs/Kobo-Reader/issues/12#issuecomment-9783236.

debiatan commented 12 years ago

I have tried finding the beginning of the uImage in the raw dump of the SD card (as explained in http://buffalo.nas-central.org/wiki/How_to_Extract_an_uImage): $ od -A d -t x1 working_image.img | grep "27 05 19 56" 1048576 27 05 19 56 c4 82 37 bd 4e d4 b1 98 00 1d 0f 34 290981376 27 05 19 56 94 ff ba 06 4e 8d 0e 81 00 1d 0f 1c 425199104 27 05 19 56 3b d8 6d 13 4e 7b 92 25 00 1c 6b d4 669794304 27 05 19 56 11 cc d6 81 4e 98 62 02 00 1c 6b d4 671797248 27 05 19 56 c4 82 37 bd 4e d4 b1 98 00 1d 0f 34

The first one (at offset 1M) looked promising, so I set to overwrite it with the new uImage, thus: $ dd if=uImage of=/dev/sdb bs=512 seek=2048 conv=notrunc

After rebooting, I saw no effect, so I decided to take a change with the last entry, since it looked the same: $ dd if=uImage of=/dev/sdb bs=512 seek=1312104 conv=notrunc

This one also didn't do much.

I suppose I'm making some silly mistake. Do you have any further pointers?

Thanks again!

debiatan commented 12 years ago

I finally was able to replace the running kernel by remounting in read-only mode the root partition of the Kobo and then overwritting it with:

    dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048

I probably got something wrong in my kernel .config since it starts but fails to complete the boot-up process, but that's something I'll have to look into. Thanks again!